]> Git — Sourcephile - julm/julm-nix.git/blob - home-manager/profiles/essential.nix
direnv: add to essential
[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.direnv
17 pkgs.dislocker
18 pkgs.dmidecode
19 pkgs.dstat
20 pkgs.dust
21 pkgs.e2fsprogs
22 pkgs.file
23 pkgs.fio
24 pkgs.gptfdisk
25 pkgs.hdparm
26 pkgs.hwinfo
27 pkgs.i2c-tools # for decode-dimms
28 pkgs.iotop
29 pkgs.iperf
30 pkgs.kernel-hardening-checker
31 pkgs.ldns
32 pkgs.lm_sensors
33 pkgs.lshw
34 pkgs.lsof
35 pkgs.lsscsi
36 pkgs.mkpasswd
37 pkgs.mmc-utils
38 #pkgs.moreutils
39 pkgs.multitail
40 pkgs.nload
41 pkgs.parted
42 pkgs.pciutils
43 #pkgs.powertop
44 pkgs.procps
45 pkgs.pstree
46 pkgs.pv
47 pkgs.s-tui
48 pkgs.smartmontools
49 pkgs.smem
50 pkgs.spectre-meltdown-checker
51 pkgs.strace
52 pkgs.stress-ng
53 pkgs.testdisk
54 pkgs.tree
55 pkgs.usbutils
56 pkgs.util-linux
57 pkgs.which
58 ] ++ lib.optionals nixosConfig.services.xserver.enable [
59 pkgs.gparted
60 pkgs.xdg-utils
61 ] ++ pkgs.lib.optionals pkgs.stdenv.hostPlatform.isx86_64 [
62 pkgs.ncdu
63 ];
64 home.sessionPath = [ "${config.home.homeDirectory}/bin" ];
65 home.sessionVariables = {
66 EDITOR = "vim";
67 LANG = "fr_FR.UTF-8";
68 LESS = "-FRSX";
69 # NixOS generates a customized pkgs.glibcLocales in config.i18n.glibcLocales
70 #LOCALE_ARCHIVE = "${pkgs.glibcLocalesUtf8}/lib/locale/locale-archive";
71 MANPAGER = "less";
72 };
73 # Keep only the last generation of the home-manager profile
74 home.activation.delete-generations = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
75 if [ "$(${pkgs.coreutils}/bin/id -u)" = 0 ]
76 then profile="''${NIX_STATE_DIR:-/nix/var/nix}/profiles/per-user/$USER"
77 else profile="''${XDG_STATE_HOME:-$HOME/.local/state}"/nix/profiles
78 fi
79 ${nixosConfig.nix.package}/bin/nix-env --delete-generations +1 --profile "$profile"/home-manager
80 '';
81 }