diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-05-08 23:23:19 +0200 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2026-05-08 23:23:19 +0200 |
| commit | bb957032ffc5352229edbbdcdb56b9dba4408f37 (patch) | |
| tree | 8d6c171a49aae83dfc191e2aad1ecf55330f0bb4 /hosts | |
| parent | ad57da6bda1cb00ab11f78125c16daebbf0c221c (diff) | |
Tacitus hosts and locale
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/apocalypse/default.nix | 2 | ||||
| -rw-r--r-- | hosts/tacitus/default.nix (renamed from hosts/threshold/default.nix) | 23 | ||||
| -rw-r--r-- | hosts/tacitus/disko.nix | 91 | ||||
| -rw-r--r-- | hosts/tacitus/hardware.nix (renamed from hosts/threshold/hardware.nix) | 0 | ||||
| -rw-r--r-- | hosts/tacitus/network.nix (renamed from hosts/threshold/network.nix) | 0 | ||||
| -rw-r--r-- | hosts/threshold/disko.nix | 85 |
6 files changed, 105 insertions, 96 deletions
diff --git a/hosts/apocalypse/default.nix b/hosts/apocalypse/default.nix index e82b048..179e2d1 100644 --- a/hosts/apocalypse/default.nix +++ b/hosts/apocalypse/default.nix @@ -23,7 +23,7 @@ addons = { desktop.hyprland.enable = false; desktop.xfce.enable = true; - desktop.cosmic.enable = false; + desktop.cosmic.enable = true; desktop.kde.enable = true; steam.enable = true; diff --git a/hosts/threshold/default.nix b/hosts/tacitus/default.nix index 485997b..1efc539 100644 --- a/hosts/threshold/default.nix +++ b/hosts/tacitus/default.nix @@ -3,7 +3,6 @@ ... }: { - imports = [ ./network.nix ./disko.nix @@ -17,18 +16,22 @@ # Bootloader and boot setup. boot.loader.efi.canTouchEfiVariables = lib.mkDefault true; - - boot.loader.grub = { - enable = true; - useOSProber = false; - device = "nodev"; + boot.loader.limine = { efiSupport = true; - default = "saved"; - memtest86.enable = true; + enable = true; + secureBoot = { + enable = true; + autoGenerateKeys = true; + autoEnrollKeys = { + extraArgs = [ + "--microsoft" + "--firmware-builtin" + ]; + }; + }; }; - # Networking setup - networking.hostName = "threshold"; + networking.hostName = "tacitus"; services.resolved = { enable = true; settings.Resolve.DNSOverTLS = "opportunistic"; diff --git a/hosts/tacitus/disko.nix b/hosts/tacitus/disko.nix new file mode 100644 index 0000000..5e36661 --- /dev/null +++ b/hosts/tacitus/disko.nix @@ -0,0 +1,91 @@ +{ config, lib, ... }: +{ + options.host-config.disko = with lib; { + root_device = mkOption { + type = types.path; + default = "/dev/nvme0n1"; + example = "/dev/nvme0n1"; + description = "Root device for disko and grub"; + }; + enable = mkOption { + type = types.bool; + default = !config.addons.virtualisation.isTestVM; + description = "Whenever to enable disko or not."; + }; + }; + + config = + let + cfg = config.host-config.disko; + in + lib.mkIf (cfg.enable) { + services.btrfs.autoScrub = { + enable = true; + interval = "weekly"; + }; + + disko.devices = { + disk = { + main-disk = { + device = cfg.root_device; + type = "disk"; + content = { + type = "gpt"; + partitions = { + ESP = { + type = "EF00"; + size = "512M"; + content = { + type = "filesystem"; + format = "vfat"; + mountpoint = "/boot"; + mountOptions = [ "umask=0077" ]; + }; + }; + luks = { + size = "100%"; + content = { + type = "luks"; + name = "crypted"; + passwordFile = "/tmp/root-reserve-key.key"; + # Do not wait for recovery displaying and blocking formatting. + content = { + type = "btrfs"; + extraArgs = [ "-f" ]; + subvolumes = { + # Subvolume name is different from mountpoint + "/rootfs" = { + mountOptions = [ "compress=zstd" ]; + mountpoint = "/"; + }; + # Subvolume name is the same as the mountpoint + "/home" = { + mountOptions = [ "compress=zstd" ]; + mountpoint = "/home"; + }; + # Parent is not mounted so the mountpoint must be set + "/nix" = { + mountOptions = [ + "compress=zstd" + "noatime" + ]; + mountpoint = "/nix"; + }; + # Subvolume for the swapfile + "/swap" = { + mountpoint = "/.swapvol"; + swap = { + swapfile.size = "8G"; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/hosts/threshold/hardware.nix b/hosts/tacitus/hardware.nix index f0b2fe7..f0b2fe7 100644 --- a/hosts/threshold/hardware.nix +++ b/hosts/tacitus/hardware.nix diff --git a/hosts/threshold/network.nix b/hosts/tacitus/network.nix index a4d0c03..a4d0c03 100644 --- a/hosts/threshold/network.nix +++ b/hosts/tacitus/network.nix diff --git a/hosts/threshold/disko.nix b/hosts/threshold/disko.nix deleted file mode 100644 index ddbfa11..0000000 --- a/hosts/threshold/disko.nix +++ /dev/null @@ -1,85 +0,0 @@ -{ config, lib, ... }: -{ - options.host-config.disko = with lib; { - root_device = mkOption { - type = types.path; - default = "/dev/nvme0n1"; - example = "/dev/nvme0n1"; - description = "Root device for disko and grub"; - }; - enable = mkOption { - type = types.bool; - default = !config.addons.virtualisation.isTestVM; - description = "Whenever to enable disko or not."; - }; - }; - - config = - let - cfg = config.host-config.disko; - in - lib.mkIf (cfg.enable) { - services.btrfs.autoScrub = { - enable = true; - interval = "weekly"; - }; - - disko.devices = { - disk = { - main-disk = { - device = cfg.root_device; - type = "disk"; - content = { - type = "gpt"; - partitions = { - ESP = { - type = "EF00"; - size = "512M"; - content = { - type = "filesystem"; - format = "vfat"; - mountpoint = "/boot"; - mountOptions = [ "umask=0077" ]; - }; - }; - root = { - size = "100%"; - content = { - type = "btrfs"; - extraArgs = [ "-f" ]; - subvolumes = { - # Subvolume name is different from mountpoint - "/rootfs" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/"; - }; - # Subvolume name is the same as the mountpoint - "/home" = { - mountOptions = [ "compress=zstd" ]; - mountpoint = "/home"; - }; - # Parent is not mounted so the mountpoint must be set - "/nix" = { - mountOptions = [ - "compress=zstd" - "noatime" - ]; - mountpoint = "/nix"; - }; - # Subvolume for the swapfile - "/swap" = { - mountpoint = "/.swapvol"; - swap = { - swapfile.size = "8G"; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; - }; -} |
