From 2a76eef47739dd53b47a959675275aa36a588990 Mon Sep 17 00:00:00 2001 From: Joseph Hanson Date: Fri, 21 Jun 2024 12:55:52 -0500 Subject: [PATCH] Update for legiondary. --- .../modules/programs/de/gnome/default.nix | 6 ++ nixos/home/modules/shell/wezterm/default.nix | 16 +++++ nixos/hosts/legiondary/default-old.nix | 33 +++++++++ nixos/hosts/legiondary/default.nix | 70 ++++++++++++------- nixos/profiles/hw-legion-15arh05h.nix | 29 ++++---- nixos/profiles/role-gaming.nix | 13 +--- 6 files changed, 116 insertions(+), 51 deletions(-) create mode 100644 nixos/hosts/legiondary/default-old.nix diff --git a/nixos/home/modules/programs/de/gnome/default.nix b/nixos/home/modules/programs/de/gnome/default.nix index cda8961..4a97c7c 100644 --- a/nixos/home/modules/programs/de/gnome/default.nix +++ b/nixos/home/modules/programs/de/gnome/default.nix @@ -30,6 +30,12 @@ with lib.hm.gvariant; { "org/gnome/nautilus/icon-view" = { default-zoom-level = "small"; }; + "org/gnome/desktop/interface" = { + color-scheme = "prefer-dark"; + }; + "org/gnome/desktop/peripherals/touchpad" = { + tap-to-click = false; + }; }; }; diff --git a/nixos/home/modules/shell/wezterm/default.nix b/nixos/home/modules/shell/wezterm/default.nix index f9aef40..936dcf6 100644 --- a/nixos/home/modules/shell/wezterm/default.nix +++ b/nixos/home/modules/shell/wezterm/default.nix @@ -17,12 +17,28 @@ in enable = true; extraConfig = '' local wez = require('wezterm') + local xcursor_size = nil + local xcursor_theme = nil + + local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-theme"}) + if success then + xcursor_theme = stdout:gsub("'(.+)'\n", "%1") + end + + local success, stdout, stderr = wezterm.run_child_process({"gsettings", "get", "org.gnome.desktop.interface", "cursor-size"}) + if success then + xcursor_size = tonumber(stdout) + end + return { -- issue relating to nvidia drivers -- https://github.com/wez/wezterm/issues/2011 -- had to build out 550.67 manually to 'fix' enable_wayland = true, + xcursor_theme = xcursor_theme, + xcursor_size = xcursor_size, + color_scheme = "Dracula (Official)", check_for_updates = false, window_background_opacity = .90, diff --git a/nixos/hosts/legiondary/default-old.nix b/nixos/hosts/legiondary/default-old.nix new file mode 100644 index 0000000..4c32474 --- /dev/null +++ b/nixos/hosts/legiondary/default-old.nix @@ -0,0 +1,33 @@ +{ ... }: { + config = { + + # hardware-configuration.nix - half of the hardware-configuration.nix file + + networking.hostId = "ad4380db"; + networking.hostName = "durincore"; + + fileSystems."/" = + { device = "rpool/root"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "rpool/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/F1B9-CA7C"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = [ ]; + + # System settings and services. + mySystem = { + system.motd.networkInterfaces = [ "enp0s31f6" "wlp4s0" ]; + }; + + }; +} diff --git a/nixos/hosts/legiondary/default.nix b/nixos/hosts/legiondary/default.nix index 4c32474..5a59ac0 100644 --- a/nixos/hosts/legiondary/default.nix +++ b/nixos/hosts/legiondary/default.nix @@ -1,33 +1,51 @@ -{ ... }: { - config = { +# 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, ... }: - # hardware-configuration.nix - half of the hardware-configuration.nix file +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; - networking.hostId = "ad4380db"; - networking.hostName = "durincore"; + networking.hostId = "2132e3bf"; + networking.hostName = "legiondary"; + boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "ahci" "usb_storage" "usbhid" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "rpool/root"; - fsType = "zfs"; - }; - - fileSystems."/home" = - { device = "rpool/home"; - fsType = "zfs"; - }; - - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/F1B9-CA7C"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; - - swapDevices = [ ]; - - # System settings and services. - mySystem = { - system.motd.networkInterfaces = [ "enp0s31f6" "wlp4s0" ]; + fileSystems."/" = + { device = "zpool/root"; + fsType = "zfs"; }; + fileSystems."/nix" = + { device = "zpool/nix"; + fsType = "zfs"; + }; + + fileSystems."/var" = + { device = "zpool/var"; + fsType = "zfs"; + }; + + fileSystems."/home" = + { device = "zpool/home"; + fsType = "zfs"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/E532-B74A"; + fsType = "vfat"; + options = [ "fmask=0022" "dmask=0022" ]; + }; + + swapDevices = [ ]; + + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + + mySystem = { + system.motd.networkInterfaces = [ "eno1" "wlp4s0" ]; }; } diff --git a/nixos/profiles/hw-legion-15arh05h.nix b/nixos/profiles/hw-legion-15arh05h.nix index 30f0001..bc414a5 100644 --- a/nixos/profiles/hw-legion-15arh05h.nix +++ b/nixos/profiles/hw-legion-15arh05h.nix @@ -1,22 +1,26 @@ -{ config, lib, ... }: +{ config, lib, pkgs, ... }: { + # Support windows partition + mySystem.system.packages = with pkgs; [ + ntfs3g + ]; + boot = { + # for managing/mounting ntfs + supportedFilesystems = [ "ntfs" ]; + # Use the systemd-boot EFI boot loader. loader = { - systemd-boot = { + grub = { enable = true; - }; - efi = { - canTouchEfiVariables = true; + zfsSupport = true; + efiSupport = true; + efiInstallAsRemovable = true; + mirroredBoots = [ + { devices = ["nodev"]; path = "/boot";} + ]; }; }; - # Kernel mods - initrd = { - availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" ]; - kernelModules = [ ]; - }; - kernelModules = [ "kvm-intel" ]; - extraModulePackages = [ ]; }; networking = { @@ -26,5 +30,4 @@ # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixos/profiles/role-gaming.nix b/nixos/profiles/role-gaming.nix index 91c133b..714c163 100644 --- a/nixos/profiles/role-gaming.nix +++ b/nixos/profiles/role-gaming.nix @@ -3,17 +3,6 @@ # Enable module for NVIDIA graphics mySystem.hardware.nvidia.enable = true; - boot = { - # for managing/mounting ntfs - supportedFilesystems = [ "ntfs" ]; - - loader = { - systemd-boot.enable = true; - efi.canTouchEfiVariables = true; - grub.memtest86.enable = true; - }; - }; - - # set xserver videodrivers for NVIDIA 4080 gpu + # set xserver videodrivers for NVIDIA gpu services.xserver.videoDrivers = [ "nvidia" ]; }