This commit is contained in:
Simon Gardling 2025-07-27 00:22:43 -07:00
parent f989ac6e1e
commit 3978c1e904
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D
2 changed files with 64 additions and 66 deletions

122
flake.nix
View File

@ -39,6 +39,7 @@
url = "github:nix-community/srvos"; url = "github:nix-community/srvos";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
deploy-rs = { deploy-rs = {
url = "github:serokell/deploy-rs"; url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -151,71 +152,70 @@
lib lib
; ;
}; };
modules = modules = [
[ # SAFETY! make sure no ports collide
# SAFETY! make sure no ports collide (
( { lib, ... }:
{ lib, ... }:
{
config = {
assertions = [
{
assertion =
let
ports = lib.attrValues service_configs.ports;
uniquePorts = lib.unique ports;
in
(lib.length ports) == (lib.length uniquePorts);
message = "Duplicate ports detected in 'ports' configuration";
}
];
};
}
)
# sets up things like the watchdog
srvos.nixosModules.server
# diff terminal support
srvos.nixosModules.mixins-terminfo
./disk-config.nix
disko.nixosModules.disko
./configuration.nix
vpn-confinement.nixosModules.default
# import the `services.qbittorrent` module
(nixpkgs-qbt + "/nixos/modules/services/torrent/qbittorrent.nix")
# get nix-minecraft working!
nix-minecraft.nixosModules.minecraft-servers
{ {
nixpkgs.overlays = [ nix-minecraft.overlay ]; config = {
assertions = [
{
assertion =
let
ports = lib.attrValues service_configs.ports;
uniquePorts = lib.unique ports;
in
(lib.length ports) == (lib.length uniquePorts);
message = "Duplicate ports detected in 'ports' configuration";
}
];
};
} }
)
lanzaboote.nixosModules.lanzaboote # sets up things like the watchdog
srvos.nixosModules.server
home-manager.nixosModules.home-manager # diff terminal support
( srvos.nixosModules.mixins-terminfo
{
pkgs, ./disk-config.nix
username, disko.nixosModules.disko
home-manager, ./configuration.nix
stateVersion,
... vpn-confinement.nixosModules.default
}:
{ # import the `services.qbittorrent` module
home-manager.users.${username} = import ./home.nix; (nixpkgs-qbt + "/nixos/modules/services/torrent/qbittorrent.nix")
}
) # get nix-minecraft working!
] nix-minecraft.nixosModules.minecraft-servers
++ (with nixos-hardware.nixosModules; [ {
common-cpu-amd-pstate nixpkgs.overlays = [ nix-minecraft.overlay ];
common-cpu-amd-zenpower }
common-pc-ssd
common-gpu-intel lanzaboote.nixosModules.lanzaboote
]);
home-manager.nixosModules.home-manager
(
{
pkgs,
username,
home-manager,
stateVersion,
...
}:
{
home-manager.users.${username} = import ./home.nix;
}
)
]
++ (with nixos-hardware.nixosModules; [
common-cpu-amd-pstate
common-cpu-amd-zenpower
common-pc-ssd
common-gpu-intel
]);
}; };
deploy.nodes.muffin = { deploy.nodes.muffin = {

View File

@ -6,11 +6,9 @@
}: }:
let let
owntracks_pkg = pkgs.owntracks-recorder.overrideAttrs (old: { owntracks_pkg = pkgs.owntracks-recorder.overrideAttrs (old: {
installPhase = installPhase = old.installPhase + ''
old.installPhase mkdir -p $out/usr/share/ot-recorder
+ '' cp -R docroot/* $out/usr/share/ot-recorder'';
mkdir -p $out/usr/share/ot-recorder
cp -R docroot/* $out/usr/share/ot-recorder'';
}); });
in in
{ {