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