-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
95 lines (87 loc) · 2.48 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
{
description = "Ben's Nixos configuration, here be dragons";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
devshell.url = "github:numtide/devshell";
devshell.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-flatpak.url = "github:gmodena/nix-flatpak";
remarkable-utility.url = "github:404Wolf/remarkable-connection-utility";
# doom emacs install repo
doom-emacs-src = {
url = "github:doomemacs/doomemacs";
flake = false;
};
agenix.url = "github:ryantm/agenix";
};
outputs = inputs @ {
self,
nixpkgs,
...
}: let
pc-modules =
[
./modules
./modules/pc-services.nix
./modules/pc-programs.nix
{
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "hmbak";
users.bezmuth.imports = [
./home
];
extraSpecialArgs = {
inherit inputs self;
};
};
}
]
++ (with inputs; [
home-manager.nixosModules.default
nix-flatpak.nixosModules.nix-flatpak
agenix.nixosModules.default
]);
server-modules =
[
./modules
./modules/services.nix
./modules/programs.nix
]
++ (with inputs; [
inputs.agenix.nixosModules.default
]);
in
inputs.utils.lib.mkFlake {
inherit self inputs;
supportedSystems = [
"x86_64-linux"
];
channelsConfig.allowUnfree = true;
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
sharedOverlays = [
inputs.devshell.overlays.default
(import ./pkgs)
];
hosts = {
Mishim.modules = [./hosts/mishim] ++ pc-modules;
Roshar.modules = [./hosts/roshar] ++ pc-modules;
Salas.modules = [./hosts/salas] ++ server-modules;
};
hostDefaults.modules = [];
outputsBuilder = channels:
with channels.nixpkgs; {
defaultPackage = channels.nixpkgs.devshell.mkShell {
imports = [(channels.nixpkgs.devshell.importTOML ./devshell.toml)];
};
devShell = channels.nixpkgs.devshell.mkShell {
imports = [(channels.nixpkgs.devshell.importTOML ./devshell.toml)];
};
};
};
}