diff options
| -rw-r--r-- | hosts/profiles.nix | 14 | ||||
| -rw-r--r-- | parts/ci.nix | 18 | ||||
| -rw-r--r-- | parts/dev.nix | 11 |
3 files changed, 19 insertions, 24 deletions
diff --git a/hosts/profiles.nix b/hosts/profiles.nix index 349028a..4e6d019 100644 --- a/hosts/profiles.nix +++ b/hosts/profiles.nix @@ -1,14 +1,12 @@ { inputs, self, -}: let - inherit (inputs) getchoo home-manager nixpkgs nixpkgs-stable nur ragenix; -in { +}: { personal = { system = "x86_64-linux"; - builder = nixpkgs.lib.nixosSystem; + builder = inputs.nixpkgs.lib.nixosSystem; - modules = [ + modules = with inputs; [ ragenix.nixosModules.default home-manager.nixosModules.home-manager nur.nixosModules.nur @@ -28,7 +26,7 @@ in { }; nixpkgs = { - overlays = [nur.overlay getchoo.overlays.default self.overlays.default]; + overlays = with inputs; [nur.overlay getchoo.overlays.default self.overlays.default]; config.allowUnfree = true; }; @@ -64,9 +62,9 @@ in { }; server = { - builder = nixpkgs-stable.lib.nixosSystem; + builder = inputs.nixpkgs-stable.lib.nixosSystem; - modules = [ + modules = with inputs; [ ragenix.nixosModules.default ../modules/nixos/base ../modules/nixos/server diff --git a/parts/ci.nix b/parts/ci.nix index c958ed3..72fc08c 100644 --- a/parts/ci.nix +++ b/parts/ci.nix @@ -1,5 +1,5 @@ { - inputs, + lib, myLib, self, ... @@ -9,15 +9,15 @@ "aarch64-linux" ]; - ci = sys: myLib.ci ["${sys}"]; - hm = sys: (ci sys).mkCompatibleHM self.homeConfigurations; - hosts = sys: (ci sys).mkCompatibleCfg self.nixosConfigurations; + mkChecks = sys: let + ci = myLib.ci [sys]; + in + lib.recursiveUpdate + (ci.mkCompatibleHM self.homeConfigurations).${sys} + (ci.mkCompatibleCfg self.nixosConfigurations); in { flake = { - checks = inputs.nixpkgs.lib.genAttrs ciSystems hosts; - }; - - perSystem = {system, ...}: { - checks = (hm system).${system}; + checks = + lib.genAttrs ciSystems mkChecks; }; } diff --git a/parts/dev.nix b/parts/dev.nix index 5453286..c190008 100644 --- a/parts/dev.nix +++ b/parts/dev.nix @@ -22,18 +22,15 @@ }; }; - devShells = let - inherit (pkgs) mkShell; - in { - default = mkShell { + devShells = { + default = pkgs.mkShell { inherit (self.checks.${system}.pre-commit-check) shellHook; - packages = with pkgs; - with inputs; [ + packages = with pkgs; [ actionlint alejandra deadnix just - ragenix.packages.${system}.ragenix + inputs.ragenix.packages.${system}.ragenix statix stylua ]; |
