1 { pkgs, lib, config, nixosConfig, ... }:
9 programs.bat.enable = lib.mkDefault true;
11 nixosConfig.boot.kernelPackages.cpupower
27 pkgs.i2c-tools # for decode-dimms
31 pkgs.kernel-hardening-checker
51 pkgs.spectre-meltdown-checker
59 ] ++ lib.optionals nixosConfig.services.xserver.enable [
62 ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [
65 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
66 home.sessionVariables = {
70 # NixOS generates a customized pkgs.glibcLocales in config.i18n.glibcLocales
71 #LOCALE_ARCHIVE = "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive";
74 # Keep only the last generation of the home-manager profile
75 home.activation.delete-generations = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
76 if [ "$(${pkgs.coreutils}/bin/id -u)" = 0 ]
77 then profile="''${NIX_STATE_DIR:-/nix/var/nix}/profiles/per-user/$USER"
78 else profile="''${XDG_STATE_HOME:-$HOME/.local/state}"/nix/profiles
80 ${nixosConfig.nix.package}/bin/nix-env --delete-generations +1 --profile "$profile"/home-manager