feat: modular zram

This commit is contained in:
2026-02-19 08:58:37 +01:00
parent 8d7848c0d3
commit f832903ada
5 changed files with 10 additions and 2 deletions

View File

@@ -57,6 +57,7 @@
gamingSystem = true; gamingSystem = true;
# Currently supported: plasma, gnome, hyprland and none # Currently supported: plasma, gnome, hyprland and none
desktopEnvironment = "gnome"; desktopEnvironment = "gnome";
enableZram = true;
additionalModules = [ additionalModules = [
]; ];
}; };
@@ -66,12 +67,14 @@
email = personalEmail; email = personalEmail;
workSystem = true; workSystem = true;
desktopEnvironment = "gnome"; desktopEnvironment = "gnome";
enableZram = true;
}; };
nixosConfigurations."bomba" = mkSystem "bomba" { nixosConfigurations."bomba" = mkSystem "bomba" {
system = "x86_64-linux"; system = "x86_64-linux";
email = personalEmail; email = personalEmail;
user = username; user = username;
desktopEnvironment = "none"; desktopEnvironment = "none";
enableZram = true;
}; };
}; };
} }

View File

@@ -17,6 +17,7 @@ name:
gamingSystem ? false, gamingSystem ? false,
workSystem ? false, workSystem ? false,
desktopEnvironment ? "", desktopEnvironment ? "",
enableZram ? false,
additionalModules ? [ ], additionalModules ? [ ],
}: }:
let let
@@ -36,6 +37,7 @@ let
currentSystemDe = desktopEnvironment; currentSystemDe = desktopEnvironment;
gamingSystem = gamingSystem; gamingSystem = gamingSystem;
workSystem = workSystem; workSystem = workSystem;
enableZram = enableZram;
nixvim = nixvim; nixvim = nixvim;
millennium = millennium; millennium = millennium;
nur = nur; nur = nur;

View File

@@ -48,6 +48,4 @@
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
zramSwap.enable = true;
} }

View File

@@ -6,6 +6,7 @@
}: }:
{ {
imports = [ imports = [
./hardware.nix
./keyboard.nix ./keyboard.nix
./security.nix ./security.nix
./services.nix ./services.nix

View File

@@ -0,0 +1,4 @@
{ enableZram, ... }:
{
zramSwap.enable = enableZram;
}