From abc9f50a30ff526752282a225447c8d6b6f86b1e Mon Sep 17 00:00:00 2001 From: Filippo Berto Date: Tue, 6 Dec 2022 21:50:55 +0100 Subject: [PATCH] Configurations cleanup Fix home state version --- hm_modules/__basic.nix | 2 ++ odin/common_configuration.nix | 13 +++++++++++ odin/configuration-intel.nix | 33 ++++++++++++--------------- odin/configuration-nvidia.nix | 43 +++++++++++++++++------------------ odin/hm.nix | 38 +++++++++++-------------------- thor/hm.nix | 29 +++++++++++------------ 6 files changed, 76 insertions(+), 82 deletions(-) diff --git a/hm_modules/__basic.nix b/hm_modules/__basic.nix index 1243430..0690f0c 100644 --- a/hm_modules/__basic.nix +++ b/hm_modules/__basic.nix @@ -5,11 +5,13 @@ fd file htop + lf mmv-go neofetch nixos-option nix-tree pv + ripgrep unrar unzip wget diff --git a/odin/common_configuration.nix b/odin/common_configuration.nix index 851a8b4..02f45a2 100644 --- a/odin/common_configuration.nix +++ b/odin/common_configuration.nix @@ -12,6 +12,19 @@ with lib; { hardware.enableRedistributableFirmware = true; + # Enable opengl support + hardware.opengl = { + enable = true; + driSupport = true; + driSupport32Bit = true; + extraPackages = with pkgs; [ + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; + }; + # Use same ACPI identifier as Dell Ubuntu boot.kernelParams = [ "acpi_osi=Linux-Dell-Video" ]; diff --git a/odin/configuration-intel.nix b/odin/configuration-intel.nix index 16fd7de..300fa5f 100644 --- a/odin/configuration-intel.nix +++ b/odin/configuration-intel.nix @@ -5,28 +5,23 @@ { pkgs, ... }: { - boot.initrd.kernelModules = [ "i915" ]; - boot.kernelPackages = pkgs.linuxPackages_latest; - hardware.opengl.enable = true; - hardware.opengl.driSupport = true; - hardware.opengl.extraPackages = with pkgs; [ - intel-media-driver - vaapiIntel - vaapiVdpau - libvdpau-va-gl - ]; - - # services.xserver.displayManager.gdm.enable = true; - services.xserver.displayManager.sddm = { - enable = true; - autoNumlock = true; - theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; + boot = { + initrd.kernelModules = [ "i915" ]; + kernelPackages = pkgs.linuxPackages_latest; + blacklistedKernelModules = [ "nouveau" "nvidia" ]; }; # This runs only Intel and nvidia does not drain power. ##### disable nvidia for a very nice battery life. hardware.nvidiaOptimus.disable = true; - boot.blacklistedKernelModules = [ "nouveau" "nvidia" ]; - services.xserver.videoDrivers = [ "intel" ]; - hardware.opengl.driSupport32Bit = true; + + services.xserver = { + videoDrivers = [ "intel" ]; + displayManager.sddm = { + enable = true; + autoNumlock = true; + theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; + }; + }; + } diff --git a/odin/configuration-nvidia.nix b/odin/configuration-nvidia.nix index fc8083a..2f4022a 100644 --- a/odin/configuration-nvidia.nix +++ b/odin/configuration-nvidia.nix @@ -2,30 +2,29 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). { pkgs, ... }: { - boot.initrd.kernelModules = [ "i915" ]; - # boot.kernelPackages = pkgs.linuxPackages; + + boot = { + initrd.kernelModules = [ "i915" ]; + kernelPackages = pkgs.linuxPackages_latest; + }; + + hardware.nvidia = { + # modesetting.enable = true; + # package = pkgs.linuxPackages.nvidia_x11; + prime = { + offload.enable = false; + sync.enable = true; + intelBusId = "PCI:0:2:0"; + nvidiaBusId = "PCI:1:0:0"; + }; + }; services.xserver = { videoDrivers = [ "nvidia" ]; - # displayManager.gdm = { - # enable = true; - # wayland = false; - # }; + displayManager.sddm = { + enable = true; + autoNumlock = true; + theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; + }; }; - - services.xserver.displayManager.sddm = { - enable = true; - autoNumlock = true; - theme = "${pkgs.sddm-theme-clairvoyance}/usr/share/sddm/themes/clairvoyance"; - }; - - hardware.nvidia.prime = { - offload.enable = false; - sync.enable = true; - intelBusId = "PCI:0:2:0"; - nvidiaBusId = "PCI:1:0:0"; - }; - # hardware.nvidia.modesetting.enable = true; - # hardware.nvidia.package = pkgs.linuxPackages.nvidia_x11; - hardware.opengl.driSupport32Bit = true; } diff --git a/odin/hm.nix b/odin/hm.nix index b0ed749..7b5d380 100644 --- a/odin/hm.nix +++ b/odin/hm.nix @@ -7,54 +7,45 @@ }; packages = with pkgs; [ arandr + authy bitwarden cava + discord dmenu docker-compose docker-machine droidcam easyeffects # element-desktop # matrix client - # evince + evince evolution - unstable.firefox # freecad gallery-dl gnome.eog - gnome.evince gnome.file-roller gnome.geary - gnome.gnome-boxes + # gnome.gnome-boxes gnome.gnome-calendar gnome.gnome-font-viewer gnome.gnome-screenshot # gnome.gnome-sound-recorder - gnome.gnome-sound-recorder - # gnome.gnome-sudoku - gnome.gnome-sudoku - # gnome.gnome-system-monitor - # gnome.gnome-tweaks - # gnome.nautilus - # gnome.quadrapassel + gnome.gnome-system-monitor # gnome.seahorse - # gnome.sushi gnome.totem - # gnome.vinagre - (google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }) + # (google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }) gucharmap handbrake httpie - # hyperspace-cli inkscape jetbrains.datagrip - # keepassxc krita - lutris + # lutris meld mendeley # minecraft # mycrypto nix-prefetch-scripts + obsidian openvpn p7zip pavucontrol @@ -65,19 +56,16 @@ # pulseaudio pulseaudio # retroarchFull - ripgrep + shotwell # signal-desktop skypeforlinux # slack spotify - teams - tex2nix - transmission-gtk - authy - discord - obsidian tdesktop + teams thunderbird + transmission-gtk + unstable.firefox virt-manager virt-viewer # wineFull @@ -160,5 +148,5 @@ ../hm_modules/zathura.nix ]; - home.stateVersion = "21.11"; + home.stateVersion = "22.05"; } diff --git a/thor/hm.nix b/thor/hm.nix index 86861c8..d24e569 100644 --- a/thor/hm.nix +++ b/thor/hm.nix @@ -7,8 +7,8 @@ }; packages = with pkgs; [ arandr + authy bitwarden - catgirl # IRC discord dmenu docker-compose @@ -17,27 +17,26 @@ easyeffects # electrum # element-desktop # matrix client + evince evolution filelight - unstable.firefox # freecad gallery-dl gnome.eog - gnome.evince gnome.file-roller gnome.geary - gnome.gnome-boxes + # gnome.gnome-boxes gnome.gnome-calendar gnome.gnome-font-viewer gnome.gnome-screenshot - gnome.gnome-sound-recorder - # gnome.gnome-system-monitor + # gnome.gnome-sound-recorder + gnome.gnome-system-monitor + # gnome.seahorse gnome.totem # (google-chrome.override { commandLineArgs = [ "--password-store=gnome" "--force-dark-mode" ]; }) gucharmap handbrake httpie - # hyperspace-cli inkscape jetbrains.datagrip krita @@ -45,13 +44,13 @@ meld mendeley # minecraft - mycrypto + # mycrypto nix-prefetch-scripts - okular + obsidian openvpn p7zip pavucontrol - pcmanfm + # pcmanfm pcsx2 pentablet-driver postman @@ -59,18 +58,16 @@ # pulseaudio pulseaudio retroarchFull - ripgrep shotwell # signal-desktop skypeforlinux # slack + spotify tdesktop teams - transmission-gtk - authy - obsidian - spotify thunderbird + transmission-gtk + unstable.firefox virt-manager virt-viewer # wineFull @@ -140,5 +137,5 @@ ../hm_modules/zathura.nix ]; - home.stateVersion = "21.05"; + home.stateVersion = "22.05"; }