1 { config, pkgs, lib, inputs, hostName, ... }:
4 ../nixos/profiles/debug.nix
5 ../nixos/profiles/graphical.nix
6 ../nixos/profiles/irssi.nix
7 ../nixos/profiles/lang-fr.nix
8 ../nixos/profiles/laptop.nix
9 ../nixos/profiles/printing.nix
10 ../nixos/profiles/radio.nix
11 ../nixos/profiles/tor.nix
12 ../nixos/profiles/bluetooth.nix
16 pumpkin/networking.nix
19 # Lower kernel's security for better performances
20 security.kernel.mitigations = "off";
22 home-manager.users.julm = {
23 imports = [ ../homes/julm.nix ];
26 openssh.authorizedKeys.keys = map lib.readFile [
27 # For nix -L run .#pumpkin.switch
28 ../users/julm/ssh/pumpkin.pub
34 # Put the hashedPassword in /nix/store,
35 # though /etc/shadow is not world readable...
36 # printf %s $(mkpasswd -m md5crypt)
37 hashedPassword = lib.readFile pumpkin/users/julm/login/hashedPassword.clear;
43 "plugdev" # For rtl-sdr
50 config.services.davfs2.davGroup
53 # If created, zfs-mount.service would require:
54 # zfs set overlay=yes ${hostName}/home
56 openssh.authorizedKeys.keys = map lib.readFile [
57 ../users/julm/ssh/losurdo.pub
64 #"http://nix-localcache.losurdo.sp"
65 #"file:///mnt/off4/julm/nix?priority=10&trusted=true"
66 "ssh://nix-ssh@losurdo.sp?priority=30"
68 trusted-public-keys = map lib.readFile [
69 ../users/nix/ssh/losurdo.pub
72 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
74 #environment.etc."nixpkgs".source = pkgs.path;
75 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
77 nix.settings.allowed-users = [
78 #config.users.users."nix-ssh".name
82 keys = map lib.readFile [
83 ../users/julm/ssh/losurdo.pub
84 ../users/julm/ssh/pumpkin.pub
85 ../users/sevy/ssh/patate.pub
89 environment.systemPackages = [
90 #pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
93 boot.extraModulePackages = [
94 #config.boot.kernelPackages.v4l2loopback
97 programs.fuse.userAllowOther = true;
99 services.davfs2.enable = true;
101 systemd.automounts = [
102 { where = "/mnt/aubergine"; automountConfig.TimeoutIdleSec = "5 min"; }
106 # Use the user's gpg-agent session to query
107 # for the password of the SSH key when auto-mounting.
109 pkgs.writeScript "sshAsUser" ''
111 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
112 ${pkgs.openssh}/bin/ssh "$@"
120 "exec" # Override "user"'s noexec
124 "ssh_command=${sshAsUser}\\040julm"
127 "x-systemd.automount"
128 #"Compression=yes" # YMMV
129 # Disconnect approximately 2*15=30 seconds after a network failure
130 "ServerAliveCountMax=1"
131 "ServerAliveInterval=15"
138 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
143 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@losurdo.sp:/";
148 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@mermet.sp:/";
152 "/mnt/ilico/severine" = {
153 device = "https://nuage.ilico.org/remote.php/dav/files/severine/";
157 conf = pkgs.writeText "davfs2.conf" ''
158 backup_dir /home/julm/.local/share/davfs2/ilico/severine
159 secrets /home/julm/.davfs2/secrets
171 "x-systemd.automount"
172 "x-systemd.device-timeout=1m"
173 "x-systemd.idle-timeout=1m"
174 "x-systemd.mount-timeout=10s"
181 defaultMode = "online";
184 localDiscovery = false;
186 Datastore.StorageMax = "10GB";
187 Discovery.MDNS.Enabled = false;
190 #Swarm.AddrFilters = null;
192 startWhenNeeded = true;
195 services.udev.packages = [
196 # Allow the console user access the Yubikey USB device node,
197 # needed for challenge/response to work correctly.
198 pkgs.yubikey-personalization
203 layout = "fr,us(altgr-intl)";
207 # Let the session be generated by home-manager
209 name = "home-manager";
211 ${pkgs.runtimeShell} $HOME/.hm-xsession &
219 services.displayManager = {
220 defaultSession = "home-manager";
221 #defaultSession = "none+xmonad";
222 #defaultSession = "mate";
223 #defaultSession = "cinnamon";
225 user = config.users.users.julm.name;
229 # This value determines the NixOS release with which your system is to be
230 # compatible, in order to avoid breaking some software such as database
231 # servers. You should change this only after NixOS release notes say you should.
232 system.stateVersion = "24.11"; # Did you read the comment?