-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
139 lines (115 loc) · 4.07 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
{
outputs = inputs: let
lib = inputs.snowfall-lib.mkLib {
inherit inputs;
src = ./.;
snowfall = {
namespace = "snowflake";
meta = {
name = "nix-snowflake";
title = "NixOS Flake configuration for snowflakes";
};
};
};
userdata = import ./data.nix;
in
lib.mkFlake {
inherit inputs;
src = ./.;
systems.modules.nixos = with inputs; [
agenix.nixosModules.age
disko.nixosModules.disko
srvos.nixosModules.common
inputs.lanzaboote.nixosModules.lanzaboote
];
systems.hosts.thonkpad.modules = [
inputs.nixos-hardware.nixosModules.lenovo-thinkpad-x1-12th-gen
];
systems.hosts.thonkpad.specialArgs = {
inherit userdata;
};
systems.hosts.zippyrus.modules = [];
systems.hosts.zippyrus.specialArgs = {
inherit userdata;
};
# TODO: setup atticd
systems.hosts.bicboye.modules = [
inputs.srvos.nixosModules.server
inputs.srvos.nixosModules.mixins-systemd-boot
];
systems.hosts.bicboye.specialArgs = {
inherit userdata;
};
systems.hosts.smolboye.modules = [
inputs.nixos-hardware.nixosModules.common-cpu-intel
inputs.srvos.nixosModules.hardware-hetzner-cloud
];
systems.hosts.smolboye.specialArgs = {
inherit userdata;
};
homes.modules = with inputs; [
nur.modules.homeManager.default
];
overlays = [
(_: prev: {
inherit (inputs.maych-in.packages.${prev.system}) maych-in;
inherit (inputs.nur.legacyPackages.${prev.system}.repos.rycee) firefox-addons;
})
];
channels-config.allowUnfree = true;
outputs-builder = channels: {
formatter = channels.nixpkgs.writeShellApplication {
name = "format";
runtimeInputs = with channels.nixpkgs; [
nixfmt-rfc-style
deadnix
shfmt
statix
];
text = ''
set -euo pipefail
shfmt --write --simplify --language-dialect bash --indent 2 --case-indent --space-redirects .;
deadnix --edit
statix check . || statix fix .
nixfmt .
'';
};
};
deploy = lib.mkDeploy {inherit (inputs) self;};
};
inputs = {
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
agenix.inputs.home-manager.follows = "nixpkgs";
deploy-rs.url = "github:serokell/deploy-rs";
deploy-rs.inputs.nixpkgs.follows = "nixpkgs";
disko.url = "github:nix-community/disko";
disko.inputs.nixpkgs.follows = "nixpkgs";
firefox.url = "github:nix-community/flake-firefox-nightly";
firefox.inputs.nixpkgs.follows = "nixpkgs";
home-manager.url = "github:nix-community/home-manager";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
# NOTE: enable this to make hyprland work
# hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
lanzaboote.url = "github:nix-community/lanzaboote";
lanzaboote.inputs.nixpkgs.follows = "nixpkgs";
maych-in.url = "https://git.deku.moe/thunderbottom/website/archive/main.tar.gz";
maych-in.inputs.nixpkgs.follows = "nixpkgs";
nil.url = "github:oxalica/nil";
nil.inputs.nixpkgs.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
nixos-hardware.url = "github:nixos/nixos-hardware";
nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver";
nixos-mailserver.inputs.nixpkgs.follows = "nixpkgs";
nur.url = "github:nix-community/nur";
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
snowfall-lib.url = "github:snowfallorg/lib";
snowfall-lib.inputs.nixpkgs.follows = "nixpkgs";
srvos.url = "github:nix-community/srvos";
srvos.inputs.nixpkgs.follows = "nixpkgs";
wezterm.url = "github:wez/wezterm?dir=nix";
wezterm.inputs.nixpkgs.follows = "nixpkgs";
wezterm.inputs.rust-overlay.follows = "rust-overlay";
};
}