1 { config, pkgs, lib, private, hostName, ... }:
4 ../nixos/profiles/dnscrypt-proxy2.nix
5 ../nixos/profiles/security.nix
6 ../nixos/profiles/wireguard/wg-intra.nix
13 home-manager.users.julm = {
14 imports = [ ../homes/julm.nix ];
15 host.hardware = [ "ThinkPad" "X201" ];
17 systemd.services.home-manager-julm.postStart = ''
18 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
20 security.lockKernelModules = false;
21 users.mutableUsers = false;
25 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
26 # which is already world readable.
27 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
37 config.services.davfs2.davGroup
40 # If created, zfs-mount.service would require:
41 # zfs set overlay=yes ${hostName}/home
47 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
49 autoOptimiseStore = true;
52 gc.options = "--delete-older-than 7d";
53 nixPath = lib.mkForce [];
54 trustedUsers = [ config.users.users.julm.name ];
55 binaryCaches = [ "http://nix-localcache.losurdo.wg" ];
56 binaryCachePublicKeys = [ "losurdo.sourcephile.fr-1:XGeaIE2AA2mZskSZ5bIDrfx53q+TDDWJOUEpZDX7los=" ];
58 #environment.etc."nixpkgs".source = pkgs.path;
59 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
71 keys = [ (lib.readFile ../private/world/julm/losurdo/ssh.pub) ];
73 users.users.julm.openssh.authorizedKeys.keys = [
74 (lib.readFile ../private/world/julm/losurdo/ssh.pub)
77 time.timeZone = "Europe/Paris";
78 i18n.defaultLocale = "fr_FR.UTF-8";
79 console.font = "Lat2-Terminus16";
80 console.keyMap = "fr";
84 domain = "localdomain";
85 search = [ "sourcephile.fr" ];
92 #backend = "wpa_supplicant";
103 hardware.pulseaudio.enable = true;
104 hardware.sane.enable = true;
105 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
107 environment.variables = {
110 SYSTEMD_LESS = "FKMRX";
113 programs.bash.interactiveShellInit = ''
116 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
117 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
122 programs.dconf.enable = true;
123 programs.mtr.enable = true;
128 openFirewall = false;
133 services.davfs2.enable = true;
134 fileSystems."/home/julm/mnt/ilico/severine" = {
135 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
138 let conf = pkgs.writeText "davfs2.conf" ''
139 backup_dir /home/julm/documents/backup/ilico/severine
140 cache_dir /home/julm/.cache/davfs2/ilico/severine
142 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
144 programs.fuse.userAllowOther = true;
145 fileSystems."/mnt/losurdo" = {
146 device = "${pkgs.sshfsFuse}/bin/sshfs#julm@losurdo.wg:/";
149 # Use the user's gpg-agent session to query
150 # for the password of the SSH key when auto-mounting.
151 let sshAsUser = user:
152 pkgs.writeScript "sshAsUser-${user}" ''
153 exec ${pkgs.sudo}/bin/sudo -i -u ${user} \
154 ${pkgs.openssh}/bin/ssh "$@"
157 "noatime" "noexec" "nosuid"
158 "user" "uid=julm" "gid=users" "allow_other"
159 "_netdev" "reconnect" "ssh_command=${sshAsUser "julm"}"
160 "noauto" "x-gvfs-hide" "x-systemd.automount"
161 #"Compression=yes" # YMMV
162 # Disconnect approximately 2*15=30 seconds after a network failure
163 "ServerAliveCountMax=2"
164 "ServerAliveInterval=15"
168 packages = [ pkgs.gnome3.dconf ];
170 services.gvfs.enable = true;
173 defaultMode = "online";
176 localDiscovery = false;
178 Datastore.StorageMax = "10GB";
179 Discovery.MDNS.Enabled = false;
182 #Swarm.AddrFilters = null;
184 startWhenNeeded = true;
189 services.printing = {
198 # Allow members of the "adbusers" group to mount Android devices via MTP.
199 pkgs.android-udev-rules
200 # Allow the console user access the Yubikey USB device node,
201 # needed for challenge/response to work correctly.
202 pkgs.yubikey-personalization
208 xkbOptions = "eurosign:e";
209 libinput.enable = true;
212 # Let the session be generated by home-manager
213 { name = "home-manager";
215 ${pkgs.runtimeShell} $HOME/.hm-xsession &
222 defaultSession = "home-manager";
223 #defaultSession = "none+xmonad";
226 user = config.users.users.julm.name;
231 systemd.coredump.enable = true;
232 #environment.enableDebugInfo = true;
234 # This value determines the NixOS release with which your system is to be
235 # compatible, in order to avoid breaking some software such as database
236 # servers. You should change this only after NixOS release notes say you should.
237 system.stateVersion = "20.09"; # Did you read the comment?