Nix store gc and Emacs as systemd service

This commit is contained in:
Andrea Ciceri 2022-01-12 12:09:58 +01:00
parent 1da0bea837
commit d0c42a5b7f
No known key found for this signature in database
GPG key ID: A1FC89532D1C5654
6 changed files with 33 additions and 9 deletions

View file

@ -259,6 +259,14 @@
email = "andrea.ciceri@autistici.org";
};
nix = {
package = pkgs.nixUnstable;
gc = {
automatic = true;
options = "--delete-older-than 3d";
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -18,13 +18,8 @@
nix = {
package = pkgs.nixUnstable;
extraOptions = ''
experimental-features = nix-command flakes flakes ca-references
keep-derivations = true
keep-outputs = true
'';
gc = {
automatic = false;
automatic = true;
user = "andreaciceri";
options = "--delete-older-than 3d";
};

View file

@ -6,7 +6,7 @@
boot = {
initrd.availableKernelModules = [ "usbhid" ];
kernelPackages = pbpKernelLatest;
kernelModules = [];
kernelModules = [ ];
extraModulePackages = with config.boot.kernelPackages; [
v4l2loopback
];
@ -45,7 +45,16 @@
};
swapDevices =
[ { device = "/dev/disk/by-uuid/e236d328-496e-4cf8-ba54-857789ca258f"; } ];
[{ device = "/dev/disk/by-uuid/e236d328-496e-4cf8-ba54-857789ca258f"; }];
nix = {
package = pkgs.nixUnstable;
gc = {
automatic = true;
options = "--delete-older-than 3d";
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
}

View file

@ -43,5 +43,13 @@
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
nix = {
package = pkgs.nixUnstable;
gc = {
automatic = true;
options = "--delete-older-than 3d";
};
};
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
}

View file

@ -11,6 +11,10 @@
package = pkgs.customEmacs;
};
services.emacs = {
enable = true;
};
# For some reason Hunspell dictionaries paths must be specified on Darwin
home.sessionVariables =
if pkgs.stdenv.hostPlatform.isDarwin then {

View file

@ -57,7 +57,7 @@
'';
in
lib.mkOptionDefault {
"${modifier}+x" = "exec emacs";
"${modifier}+x" = "exec emacsclient -c";
"${modifier}+b" = "exec firefox";
"${modifier}+s" = "exec ${screenshotScript}";
};