-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
171 lines (163 loc) · 4.37 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
{
description = "Kristian start with NixOS flakes";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# flake-utils is a tool that helps you work with flakes
flake-utils.url = "github:numtide/flake-utils";
# Home Manager is a tool that helps you manage your dotfiles
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
myNeovimFlake = {
url = "github:KristianAN/neovim-flake";
flake = true;
};
indent-bars = {
url = "github:jdtsmith/indent-bars";
flake = false;
};
};
outputs =
{
self,
nixpkgs,
home-manager,
...
}@inputs:
let
inherit (self) outputs;
lib = nixpkgs.lib // home-manager.lib;
systems = [
"x86_64-linux"
"aarch64-linux"
];
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
pkgsFor = lib.genAttrs systems (
system:
import nixpkgs {
inherit system;
config.allowUnfree = true;
}
);
nixosModules = import ./modules/nixos;
homeManagerModules = import ./modules/home-manager;
in
{
inherit lib;
overlays = {
default = import ./overlay { inherit inputs outputs; };
};
templates = import ./templates;
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
devShells = forEachSystem (
pkgs:
import ./shell.nix {
inherit pkgs;
buildInputs = with pkgs; [ ];
}
);
nixosConfigurations = {
sky = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hosts/sky
nixosModules
{
programs.slack.enable = false;
programs.citrix.enable = false;
programs.discord.enable = false;
programs.intellij.enable = false;
}
];
};
rubble = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hosts/rubble
nixosModules
{
programs.slack.enable = true;
programs.citrix.enable = false;
programs.discord.enable = true;
programs.intellij.enable = true;
}
];
};
everest = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hosts/everest
nixosModules
{
programs.slack.enable = true;
programs.citrix.enable = false;
programs.discord.enable = true;
programs.intellij.enable = false;
}
];
};
chase = lib.nixosSystem {
specialArgs = {
inherit inputs outputs;
};
modules = [
./hosts/chase
nixosModules
{
programs.slack.enable = true;
programs.citrix.enable = false;
programs.discord.enable = true;
programs.intellij.enable = false;
}
];
};
};
homeConfigurations = {
"kristian@sky" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
./home/sky
homeManagerModules
];
};
"kristian@rubble" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
./home/rubble
homeManagerModules
];
};
"kristian@everest" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
./home/everest
homeManagerModules
];
};
"kristian@chase" = lib.homeManagerConfiguration {
pkgs = pkgsFor.x86_64-linux;
extraSpecialArgs = {
inherit inputs outputs;
};
modules = [
./home/chase
homeManagerModules
];
};
};
};
}