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