1 { config, pkgs, lib, inputs, private, hostName, ... }:
3 inherit (config.users) users;
4 inherit (config.services) davfs2;
8 ../profiles/dnscrypt-proxy2.nix
15 home-manager.users.julm = {
16 imports = [ ../homes/julm.nix ];
18 host.hardware = ["ThinkPad" "X201"];
20 systemd.services.home-manager-julm.postStart = ''
21 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
23 users.mutableUsers = false;
27 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
28 # which is already world readable.
29 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
41 # If created, zfs-mount.service would require:
42 # zfs set overlay=yes ${hostName}/home
48 auto-optimise-store = true
49 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
54 options = "--delete-older-than 7d";
57 "nixpkgs=/etc/nixpkgs"
58 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
60 trustedUsers = [ users.julm.name ];
61 binaryCaches = [ "https://nix-localcache.sourcephile.fr" ];
62 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
66 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
68 users.users.julm.openssh.authorizedKeys.keys = [
69 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
71 services.openssh.forwardX11 = true;
72 services.openssh.passwordAuthentication = false;
77 environment.etc."nixpkgs".source = pkgs.path;
78 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
80 documentation.nixos.enable = true;
81 time.timeZone = "Europe/Paris";
82 i18n.defaultLocale = "fr_FR.UTF-8";
83 console.font = "Lat2-Terminus16";
84 console.keyMap = "fr";
88 domain = "localdomain";
89 search = [ "sourcephile.fr" ];
96 #backend = "wpa_supplicant";
107 hardware.pulseaudio.enable = true;
108 hardware.sane.enable = true;
109 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
111 environment.variables = {
114 SYSTEMD_LESS = "FKMRX";
116 environment.systemPackages = [
123 interactiveShellInit = ''
124 bind '"\e[A":history-search-backward'
125 bind '"\e[B":history-search-forward'
127 # Ignore duplicate commands, ignore commands starting with a space
128 export HISTCONTROL=erasedups:ignorespace
129 export HISTSIZE=42000
130 # Append to the history instead of overwriting (good for multiple connections)
134 mkcd () { mkdir -p "$1"; cd "$1"; }
137 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
138 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
145 grep = "grep --color";
148 ls = "ls --color=tty";
149 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
152 st="sudo systemctl status";
153 u="systemctl --user";
154 j="sudo journalctl -u";
155 jb="sudo journalctl -b";
157 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
159 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
169 openFirewall = false;
179 fileSystems."/home/julm/mnt/ilico/severine" = {
180 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
183 let conf = pkgs.writeText "davfs2.conf" ''
184 backup_dir /home/julm/documents/backup/ilico/severine
185 cache_dir /home/julm/.cache/davfs2/ilico/severine
187 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
190 packages = [ pkgs.gnome3.dconf ];
195 services.journald = {
198 MaxRetentionSec=1month
203 services.printing = {
212 # Allow members of the "adbusers" group to mount Android devices via MTP
213 pkgs.android-udev-rules
219 xkbOptions = "eurosign:e";
220 libinput.enable = true;
223 # Let the session be generated by home-manager
224 { name = "home-manager";
226 ${pkgs.runtimeShell} $HOME/.hm-xsession &
233 defaultSession = "home-manager";
234 #defaultSession = "none+xmonad";
237 user = users.julm.name;
242 systemd.coredump.enable = true;
243 #environment.enableDebugInfo = true;
245 # This value determines the NixOS release with which your system is to be
246 # compatible, in order to avoid breaking some software such as database
247 # servers. You should change this only after NixOS release notes say you should.
248 system.stateVersion = "20.09"; # Did you read the comment?