summary refs log tree commit diff stats
path: root/flake.nix
diff options
context:
space:
mode:
authorsils <sils@sils.li>2023-11-18 12:30:25 +0100
committersils <sils@sils.li>2023-11-18 12:30:25 +0100
commit2fe677e959a65024fef92c8b0994826818cc3aed (patch)
tree79f5a43be9e614e499123a17c8f99723c91ff924 /flake.nix
parentfix(flake): add i686-linux system (diff)
downloadnix-config-2fe677e959a65024fef92c8b0994826818cc3aed.tar.gz
nix-config-2fe677e959a65024fef92c8b0994826818cc3aed.zip
feat(flake): declare devShell and formatter for i686-linux
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix51
1 files changed, 27 insertions, 24 deletions
diff --git a/flake.nix b/flake.nix
index ce2ce0a..1ad7ecb 100644
--- a/flake.nix
+++ b/flake.nix
@@ -125,8 +125,10 @@
     impermanence,
     wl-togglescreens,
     sops-nix,
+    flake-utils,
     ...
   } @ attrs: let
+    utils = flake-utils.lib;
     system = "x86_64-linux";
     pkgs = import nixpkgs {
       inherit system;
@@ -147,36 +149,37 @@
         };
       }
     ];
-  in {
-    nixosConfigurations = {
-      thinklappi = nixpkgs.lib.nixosSystem {
-        inherit system;
-        specialArgs = attrs;
-        modules =
-          [
-            ./hosts/thinklappi
-          ]
-          ++ defaultModules;
-      };
-      thinklappi-bootstrap = nixpkgs.lib.nixosSystem {
-        inherit system;
-        specialArgs = attrs;
-        modules = [
-          ./hosts/thinklappi-bootstrap
-          lanzaboote.nixosModules.lanzaboote
-        ];
+  in
+    {
+      nixosConfigurations = {
+        thinklappi = nixpkgs.lib.nixosSystem {
+          inherit system;
+          specialArgs = attrs;
+          modules =
+            [
+              ./hosts/thinklappi
+            ]
+            ++ defaultModules;
+        };
+        thinklappi-bootstrap = nixpkgs.lib.nixosSystem {
+          inherit system;
+          specialArgs = attrs;
+          modules = [
+            ./hosts/thinklappi-bootstrap
+            lanzaboote.nixosModules.lanzaboote
+          ];
+        };
       };
-    };
-    devShells."${system}" = {
-      default = pkgs.mkShell {
+    }
+    // utils.eachDefaultSystem (system: {
+      devShell = pkgs.mkShell {
         packages = with pkgs; [
           nil
           statix
           alejandra
         ];
       };
-    };
 
-    formatter."${system}" = pkgs.alejandra;
-  };
+      formatter = pkgs.alejandra;
+    });
 }