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";
70 nix.allowedUsers = [ config.users.users."nix-ssh".name ];
74 (lib.readFile ../private/shared/ssh/julm/losurdo.pub)
75 (lib.readFile ../private/shared/ssh/sevy/patate.pub)
76 (lib.readFile ../private/shared/ssh/julm/oignon.pub)
79 users.users.julm.openssh.authorizedKeys.keys = [
80 (lib.readFile ../private/shared/ssh/julm/losurdo.pub)
83 time.timeZone = "Europe/Paris";
84 i18n.defaultLocale = "fr_FR.UTF-8";
85 console.font = "Lat2-Terminus16";
86 console.keyMap = "fr";
90 domain = "localdomain";
91 search = [ "sourcephile.fr" ];
98 #backend = "wpa_supplicant";
109 hardware.pulseaudio.enable = true;
110 hardware.sane.enable = true;
111 hardware.sane.extraBackends = [ pkgs.hplipWithPlugin ];
113 environment.variables = {
116 SYSTEMD_LESS = "FKMRX";
119 programs.bash.interactiveShellInit = ''
122 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
123 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
128 programs.dconf.enable = true;
129 programs.mtr.enable = true;
134 openFirewall = false;
139 services.davfs2.enable = true;
140 fileSystems."/home/julm/mnt/ilico/severine" = {
141 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
144 let conf = pkgs.writeText "davfs2.conf" ''
145 backup_dir /home/julm/documents/backup/ilico/severine
146 cache_dir /home/julm/.cache/davfs2/ilico/severine
148 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
150 environment.systemPackages = [pkgs.glib.bin];
151 programs.fuse.userAllowOther = true;
152 fileSystems."/mnt/losurdo" = {
153 device = "${pkgs.sshfsFuse}/bin/sshfs#julm@losurdo.wg:/";
156 # Use the user's gpg-agent session to query
157 # for the password of the SSH key when auto-mounting.
158 let sshAsUser = user:
159 pkgs.writeScript "sshAsUser-${user}" ''
160 exec ${pkgs.sudo}/bin/sudo -i -u ${user} \
161 ${pkgs.openssh}/bin/ssh "$@"
164 "noatime" "noexec" "nosuid"
165 "user" "uid=julm" "gid=users" "allow_other"
166 "_netdev" "ssh_command=${sshAsUser "julm"}" # "reconnect"
167 "noauto" "x-gvfs-hide" "x-systemd.automount"
168 #"Compression=yes" # YMMV
169 # Disconnect approximately 2*15=30 seconds after a network failure
170 "ServerAliveCountMax=1"
171 "ServerAliveInterval=15"
175 packages = [ pkgs.gnome3.dconf ];
177 services.gvfs.enable = true;
180 defaultMode = "online";
183 localDiscovery = false;
185 Datastore.StorageMax = "10GB";
186 Discovery.MDNS.Enabled = false;
189 #Swarm.AddrFilters = null;
191 startWhenNeeded = true;
197 services.printing = {
206 # Allow members of the "adbusers" group to mount Android devices via MTP.
207 pkgs.android-udev-rules
208 # Allow the console user access the Yubikey USB device node,
209 # needed for challenge/response to work correctly.
210 pkgs.yubikey-personalization
216 xkbOptions = "eurosign:e";
217 libinput.enable = true;
220 # Let the session be generated by home-manager
221 { name = "home-manager";
223 ${pkgs.runtimeShell} $HOME/.hm-xsession &
230 defaultSession = "home-manager";
231 #defaultSession = "none+xmonad";
234 user = config.users.users.julm.name;
239 systemd.coredump.enable = true;
240 #environment.enableDebugInfo = true;
242 # This value determines the NixOS release with which your system is to be
243 # compatible, in order to avoid breaking some software such as database
244 # servers. You should change this only after NixOS release notes say you should.
245 system.stateVersion = "20.09"; # Did you read the comment?