-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathdarwin.nix
67 lines (64 loc) · 1.83 KB
/
darwin.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# This function creates a NixOS system based on our VM setup for a
# particular architecture.
name: { inputs, nixpkgs, home-manager, system, user, darwin }:
let
pkgs-unstable = import inputs.nixpkgs-unstable { inherit system; config.allowUnfree = true; };
in
darwin.lib.darwinSystem {
system = "aarch64-darwin";
# nix-darwin level modules
modules = [
./modules/nix.nix
./modules/zsh.nix
./modules/darwin.nix
# The home-manager nix-darwin module
home-manager.darwinModules.home-manager
{
users.users.cor = {
name = "cor";
home = "/Users/cor";
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.cor = {
# Home-manager level modules
imports = [
./home-modules/darwin.nix
./home-modules/direnv.nix
./home-modules/ghostty.nix
./home-modules/git.nix
./home-modules/gpg.nix
./home-modules/zsh.nix
# ./home-modules/kitty.nix
# ./home-modules/helix.nix
# ./home-modules/lazygit.nix
# ./home-modules/wezterm.nix
# ./home-modules/zellij.nix
# ./home-modules/yazi.nix
# ./home-modules/aerospace.nix
];
};
# Arguments that are exposed to every `home-module`.
extraSpecialArgs = {
inherit pkgs-unstable;
theme = "dark";
currentSystemName = name;
currentSystem = system;
isDarwin = true;
inherit inputs;
};
};
}
# Arguments that are exposed to every `module`.
{
config._module.args = {
inherit pkgs-unstable;
currentSystemName = name;
currentSystem = system;
isDarwin = true;
};
}
];
inputs = { inherit darwin nixpkgs inputs; };
}