From fd7724dbd0c21449d5286e272a5d5020e1fc4372 Mon Sep 17 00:00:00 2001 From: Mathias Magnusson Date: Mon, 12 Jan 2026 17:30:18 +0100 Subject: move some stuff out of flake.nix --- flake.nix | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix index 98aac21..5ccb5d4 100644 --- a/flake.nix +++ b/flake.nix @@ -17,48 +17,34 @@ self, nixpkgs, unstable, - disko, - impermanence, - agenix, ... }: let - pkgsFor = system: import nixpkgs { - inherit system; - config.allowUnfree = true; - overlays = [ - agenix.overlays.default - ]; - }; forAllSystems = f: nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] - (system: f (pkgsFor system)); + (system: f { inherit system; pkgs = import nixpkgs { inherit system; }; }); in { nixosConfigurations.oden = nixpkgs.lib.nixosSystem { - pkgs = pkgsFor "x86_64-linux"; modules = [ ./configuration.nix - disko.nixosModules.disko - impermanence.nixosModules.impermanence - agenix.nixosModules.default ]; specialArgs = { inherit inputs; }; }; - packages = forAllSystems (pkgs: { + packages = forAllSystems ({ system, pkgs }: { deploy = pkgs.writeShellScriptBin "deploy" '' [ -n "$1" ] && action="$1" || action="switch" nixos-rebuild --flake .#oden "$action" --target-host oden --build-host oden --use-remote-sudo ''; }); - devShells = forAllSystems (pkgs: { + devShells = forAllSystems ({ system, pkgs }: { default = pkgs.mkShellNoCC { packages = [ - pkgs.agenix + inputs.agenix.packages.${system}.agenix self.packages.${pkgs.system}.deploy ]; }; -- cgit v1.2.3