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";
72 (lib.readFile ../private/shared/ssh/julm/losurdo.pub)
73 (lib.readFile ../private/shared/ssh/sevy/patate.pub)
74 (lib.readFile ../private/shared/ssh/julm/oignon.pub)
77 users.users.julm.openssh.authorizedKeys.keys = [
78 (lib.readFile ../private/shared/ssh/julm/losurdo.pub)
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";
117 programs.bash.interactiveShellInit = ''
120 then sudo tee /proc/acpi/ibm/fan <<<"level $1"
121 else grep '^\(level\|speed\):' /proc/acpi/ibm/fan
126 programs.dconf.enable = true;
127 programs.mtr.enable = true;
132 openFirewall = false;
137 services.davfs2.enable = true;
138 fileSystems."/home/julm/mnt/ilico/severine" = {
139 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
142 let conf = pkgs.writeText "davfs2.conf" ''
143 backup_dir /home/julm/documents/backup/ilico/severine
144 cache_dir /home/julm/.cache/davfs2/ilico/severine
146 [ "conf=${conf}" "user" "noexec" "nosuid" "noauto" ]; # "x-systemd.automount"
148 environment.systemPackages = [pkgs.glib.bin];
149 programs.fuse.userAllowOther = true;
150 fileSystems."/mnt/losurdo" = {
151 device = "${pkgs.sshfsFuse}/bin/sshfs#julm@losurdo.wg:/";
154 # Use the user's gpg-agent session to query
155 # for the password of the SSH key when auto-mounting.
156 let sshAsUser = user:
157 pkgs.writeScript "sshAsUser-${user}" ''
158 exec ${pkgs.sudo}/bin/sudo -i -u ${user} \
159 ${pkgs.openssh}/bin/ssh "$@"
162 "noatime" "noexec" "nosuid"
163 "user" "uid=julm" "gid=users" "allow_other"
164 "_netdev" "ssh_command=${sshAsUser "julm"}" # "reconnect"
165 "noauto" "x-gvfs-hide" "x-systemd.automount"
166 #"Compression=yes" # YMMV
167 # Disconnect approximately 2*15=30 seconds after a network failure
168 "ServerAliveCountMax=1"
169 "ServerAliveInterval=15"
173 packages = [ pkgs.gnome3.dconf ];
175 services.gvfs.enable = true;
178 defaultMode = "online";
181 localDiscovery = false;
183 Datastore.StorageMax = "10GB";
184 Discovery.MDNS.Enabled = false;
187 #Swarm.AddrFilters = null;
189 startWhenNeeded = true;
195 services.printing = {
204 # Allow members of the "adbusers" group to mount Android devices via MTP.
205 pkgs.android-udev-rules
206 # Allow the console user access the Yubikey USB device node,
207 # needed for challenge/response to work correctly.
208 pkgs.yubikey-personalization
214 xkbOptions = "eurosign:e";
215 libinput.enable = true;
218 # Let the session be generated by home-manager
219 { name = "home-manager";
221 ${pkgs.runtimeShell} $HOME/.hm-xsession &
228 defaultSession = "home-manager";
229 #defaultSession = "none+xmonad";
232 user = config.users.users.julm.name;
237 systemd.coredump.enable = true;
238 #environment.enableDebugInfo = true;
240 # This value determines the NixOS release with which your system is to be
241 # compatible, in order to avoid breaking some software such as database
242 # servers. You should change this only after NixOS release notes say you should.
243 system.stateVersion = "20.09"; # Did you read the comment?