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"
188 security.wrappers."mount.davfs" = {
189 program = "mount.davfs";
190 source = "${pkgs.davfs2}/bin/mount.davfs";
192 group = davfs2.davGroup;
194 permissions = "u+rx,g+x";
196 security.wrappers."umount.davfs" = {
197 program = "umount.davfs";
198 source = "${pkgs.davfs2}/bin/umount.davfs";
200 group = davfs2.davGroup;
202 permissions = "u+rx,g+x";
205 packages = [ pkgs.gnome3.dconf ];
210 services.journald = {
213 MaxRetentionSec=1month
218 services.printing = {
227 # Allow members of the "adbusers" group to mount Android devices via MTP
228 pkgs.android-udev-rules
234 xkbOptions = "eurosign:e";
235 libinput.enable = true;
238 # Let the session be generated by home-manager
239 { name = "home-manager";
241 ${pkgs.runtimeShell} $HOME/.hm-xsession &
248 defaultSession = "home-manager";
249 #defaultSession = "none+xmonad";
252 user = users.julm.name;
257 systemd.coredump.enable = true;
258 #environment.enableDebugInfo = true;
260 # This value determines the NixOS release with which your system is to be
261 # compatible, in order to avoid breaking some software such as database
262 # servers. You should change this only after NixOS release notes say you should.
263 system.stateVersion = "20.09"; # Did you read the comment?