diff --git a/core/config.nix b/core/config.nix index 86a4083..ec144e4 100644 --- a/core/config.nix +++ b/core/config.nix @@ -45,6 +45,7 @@ "flakes" ]; }; + gc = { ## Automatically run 'nix-collect-garbage' automatic = true; @@ -58,6 +59,12 @@ }; + hardware = { + + enableAllFirmware = true; + + }; + ## Apparently prevents getting stuck at shutdown systemd.extraConfig = "DefaultTimeoutStopSec=10s"; diff --git a/home/common/programs/fish-sashas.nix b/home/common/fish-sashas.nix similarity index 100% rename from home/common/programs/fish-sashas.nix rename to home/common/fish-sashas.nix diff --git a/home/common/programs/gitsync.nix b/home/common/gitsync.nix similarity index 100% rename from home/common/programs/gitsync.nix rename to home/common/gitsync.nix diff --git a/home/common/programs/lazygit.nix b/home/common/lazygit.nix similarity index 100% rename from home/common/programs/lazygit.nix rename to home/common/lazygit.nix diff --git a/home/common/programs/default.nix b/home/common/programs/default.nix deleted file mode 100644 index 1cecc8e..0000000 --- a/home/common/programs/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - self, - inputs, - outputs, - lib, - config, - pkgs, - ... -}: - -{ - - imports = [ - ./git.nix - #./btop.nix - ./yazi.nix - ./kitty.nix - #./nixvim - ./neofetch.nix - - ]; - -} diff --git a/hosts/hades/default.nix b/hosts/hades/default.nix index a850fa3..9339dcd 100644 --- a/hosts/hades/default.nix +++ b/hosts/hades/default.nix @@ -1,24 +1,27 @@ -{ lib, config, pkgs, modulesPath, ... }: +{ inputs, outputs, modulesPath, lib, config, pkgs, ... }: { imports = [ - ./hardware-configuration.nix - ./network-configuration.nix - ../../core/config.nix - #./modules/syncthing.nix # got nuked, wasn't functional anyway :shrug: - #./modules/disko.nix # BROKEN - ./modules/zfs.nix + ## Host specific files + ./hardware-configuration.nix # hardware config + ./network-configuration.nix # network config + ./modules # more host specific configs + + ## Shared 'core' config options + ../../config.nix + ]; hardware = { - enableAllFirmware = true; + ## No bluetooth inside Hades (yet) bluetooth.enable = false; graphics = { enable = true; - ## Packages for integrated graphics inside Hades + + ## Packages for the iGPU inside Hades extraPackages = with pkgs; [ #intel-compute-runtime #intel-media-driver @@ -26,12 +29,14 @@ #vaapiVdpau #libvdpau-va-gl ]; + }; + ## Packages for the dGPU inside Hades amdgpu = { initrd.enable = true; opencl.enable = true; - + ## Vulkan packages for the dGPU inside Hades amdvlk = { enable = true; #package = [ ]; @@ -40,21 +45,23 @@ #settings = { #}; }; - }; + }; programs = { - ## For tweaking Radeon GPUs + + ## For tweaking system performance corectrl = { enable = true; + ## Allows tweaking GPU performance gpuOverclock = { enable = true; - ## Allows changing clocks and volts + ## Needed for radeon GPU overclocking ppfeaturemask = "0xfffd7fff"; }; }; - + ## Performance tweaking continued tuxclocker = { enable = true; enableAMD = true; @@ -63,7 +70,7 @@ }; - ## Some packages for managing the radeon GPU inside Hades + ## Some packages for managing the hardware inside Hades environment.systemPackages = with pkgs; [ umr radeontop diff --git a/hosts/hades/modules/default.nix b/hosts/hades/modules/default.nix new file mode 100644 index 0000000..3190559 --- /dev/null +++ b/hosts/hades/modules/default.nix @@ -0,0 +1,14 @@ +{ inputs, outputs, modulesPath, lib, config, pkgs, ... }: + +{ + imports = [ + + ## Selected modules for import + ./zfs.nix # zfs storage config + ./disko.nix # disk/partition config + ./network.nix # network/internet config + ./syncthing.nix # syncthing config + + ]; + +} diff --git a/hosts/hades/network-configuration.nix b/hosts/hades/modules/network.nix similarity index 100% rename from hosts/hades/network-configuration.nix rename to hosts/hades/modules/network.nix diff --git a/hosts/persephone/default.nix b/hosts/persephone/default.nix index 267bb05..79c4440 100644 --- a/hosts/persephone/default.nix +++ b/hosts/persephone/default.nix @@ -1,36 +1,56 @@ -{ inputs, outputs, lib, config, pkgs, ... }: +{ inputs, outputs, modulesPath, lib, config, pkgs, ... }: { imports = [ - ## Import necessary flake modules - #"${builtins.fetchTarball ""}/module.nix" + ## Host specific files + ./hardware-configuration.nix # hardware config + ./network-configuration.nix # network config + ./modules # more host specific configs - ## Include host specific options - ./hardware - ./network - - ## Include core config options + ## Shared 'core' config options ../../config.nix ]; - nix = { + hardware = { - #settings = { - #}; + ## Enable bluetooth inside Persephone + bluetooth.enable = true; - gc = { - ## Automatically run 'nix-collect-garbage', - automatic = true; - ## every day, - dates = "daily"; - ## and clear junk older than 1 day - options = "--delete-older-than 1d"; + graphics = { + enable = true; + + ## Packages for the iGPU inside Persephone + extraPackages = with pkgs; [ + intel-compute-runtime + intel-media-driver + vaapiIntel + vaapiVdpau + libvdpau-va-gl + ]; - ## No clue what this does lol. - persistent = true; }; + }; + programs = { + + ## For tweaking system performance + corectrl = { + enable = true; + }; + ## Performance tweaking continued + tuxclocker = { + enable = true; + useUnfree = true; + }; + + }; + + ## Some packages for managing the hardware inside Persephone + environment.systemPackages = with pkgs; [ + nvtopPackages.intel + ]; + } diff --git a/hosts/persephone/hardware/default.nix b/hosts/persephone/hardware-configuration.nix similarity index 100% rename from hosts/persephone/hardware/default.nix rename to hosts/persephone/hardware-configuration.nix diff --git a/hosts/persephone/modules/default.nix b/hosts/persephone/modules/default.nix new file mode 100644 index 0000000..802bef5 --- /dev/null +++ b/hosts/persephone/modules/default.nix @@ -0,0 +1,13 @@ +{ inputs, outputs, modulesPath, lib, config, pkgs, ... }: + +{ + imports = [ + + ## Selected modules for import + ./disko.nix # disk/partition config + ./network.nix # network/internet config + ./syncthing.nix # syncthing config + + ]; + +} diff --git a/hosts/persephone/hardware/disko.nix b/hosts/persephone/modules/disko.nix similarity index 100% rename from hosts/persephone/hardware/disko.nix rename to hosts/persephone/modules/disko.nix diff --git a/hosts/persephone/network/default.nix b/hosts/persephone/modules/network.nix similarity index 100% rename from hosts/persephone/network/default.nix rename to hosts/persephone/modules/network.nix diff --git a/hosts/persephone/network/syncthing.nix b/hosts/persephone/modules/syncthing.nix similarity index 100% rename from hosts/persephone/network/syncthing.nix rename to hosts/persephone/modules/syncthing.nix