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/desktop.nix
9 ../nixos/profiles/printing.nix
10 #../nixos/profiles/radio.nix
11 ../nixos/profiles/tor.nix
12 ../nixos/profiles/bluetooth.nix
13 ../nixos/profiles/home.nix
14 #blackberry/backup.nix
15 blackberry/hardware.nix
17 blackberry/networking.nix
18 #blackberry/pixiecore.nix
19 blackberry/nix-ssh.nix
22 # Lower kernel's security for better performances
23 security.kernel.mitigations = "off";
25 home-manager.users.julm = {
26 imports = [ ../homes/julm.nix ];
29 openssh.authorizedKeys.keys = map lib.readFile [
30 # For nix -L run .#pumpkin.switch
31 ../users/julm/ssh/oignon.pub
32 ../users/julm/ssh/pumpkin.pub
33 ../users/julm/ssh/blackberry.pub
39 # Put the hashedPassword in /nix/store,
40 # though /etc/shadow is not world readable...
41 # printf %s $(mkpasswd -m md5crypt)
42 hashedPassword = lib.readFile blackberry/users/julm/login/hashedPassword.clear;
48 "plugdev" # For rtl-sdr
55 config.services.davfs2.davGroup
58 # If created, zfs-mount.service would require:
59 # zfs set overlay=yes ${hostName}/home
61 openssh.authorizedKeys.keys = map lib.readFile [
62 ../users/julm/ssh/oignon.pub
63 ../users/julm/ssh/pumpkin.pub
64 ../users/julm/ssh/losurdo.pub
74 trusted-public-keys = map lib.readFile [
77 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
80 environment.systemPackages = [
81 #pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
84 boot.extraModulePackages = [
85 #config.boot.kernelPackages.v4l2loopback
88 programs.fuse.userAllowOther = true;
90 systemd.automounts = [
91 { where = "/mnt/aubergine"; automountConfig.TimeoutIdleSec = "5 min"; }
95 # Use the user's gpg-agent session to query
96 # for the password of the SSH key when auto-mounting.
98 pkgs.writeScript "sshAsUser" ''
100 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
101 ${pkgs.openssh}/bin/ssh "$@"
109 "exec" # Override "user"'s noexec
113 "ssh_command=${sshAsUser}\\040julm"
116 "x-systemd.automount"
117 #"Compression=yes" # YMMV
118 # Disconnect approximately 2*15=30 seconds after a network failure
119 "ServerAliveCountMax=1"
120 "ServerAliveInterval=15"
127 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
133 networking.firewall.extraCommands = ''
134 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 8000 -j ACCEPT
139 layout = "fr,us(altgr-intl)";
143 # Let the session be generated by home-manager
145 name = "home-manager";
147 ${pkgs.runtimeShell} $HOME/.hm-xsession &
155 services.displayManager = {
156 defaultSession = "home-manager";
157 #defaultSession = "none+xmonad";
158 #defaultSession = "mate";
159 #defaultSession = "cinnamon";
161 user = config.users.users.julm.name;
165 # This value determines the NixOS release with which your system is to be
166 # compatible, in order to avoid breaking some software such as database
167 # servers. You should change this only after NixOS release notes say you should.
168 system.stateVersion = "24.05"; # Did you read the comment?