From c635ff186a5f2067af3989bf08c5bdeecb4511b7 Mon Sep 17 00:00:00 2001 From: iFargle Date: Tue, 12 Dec 2023 13:27:40 +0900 Subject: [PATCH] reorganize --- flake.nix | 21 ++++++--------------- lib/default.nix | 9 +++++++++ 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/flake.nix b/flake.nix index c2a0bf43..90ea5440 100644 --- a/flake.nix +++ b/flake.nix @@ -58,12 +58,6 @@ "albert@nixos-rpi4-02" = libx.mkHome { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; }; "albert@nixos-rpi4-03" = libx.mkHome { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; }; }; - imageConfigurations = { - nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; - nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; platform = "aarch64-linux"; }; - nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; }; - nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; }; - }; deploy.nodes = { osaka-linode-01 = libx.deploy { hostname = "osaka-linode-01"; }; nixos-vm-01 = libx.deploy { hostname = "nixos-vm-01"; }; @@ -74,14 +68,11 @@ nixos-rpi4-02 = libx.deploy { hostname = "nixos-rpi4-02"; platform = "aarch64-linux"; }; nixos-rpi4-03 = libx.deploy { hostname = "nixos-rpi4-03"; platform = "aarch64-linux"; }; }; - - # Checks for deploy-rs - Makes deploy-rs fail when system evaluations fail - checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; - - # Devshell for bootstrapping; acessible via 'nix develop' - devShells = libx.forAllSystems (system: - let pkgs = nixpkgs.legacyPackages.${system}; - in import ./shell.nix { inherit pkgs sops-nix deploy-rs system; } - ); + imageConfigurations = { + nixos-linode-img = libx.mkMinImage { hostname = "nixos-linode-img"; format = "linode"; }; + nixos-rpi4-img = libx.mkImage { hostname = "nixos-rpi4-img"; format = "sd-aarch64"; platform = "aarch64-linux"; }; + nixos-iso-console = libx.mkImage { hostname = "nixos-iso-console"; format = "iso"; }; + nixos-iso-desktop = libx.mkImage { hostname = "nixos-iso-desktop"; format = "iso"; desktop = "gnome"; }; + }; }; } \ No newline at end of file diff --git a/lib/default.nix b/lib/default.nix index 3a692026..99e25dd5 100644 --- a/lib/default.nix +++ b/lib/default.nix @@ -109,4 +109,13 @@ "aarch64-linux" "x86_64-linux" ]; + + # Checks for deploy-rs - Makes deploy-rs fail when system evaluations fail + checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib; + + # Devshell for bootstrapping; acessible via 'nix develop' + devShells = libx.forAllSystems (system: + let pkgs = nixpkgs.legacyPackages.${system}; + in import ./shell.nix { inherit pkgs sops-nix deploy-rs system; } + ); } \ No newline at end of file