summaryrefslogtreecommitdiff
path: root/nixos/hosts/apocalypse
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/hosts/apocalypse')
-rw-r--r--nixos/hosts/apocalypse/backup.nix27
-rw-r--r--nixos/hosts/apocalypse/default.nix88
-rw-r--r--nixos/hosts/apocalypse/firewall.nix50
-rw-r--r--nixos/hosts/apocalypse/hardware-configuration.nix91
-rw-r--r--nixos/hosts/apocalypse/nvidia.nix55
5 files changed, 0 insertions, 311 deletions
diff --git a/nixos/hosts/apocalypse/backup.nix b/nixos/hosts/apocalypse/backup.nix
deleted file mode 100644
index 07386be..0000000
--- a/nixos/hosts/apocalypse/backup.nix
+++ /dev/null
@@ -1,27 +0,0 @@
-{ config, lib, pkgs, modulesPath, ...}:
-{
- environment.systemPackages = with pkgs; [
- btrbk
- lz4
- ];
-
- services.btrbk = {
- extraPackages = with pkgs; [ lz4 ];
- instances."remote_vault" = {
- onCalendar = "weekly";
- settings = {
- ssh_identity = "/etc/vault_key"; # NOTE: must be readable by user/group btrbk
- ssh_user = "vaultmanager";
- stream_compress = "lz4";
- volume."/btrfs_root" = {
- target = "ssh://10.127.9.1/vault/backups/apocalypse";
- subvolume = {
- "@root" = {
- snapshot_create = "always";
- };
- };
- };
- };
- };
-};
-}
diff --git a/nixos/hosts/apocalypse/default.nix b/nixos/hosts/apocalypse/default.nix
deleted file mode 100644
index e57105c..0000000
--- a/nixos/hosts/apocalypse/default.nix
+++ /dev/null
@@ -1,88 +0,0 @@
- {pkgs, config, lib, ...}:
- {
- imports = [
- ./hardware-configuration.nix
- ../../common
- ./nvidia.nix
- ./backup.nix
- ./firewall.nix
- ];
- boot.loader.grub = {
- useOSProber = true;
- device = "nodev";
-
- efiSupport = true;
- default = "saved";
- memtest86.enable = true;
- # splashImage = ./GrubBG.png;
- };
- boot.loader.efi.canTouchEfiVariables = true;
- boot.initrd.systemd.enable = 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 = "apocalypse"; # Define your hostname.
- 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;
-
-
- services.resolved = {
- enable = true;
- dnssec = "false";
- domains = [ "~." ];
- fallbackDns = [ ];
- dnsovertls = "opportunistic";
- };
-
-
- networking.useDHCP = lib.mkDefault true;
- networking.firewall.checkReversePath = false;
-
-
- # Thunderbolt
- services.hardware.bolt.enable = true;
- powerManagement.enable = true;
-
- # Firmware updates
- services.fwupd.enable = true;
-
- services.openssh = {
- enable = true;
- ports = [22];
- openFirewall = false;
- allowSFTP = false;
- settings = {
- PasswordAuthentication = false;
- AllowUsers = ["wilkuu"];
- X11Forwarding = false;
- PermitRootLogin = "no";
- PrintMotd = true;
- };
- };
-}
-
-
diff --git a/nixos/hosts/apocalypse/firewall.nix b/nixos/hosts/apocalypse/firewall.nix
deleted file mode 100644
index 5c73966..0000000
--- a/nixos/hosts/apocalypse/firewall.nix
+++ /dev/null
@@ -1,50 +0,0 @@
-{pkgs, config, ...}:
-let
- baseTCP = [
- 22000 # Syncthng
- ];
- baseUDP = [
- 22000 # Syncthing
- 22027 # Syncthing
- 16555 # Wireguard
- ];
- baseTCPRanges = [
- { from = 1714; to = 1764; } # KDE-CONNECT
- ];
- baseUDPRanges = [
- { from = 1714; to = 1764; } # KDE-CONNECT
- ];
-
- secureTCP = [
- 22 80 433 5900 # SSH HTTP VNC
- ];
-
- secureUDP = [
- 5900
- ];
-
- secureTCPRanges = [
-
- ];
- secureUDPRanges = [
-
- ];
-in
-{
- networking.firewall = {
- enable = false;
- allowedTCPPorts = baseTCP;
- allowedUDPPorts = baseUDP;
- allowedUDPPortRanges = baseUDPRanges;
- allowedTCPPortRanges = baseTCPRanges;
- interfaces = {
- "nix-laptop" = {
- allowedTCPPorts = secureTCP;
- allowedUDPPorts = secureUDP;
- allowedUDPPortRanges = secureUDPRanges;
- allowedTCPPortRanges = secureTCPRanges;
- };
- };
- };
-}
-
diff --git a/nixos/hosts/apocalypse/hardware-configuration.nix b/nixos/hosts/apocalypse/hardware-configuration.nix
deleted file mode 100644
index d8ae434..0000000
--- a/nixos/hosts/apocalypse/hardware-configuration.nix
+++ /dev/null
@@ -1,91 +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" "usb_storage" "usbhid" "sd_mod" "sdhci_pci" ];
- boot.initrd.kernelModules = [ "cryptd" "aesni_intel" ];
- boot.kernelModules = [ "kvm-intel" ];
- boot.extraModulePackages = [ ];
- boot.supportedFilesystems = [ "ntfs" "btrfs" "vfat" ];
- boot.loader.grub.extraEntries =
- ''
-menuentry 'UEFI Firmware' $menuentry_id_option 'uefi-firmware' {
- fwsetup
-}
- '';
-
- boot.initrd.luks.devices = {
- "cryptroot".device = "/dev/disk/by-uuid/d2c3c197-3d75-4da2-a098-207030a91b62";
- "cryptswap".device = "/dev/disk/by-uuid/fd6a5644-a33c-40af-ae48-42db1a5997ac";
- };
-
- fileSystems."/" =
- { device = "/dev/mapper/cryptroot";
- fsType = "btrfs";
- options = [ "subvol=@root" "compress=zstd" ];
- };
-
- fileSystems."/btrfs_root" = {
- device = "/dev/mapper/cryptroot";
- fsType = "btrfs";
- options = [ "subvolid=5" "compress=zstd"];
- };
-
-
- fileSystems."/snapshots" =
- { device = "/dev/mapper/cryptroot";
- fsType = "btrfs";
- options = [ "subvol=@snapshots" "compress=zstd" ];
- };
-
- 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"];
- };
- fileSystems."/windows" = {
- device = "/dev/disk/by-uuid/7AFA6C84FA6C3E8F";
- fsType = "ntfs-3g";
- options = ["rw" "uid=1000" "gid=100"];
- };
-
- swapDevices =
- [ { device = "/dev/mapper/cryptswap"; }
- ];
-
- # 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.br-7bda29607d31.useDHCP = lib.mkDefault true;
- # networking.interfaces.docker0.useDHCP = lib.mkDefault true;
- # networking.interfaces.enp0s31f6.useDHCP = lib.mkDefault true;
- # networking.interfaces.virbr0.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;
-}
diff --git a/nixos/hosts/apocalypse/nvidia.nix b/nixos/hosts/apocalypse/nvidia.nix
deleted file mode 100644
index ef95b43..0000000
--- a/nixos/hosts/apocalypse/nvidia.nix
+++ /dev/null
@@ -1,55 +0,0 @@
-{ config, lib, pkgs, modulesPath, ...}:
-{
- # 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";
- };
- };
-
-}