diff --git a/devices/binto/hardware-configuration.nix b/devices/binto/hardware-configuration.nix index 7b07e8fb..55d32cf9 100644 --- a/devices/binto/hardware-configuration.nix +++ b/devices/binto/hardware-configuration.nix @@ -67,6 +67,7 @@ virtualisation = { libvirtd.enable = true; + spiceUSBRedirection.enable = true; }; environment.systemPackages = with pkgs; [ qemu diff --git a/devices/cluster/default.nix b/devices/cluster/default.nix new file mode 100644 index 00000000..c5b1635b --- /dev/null +++ b/devices/cluster/default.nix @@ -0,0 +1,43 @@ +deviceName: {config, ...}: let + inherit (config.vars) mainUser hostName; +in { + imports = [ + ./hardware-configuration.nix + + ../../modules/kmscon.nix + ../../modules/sshd.nix + ../../modules/tailscale.nix + ]; + + vars = { + mainUser = "matt"; + hostName = deviceName; + }; + + users.users.${mainUser} = { + isNormalUser = true; + extraGroups = [ + "wheel" + "adm" + ]; + }; + + home-manager.users.${mainUser} = { + imports = []; + + # No touchy + home.stateVersion = "24.05"; + }; + + networking = { + inherit hostName; + resolvconf.enable = true; + firewall.enable = false; + }; + + # Set your time zone. + time.timeZone = "America/Montreal"; + + # No touchy + system.stateVersion = "24.05"; +} diff --git a/devices/cluster/hardware-configuration.nix b/devices/cluster/hardware-configuration.nix new file mode 100644 index 00000000..7d12a4cc --- /dev/null +++ b/devices/cluster/hardware-configuration.nix @@ -0,0 +1,48 @@ +{ + config, + modulesPath, + ... +}: { + nixpkgs.hostPlatform = "x86_64-linux"; + imports = [(modulesPath + "/installer/scan/not-detected.nix")]; + + boot = { + loader = { + timeout = 2; + + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + initrd.availableKernelModules = [ + "xhci_pci" + "ahci" + "usbhid" + "usb_storage" + "sd_mod" + ]; + }; + + fileSystems = { + "/" = { + device = "/dev/disk/by-label/NIXROOT"; + fsType = "btrfs"; + }; + + "/boot" = { + device = "/dev/disk/by-label/NIXBOOT"; + fsType = "vfat"; + }; + }; + + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 16 * 1024; + } + ]; + + zramSwap.enable = true; + + hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware; +} diff --git a/flake.nix b/flake.nix index ac4af89a..6b4b7453 100644 Binary files a/flake.nix and b/flake.nix differ