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