system/common: misc nix-related changes

This commit is contained in:
chayleaf 2023-08-12 17:40:51 +07:00
parent aa6fef1d9c
commit 67509d0801

View file

@ -38,7 +38,8 @@ in {
cfg = config.common; cfg = config.common;
in { in {
nix = { nix = {
channel.enable = false; # nix.channel.enable is needed for NIX_PATH to work for some reason
# channel.enable = false;
settings = { settings = {
allowed-users = [ cfg.mainUsername ]; allowed-users = [ cfg.mainUsername ];
auto-optimise-store = true; auto-optimise-store = true;
@ -59,6 +60,8 @@ in {
package = pkgs.nixForNixPlugins; package = pkgs.nixForNixPlugins;
}; };
systemd.services.nix-daemon.serviceConfig.LimitSTACKSoft = "infinity"; systemd.services.nix-daemon.serviceConfig.LimitSTACKSoft = "infinity";
nix.daemonCPUSchedPolicy = lib.mkDefault "idle";
nix.daemonIOSchedClass = lib.mkDefault "idle";
boot.kernelParams = lib.optionals (cfg.resolution != null) [ boot.kernelParams = lib.optionals (cfg.resolution != null) [
"consoleblank=60" "consoleblank=60"
] ++ (lib.optionals (cfg.resolution == "1920x1080") [ ] ++ (lib.optionals (cfg.resolution == "1920x1080") [