From b8c5d1d0c7c9ceb76d0e20accc091f89b0c1432e Mon Sep 17 00:00:00 2001 From: matt1432 Date: Tue, 17 Oct 2023 18:45:08 -0400 Subject: [PATCH] feat: adjust host configs --- hosts/binto/configuration.nix | 11 ++-- hosts/binto/hardware-configuration.nix | 69 ++++++++++++++++---------- hosts/wim/configuration.nix | 1 - hosts/wim/hardware-configuration.nix | 21 ++++---- 4 files changed, 60 insertions(+), 42 deletions(-) diff --git a/hosts/binto/configuration.nix b/hosts/binto/configuration.nix index 9ae922bb..02bd9262 100644 --- a/hosts/binto/configuration.nix +++ b/hosts/binto/configuration.nix @@ -18,10 +18,6 @@ networkmanager.enable = true; firewall.enable = false; }; - - # Set your time zone. - time.timeZone = "America/Toronto"; - # Enable the X11 windowing system. services.xserver = { enable = true; @@ -32,6 +28,10 @@ }; services = { + dbus.enable = true; + gvfs.enable = true; + flatpak.enable = true; + tailscale = { enable = true; extraUpFlags = [ @@ -69,6 +69,9 @@ }; }; + # Set your time zone. + time.timeZone = "America/Toronto"; + # This value determines the NixOS release from which the default # settings for stateful data, like file locations and database versions # on your system were taken. It‘s perfectly fine and recommended to leave diff --git a/hosts/binto/hardware-configuration.nix b/hosts/binto/hardware-configuration.nix index 93dea880..a2947295 100644 --- a/hosts/binto/hardware-configuration.nix +++ b/hosts/binto/hardware-configuration.nix @@ -1,44 +1,59 @@ -# 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, modulesPath, pkgs, ... }: +{ config, lib, modulesPath, pkgs, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; -{ - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") + boot = { + kernelPackages = pkgs.linuxPackages_latest; + kernelModules = [ "kvm-amd" ]; + extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback ]; + consoleLogLevel = 0; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - boot.supportedFilesystems = [ "ntfs" ]; + initrd = { + verbose = false; + systemd.enable = true; + availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + }; - boot.kernelPackages = pkgs.linuxPackages_latest; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; - boot.initrd.kernelModules = [ ]; - boot.kernelModules = [ "kvm-amd" ]; - boot.extraModulePackages = [ ]; + loader = { + efi.canTouchEfiVariables = true; + timeout = 2; - fileSystems."/" = - { device = "/dev/disk/by-uuid/560976b6-85e0-44ca-bb73-e15a78e9c449"; + grub = { + enable = true; + device = "nodev"; + efiSupport = true; + extraConfig = '' + set timeout_style=hidden + ''; + splashImage = null; + }; + }; + }; + + fileSystems = { + "/" ={ + device = "/dev/disk/by-uuid/560976b6-85e0-44ca-bb73-e15a78e9c449"; fsType = "btrfs"; options = [ "subvol=@" ]; }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/1407-A10C"; + "/boot" = { + device = "/dev/disk/by-uuid/1407-A10C"; fsType = "vfat"; }; + }; - swapDevices = [ ]; + zramSwap.enable = true; + hardware = { + cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + uinput.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..useDHCP`. - networking.useDHCP = lib.mkDefault true; - # networking.interfaces.enp6s0.useDHCP = lib.mkDefault true; + virtualisation = { + libvirtd.enable = true; + }; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/hosts/wim/configuration.nix b/hosts/wim/configuration.nix index 14f67782..b2547e6f 100644 --- a/hosts/wim/configuration.nix +++ b/hosts/wim/configuration.nix @@ -16,7 +16,6 @@ ]; networking = { - useDHCP = lib.mkDefault true; hostName = "wim"; networkmanager = { enable = true; diff --git a/hosts/wim/hardware-configuration.nix b/hosts/wim/hardware-configuration.nix index 6afb6d21..7aa73de1 100644 --- a/hosts/wim/hardware-configuration.nix +++ b/hosts/wim/hardware-configuration.nix @@ -4,6 +4,16 @@ boot = { kernelPackages = pkgs.linuxPackages_latest; + kernelModules = [ "kvm-amd" ]; + extraModulePackages = with config.boot.kernelPackages; [ + v4l2loopback + ]; + + kernelParams = [ + "cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root" + "root=/dev/mapper/root" + ]; + consoleLogLevel = 0; initrd = { @@ -16,19 +26,10 @@ }; }; - kernelModules = [ "kvm-amd" ]; - extraModulePackages = with config.boot.kernelPackages; [ - v4l2loopback - ]; - - kernelParams = [ - "cryptdevice=UUID=ab82b477-2477-453f-b95f-28e5553ad10d:root" - "root=/dev/mapper/root" - ]; - loader = { efi.canTouchEfiVariables = true; timeout = 2; + grub = { enable = true; device = "nodev";