1{
2 self,
3 config,
4 ...
5}: {
6 imports = [
7 ./home.nix
8 ./secrets.nix
9 ./notifier.nix
10 ./backups.nix
11 self.nixosModules.locale-en-gb
12 ];
13
14 networking.hostName = "nanpi";
15 system.stateVersion = "25.05";
16 time.timeZone = "America/Sao_Paulo";
17 myHardware.acer.aspire."A315-53".enable = true;
18
19 myNixOS = {
20 programs = {
21 lanzaboote.enable = true;
22 nix.enable = true;
23 };
24 profiles = {
25 base.enable = true;
26 server.enable = true;
27 backups.enable = true;
28 btrfs = {
29 enable = true;
30 deduplicate = true;
31 };
32 swap = {
33 enable = true;
34 size = 4096;
35 location = "/.swap";
36 };
37 arr.enable = true;
38 };
39 services = {
40 audiobookshelf.enable = true;
41 caddy.enable = true;
42 cloudflared.enable = true;
43 copyparty.enable = true;
44 dnsmasq.enable = true;
45 forgejo = {
46 enable = true;
47 db = "postgresql";
48 };
49 glance.enable = true;
50 jellyfin.enable = true;
51 jellyseerr.enable = true;
52 karakeep.enable = false;
53 miniflux.enable = true;
54 ntfy.enable = true;
55 pds.enable = true;
56 qbittorrent = {
57 enable = true;
58 webuiPort = config.mySnippets.tailnet.networkMap.qbittorrent.port;
59 openFirewall = true;
60 };
61 radicale.enable = true;
62 redlib.enable = true;
63 syncthing = {
64 enable = true;
65 certFile = config.age.secrets.syncthingCert.path;
66 keyFile = config.age.secrets.syncthingKey.path;
67 user = "ayla";
68 };
69 tailscale = {
70 enable = true;
71 enableCaddy = true;
72 operator = "ayla";
73 };
74 vaultwarden.enable = true;
75 webdav.enable = true;
76 };
77 };
78
79 myUsers = {
80 ayla = {
81 enable = true;
82 passwordFile = config.age.secrets.aylaPassword.path;
83 };
84 };
85
86 boot = {
87 initrd = {
88 availableKernelModules = [
89 "xhci_pci"
90 "ahci"
91 "usb_storage"
92 "sd_mod"
93 "rtsx_pci_sdmmc"
94 ];
95
96 luks.devices = {
97 crypted.device = "/dev/disk/by-uuid/d82fc855-f29a-4aef-90d4-da94c23d0ac1";
98 crypted_external.device = "/dev/disk/by-uuid/0e477648-92d6-4cf5-a0c5-8d0707b69935";
99 };
100 };
101
102 kernelParams = [
103 "consoleblank=30"
104 ];
105 };
106
107 fileSystems = {
108 "/" = {
109 device = "/dev/disk/by-uuid/97fd311a-2575-487e-be03-45dfa9c2db8a";
110 fsType = "btrfs";
111 options = ["subvol=/root" "compress=zstd" "noatime"];
112 };
113
114 "/home" = {
115 device = "/dev/disk/by-uuid/97fd311a-2575-487e-be03-45dfa9c2db8a";
116 fsType = "btrfs";
117 options = ["subvol=/home" "compress=zstd" "noatime"];
118 };
119
120 "/home/.snapshots" = {
121 device = "/dev/disk/by-uuid/97fd311a-2575-487e-be03-45dfa9c2db8a";
122 fsType = "btrfs";
123 options = ["subvol=/home/.snapshots" "compress=zstd" "noatime"];
124 };
125
126 "/nix" = {
127 device = "/dev/disk/by-uuid/97fd311a-2575-487e-be03-45dfa9c2db8a";
128 fsType = "btrfs";
129 options = ["subvol=/nix" "compress=zstd" "noatime"];
130 };
131
132 "/boot" = {
133 device = "/dev/disk/by-uuid/7D56-EE82";
134 fsType = "vfat";
135 options = ["fmask=0077" "dmask=0077"];
136 };
137
138 "/external1" = {
139 device = "/dev/disk/by-uuid/130ead1c-6642-45d5-9053-b6cb2df9c7e4";
140 fsType = "btrfs";
141 options = ["compress=zstd" "noatime"];
142 };
143 };
144}