summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.nix125
-rw-r--r--flake/nixosConfigurations/default.nix1
2 files changed, 66 insertions, 60 deletions
diff --git a/flake.nix b/flake.nix
index f1012f1..62c2b67 100644
--- a/flake.nix
+++ b/flake.nix
@@ -179,78 +179,85 @@
     wl-togglescreens,
     stylix,
     sops-nix,
-    flake-utils,
+    flake-parts,
     agenix,
     ragenix,
     git-hooks,
     arkenfox-user-js,
+    systems,
     ...
-  } @ attrs:
-    flake-utils.lib.eachDefaultSystem (system: let
-      pkgs = import nixpkgs {
-        inherit system;
-        overlays = [nixvim.overlays.default];
-      };
-      nixVimConfig =
-        (import ./hm/nixvim/config.nix pkgs)
-        // {
-          colorschemes.gruvbox.enable = true;
-          plugins.airline.settings.theme = "minimalist";
+  } @ inputs:
+    flake-parts.lib.mkFlake {inherit inputs;} {
+      systems = import systems;
+      perSystem = {
+        config,
+        system,
+        ...
+      }: let
+        pkgs = import nixpkgs {
+          inherit system;
+          overlays = [nixvim.overlays.default];
+        };
+        nixVimConfig =
+          (import ./hm/nixvim/config.nix pkgs)
+          // {
+            colorschemes.gruvbox.enable = true;
+            plugins.airline.settings.theme = "minimalist";
+          };
+        nvim = nixvim.legacyPackages."${system}".makeNixvim nixVimConfig;
+        hooks = self.checks.${system}.pre-commit;
+      in {
+        devShells.default = pkgs.mkShell {
+          inherit (hooks) shellHook;
+          buildInputs = hooks.enabledPackages;
+          packages = with pkgs; [
+            nil
+            statix
+            alejandra
+            sops
+            ragenix.packages."${system}".default
+          ];
         };
-      nvim = nixvim.legacyPackages."${system}".makeNixvim nixVimConfig;
-      hooks = self.checks.${system}.pre-commit;
-    in {
-      devShells.default = pkgs.mkShell {
-        inherit (hooks) shellHook;
-        buildInputs = hooks.enabledPackages;
-        packages = with pkgs; [
-          nil
-          statix
-          alejandra
-          sops
-          ragenix.packages."${system}".default
-        ];
-      };
 
-      formatter = pkgs.alejandra;
+        formatter = pkgs.alejandra;
 
-      packages = {
-        inherit nvim;
-        default = nvim;
-      };
-      checks = {
-        nvim = nixvim.lib.${system}.check.mkTestDerivationFromNvim {
+        packages = {
           inherit nvim;
-          name = "My NixVim Configuration";
+          default = nvim;
         };
-        pre-commit = git-hooks.lib.${system}.run {
-          src = ./.;
-          hooks = {
-            alejandra.enable = true;
+        checks = {
+          nvim = nixvim.lib.${system}.check.mkTestDerivationFromNvim {
+            inherit nvim;
+            name = "My NixVim Configuration";
+          };
+          pre-commit = git-hooks.lib.${system}.run {
+            src = ./.;
+            hooks = {
+              alejandra.enable = true;
+            };
           };
         };
       };
-    })
-    // {
-      nixosConfigurations = import ./flake/nixosConfigurations {
-        inherit
-          self
-          base16-tokyo-night-scheme
-          nixpkgs
-          nixpkgs-pinned
-          home-manager
-          prismlauncher
-          lanzaboote
-          nixvim
-          impermanence
-          wl-togglescreens
-          stylix
-          sops-nix
-          flake-utils
-          agenix
-          ragenix
-          arkenfox-user-js
-          ;
+      flake = {
+        nixosConfigurations = import ./flake/nixosConfigurations {
+          inherit
+            self
+            base16-tokyo-night-scheme
+            nixpkgs
+            nixpkgs-pinned
+            home-manager
+            prismlauncher
+            lanzaboote
+            nixvim
+            impermanence
+            wl-togglescreens
+            stylix
+            sops-nix
+            agenix
+            ragenix
+            arkenfox-user-js
+            ;
+        };
       };
     };
 }
diff --git a/flake/nixosConfigurations/default.nix b/flake/nixosConfigurations/default.nix
index b303335..3d97e63 100644
--- a/flake/nixosConfigurations/default.nix
+++ b/flake/nixosConfigurations/default.nix
@@ -11,7 +11,6 @@
   wl-togglescreens,
   stylix,
   sops-nix,
-  flake-utils,
   agenix,
   ragenix,
   arkenfox-user-js,