From 3978c1e904453277a485650f240985549408261d Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sun, 27 Jul 2025 00:22:43 -0700 Subject: [PATCH] format --- flake.nix | 122 ++++++++++++++++++++--------------------- services/owntracks.nix | 8 +-- 2 files changed, 64 insertions(+), 66 deletions(-) diff --git a/flake.nix b/flake.nix index 82c95ea..b56fb9e 100644 --- a/flake.nix +++ b/flake.nix @@ -39,6 +39,7 @@ url = "github:nix-community/srvos"; inputs.nixpkgs.follows = "nixpkgs"; }; + deploy-rs = { url = "github:serokell/deploy-rs"; inputs.nixpkgs.follows = "nixpkgs"; @@ -151,71 +152,70 @@ lib ; }; - modules = - [ - # SAFETY! make sure no ports collide - ( - { 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 + modules = [ + # SAFETY! make sure no ports collide + ( + { lib, ... }: { - 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 - ( - { - 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 - ]); + # 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 ]; + } + + 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 = { diff --git a/services/owntracks.nix b/services/owntracks.nix index 3def720..0b59d51 100644 --- a/services/owntracks.nix +++ b/services/owntracks.nix @@ -6,11 +6,9 @@ }: let owntracks_pkg = pkgs.owntracks-recorder.overrideAttrs (old: { - installPhase = - old.installPhase - + '' - mkdir -p $out/usr/share/ot-recorder - cp -R docroot/* $out/usr/share/ot-recorder''; + installPhase = old.installPhase + '' + mkdir -p $out/usr/share/ot-recorder + cp -R docroot/* $out/usr/share/ot-recorder''; }); in {