Expose the nix-darwin configuration as a flake
Now we won't have to deal with issues due to nix-darwin being unpinned.
Cole Helbling committed
Oct 26, 2022 at 09:30 UTC
93504d2102412870bbc7e31867e63bf128e76f3a
3 files changed
+76
-6
macs/flake.lock
new
+46
@@ -0,0 +1,46 @@
1
+{
2
+ "nodes": {
3
+ "darwin": {
4
+ "inputs": {
5
+ "nixpkgs": [
6
+ "nixpkgs"
7
+ ]
8
+ },
9
+ "locked": {
10
+ "lastModified": 1666776005,
11
+ "owner": "LnL7",
12
+ "repo": "nix-darwin",
13
+ "rev": "f6648ca0698d1611d7eadfa72b122252b833f86c",
14
+ "type": "github"
15
+ },
16
+ "original": {
17
+ "owner": "LnL7",
18
+ "repo": "nix-darwin",
19
+ "type": "github"
20
+ }
21
+ },
22
+ "nixpkgs": {
23
+ "locked": {
24
+ "lastModified": 1666753130,
25
+ "owner": "nixos",
26
+ "repo": "nixpkgs",
27
+ "rev": "f540aeda6f677354f1e7144ab04352f61aaa0118",
28
+ "type": "github"
29
+ },
30
+ "original": {
31
+ "owner": "nixos",
32
+ "ref": "nixpkgs-unstable",
33
+ "repo": "nixpkgs",
34
+ "type": "github"
35
+ }
36
+ },
37
+ "root": {
38
+ "inputs": {
39
+ "darwin": "darwin",
40
+ "nixpkgs": "nixpkgs"
41
+ }
42
+ }
43
+ },
44
+ "root": "root",
45
+ "version": 7
46
+}
macs/flake.nix
new
+30
@@ -0,0 +1,30 @@
1
+{
2
+ description = "nixos-org-configurations macs";
3
+
4
+ inputs = {
5
+ nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
6
+ darwin = { url = "github:LnL7/nix-darwin"; inputs.nixpkgs.follows = "nixpkgs"; };
7
+ };
8
+
9
+ outputs =
10
+ { nixpkgs
11
+ , darwin
12
+ , ...
13
+ }@inputs:
14
+ {
15
+ darwinConfigurations =
16
+ let
17
+ mac = system: darwin.lib.darwinSystem {
18
+ inherit system;
19
+
20
+ modules = [
21
+ ./nix-darwin.nix
22
+ ];
23
+ };
24
+ in
25
+ {
26
+ arm64 = mac "aarch64-darwin";
27
+ x86_64 = mac "x86_64-darwin";
28
+ };
29
+ };
30
+}
macs/nix-darwin.nix
-6
@@ -38,12 +38,6 @@ in
38
cores = 2;
39
};
40
41
- nix.nixPath = [
42
- "nixpkgs=channel:nixpkgs-unstable"
43
- "darwin=https://github.com/LnL7/nix-darwin/archive/master.tar.gz"
44
- "darwin-config=/nix/home/config.nix"
45
- ];
46
-
41
nix.gc.automatic = true;
42
nix.gc.user = "";
43
nix.gc.interval = { Minute = 15; };