diff options
| author | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-08-17 11:25:33 +0200 |
|---|---|---|
| committer | Jakub Stachurski <j.stachurski@student.utwente.nl> | 2025-08-17 11:25:33 +0200 |
| commit | 1be972048dd58218cd689ecb5cac562eb398b751 (patch) | |
| tree | 203f19ee01ad5fe28f2868e8c1451f9538e4ab12 /nixos/hosts | |
| parent | 3cd59d4670711e34a50adea912c3b0894883e490 (diff) | |
refreshed config
Diffstat (limited to '')
| -rw-r--r-- | hosts/apocalypse/backup.nix (renamed from nixos/hosts/apocalypse/backup.nix) | 6 | ||||
| -rw-r--r-- | hosts/apocalypse/default.nix (renamed from nixos/hosts/apocalypse/default.nix) | 21 | ||||
| -rw-r--r-- | hosts/apocalypse/firewall.nix (renamed from nixos/hosts/apocalypse/firewall.nix) | 0 | ||||
| -rw-r--r-- | hosts/apocalypse/hardware-configuration.nix (renamed from nixos/hosts/apocalypse/hardware-configuration.nix) | 0 | ||||
| -rw-r--r-- | hosts/apocalypse/nvidia.nix (renamed from nixos/hosts/apocalypse/nvidia.nix) | 0 | ||||
| -rw-r--r-- | nixos/hosts/crank-vm/default.nix | 20 | ||||
| -rw-r--r-- | nixos/hosts/crank-vm/hardware-configuration.nix | 65 | ||||
| -rw-r--r-- | nixos/hosts/icetea-dispenser/GrubBG.png | bin | 4109858 -> 0 bytes | |||
| -rw-r--r-- | nixos/hosts/icetea-dispenser/default.nix | 49 | ||||
| -rw-r--r-- | nixos/hosts/icetea-dispenser/hardware-configuration.nix | 155 |
10 files changed, 21 insertions, 295 deletions
diff --git a/nixos/hosts/apocalypse/backup.nix b/hosts/apocalypse/backup.nix index 07386be..3529024 100644 --- a/nixos/hosts/apocalypse/backup.nix +++ b/hosts/apocalypse/backup.nix @@ -10,6 +10,10 @@ instances."remote_vault" = { onCalendar = "weekly"; settings = { + snapshot_preserve_min = "1w"; + snapshot_preserve = "2w"; + target_preserve_min = "1w"; + target_preserve = "4w"; ssh_identity = "/etc/vault_key"; # NOTE: must be readable by user/group btrbk ssh_user = "vaultmanager"; stream_compress = "lz4"; @@ -17,7 +21,7 @@ target = "ssh://10.127.9.1/vault/backups/apocalypse"; subvolume = { "@root" = { - snapshot_create = "always"; + snapshot_create = "ondemand"; }; }; }; diff --git a/nixos/hosts/apocalypse/default.nix b/hosts/apocalypse/default.nix index e57105c..8993dc2 100644 --- a/nixos/hosts/apocalypse/default.nix +++ b/hosts/apocalypse/default.nix @@ -1,12 +1,24 @@ - {pkgs, config, lib, ...}: + {lib, ...}: { imports = [ ./hardware-configuration.nix - ../../common ./nvidia.nix ./backup.nix ./firewall.nix ]; + + ## Addons for this system + addons = { + desktop.hyprland.enable = true; + desktop.xfce.enable = true; + + virtualisation.guest = false; + virtualisation.host = true; + + vpn.mullvad.enable = true; + gpg.enable = true; + }; + boot.loader.grub = { useOSProber = true; device = "nodev"; @@ -18,7 +30,7 @@ }; boot.loader.efi.canTouchEfiVariables = true; boot.initrd.systemd.enable = true; - boot.crashDump.enable = false; + boot.crashDump.enable = true; boot.plymouth = { enable = true; theme = "bgrt"; @@ -47,7 +59,7 @@ programs.nix-ld.enable = true; services.printing.enable = true; - nixpkgs.config.allowUnfree = true; + # nix.config.allowUnfree = true; services.resolved = { @@ -58,7 +70,6 @@ dnsovertls = "opportunistic"; }; - networking.useDHCP = lib.mkDefault true; networking.firewall.checkReversePath = false; diff --git a/nixos/hosts/apocalypse/firewall.nix b/hosts/apocalypse/firewall.nix index 5c73966..5c73966 100644 --- a/nixos/hosts/apocalypse/firewall.nix +++ b/hosts/apocalypse/firewall.nix diff --git a/nixos/hosts/apocalypse/hardware-configuration.nix b/hosts/apocalypse/hardware-configuration.nix index d8ae434..d8ae434 100644 --- a/nixos/hosts/apocalypse/hardware-configuration.nix +++ b/hosts/apocalypse/hardware-configuration.nix diff --git a/nixos/hosts/apocalypse/nvidia.nix b/hosts/apocalypse/nvidia.nix index ef95b43..ef95b43 100644 --- a/nixos/hosts/apocalypse/nvidia.nix +++ b/hosts/apocalypse/nvidia.nix diff --git a/nixos/hosts/crank-vm/default.nix b/nixos/hosts/crank-vm/default.nix deleted file mode 100644 index 1415674..0000000 --- a/nixos/hosts/crank-vm/default.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, inputs, pkgs, ...}: -{ - imports = [ - ./hardware-configuration.nix - ../../common - ]; - - networking.hostName = "crank-vm"; # Define your hostname. - # Use the systemd-boot EFI boot loader. - # boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.loader.grub = { - device = "nodev"; - useOSProber = true; - efiSupport = true; - default = "saved"; - memtest86.enable = true; - }; - networking.firewall.enable = false; -} diff --git a/nixos/hosts/crank-vm/hardware-configuration.nix b/nixos/hosts/crank-vm/hardware-configuration.nix deleted file mode 100644 index e73cd34..0000000 --- a/nixos/hosts/crank-vm/hardware-configuration.nix +++ /dev/null @@ -1,65 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/profiles/qemu-guest.nix") - ]; - - boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "virtio_pci" "sr_mod" "virtio_blk" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - - fileSystems."/" = - { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; - fsType = "btrfs"; - options = [ "subvol=root" ]; - }; - - boot.initrd.luks.devices."system".device = "/dev/disk/by-uuid/70bdaa2d-b736-417b-899e-50f6c61c0036"; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; - fsType = "btrfs"; - options = [ "subvol=home" ]; - }; - - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; - fsType = "btrfs"; - options = [ "subvol=nix" ]; - }; - - fileSystems."/snapshots" = - { device = "/dev/disk/by-uuid/4b8e866a-bbf0-4312-a134-e6369276ed60"; - fsType = "btrfs"; - options = [ "subvol=snapshots" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/D0B7-5718"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; - - swapDevices = [ ]; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp1s0.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - - services = { - qemuGuest.enable = true; - spice-vdagentd.enable = true; - }; -} - - diff --git a/nixos/hosts/icetea-dispenser/GrubBG.png b/nixos/hosts/icetea-dispenser/GrubBG.png Binary files differdeleted file mode 100644 index 0f5028f..0000000 --- a/nixos/hosts/icetea-dispenser/GrubBG.png +++ /dev/null diff --git a/nixos/hosts/icetea-dispenser/default.nix b/nixos/hosts/icetea-dispenser/default.nix deleted file mode 100644 index a8d4630..0000000 --- a/nixos/hosts/icetea-dispenser/default.nix +++ /dev/null @@ -1,49 +0,0 @@ - {pkgs, config, ...}: - { - imports = [ - ./hardware-configuration.nix - ../../common - ]; - boot.loader.grub = { - useOSProber = true; - device = "nodev"; - - - efiSupport = true; - default = "saved"; - memtest86.enable = true; - # splashImage = ./GrubBG.png; - }; - boot.loader.efi.canTouchEfiVariables = true; - boot.crashDump.enable = false; - boot.plymouth = { - enable = true; - theme = "bgrt"; - }; - - boot.kernelParams = [ - "quiet" - "splash" - "loglevel=3" - "rd.systemd.show_status=false" - "rd.udev.log_level=3" - "udev.logpriority=3" - ]; - boot.consoleLogLevel = 0; - - networking.hostName = "icetea-dispenser"; # Define your hostname. - networking.firewall.enable = false; - networking.networkmanager.enable = true; # Easiest to use and most distros use this by default. - - hardware.bluetooth.enable = true; - hardware.bluetooth.settings = { - General = {Enable = "Source,Sink,Media,Socket";}; - }; - - hardware.bluetooth.powerOnBoot = true; - services.blueman.enable = true; - - programs.nix-ld.enable = true; - services.printing.enable = true; - nixpkgs.config.allowUnfree = true; -} diff --git a/nixos/hosts/icetea-dispenser/hardware-configuration.nix b/nixos/hosts/icetea-dispenser/hardware-configuration.nix deleted file mode 100644 index 7ae80aa..0000000 --- a/nixos/hosts/icetea-dispenser/hardware-configuration.nix +++ /dev/null @@ -1,155 +0,0 @@ -# Do not modify this file! It was generated by ‘nixos-generate-config’ -# and may be overwritten by future invocations. Please make changes -# to /etc/nixos/configuration.nix instead. -{ config, lib, pkgs, modulesPath, ... }: - -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; - - boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ "aesni_intel" "cryptd" ]; - boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; - boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" ]; - # GRUB 2 with UEFI example, chainloading another distro - boot.loader.grub.extraEntries = - '' -menuentry 'UEFI Firmware' $menuentry_id_option 'uefi-firmware' { - fwsetup -} - ''; - fileSystems."/" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=root" ]; - }; - - fileSystems."/home" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=home" ]; - }; - - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=nix" ]; - }; - - fileSystems."/snapshots" = - { device = "/dev/disk/by-uuid/f75781bf-b2bf-4bb0-915d-95193e8eee9e"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=snapshots" ]; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/6E1A-07F4"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - fileSystems."/store2" = - { device = "/dev/disk/by-uuid/5368282f-c09d-44cf-9cf2-e69a2d415da6"; - fsType = "btrfs"; - options = [ "noatime" "compress=zstd" "subvol=/"]; - }; - fileSystems."/store1" = - { device = "/dev/disk/by-uuid/6A2E2BFF2E2BC2C5"; - fsType = "ntfs-3g" ; - options = ["rw" "uid=1000" "gid=100"]; - }; - fileSystems."/win_games" = - { device = "/dev/disk/by-uuid/6A680789680752ED"; - fsType = "ntfs-3g" ; - options = ["rw" "uid=1000" "gid=100"]; - }; - - - - swapDevices = - [ { device = "/dev/disk/by-uuid/f1dfc6a1-55f3-4148-9f1d-2a998c3b3168"; } - ]; - - # Thunderbolt - services.hardware.bolt.enable = true; - powerManagement.enable = true; - - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking - # (the default) this is the recommended approach. When using systemd-networkd it's - # still possible to use this option, but it's recommended to use it in conjunction - # with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`. - # networking.nameservers = [ "1.1.1.1#one.one.one.one" "1.0.0.1#one.one.one.one" ]; - - services.resolved = { - enable = true; - dnssec = "false"; - domains = [ "~." ]; - fallbackDns = [ ]; - dnsovertls = "opportunistic"; - }; - - - networking.useDHCP = lib.mkDefault true; - networking.firewall.checkReversePath = false; - - # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true; - # networking.interfaces.enp81s0u1u4.useDHCP = lib.mkDefault true; - # networking.interfaces.wlp0s20f3.useDHCP = lib.mkDefault true; - - nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; - - # Enable OpenGL - hardware.graphics = { - enable = true; - }; - - # Load nvidia driver for Xorg and Wayland - services.xserver.videoDrivers = ["nvidia"]; - - hardware.nvidia = { - - # Modesetting is required. - modesetting.enable = true; - - # Nvidia power management. Experimental, and can cause sleep/suspend to fail. - # Enable this if you have graphical corruption issues or application crashes after waking - # up from sleep. This fixes it by saving the entire VRAM memory to /tmp/ instead - # of just the bare essentials. - powerManagement.enable = false; - - # Fine-grained power management. Turns off GPU when not in use. - # Experimental and only works on modern Nvidia GPUs (Turing or newer). - powerManagement.finegrained = false; - - # Use the NVidia open source kernel module (not to be confused with the - # independent third-party "nouveau" open source driver). - # Support is limited to the Turing and later architectures. Full list of - # supported GPUs is at: - # https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus - # Only available from driver 515.43.04+ - # Currently alpha-quality/buggy, so false is currently the recommended setting. - open = false; - - # Enable the Nvidia settings menu, - # accessible via `nvidia-settings`. - nvidiaSettings = true; - - # Optionally, you may need to select the appropriate driver version for your specific GPU. - package = config.boot.kernelPackages.nvidiaPackages.production; - - prime = { - offload = { - enable = true; - enableOffloadCmd = true; - }; - - sync.enable = false; - - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - }; -} |
