Enable zramswap and earlyoom
This commit is contained in:
parent
0fe4816359
commit
6d5a1145a8
32
flake.lock
32
flake.lock
|
@ -201,11 +201,11 @@
|
|||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699783872,
|
||||
"narHash": "sha256-4zTwLT2LL45Nmo6iwKB3ls3hWodVP9DiSWxki/oewWE=",
|
||||
"lastModified": 1700261686,
|
||||
"narHash": "sha256-kplQg6hKFNuWKrOyGp9D//G/WH1nHGJ43r2m7fagTYY=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "280721186ab75a76537713ec310306f0eba3e407",
|
||||
"rev": "ecd0a800f716b80a6eac58a7ac34d6d33e6fa5ee",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -265,11 +265,11 @@
|
|||
},
|
||||
"nixos-hardware": {
|
||||
"locked": {
|
||||
"lastModified": 1699701045,
|
||||
"narHash": "sha256-mDzUXK7jNO/utInWpSWEX1NgEEunVIpJg+LyPsDTfy0=",
|
||||
"lastModified": 1700315735,
|
||||
"narHash": "sha256-zlSLW6dX5XwBEwN87CIVtMr8zDSKvTRFmWmIQ9FfWgo=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixos-hardware",
|
||||
"rev": "b689465d0c5d88e158e7d76094fca08cc0223aad",
|
||||
"rev": "1721da31f9b30cbf4460c4ec5068b3b6174a4694",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -280,11 +280,11 @@
|
|||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1699099776,
|
||||
"narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=",
|
||||
"lastModified": 1700204040,
|
||||
"narHash": "sha256-xSVcS5HBYnD3LTer7Y2K8ZQCDCXMa3QUD1MzRjHzuhI=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb",
|
||||
"rev": "c757e9bd77b16ca2e03c89bf8bc9ecb28e0c06ad",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -338,11 +338,11 @@
|
|||
"pre-commit-hooks": "pre-commit-hooks"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1699881763,
|
||||
"narHash": "sha256-3oky/Ye5JPIsPj77A7XGXFkAlhAV70N1pGoEkfZKQyA=",
|
||||
"lastModified": 1700240304,
|
||||
"narHash": "sha256-nR5Ot2nN0msfGD1Vj76/4zb6+5ksJ28gfsit/BhK/oA=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "d748d9ea024c0ebe99996f71a534d2ebb12e5462",
|
||||
"rev": "440c449c0a13f7864bb8406baf19f4e9f61abc55",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -436,11 +436,11 @@
|
|||
},
|
||||
"private": {
|
||||
"locked": {
|
||||
"lastModified": 1699584232,
|
||||
"narHash": "sha256-nVMcOMUtTKfdZZlp+DAp3NYsEXCGWwUpaAYAmyv+PkY=",
|
||||
"lastModified": 1700250258,
|
||||
"narHash": "sha256-5RE41KPIh85LRSwWP0CHBv2L5Gl1Qnl42268JE9fFWI=",
|
||||
"ref": "unified",
|
||||
"rev": "5248b9d52f4d73f4781d49dbc8e05d6b2fd1adae",
|
||||
"revCount": 37,
|
||||
"rev": "061bc7e341df4629220e215c6caad77684c18513",
|
||||
"revCount": 38,
|
||||
"type": "git",
|
||||
"url": "ssh://gitea@git.mildlyfunctional.gay/artemist/nixos-config-private"
|
||||
},
|
||||
|
|
10
sets/swap.nix
Normal file
10
sets/swap.nix
Normal file
|
@ -0,0 +1,10 @@
|
|||
{ lib, ... }: {
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
memoryPercent = lib.mkDefault 25;
|
||||
};
|
||||
services.earlyoom = {
|
||||
enable = true;
|
||||
freeMemThreshold = lib.mkDefault 5;
|
||||
};
|
||||
}
|
|
@ -2,13 +2,14 @@
|
|||
|
||||
{
|
||||
imports = [
|
||||
../home
|
||||
./1password.nix
|
||||
./sway.nix
|
||||
./base.nix
|
||||
./nix-index.nix
|
||||
./packages.nix
|
||||
./pipewire.nix
|
||||
./base.nix
|
||||
../home
|
||||
./nix-index.nix
|
||||
./swap.nix
|
||||
./sway.nix
|
||||
inputs.nixvim.nixosModules.nixvim
|
||||
];
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
|
||||
{
|
||||
boot = {
|
||||
kernel.sysctl."vm.swappiness" = 5;
|
||||
kernelParams = [ "console=tty1" ];
|
||||
tmp.cleanOnBoot = true;
|
||||
loader.grub.enable = false;
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
kernel.sysctl."vm.swappiness" = 5;
|
||||
tmp.cleanOnBoot = true;
|
||||
blacklistedKernelModules = [ "psmouse" ];
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
{
|
||||
boot = {
|
||||
kernelParams = [ "fbcon=rotate:1" ];
|
||||
kernel.sysctl."vm.swappiness" = 5;
|
||||
tmp.cleanOnBoot = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@ in {
|
|||
boot = {
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
extraModulePackages = with config.boot.kernelPackages; [ v4l2loopback ];
|
||||
kernel.sysctl."vm.swappiness" = 5;
|
||||
tmp.cleanOnBoot = true;
|
||||
|
||||
# Encrypted drives
|
||||
|
|
|
@ -87,8 +87,6 @@
|
|||
}))
|
||||
];
|
||||
|
||||
hardware.opengl.extraPackages = with pkgs; [ vulkan-validation-layers ];
|
||||
|
||||
# Home
|
||||
home-manager.users.artemis = {
|
||||
programs.git.signing.key =
|
||||
|
|
Loading…
Reference in a new issue