-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdefault.nix
More file actions
65 lines (56 loc) · 1.37 KB
/
default.nix
File metadata and controls
65 lines (56 loc) · 1.37 KB
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
{
modulesPath,
config,
lib,
pkgs,
...
}: {
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
(modulesPath + "/profiles/qemu-guest.nix")
./disk-config.nix
./services
];
boot.loader.grub.enable = true;
boot.loader.grub.efiSupport = true;
boot.loader.grub.efiInstallAsRemovable = true;
networking = {
hostName = "spore";
enableIPv6 = false;
interfaces.eth0 = {
useDHCP = false;
ipv4.addresses = [
{
address = "74.48.202.251";
prefixLength = 24;
}
];
};
defaultGateway = {
address = "74.48.202.1";
interface = "eth0";
};
nameservers = ["8.8.8.8"];
};
networking.firewall.allowedTCPPorts = [80 443];
networking.firewall.trustedInterfaces = ["tailscale0"];
time.timeZone = "America/Los_Angeles";
i18n.defaultLocale = "en_US.UTF-8";
boot.kernel.sysctl."vm.swappiness" = 1;
swapDevices = [
{
device = "/swapfile";
size = 2048;
}
];
# Stricter GC due to limited disk space (30 GB)
nix.gc = {
dates = lib.mkForce "daily";
options = lib.mkForce "--delete-older-than 7d";
};
nix.settings = {
min-free = 1024 * 1024 * 1024; # 1 GB — trigger GC when free space drops below this
max-free = 5 * 1024 * 1024 * 1024; # 5 GB — stop GC once this much space is free
};
system.stateVersion = "24.05";
}