-
Notifications
You must be signed in to change notification settings - Fork 2
/
flake.nix
175 lines (148 loc) · 4.58 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
172
173
174
175
{
description = "You could not live with your own failure. Where did that bring you? Back to me. - Thanos";
inputs = {
# Core
nix-flatpak.url = "github:gmodena/nix-flatpak";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
snowfall-lib = {
url = "github:snowfallorg/lib";
inputs.nixpkgs.follows = "nixpkgs";
};
nixos-generators.url = "github:nix-community/nixos-generators";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
# For nixd
flake-compat = {
url = "github:inclyc/flake-compat";
flake = false;
};
sops-nix.url = "github:Mic92/sops-nix";
sops-nix.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
impermanence.url = "github:nix-community/impermanence";
persist-retro.url = "github:Geometer1729/persist-retro";
# Home
neovim = {
url = "github:IogaMaster/neovim";
inputs.nixpkgs.follows = "nixpkgs";
};
yeetmouse = {
url = "github:AndyFilter/YeetMouse?dir=nix";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-colors.url = "github:IogaMaster/nix-colors";
prism.url = "github:IogaMaster/prism";
# Deployments
arion.url = "github:hercules-ci/arion";
arion.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
nix-topology.url = "github:oddlama/nix-topology";
microvm.url = "github:astro/microvm.nix";
microvm.inputs.nixpkgs.follows = "nixpkgs";
# Misc
nix-ld.url = "github:Mic92/nix-ld";
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
dzgui.url = "github:jiriks74/dzgui.flake";
flux.url = "github:IogaMaster/flux";
};
outputs =
inputs:
let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
snowfall = {
meta = {
name = "dotfiles";
title = "dotfiles";
};
namespace = "custom";
};
};
in
(lib.mkFlake {
inherit inputs;
src = ./.;
channels-config = {
allowUnfree = true;
permittedInsecurePackages = [
"electron-24.8.6"
"dotnet-sdk-6.0.428"
"dotnet-runtime-6.0.36"
];
};
overlays = with inputs; [
neovim.overlays.default
nix-topology.overlays.default
flux.overlays.default
];
systems.modules.nixos = with inputs; [
nix-topology.nixosModules.default
disko.nixosModules.disko
{
# Required for impermanence
fileSystems."/persist".neededForBoot = true;
}
flux.nixosModules.flux
nix-flatpak.nixosModules.nix-flatpak
];
systems.hosts.equinox.modules = with inputs; [
(import ./disks/default.nix {
inherit lib;
device = "/dev/sda";
})
];
systems.hosts.zodiac.modules = with inputs; [
# impermanence.nixosModules.impermanence
(import ./disks/default.nix {
inherit lib;
device = "/dev/sda";
})
];
systems.hosts.aurora.modules = with inputs; [
(import ./disks/default.nix {
inherit lib;
device = "/dev/nvme0n1";
})
{
# Required for impermanence
fileSystems."/persist".neededForBoot = true;
}
];
systems.hosts.orion.modules = with inputs; [
(import ./disks/default.nix { inherit lib; })
];
deploy = lib.mkDeploy { inherit (inputs) self; };
checks = builtins.mapAttrs (
_system: deploy-lib: deploy-lib.deployChecks inputs.self.deploy
) inputs.deploy-rs.lib;
templates = import ./templates { };
topology =
with inputs;
let
host = self.nixosConfigurations.${builtins.head (builtins.attrNames self.nixosConfigurations)};
in
import nix-topology {
inherit (host) pkgs; # Only this package set must include nix-topology.overlays.default
modules = [
(import ./topology {
inherit (host) config;
})
{ inherit (self) nixosConfigurations; }
];
};
})
# Outputs not managed by snowfall.
// {
hydraJobs = {
packages = {
inherit (inputs.self.packages) "x86_64-linux";
};
};
};
}