11 ../nixos/profiles/debug.nix
12 ../nixos/profiles/graphical.nix
13 ../nixos/profiles/irssi.nix
14 ../nixos/profiles/lang-fr.nix
15 ../nixos/profiles/laptop.nix
16 ../nixos/profiles/printing.nix
17 ../nixos/profiles/radio.nix
18 ../nixos/profiles/tor.nix
19 ../nixos/profiles/bluetooth.nix
26 # Lower kernel's security for better performances
27 security.kernel.mitigations = "off";
29 home-manager.users.julm = {
30 imports = [ ../homes/julm.nix ];
33 openssh.authorizedKeys.keys = map lib.readFile [
34 # For nix -L run .#oignon.switch
35 ../users/julm/ssh/oignon.pub
41 # Put the hashedPassword in /nix/store,
42 # though /etc/shadow is not world readable...
43 # printf %s $(mkpasswd -m md5crypt)
44 hashedPassword = lib.readFile oignon/users/julm/login/hashedPassword.clear;
50 "plugdev" # For rtl-sdr
56 config.services.davfs2.davGroup
59 # If created, zfs-mount.service would require:
60 # zfs set overlay=yes ${hostName}/home
62 openssh.authorizedKeys.keys = map lib.readFile [
63 ../users/julm/ssh/losurdo.pub
67 systemd.services.nix-daemon.serviceConfig.LoadCredentialEncrypted = [
69 builtins.path { path = ./. + "/${hostName}/nix/secret-key-files.priv.pem.cred"; }
74 secret-key-files = /run/credentials/nix-daemon.service/${hostName}.key
78 #"http://nix-localcache.losurdo.sp"
79 "ssh://nix-ssh@losurdo.sp?priority=30"
81 trusted-public-keys = map lib.readFile [
82 ../users/nix/ssh/losurdo.pub
86 #environment.etc."nixpkgs".source = pkgs.path;
87 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
89 nix.settings.allowed-users = [ config.users.users."nix-ssh".name ];
92 keys = map lib.readFile [
93 ../users/julm/ssh/losurdo.pub
94 ../users/julm/ssh/oignon.pub
95 ../users/sevy/ssh/patate.pub
99 environment.systemPackages = [
100 pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
103 boot.extraModulePackages = [
104 #config.boot.kernelPackages.v4l2loopback
107 programs.fuse.userAllowOther = true;
109 services.davfs2.enable = true;
111 systemd.automounts = [
113 where = "/mnt/aubergine";
114 automountConfig.TimeoutIdleSec = "5 min";
119 # Use the user's gpg-agent session to query
120 # for the password of the SSH key when auto-mounting.
121 sshAsUser = pkgs.writeScript "sshAsUser" ''
123 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
124 ${pkgs.openssh}/bin/ssh "$@"
131 "exec" # Override "user"'s noexec
135 "ssh_command=${sshAsUser}\\040julm"
138 "x-systemd.automount"
139 #"Compression=yes" # YMMV
140 # Disconnect approximately 2*15=30 seconds after a network failure
141 "ServerAliveCountMax=1"
142 "ServerAliveInterval=15"
149 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
154 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@losurdo.sp:/";
159 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@mermet.sp:/";
163 "/mnt/ilico/severine" = {
164 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
168 conf = pkgs.writeText "davfs2.conf" ''
169 backup_dir /home/julm/.local/share/davfs2/ilico/severine
170 secrets /home/julm/.davfs2/secrets
182 "x-systemd.automount"
183 "x-systemd.device-timeout=1m"
184 "x-systemd.idle-timeout=1m"
185 "x-systemd.mount-timeout=10s"
190 networking.firewall.extraCommands = ''
191 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 8000 -j ACCEPT
196 defaultMode = "online";
199 localDiscovery = false;
201 Datastore.StorageMax = "10GB";
202 Discovery.MDNS.Enabled = false;
205 #Swarm.AddrFilters = null;
207 startWhenNeeded = true;
210 services.udev.packages = [
211 # Allow the console user access the Yubikey USB device node,
212 # needed for challenge/response to work correctly.
213 pkgs.yubikey-personalization
218 layout = "fr,us(altgr-intl)";
222 # Let the session be generated by home-manager
224 name = "home-manager";
226 ${pkgs.runtimeShell} $HOME/.hm-xsession &
234 services.displayManager = {
235 defaultSession = "home-manager";
236 #defaultSession = "none+xmonad";
237 #defaultSession = "mate";
238 #defaultSession = "cinnamon";
240 user = config.users.users.julm.name;
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?