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
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 .#oignon.switch
28 ../users/julm/ssh/oignon.pub
29 ../users/julm/ssh/blackberry.pub
35 # Put the hashedPassword in /nix/store,
36 # though /etc/shadow is not world readable...
37 # printf %s $(mkpasswd -m md5crypt)
38 hashedPassword = lib.readFile blackberry/users/julm/login/hashedPassword.clear;
44 "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/oignon.pub
58 ../users/julm/ssh/losurdo.pub
68 trusted-public-keys = map lib.readFile [
71 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
74 environment.systemPackages = [
75 #pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
78 boot.extraModulePackages = [
79 #config.boot.kernelPackages.v4l2loopback
82 programs.fuse.userAllowOther = true;
84 systemd.automounts = [
85 { where = "/mnt/aubergine"; automountConfig.TimeoutIdleSec = "5 min"; }
89 # Use the user's gpg-agent session to query
90 # for the password of the SSH key when auto-mounting.
92 pkgs.writeScript "sshAsUser" ''
94 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
95 ${pkgs.openssh}/bin/ssh "$@"
103 "exec" # Override "user"'s noexec
107 "ssh_command=${sshAsUser}\\040julm"
110 "x-systemd.automount"
111 #"Compression=yes" # YMMV
112 # Disconnect approximately 2*15=30 seconds after a network failure
113 "ServerAliveCountMax=1"
114 "ServerAliveInterval=15"
121 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
127 networking.firewall.extraCommands = ''
128 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 8000 -j ACCEPT
133 layout = "fr,us(altgr-intl)";
137 # Let the session be generated by home-manager
139 name = "home-manager";
141 ${pkgs.runtimeShell} $HOME/.hm-xsession &
149 services.displayManager = {
150 defaultSession = "home-manager";
151 #defaultSession = "none+xmonad";
152 #defaultSession = "mate";
153 #defaultSession = "cinnamon";
155 user = config.users.users.julm.name;
159 # This value determines the NixOS release with which your system is to be
160 # compatible, in order to avoid breaking some software such as database
161 # servers. You should change this only after NixOS release notes say you should.
162 system.stateVersion = "24.05"; # Did you read the comment?