-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
134 lines (124 loc) · 3.73 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
{
description = "My personal host configurations";
inputs = {
nixpkgs.url =
"github:nixos/nixpkgs/nixos-unstable"; # Nix Packages collection
unstable.url = "github:nixos/nixpkgs";
nur.url =
"github:nix-community/NUR"; # Nix User Repository: User contributed nix packages
utils.url =
"github:gytis-ivaskevicius/flake-utils-plus"; # Use Nix flakes without any fluff
home-manager = {
# Manage a user environment using Nix
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-hardware.url =
"github:NixOS/nixos-hardware"; # A collection of NixOS modules covering hardware quirks.
emacs-overlay.url =
"github:nix-community/emacs-overlay"; # Bleeding edge emacs overlay
agenix = {
# age-encrypted secrets for NixOS
url = "github:ryantm/agenix";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs.url =
"github:serokell/deploy-rs"; # A simple multi-profile Nix-flake deploy tool.
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
devshell.url =
"github:numtide/devshell?ref=fff3dc6e4538f6df85ee3027f13cc7730b23f61d"; # Per project developer environments
};
outputs =
inputs@{ self
, nur
, utils
, home-manager
, nixos-hardware
, emacs-overlay
, agenix
, deploy-rs
, disko
, ...
}:
let userModules = utils.lib.exportModules [ ./modules ];
in utils.lib.mkFlake {
inherit self inputs;
supportedSystems = [ "x86_64-linux" ];
channelsConfig.allowUnfree = true;
channels.nixpkgs.overlaysBuilder = channels:
[
# Use packages from the unstable channel
(final: prev: {
inherit (channels.unstable)
cachix discord starship;
disko = disko.packages.${channels.unstable.system};
})
];
sharedOverlays = [
self.overlay
nur.overlay
emacs-overlay.overlay
deploy-rs.overlay
agenix.overlays.default
inputs.devshell.overlay
];
overlay = import ./overlays;
hostDefaults = {
modules = [
./modules
./secrets/keys
home-manager.nixosModules.home-manager
agenix.nixosModules.age
disko.nixosModules.disko
{
home-manager = {
extraSpecialArgs = { inherit inputs self; };
useUserPackages = true;
useGlobalPkgs = true;
};
}
];
};
hosts = {
Kronos = { modules = [ ./hosts/Kronos ]; };
Eos = { modules = [ ./hosts/Eos ]; };
Nyx = { modules = [ ./hosts/Nyx ]; };
Apollo = { modules = [ ./hosts/Apollo ]; };
Hermes = { modules = [ ./hosts/Hermes ]; };
Theia = {
modules = [
./hosts/Theia
nixos-hardware.nixosModules.lenovo-thinkpad-t14
];
};
};
deploy.nodes = {
Eos = {
sshUser = "root";
hostname = "89.58.11.175";
profiles = {
system = {
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.Eos;
user = "root";
};
};
};
};
outputsBuilder = channels: {
packages = { };
devShells = {
default = import ./devshell.nix { pkgs = channels.nixpkgs; };
xmonad =
let pkgs = channels.nixpkgs;
in pkgs.haskellPackages.shellFor { packages = p: [ p.xmonad ]; };
};
};
};
}