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