1 { config, pkgs, lib, inputs, private, hostName, ... }:
3 inherit (config.users) users;
4 inherit (config.services) davfs2;
8 ../profiles/dnscrypt-proxy2.nix
14 home-manager.users.julm = {
15 imports = [ ../homes/julm.nix ];
17 host.hardware = ["ThinkPad" "X201"];
19 systemd.services.home-manager-julm.postStart = ''
20 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
22 users.mutableUsers = false;
26 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
27 # which is already world readable.
28 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
40 # If created, zfs-mount.service would require:
41 # zfs set overlay=yes ${hostName}/home
47 auto-optimise-store = true
48 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
53 options = "--delete-older-than 7d";
56 "nixpkgs=/etc/nixpkgs"
57 "nixpkgs-overlays=/etc/nixpkgs-overlays/overlays.nix"
59 trustedUsers = [ users.julm.name ];
60 binaryCaches = [ "https://nix-localcache.sourcephile.fr" ];
61 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
65 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
67 users.users.julm.openssh.authorizedKeys.keys = [
68 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
70 services.openssh.forwardX11 = true;
71 services.openssh.passwordAuthentication = false;
76 environment.etc."nixpkgs".source = pkgs.path;
77 environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
79 documentation.nixos.enable = true;
80 time.timeZone = "Europe/Paris";
81 i18n.defaultLocale = "fr_FR.UTF-8";
82 console.font = "Lat2-Terminus16";
83 console.keyMap = "fr";
87 domain = "localdomain";
88 search = [ "sourcephile.fr" ];
95 #backend = "wpa_supplicant";
106 hardware.pulseaudio.enable = true;
107 hardware.sane.enable = true;
108 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
110 environment.variables = {
113 SYSTEMD_LESS = "FKMRX";
115 environment.systemPackages = [
122 interactiveShellInit = ''
123 bind '"\e[A":history-search-backward'
124 bind '"\e[B":history-search-forward'
126 # Ignore duplicate commands, ignore commands starting with a space
127 export HISTCONTROL=erasedups:ignorespace
128 export HISTSIZE=42000
129 # Append to the history instead of overwriting (good for multiple connections)
133 mkcd () { mkdir -p "$1"; cd "$1"; }
136 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
137 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
144 grep = "grep --color";
147 ls = "ls --color=tty";
148 mem = "ps -e -orss=,user=,args= | sort -b -k1,1n";
151 st="sudo systemctl status";
152 u="systemctl --user";
153 j="sudo journalctl -u";
154 jb="sudo journalctl -b";
156 nix-history="sudo nix-env --list-generations --profile /nix/var/nix/profiles/system";
158 sshfs = "sshfs -o ServerAliveInterval=15 -o reconnect -f";
168 openFirewall = false;
178 fileSystems."/home/julm/mnt/ilico/severine" = {
179 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
182 let conf = pkgs.writeText "davfs2.conf" ''
183 backup_dir /home/julm/documents/backup/ilico/severine
184 cache_dir /home/julm/.cache/davfs2/ilico/severine
186 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
189 packages = [ pkgs.gnome3.dconf ];
194 services.journald = {
197 MaxRetentionSec=1month
202 services.printing = {
211 # Allow members of the "adbusers" group to mount Android devices via MTP
212 pkgs.android-udev-rules
218 xkbOptions = "eurosign:e";
219 libinput.enable = true;
222 # Let the session be generated by home-manager
223 { name = "home-manager";
225 ${pkgs.runtimeShell} $HOME/.hm-xsession &
232 defaultSession = "home-manager";
233 #defaultSession = "none+xmonad";
236 user = users.julm.name;
241 systemd.coredump.enable = true;
242 #environment.enableDebugInfo = true;
244 # This value determines the NixOS release with which your system is to be
245 # compatible, in order to avoid breaking some software such as database
246 # servers. You should change this only after NixOS release notes say you should.
247 system.stateVersion = "20.09"; # Did you read the comment?