about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-27 17:53:47 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-28 07:02:05 -0700
commitbb1658aeda0dc9490b0f431991198adc5db630e6 (patch)
treef892ce010ce602833cb3a8682904abbb23ab610f
parentref(flake): be specific about which systems we support (diff)
downloadworld-bb1658aeda0dc9490b0f431991198adc5db630e6.tar.gz
ref(flake): move `nixosConfigurations` at the bottom
This is more readable.

Change-Id: Ibdb6cf2f880f8fe3be80f9049bdf18b2d9120b91
Reviewed-on: https://cl.fcuny.net/c/world/+/587
Reviewed-by: Franck Cuny <franck@fcuny.net>
Tested-by: CI
-rw-r--r--flake.nix91
1 files changed, 48 insertions, 43 deletions
diff --git a/flake.nix b/flake.nix
index c6b5373..3a1c6e2 100644
--- a/flake.nix
+++ b/flake.nix
@@ -36,53 +36,58 @@
       eachMySystem = eachSystem mySystems;
       lib = import ./nix { inherit inputs; };
     in
-    {
-      nixosConfigurations = {
-        carmel = lib.mkSystem { hostname = "carmel"; };
-        aptos = lib.mkSystem { hostname = "aptos"; };
-        tahoe = lib.mkSystem { hostname = "tahoe"; };
-      };
-    } // eachMySystem (system:
-      let
-        pkgs = import inputs.nixpkgs { inherit system; };
-        home-manager = inputs.home-manager.defaultPackage."${system}";
-        ci = import ./ops/ci { inherit pkgs; };
-      in
-      {
-        packages = pkgs // {
-          inherit home-manager;
+    eachMySystem
+      (system:
+        let
+          pkgs = import inputs.nixpkgs { inherit system; };
+          home-manager = inputs.home-manager.defaultPackage."${system}";
+          ci = import ./ops/ci { inherit pkgs; };
+        in
+        rec
+        {
+          packages = pkgs // {
+            inherit home-manager;
 
-          tools = {
-            dnsupdate = import ./tools/dnsupdate { inherit pkgs; };
-            govanity = import ./tools/govanity { inherit pkgs; };
-            ipconverter = import ./tools/ipconverter { inherit pkgs; };
-            git-blame-stats = import ./tools/git-blame-stats { inherit pkgs; };
-          };
+            tools = {
+              dnsupdate = import ./tools/dnsupdate { inherit pkgs; };
+              govanity = import ./tools/govanity { inherit pkgs; };
+              ipconverter = import ./tools/ipconverter { inherit pkgs; };
+              git-blame-stats = import ./tools/git-blame-stats { inherit pkgs; };
+            };
 
-          users.fcuny = {
-            blog = import ./users/fcuny/blog { inherit pkgs; };
-            notes = import ./users/fcuny/notes { inherit pkgs; };
-            resume = import ./users/fcuny/resume { inherit pkgs; };
+            users.fcuny = {
+              blog = import ./users/fcuny/blog { inherit pkgs; };
+              notes = import ./users/fcuny/notes { inherit pkgs; };
+              resume = import ./users/fcuny/resume { inherit pkgs; };
+            };
           };
-        };
 
-        # `nix run .#ci.format` formats in current directory!
-        apps.ci.format = ci.fmt.mkFmtScript self;
+          # `nix run .#ci.format` formats in current directory!
+          apps.ci.format = ci.fmt.mkFmtScript self;
 
-        # `nix run .#ci.shellcheck` formats in current directory!
-        apps.ci.shellcheck = ci.shell.mkShellCheckScript self;
+          # `nix run .#ci.shellcheck` formats in current directory!
+          apps.ci.shellcheck = ci.shell.mkShellCheckScript self;
 
-        devShell = pkgs.mkShell {
-          buildInputs = with pkgs; [
-            nixUnstable
-            nixfmt
-            nixpkgs-fmt
-            rnix-lsp
-            home-manager
-            git
-            go
-            gopls
-          ];
-        };
-      });
+          devShells = {
+            default = pkgs.mkShell {
+              name = "NixOS-config";
+              buildInputs = with pkgs; [
+                nixUnstable
+                nixfmt
+                nixpkgs-fmt
+                rnix-lsp
+                home-manager
+                git
+                go
+                gopls
+              ];
+            };
+          };
+        }) // {
+      nixosConfigurations = {
+        carmel = lib.mkSystem { hostname = "carmel"; };
+        aptos = lib.mkSystem { hostname = "aptos"; };
+        tahoe = lib.mkSystem { hostname = "tahoe"; };
+      };
+    };
 }