1 { config, pkgs, lib, private, hostName, ... }:
4 ../nixos/profiles/dnscrypt-proxy2.nix
5 ../nixos/profiles/graphical.nix
6 ../nixos/profiles/lang-fr.nix
7 ../nixos/profiles/networking.nix
8 ../nixos/profiles/printing.nix
9 ../nixos/profiles/security.nix
10 ../nixos/profiles/system.nix
11 ../nixos/profiles/wireguard/wg-intra.nix
17 home-manager.users.julm = {
18 imports = [ ../homes/julm.nix ];
19 host.hardware = [ "ThinkPad" "X201" ];
21 systemd.services.home-manager-julm.postStart = ''
22 ${pkgs.nix}/bin/nix-env --delete-generations +1 --profile /nix/var/nix/profiles/per-user/julm/home-manager
27 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
28 # which is already world readable.
29 hashedPassword = lib.readFile ../private/world/julm/hashedPassword;
39 config.services.davfs2.davGroup
42 # If created, zfs-mount.service would require:
43 # zfs set overlay=yes ${hostName}/home
45 openssh.authorizedKeys.keys = map lib.readFile [
46 ../private/shared/ssh/julm/losurdo.pub
52 secret-key-files = ${private}/${hostName}/nix/binary-cache/priv.pem
54 trustedUsers = [ config.users.users."julm".name ];
56 "http://nix-localcache.losurdo.wg"
58 binaryCachePublicKeys = map lib.readFile [
59 ../private/shared/nix/losurdo.pub
62 #environment.etc."nixpkgs".source = pkgs.path;
63 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
65 nix.allowedUsers = [ config.users.users."nix-ssh".name ];
68 keys = map lib.readFile [
69 ../private/shared/ssh/julm/losurdo.pub
70 ../private/shared/ssh/sevy/patate.pub
71 ../private/shared/ssh/julm/oignon.pub
75 environment.systemPackages = [
76 pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
79 boot.extraModulePackages = [
80 #config.boot.kernelPackages.v4l2loopback
83 programs.fuse.userAllowOther = true;
84 fileSystems."/mnt/losurdo" = {
85 device = "${pkgs.sshfsFuse}/bin/sshfs#julm@losurdo.wg:/";
88 # Use the user's gpg-agent session to query
89 # for the password of the SSH key when auto-mounting.
91 pkgs.writeScript "sshAsUser-${user}" ''
92 exec ${pkgs.sudo}/bin/sudo -i -u ${user} \
93 ${pkgs.openssh}/bin/ssh "$@"
96 "noatime" "noexec" "nosuid"
97 "user" "uid=julm" "gid=users" "allow_other"
98 "_netdev" "ssh_command=${sshAsUser "julm"}" # "reconnect"
99 "noauto" "x-gvfs-hide" "x-systemd.automount"
100 #"Compression=yes" # YMMV
101 # Disconnect approximately 2*15=30 seconds after a network failure
102 "ServerAliveCountMax=1"
103 "ServerAliveInterval=15"
109 defaultMode = "online";
112 localDiscovery = false;
114 Datastore.StorageMax = "10GB";
115 Discovery.MDNS.Enabled = false;
118 #Swarm.AddrFilters = null;
120 startWhenNeeded = true;
123 services.udev.packages = [
124 # Allow the console user access the Yubikey USB device node,
125 # needed for challenge/response to work correctly.
126 pkgs.yubikey-personalization
132 # Let the session be generated by home-manager
133 { name = "home-manager";
135 ${pkgs.runtimeShell} $HOME/.hm-xsession &
142 defaultSession = "home-manager";
143 #defaultSession = "none+xmonad";
144 #defaultSession = "mate";
145 #defaultSession = "cinnamon";
147 user = config.users.users.julm.name;
152 # This value determines the NixOS release with which your system is to be
153 # compatible, in order to avoid breaking some software such as database
154 # servers. You should change this only after NixOS release notes say you should.
155 system.stateVersion = "20.09"; # Did you read the comment?