1 { config, pkgs, lib, inputs, hostName, ... }:
2 let inherit (config.users) users; in
5 ../profiles/dnscrypt-proxy2.nix
10 home-manager.users.julm = {
11 imports = [ ../homes/julm.nix ];
13 host.hardware = ["ThinkPad" "X201"];
15 systemd.services.home-manager-julm.postStart = ''
16 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
18 users.mutableUsers = false;
22 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
23 # which is already world readable.
24 hashedPassword = lib.readFile ../secrets/julm/hashedPassword;
36 # If created, zfs-mount.service would require:
37 # zfs set overlay=yes ${hostName}/home
43 auto-optimise-store = true
48 options = "--delete-older-than 7d";
51 "nixpkgs=/etc/nixpkgs"
52 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
54 trustedUsers = [ users.julm.name ];
56 environment.etc."nixpkgs".source = pkgs.path;
57 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
62 documentation.nixos.enable = true;
63 time.timeZone = "Europe/Paris";
64 i18n.defaultLocale = "fr_FR.UTF-8";
65 console.font = "Lat2-Terminus16";
66 console.keyMap = "fr";
70 domain = "localdomain";
71 search = [ "sourcephile.fr" ];
78 #backend = "wpa_supplicant";
88 hardware.pulseaudio.enable = true;
89 hardware.sane.enable = true;
90 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
92 environment.variables = {
95 SYSTEMD_LESS = "FKMRX";
100 interactiveShellInit = ''
101 bind '"\e[A":history-search-backward'
102 bind '"\e[B":history-search-forward'
104 # Ignore duplicate commands, ignore commands starting with a space
105 export HISTCONTROL=erasedups:ignorespace
106 export HISTSIZE=42000
107 # Append to the history instead of overwriting (good for multiple connections)
111 mkcd () { mkdir -p "$1"; cd "$1"; }
114 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
115 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
122 grep = "grep --color";
125 ls = "ls --color=tty";
126 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
129 st="sudo systemctl status";
130 u="systemctl --user";
131 j="sudo journalctl -u";
132 jb="sudo journalctl -b";
134 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
136 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
149 packages = [ pkgs.gnome3.dconf ];
157 MaxRetentionSec=1month
171 extraArgs = [ "--verbose" ];
173 "${hostName}/home" = {
182 "${hostName}/var" = {
195 # Allow members of the "adbusers" group to mount Android devices via MTP
196 pkgs.android-udev-rules
202 xkbOptions = "eurosign:e";
203 libinput.enable = true;
206 # Let the session be generated by home-manager
207 { name = "home-manager";
209 ${pkgs.runtimeShell} $HOME/.hm-xsession &
216 defaultSession = "home-manager";
217 #defaultSession = "none+xmonad";
220 user = users.julm.name;
226 # This value determines the NixOS release with which your system is to be
227 # compatible, in order to avoid breaking some software such as database
228 # servers. You should change this only after NixOS release notes say you should.
229 system.stateVersion = "20.09"; # Did you read the comment?