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