-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
117 lines (108 loc) · 3.11 KB
/
flake.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
unstable.url = "github:NixOS/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/release-24.05";
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";
flake-utils-plus.url = "github:gytis-ivaskevicius/flake-utils-plus/v1.4.0";
nix-gaming.url = "github:fufexan/nix-gaming";
wired.url = "github:Toqozz/wired-notify";
vscode-server.url = "github:nix-community/nixos-vscode-server";
};
outputs =
inputs@{
self,
darwin,
home-manager,
flake-utils-plus,
nix-gaming,
wired,
vscode-server,
...
}:
let
linux = "x86_64-linux";
apple = "aarch64-darwin";
config = {
allowUnfree = true;
permittedInsecurePackages = [
# "electron-13.6.9"
# "xen-4.10.4"
"electron-25.9.0"
];
};
overlays = [
(import ./overlays.nix)
wired.overlays.default
];
in
flake-utils-plus.lib.mkFlake {
inherit self inputs;
nix = {
generateRegistryFromInputs = true;
generateNixPathFromInputs = true;
linkInputs = true;
};
supportedSystems = [
linux
apple
];
channelsConfig = config;
sharedOverlays = overlays;
hostDefaults.extraArgs = {
unstable = import inputs.unstable {
system = linux;
inherit config;
inherit overlays;
};
};
hosts.aanar-nixos = {
system = linux;
extraArgs = {
inherit inputs;
};
modules = [
./configuration.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aanar = import ./aanar/linux.nix;
home-manager.users."0commitment" = import ./0commitment/linux.nix;
home-manager.extraSpecialArgs = {
wired = wired.homeManagerModules.default;
nix-gaming = nix-gaming.packages.${linux};
vscode-server = vscode-server.homeModules.default;
unstable = import inputs.unstable {
system = linux;
inherit config;
inherit overlays;
};
};
}
];
};
hosts.userlike-macbook = {
output = "darwinConfigurations";
builder = darwin.lib.darwinSystem;
system = apple;
modules = [
./macos-configuration.nix
home-manager.darwinModules.home-manager
{
users.users.aanar.home = "/Users/aanar";
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.aanar = import ./aanar/macos.nix;
home-manager.extraSpecialArgs = {
unstable = import inputs.unstable {
system = apple;
inherit config;
};
};
}
];
};
};
}