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
20 # Lower kernel's security for better performances
21 security.kernel.mitigations = "off";
23 home-manager.users.julm = {
24 imports = [ ../homes/julm.nix ];
27 openssh.authorizedKeys.keys = map lib.readFile [
28 # For nix -L run .#oignon.switch
29 ../users/julm/ssh/oignon.pub
30 ../users/julm/ssh/blackberry.pub
36 # Put the hashedPassword in /nix/store,
37 # though /etc/shadow is not world readable...
38 # printf %s $(mkpasswd -m md5crypt)
39 hashedPassword = lib.readFile blackberry/users/julm/login/hashedPassword.clear;
45 "plugdev" # For rtl-sdr
51 config.services.davfs2.davGroup
54 # If created, zfs-mount.service would require:
55 # zfs set overlay=yes ${hostName}/home
57 openssh.authorizedKeys.keys = map lib.readFile [
58 ../users/julm/ssh/oignon.pub
59 ../users/julm/ssh/losurdo.pub
69 trusted-public-keys = map lib.readFile [
72 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
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;
85 systemd.automounts = [
86 { where = "/mnt/aubergine"; automountConfig.TimeoutIdleSec = "5 min"; }
90 # Use the user's gpg-agent session to query
91 # for the password of the SSH key when auto-mounting.
93 pkgs.writeScript "sshAsUser" ''
95 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
96 ${pkgs.openssh}/bin/ssh "$@"
104 "exec" # Override "user"'s noexec
108 "ssh_command=${sshAsUser}\\040julm"
111 "x-systemd.automount"
112 #"Compression=yes" # YMMV
113 # Disconnect approximately 2*15=30 seconds after a network failure
114 "ServerAliveCountMax=1"
115 "ServerAliveInterval=15"
122 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
128 networking.firewall.extraCommands = ''
129 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 8000 -j ACCEPT
134 layout = "fr,us(altgr-intl)";
138 # Let the session be generated by home-manager
140 name = "home-manager";
142 ${pkgs.runtimeShell} $HOME/.hm-xsession &
150 services.displayManager = {
151 defaultSession = "home-manager";
152 #defaultSession = "none+xmonad";
153 #defaultSession = "mate";
154 #defaultSession = "cinnamon";
156 user = config.users.users.julm.name;
160 # This value determines the NixOS release with which your system is to be
161 # compatible, in order to avoid breaking some software such as database
162 # servers. You should change this only after NixOS release notes say you should.
163 system.stateVersion = "24.05"; # Did you read the comment?