diff --git a/machines/boop/README.md b/machines/boop/README.md new file mode 100644 index 00000000..0999d27c --- /dev/null +++ b/machines/boop/README.md @@ -0,0 +1,3 @@ +# `xn--vp9h` (pronounced 🤓) + +another server for applications and compute and stuff diff --git a/machines/boop/boot.nix b/machines/boop/boot.nix new file mode 100644 index 00000000..7a7256ad --- /dev/null +++ b/machines/boop/boot.nix @@ -0,0 +1,24 @@ +{ config, lib, ... }: +with lib; { + boot.loader = { + efi.canTouchEfiVariables = true; + + grub = { + enable = true; + devices = [ "nodev" ]; + efiSupport = true; + useOSProber = true; + # splashImage = ./nerd-emoji.jpg; + }; + }; + + boot.initrd.availableKernelModules = + [ "xhci_pci" "ehci_pci" "uhci_hcd" "hpsa" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.extraModulePackages = [ ]; + + nixpkgs.hostPlatform = "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = + mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/machines/boop/configuration.nix b/machines/boop/configuration.nix new file mode 100644 index 00000000..b9f800bd --- /dev/null +++ b/machines/boop/configuration.nix @@ -0,0 +1,47 @@ +inputs: +{ config, pkgs, lib, modulesPath, ... }: +with lib; { + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + + inputs.self.nixosModules.server + + ./boot.nix + ./fs.nix + ./net.nix + ]; + + # Logrotate config build fail workaround + # https://discourse.nixos.org/t/logrotate-config-fails-due-to-missing-group-30000/28501 + services.logrotate.checkConfig = false; + + astral = { + users.alia.enable = true; + virt = { + docker.enable = true; + libvirt.enable = true; + }; + monitoring-node.scrapeTransport = "tailscale"; + tailscale.enable = mkForce false; + + backup.db.enable = false; + }; + + time.timeZone = "US/Pacific"; + + networking = { + hostName = "boop"; + domain = "h.astrid.tech"; + + hostId = "49e32584"; # Required for ZFS + }; + + services.nginx = { + enable = true; + + clientMaxBodySize = "16m"; + recommendedTlsSettings = true; + recommendedOptimisation = true; + recommendedGzipSettings = true; + }; +} diff --git a/machines/boop/fs.nix b/machines/boop/fs.nix new file mode 100644 index 00000000..50f3d457 --- /dev/null +++ b/machines/boop/fs.nix @@ -0,0 +1,40 @@ +{ + boot.zfs.forceImportAll = true; + + fileSystems."/" = { + device = "rootfs"; + fsType = "tmpfs"; + }; + + fileSystems."/tmp" = { + device = "rpool/enc/tmp"; + fsType = "zfs"; + }; + + fileSystems."/nix" = { + device = "rpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = { + device = "rpool/enc/var"; + fsType = "zfs"; + }; + + fileSystems."/etc" = { + device = "rpool/enc/etc"; + fsType = "zfs"; + }; + + fileSystems."/home" = { + device = "rpool/enc/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/D30E-26C7"; + fsType = "vfat"; + }; + + swapDevices = [ ]; +} diff --git a/machines/boop/machine-info.nix b/machines/boop/machine-info.nix new file mode 100644 index 00000000..d6c16a25 --- /dev/null +++ b/machines/boop/machine-info.nix @@ -0,0 +1 @@ +{ arch = "x86_64-linux"; } diff --git a/machines/boop/net.nix b/machines/boop/net.nix new file mode 100644 index 00000000..aa466748 --- /dev/null +++ b/machines/boop/net.nix @@ -0,0 +1,4 @@ +{ + networking.useDHCP = false; + networking.interfaces.eno1.useDHCP = true; +}