Nix configurations for my homelab
1{ ... }:
2{
3 imports = [
4 ./hardware.nix
5
6 ../modules/audio.nix
7 ../modules/basic.nix
8 ../modules/browsers.nix
9 ../modules/cloud-storage.nix
10 ../modules/creation.nix
11 ../modules/editor.nix
12 ../modules/electron.nix
13 ../modules/flatpak.nix
14 ../modules/fonts.nix
15 ../modules/fwupd.nix
16 ../modules/games.nix
17 ../modules/gui.nix
18 ../modules/hardware-keys.nix
19 ../modules/im.nix
20 ../modules/kanidm.nix
21 ../modules/machine-id.nix
22 ../modules/machine-info.nix
23 ../modules/media.nix
24 ../modules/netbird.nix
25 ../modules/network-info.nix
26 ../modules/nix.nix
27 ../modules/printing.nix
28 ../modules/remote-builder.nix
29 ../modules/river.nix
30 ../modules/secrets.nix
31 ../modules/smartd.nix
32 ../modules/tools.nix
33 ../modules/uni.nix
34 ];
35
36 sops = {
37 defaultSopsFile = ../secrets/lutea.yaml;
38 defaultSopsFormat = "yaml";
39 age.keyFile = "/data/keys.txt";
40 };
41
42 networking.hostName = "lutea";
43 services.thermald.enable = true;
44
45 nix.settings = {
46 cores = 16;
47 max-jobs = 1;
48 };
49
50 fileSystems =
51 let
52 disk-uuid = "/dev/disk/by-uuid/7bf830d4-189d-4e9b-bcb0-565f4ac69e67";
53 in
54 {
55 "/home/mou/aud" = {
56 device = disk-uuid;
57 fsType = "btrfs";
58 options = [
59 "subvol=@home/mou/aud"
60 "compress=zstd"
61 "discard=async"
62 ];
63 };
64 "/home/mou/.cache" = {
65 device = disk-uuid;
66 fsType = "btrfs";
67 options = [
68 "subvol=@home/mou/cache"
69 "compress=zstd"
70 "discard=async"
71 ];
72 };
73 "/home/mou/.config" = {
74 device = disk-uuid;
75 fsType = "btrfs";
76 options = [
77 "subvol=@home/mou/config"
78 "compress=zstd"
79 "discard=async"
80 ];
81 };
82 "/home/mou/dls" = {
83 device = disk-uuid;
84 fsType = "btrfs";
85 options = [
86 "subvol=@home/mou/dls"
87 "compress=zstd"
88 "discard=async"
89 ];
90 };
91 "/home/mou/doc" = {
92 device = disk-uuid;
93 fsType = "btrfs";
94 options = [
95 "subvol=@home/mou/doc"
96 "compress=zstd"
97 "discard=async"
98 ];
99 };
100 "/home/mou/.local" = {
101 device = disk-uuid;
102 fsType = "btrfs";
103 options = [
104 "subvol=@home/mou/local"
105 "compress=zstd"
106 "discard=async"
107 ];
108 };
109 "/home/mou/misc" = {
110 device = disk-uuid;
111 fsType = "btrfs";
112 options = [
113 "subvol=@home/mou/misc"
114 "compress=zstd"
115 "discard=async"
116 ];
117 };
118 "/home/mou/pic" = {
119 device = disk-uuid;
120 fsType = "btrfs";
121 options = [
122 "subvol=@home/mou/pic"
123 "compress=zstd"
124 "discard=async"
125 ];
126 };
127 "/home/mou/vid" = {
128 device = disk-uuid;
129 fsType = "btrfs";
130 options = [
131 "subvol=@home/mou/vid"
132 "compress=zstd"
133 "discard=async"
134 ];
135 };
136 };
137
138 systemd.tmpfiles.settings."home-files" = {
139 "/home/mou/.barony".L.argument = "/home/mou/misc/games/barony";
140 "/home/mou/.ssh".L.argument = "/home/mou/misc/.app-data/ssh";
141 "/home/mou/.var".L.argument = "/home/mou/misc/.app-data/flatpak-var";
142 "/home/mou/dls".d = {
143 user = "mou";
144 group = "mou";
145 age = "7d";
146 };
147 };
148
149 # This option defines the first version of NixOS you have installed on this particular machine,
150 # and is used to maintain compatibility with application data (e.g. databases) created on older
151 # NixOS versions. Most users should NEVER change this value after the initial install, for any
152 # reason, even if you've upgraded your system to a new NixOS release. This value does NOT affect
153 # the Nixpkgs version your packages and OS are pulled from, so changing it will NOT upgrade your
154 # system. This value being lower than the current NixOS release does NOT mean your system is out
155 # of date, out of support, or vulnerable. Do NOT change this value unless you have manually
156 # inspected all the changes it would make to your configuration, and migrated your data
157 # accordingly. For more information, see `man configuration.nix` or
158 # https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
159 system.stateVersion = "24.05"; # Did you read the comment?
160}