-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
127 lines (114 loc) · 4.05 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
118
119
120
121
122
123
124
125
126
127
{
description = "Flake to rule em all.";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
nix-colors.url = "github:misterio77/nix-colors";
nixos-apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
emacs-overlay = {
url = "github:nix-community/emacs-overlay/master";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, nixos-hardware, nixos-apple-silicon, home-manager
, darwin, emacs-overlay, nix-colors }:
let lib = nixpkgs.lib;
in {
nixosConfigurations = {
earth = lib.nixosSystem rec { # desktop
system = "x86_64-linux";
specialArgs = { inherit home-manager emacs-overlay; };
modules = [
./hosts/${system}/earth
./modules/nixos
nixos-hardware.nixosModules.common-pc
nixos-hardware.nixosModules.common-pc-ssd
nixos-hardware.nixosModules.common-cpu-amd
nixos-hardware.nixosModules.common-gpu-nvidia-nonprime
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.venikx = lib.mkMerge [
(import ./modules/home-manager)
(import ./hosts/${system}/earth/venikx.nix)
nix-colors.homeManagerModules.default
];
home-manager.extraSpecialArgs = { inherit nix-colors; };
}
];
};
fire = lib.nixosSystem rec { # laptop
system = "x86_64-linux";
specialArgs = { inherit home-manager emacs-overlay; };
modules = [
./hosts/${system}/fire
./modules/nixos
nixos-hardware.nixosModules.asus-zephyrus-ga401
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.venikx = lib.mkMerge [
(import ./modules/home-manager)
(import ./hosts/${system}/fire/venikx.nix)
nix-colors.homeManagerModules.default
];
home-manager.extraSpecialArgs = { inherit nix-colors; };
}
];
};
air = lib.nixosSystem rec { # asahi macbook
system = "aarch64-linux";
specialArgs = {
inherit home-manager emacs-overlay nixos-apple-silicon;
};
modules = [
./hosts/${system}/air
./modules/nixos
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.venikx = lib.mkMerge [
(import ./modules/home-manager)
(import ./hosts/${system}/air/venikx.nix)
nix-colors.homeManagerModules.default
];
home-manager.extraSpecialArgs = { inherit nix-colors; };
}
];
};
};
darwinConfigurations = {
lucid = darwin.lib.darwinSystem rec {
system = "aarch64-darwin";
specialArgs = { inherit home-manager emacs-overlay; };
modules = [
./hosts/${system}/lucid
./modules/darwin
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.venikx = lib.mkMerge [
(import ./modules/home-manager)
(import ./hosts/${system}/lucid/venikx.nix)
];
}
];
};
};
};
}