+49
nix/flake.lock
+49
nix/flake.lock
···
1
+
{
2
+
"nodes": {
3
+
"nix-darwin": {
4
+
"inputs": {
5
+
"nixpkgs": [
6
+
"nixpkgs"
7
+
]
8
+
},
9
+
"locked": {
10
+
"lastModified": 1742013980,
11
+
"narHash": "sha256-34YbfwABU5nb0F5eaaJE3ujldaNDhmyxw7CWqhXJV08=",
12
+
"owner": "LnL7",
13
+
"repo": "nix-darwin",
14
+
"rev": "9175b4bb5f127fb7b5784b14f7e01abff24c378f",
15
+
"type": "github"
16
+
},
17
+
"original": {
18
+
"owner": "LnL7",
19
+
"ref": "master",
20
+
"repo": "nix-darwin",
21
+
"type": "github"
22
+
}
23
+
},
24
+
"nixpkgs": {
25
+
"locked": {
26
+
"lastModified": 1741865919,
27
+
"narHash": "sha256-4thdbnP6dlbdq+qZWTsm4ffAwoS8Tiq1YResB+RP6WE=",
28
+
"owner": "NixOS",
29
+
"repo": "nixpkgs",
30
+
"rev": "573c650e8a14b2faa0041645ab18aed7e60f0c9a",
31
+
"type": "github"
32
+
},
33
+
"original": {
34
+
"owner": "NixOS",
35
+
"ref": "nixpkgs-unstable",
36
+
"repo": "nixpkgs",
37
+
"type": "github"
38
+
}
39
+
},
40
+
"root": {
41
+
"inputs": {
42
+
"nix-darwin": "nix-darwin",
43
+
"nixpkgs": "nixpkgs"
44
+
}
45
+
}
46
+
},
47
+
"root": "root",
48
+
"version": 7
49
+
}
+53
nix/flake.nix
+53
nix/flake.nix
···
1
+
{
2
+
description = "Example nix-darwin system flake";
3
+
4
+
inputs = {
5
+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
6
+
nix-darwin.url = "github:LnL7/nix-darwin/master";
7
+
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
8
+
# home-manager.url = "github:nix-community/home-manager/release-24.05";
9
+
# home-manager.inputs.nixpkgs.follows = "nixpkgs";
10
+
};
11
+
12
+
outputs = inputs@{ self, nix-darwin, nixpkgs }:
13
+
let
14
+
configuration = { pkgs, ... }: {
15
+
# List packages installed in system profile. To search by name, run:
16
+
# $ nix-env -qaP | grep wget
17
+
environment.systemPackages =
18
+
with pkgs; [
19
+
vim
20
+
typescript-language-server
21
+
(pkgs.lua5_1.withPackages (ps: with ps; [luarocks]))
22
+
];
23
+
24
+
# Necessary for using flakes on this system.
25
+
nix.settings.experimental-features = "nix-command flakes";
26
+
nix.settings.extra-platforms = "x86_64-darwin aarch64-darwin";
27
+
28
+
# Enable alternative shell support in nix-darwin.
29
+
# programs.fish.enable = true;
30
+
31
+
# Set Git commit hash for darwin-version.
32
+
system.configurationRevision = self.rev or self.dirtyRev or null;
33
+
34
+
# Used for backwards compatibility, please read the changelog before changing.
35
+
# $ darwin-rebuild changelog
36
+
system.stateVersion = 6;
37
+
38
+
# The platform the configuration will be used on.
39
+
nixpkgs.hostPlatform = "aarch64-darwin";
40
+
};
41
+
in
42
+
{
43
+
# Build darwin flake using:
44
+
# $ darwin-rebuild build --flake .#simple
45
+
darwinConfigurations."macbook" = nix-darwin.lib.darwinSystem {
46
+
# system = "aarch64-darwin";
47
+
modules = [
48
+
# home-manager.darwinModules.home-manager
49
+
configuration
50
+
];
51
+
};
52
+
};
53
+
}
+1
nix/nix.conf
+1
nix/nix.conf
···
1
+
experimental-features = nix-command flakes