about summary refs log tree commit diff
path: root/flake/hosts.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2023-12-04 08:10:43 -0800
committerFranck Cuny <franck@fcuny.net>2023-12-04 08:10:43 -0800
commit1285614380a1b5c6261209dd5ca65925438ec441 (patch)
treed7e55ba7736f4f4db0e0ad166ed556aab5c59e37 /flake/hosts.nix
parentadd nixd as a LSP for nix. (diff)
downloadworld-1285614380a1b5c6261209dd5ca65925438ec441.tar.gz
additional cleanup for flakes
Move the host configuration to `flake/hosts.nix` to follow what we did
with `devshell`.
Diffstat (limited to '')
-rw-r--r--flake/hosts.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/flake/hosts.nix b/flake/hosts.nix
new file mode 100644
index 0000000..b0bc74c
--- /dev/null
+++ b/flake/hosts.nix
@@ -0,0 +1,21 @@
+{ inputs, ... }:
+let
+  inherit (inputs) self nixpkgs darwin home-manager;
+  inherit (nixpkgs.lib) mkMerge;
+
+  mkDarwinConfig = system: path:
+    darwin.lib.darwinSystem {
+      inherit system;
+      modules = [ home-manager.darwinModule path ];
+      specialArgs = { inherit inputs; };
+    };
+in
+{
+  flake = mkMerge [
+    {
+      darwinConfigurations = {
+        mba-fcuny = mkDarwinConfig "aarch64-darwin" ../hosts/mba;
+      };
+    }
+  ];
+}