]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/essential.nix
htop: always overwrite config
[julm/julm-nix.git] / home-manager / profiles / essential.nix
1 { pkgs, lib, config, nixosConfig, ... }:
2 {
3 imports = [
4 ./bash.nix
5 ./htop.nix
6 ./ssh.nix
7 ./tmux.nix
8 ];
9 programs.bat.enable = lib.mkDefault true;
10 home.packages = [
11 nixosConfig.boot.kernelPackages.cpupower
12 pkgs.acpi
13 pkgs.audit
14 pkgs.binutils
15 pkgs.cryptsetup
16 pkgs.dmidecode
17 pkgs.dstat
18 pkgs.dust
19 pkgs.e2fsprogs
20 pkgs.file
21 pkgs.fio
22 pkgs.gptfdisk
23 pkgs.hdparm
24 pkgs.hwinfo
25 pkgs.i2c-tools # for decode-dimms
26 pkgs.iotop
27 pkgs.iperf
28 pkgs.kernel-hardening-checker
29 pkgs.ldns
30 pkgs.lm_sensors
31 pkgs.lshw
32 pkgs.lsof
33 pkgs.lsscsi
34 pkgs.mkpasswd
35 #pkgs.moreutils
36 pkgs.multitail
37 pkgs.nload
38 pkgs.parted
39 pkgs.pciutils
40 #pkgs.powertop
41 pkgs.procps
42 pkgs.pstree
43 pkgs.pv
44 pkgs.s-tui
45 pkgs.smartmontools
46 pkgs.smem
47 pkgs.spectre-meltdown-checker
48 pkgs.strace
49 pkgs.stress-ng
50 pkgs.testdisk
51 pkgs.tree
52 pkgs.usbutils
53 pkgs.util-linux
54 pkgs.which
55 ] ++ lib.optionals nixosConfig.services.xserver.enable [
56 pkgs.gparted
57 pkgs.xdg-utils
58 ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [
59 pkgs.ncdu
60 ];
61 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
62 home.sessionVariables = {
63 EDITOR = "vim";
64 LANG = "fr_FR.UTF-8";
65 LESS = "-FRSX";
66 # NixOS generates a customized pkgs.glibcLocales in config.i18n.glibcLocales
67 #LOCALE_ARCHIVE = "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive";
68 MANPAGER = "less";
69 };
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
75 fi
76 ${nixosConfig.nix.package}/bin/nix-env --delete-generations +1 --profile "$profile"/home-manager
77 '';
78 }