Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: Add home hardware profiles, migrate lib.isNvidia

+40 -14
+1 -4
nix/home/modules/bars/caelestia/default.nix
··· 1 1 { 2 2 config, 3 - inputs, 4 3 lib, 5 - osConfig ? {}, 6 4 ... 7 5 }: let 8 - inherit (inputs.self.lib) isNvidia; 9 6 cfg = config.my.bars.caelestia; 10 7 in { 11 8 options.my.bars.caelestia.enable = lib.mkEnableOption "Caelestia"; ··· 67 64 services = { 68 65 audioIncrement = 0.05; 69 66 gpuType = 70 - if (isNvidia osConfig) 67 + if (config.my.profiles.hardware.gpu.nvidia) 71 68 then "nvidia" 72 69 else ""; 73 70 useFahrenheit = false;
+2 -6
nix/home/modules/bars/dank-material-shell/default.nix
··· 1 1 { 2 2 config, 3 - inputs, 4 3 lib, 5 - osConfig ? {}, 6 4 ... 7 5 }: let 8 6 inherit (config.my.config) wallpaper; 9 - inherit (inputs.self.lib) isNvidia; 10 7 cfg = config.my.bars.dank-material-shell; 11 - isNvidia' = isNvidia osConfig; 12 8 in { 13 9 options.my.bars.dank-material-shell.enable = lib.mkEnableOption "Dank material shell"; 14 10 ··· 41 37 isLightMode = false; 42 38 nightModeEnabled = false; 43 39 wallpaperPath = wallpaper; 44 - nvidiaGpuTempEnabled = isNvidia'; 45 - nonNvidiaGpuTempEnabled = !isNvidia'; 40 + nvidiaGpuTempEnabled = config.my.profiles.hardware.gpu.nvidia; 41 + nonNvidiaGpuTempEnabled = !config.my.profiles.hardware.gpu.nvidia; 46 42 }; 47 43 48 44 clipboardSettings = {
+1 -3
nix/home/modules/gui/chromium.nix
··· 2 2 config, 3 3 inputs, 4 4 lib, 5 - osConfig ? {}, 6 5 pkgs, 7 6 ... 8 7 }: let 9 8 inherit (inputs.home-manager.lib) hm; 10 - inherit (inputs.self.lib) isNvidia; 11 9 cfg = config.my.gui.chromium; 12 10 in { 13 11 options.my.gui.chromium.enable = ··· 21 19 [ 22 20 "--password-store=gnome" 23 21 ] 24 - ++ (lib.optionals (isNvidia osConfig) [ 22 + ++ (lib.optionals (config.my.profiles.hardware.gpu.nvidia) [ 25 23 "--disable-gpu-compositing" # @TODO Remove after NVIDIA figures this out 26 24 ]); 27 25 package = pkgs.brave;
+1
nix/home/profiles/default.nix
··· 2 2 imports = [ 3 3 ./de 4 4 ./graphical.nix 5 + ./hardware 5 6 ./llm 6 7 ./standalone.nix 7 8 ];
+5
nix/home/profiles/hardware/cpu/default.nix
··· 1 + { 2 + imports = [ 3 + ./intel.nix 4 + ]; 5 + }
+9
nix/home/profiles/hardware/cpu/intel.nix
··· 1 + { 2 + lib, 3 + osConfig ? {}, 4 + ... 5 + }: { 6 + options.my.profiles.hardware.cpu.intel = 7 + lib.mkEnableOption "Intel CPU profile" 8 + // {default = osConfig.my.profiles.hardware.cpu.intel or false;}; 9 + }
+6
nix/home/profiles/hardware/default.nix
··· 1 + { 2 + imports = [ 3 + ./cpu 4 + ./gpu 5 + ]; 6 + }
+5
nix/home/profiles/hardware/gpu/default.nix
··· 1 + { 2 + imports = [ 3 + ./nvidia.nix 4 + ]; 5 + }
+9
nix/home/profiles/hardware/gpu/nvidia.nix
··· 1 + { 2 + lib, 3 + osConfig, 4 + ... 5 + }: { 6 + options.my.profiles.hardware.gpu.nvidia = 7 + lib.mkEnableOption "NVIDIA GPU profile" 8 + // {default = osConfig.my.profiles.hardware.gpu.nvidia or false;}; 9 + }
+1 -1
nix/nixos/profiles/hardware/gpu/nvidia.nix
··· 5 5 }: let 6 6 cfg = config.my.profiles.hardware.gpu.nvidia; 7 7 in { 8 - options.my.profiles.hardware.gpu.nvidia = lib.mkEnableOption "nvidia profile"; 8 + options.my.profiles.hardware.gpu.nvidia = lib.mkEnableOption "NVIDIA GPU profile"; 9 9 config = lib.mkIf cfg { 10 10 boot.kernelParams = [ 11 11 "nvidia.NVreg_PreserveVideoMemoryAllocations=1"