1769288238
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
# inputs,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# inputs.chaotic.nixosModules.default
|
||||
./slim.nix
|
||||
./uutils.nix
|
||||
];
|
||||
boot = {
|
||||
consoleLogLevel = 0;
|
||||
kernel.sysctl."vm.swappiness" = 10;
|
||||
plymouth.enable = true;
|
||||
initrd = {
|
||||
systemd.enable = true;
|
||||
};
|
||||
|
||||
kernelPackages = pkgs.linuxPackages_latest;
|
||||
# kernelPackages = pkgs.linuxPackages_cachyos;
|
||||
|
||||
loader = {
|
||||
timeout = 0;
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot = {
|
||||
consoleMode = "auto";
|
||||
configurationLimit = lib.mkOverride 1337 10;
|
||||
};
|
||||
};
|
||||
tmp.cleanOnBoot = lib.mkDefault true;
|
||||
};
|
||||
|
||||
console.font = "${pkgs.spleen}/share/consolefonts/spleen-16x32.psfu";
|
||||
|
||||
environment = {
|
||||
ldso32 = null;
|
||||
# memoryAllocator.provider = "mimalloc"; # weird memory consumption stuff
|
||||
variables = {
|
||||
LESS = "-R --mouse";
|
||||
};
|
||||
};
|
||||
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
services.journald.extraConfig = ''
|
||||
SystemMaxUse=1G
|
||||
'';
|
||||
systemd.coredump.extraConfig = ''
|
||||
Storage=none
|
||||
ProcessSizeMax=0
|
||||
'';
|
||||
|
||||
zramSwap = {
|
||||
enable = true;
|
||||
algorithm = "zstd";
|
||||
memoryPercent = 25;
|
||||
priority = 5;
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
{
|
||||
# taken from https://github.com/NuschtOS/nixos-modules/blob/main/modules/slim.nix
|
||||
documentation = {
|
||||
# html docs and info are not required, man pages are enough
|
||||
doc.enable = false;
|
||||
info.enable = false;
|
||||
};
|
||||
|
||||
# environment.defaultPackages = lib.mkForce [];
|
||||
|
||||
# programs.thunderbird.package = pkgs.thunderbird.override {cfg.speechSynthesisSupport = false;};
|
||||
|
||||
# during testing only 550K-650K of the tmpfs where used
|
||||
security.wrapperDirSize = "10M";
|
||||
|
||||
services = {
|
||||
orca.enable = false; # requires speechd
|
||||
speechd.enable = false; # voice files are big and fat
|
||||
};
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
{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 = [
|
||||
# coreutils
|
||||
{
|
||||
# system
|
||||
oldDependency = pkgs.coreutils-full;
|
||||
newDependency = pkgs.symlinkJoin {
|
||||
# Make the name length match so it builds
|
||||
name = coreutils-full-name;
|
||||
paths = [pkgs.uutils-coreutils-noprefix];
|
||||
};
|
||||
}
|
||||
{
|
||||
# applications
|
||||
oldDependency = pkgs.coreutils;
|
||||
newDependency = pkgs.symlinkJoin {
|
||||
# Make the name length match so it builds
|
||||
name = coreutils-name;
|
||||
paths = [pkgs.uutils-coreutils-noprefix];
|
||||
};
|
||||
}
|
||||
# findutils
|
||||
# {
|
||||
# # applications
|
||||
# oldDependency = pkgs.findutils;
|
||||
# newDependency = pkgs.symlinkJoin {
|
||||
# # Make the name length match so it builds
|
||||
# name = findutils-name;
|
||||
# paths = [pkgs.uutils-findutils];
|
||||
# };
|
||||
# }
|
||||
# diffutils
|
||||
# {
|
||||
# # applications
|
||||
# oldDependency = pkgs.diffutils;
|
||||
# newDependency = pkgs.symlinkJoin {
|
||||
# # Make the name length match so it builds
|
||||
# name = diffutils-name;
|
||||
# paths = [pkgs.uutils-diffutils];
|
||||
# };
|
||||
# }
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user