diff options
Diffstat (limited to 'nixos/configuration/sys')
| -rwxr-xr-x | nixos/configuration/sys/coreutils-configuration.nix | 48 | ||||
| -rwxr-xr-x | nixos/configuration/sys/swap.nix | 11 | ||||
| -rwxr-xr-x | nixos/configuration/sys/zram.nix | 10 |
3 files changed, 69 insertions, 0 deletions
diff --git a/nixos/configuration/sys/coreutils-configuration.nix b/nixos/configuration/sys/coreutils-configuration.nix new file mode 100755 index 0000000..9532a3e --- /dev/null +++ b/nixos/configuration/sys/coreutils-configuration.nix @@ -0,0 +1,48 @@ +{ + pkgs, + ... +}: let + coreutils-full-name = "coreuutils-full" + builtins.concatStringsSep "" + (builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils-full.version)); + + coreutils-name = "coreuutils" + builtins.concatStringsSep "" + (builtins.genList (_: "_") (builtins.stringLength pkgs.coreutils.version)); + + findutils-name = "finduutils" + builtins.concatStringsSep "" + (builtins.genList (_: "_") (builtins.stringLength pkgs.findutils.version)); + + diffutils-name = "diffuutils" + builtins.concatStringsSep "" + (builtins.genList (_: "_") (builtins.stringLength pkgs.diffutils.version)); +in +{ + system.replaceDependencies.replacements = [ + { + oldDependency = pkgs.coreutils-full; + newDependency = pkgs.symlinkJoin { + name = coreutils-full-name; + paths = [pkgs.uutils-coreutils-noprefix]; + }; + } + { + oldDependency = pkgs.coreutils; + newDependency = pkgs.symlinkJoin { + name = coreutils-name; + paths = [pkgs.uutils-coreutils-noprefix]; + }; + } + { + oldDependency = pkgs.findutils; + newDependency = pkgs.symlinkJoin { + name = findutils-name; + paths = [pkgs.uutils-findutils]; + }; + } + { + oldDependency = pkgs.diffutils; + newDependency = pkgs.symlinkJoin { + name = diffutils-name; + paths = [pkgs.uutils-diffutils]; + }; + } + ]; +} diff --git a/nixos/configuration/sys/swap.nix b/nixos/configuration/sys/swap.nix new file mode 100755 index 0000000..72cba4f --- /dev/null +++ b/nixos/configuration/sys/swap.nix @@ -0,0 +1,11 @@ +{ + ... +}: +{ + swapDevices = [ + { + device = "/var/lib/swapfile"; + size = 12*1024; + } + ]; +} diff --git a/nixos/configuration/sys/zram.nix b/nixos/configuration/sys/zram.nix new file mode 100755 index 0000000..8e7037d --- /dev/null +++ b/nixos/configuration/sys/zram.nix @@ -0,0 +1,10 @@ +{ + config, + ... +}: +{ + zramSwap = { + enable = true; + writebackDevice = "/dev/nvme0n1p3"; + }; +} |
