summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--flake.lock37
-rw-r--r--flake.nix9
-rw-r--r--system/settings/darwin.nix1
3 files changed, 46 insertions, 1 deletions
diff --git a/flake.lock b/flake.lock
index b85f5372..8e21c1fb 100644
--- a/flake.lock
+++ b/flake.lock
@@ -21,6 +21,27 @@
         "type": "github"
       }
     },
+    "home-manager": {
+      "inputs": {
+        "nixpkgs": [
+          "nixpkgs-unstable"
+        ],
+        "utils": "utils"
+      },
+      "locked": {
+        "lastModified": 1665119273,
+        "narHash": "sha256-neL/ZRrwk47Ke1nfjk8ltlIm+NRZyA3MBcNbqEGSBeE=",
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "rev": "9fcae11ff29ca5f959b05c206f3724486c28ff07",
+        "type": "github"
+      },
+      "original": {
+        "owner": "nix-community",
+        "repo": "home-manager",
+        "type": "github"
+      }
+    },
     "nixos": {
       "locked": {
         "lastModified": 1664883812,
@@ -86,11 +107,27 @@
     "root": {
       "inputs": {
         "darwin": "darwin",
+        "home-manager": "home-manager",
         "nixos": "nixos",
         "nixos-hardware": "nixos-hardware",
         "nixos-unstable": "nixos-unstable",
         "nixpkgs-unstable": "nixpkgs-unstable"
       }
+    },
+    "utils": {
+      "locked": {
+        "lastModified": 1659877975,
+        "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
+        "type": "github"
+      },
+      "original": {
+        "owner": "numtide",
+        "repo": "flake-utils",
+        "type": "github"
+      }
     }
   },
   "root": "root",
diff --git a/flake.nix b/flake.nix
index 92a31715..f5314a26 100644
--- a/flake.nix
+++ b/flake.nix
@@ -6,9 +6,11 @@
     nixos-hardware.url = github:NixOS/nixos-hardware;
     darwin.url = github:lnl7/nix-darwin/master;
     darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
+    home-manager.url = github:nix-community/home-manager;
+    home-manager.inputs.nixpkgs.follows = "nixpkgs-unstable";
   };
 
-  outputs = { self, darwin, nixos-unstable, ... }@attrs: {
+  outputs = { self, darwin, home-manager, nixos-unstable, ... }@attrs: {
     nixosConfigurations.prefect = nixos-unstable.lib.nixosSystem {
       system = "x86_64-linux";
       specialArgs = attrs;
@@ -19,5 +21,10 @@
       specialArgs = attrs;
       modules = [ ./system/mba.nix ];
     };
+    homeConfigurations.mba = home-manager.lib.homeManagerConfiguration {
+      system = "x86_64-darwin";
+      specialArgs = attrs;
+      modules = [ ./user/mba.nix ];
+    };
   };
 }
diff --git a/system/settings/darwin.nix b/system/settings/darwin.nix
index 65d6f3ee..66d2a353 100644
--- a/system/settings/darwin.nix
+++ b/system/settings/darwin.nix
@@ -14,6 +14,7 @@
       options = "--max-freed $((25 * 1024**3 - 1024 * $(df -P -k /nix/store | tail -n 1 | awk '{ print $4 }')))";
     };
     settings.extra-platforms = "x86_64-darwin aarch64-darwin";
+    settings.experimental-features = "nix-command flakes";
   };
 
   nixpkgs.system = "x86_64-darwin";