1 { config, pkgs, lib, inputs, hostName, ... }:
2 let inherit (config.users) users; in
5 ../profiles/dnscrypt-proxy2.nix
11 home-manager.users.julm = {
12 imports = [ ../homes/julm.nix ];
14 host.hardware = ["ThinkPad" "X201"];
16 systemd.services.home-manager-julm.postStart = ''
17 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
19 users.mutableUsers = false;
23 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
24 # which is already world readable.
25 hashedPassword = lib.readFile ../secrets/julm/hashedPassword;
37 # If created, zfs-mount.service would require:
38 # zfs set overlay=yes ${hostName}/home
44 auto-optimise-store = true
49 options = "--delete-older-than 7d";
52 "nixpkgs=/etc/nixpkgs"
53 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
55 trustedUsers = [ users.julm.name ];
57 environment.etc."nixpkgs".source = pkgs.path;
58 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
63 documentation.nixos.enable = true;
64 time.timeZone = "Europe/Paris";
65 i18n.defaultLocale = "fr_FR.UTF-8";
66 console.font = "Lat2-Terminus16";
67 console.keyMap = "fr";
71 domain = "localdomain";
72 search = [ "sourcephile.fr" ];
79 #backend = "wpa_supplicant";
90 hardware.pulseaudio.enable = true;
91 hardware.sane.enable = true;
92 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
94 environment.variables = {
97 SYSTEMD_LESS = "FKMRX";
99 environment.systemPackages = [
105 interactiveShellInit = ''
106 bind '"\e[A":history-search-backward'
107 bind '"\e[B":history-search-forward'
109 # Ignore duplicate commands, ignore commands starting with a space
110 export HISTCONTROL=erasedups:ignorespace
111 export HISTSIZE=42000
112 # Append to the history instead of overwriting (good for multiple connections)
116 mkcd () { mkdir -p "$1"; cd "$1"; }
119 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
120 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
127 grep = "grep --color";
130 ls = "ls --color=tty";
131 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
134 st="sudo systemctl status";
135 u="systemctl --user";
136 j="sudo journalctl -u";
137 jb="sudo journalctl -b";
139 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
141 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
152 openFirewall = false;
158 packages = [ pkgs.gnome3.dconf ];
166 MaxRetentionSec=1month
180 # Allow members of the "adbusers" group to mount Android devices via MTP
181 pkgs.android-udev-rules
187 xkbOptions = "eurosign:e";
188 libinput.enable = true;
191 # Let the session be generated by home-manager
192 { name = "home-manager";
194 ${pkgs.runtimeShell} $HOME/.hm-xsession &
201 defaultSession = "home-manager";
202 #defaultSession = "none+xmonad";
205 user = users.julm.name;
211 systemd.coredump.enable = true;
212 #environment.enableDebugInfo = true;
214 # This value determines the NixOS release with which your system is to be
215 # compatible, in order to avoid breaking some software such as database
216 # servers. You should change this only after NixOS release notes say you should.
217 system.stateVersion = "20.09"; # Did you read the comment?