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
52 config.services.davfs2.davGroup
55 # If created, zfs-mount.service would require:
56 # zfs set overlay=yes ${hostName}/home
58 openssh.authorizedKeys.keys = map lib.readFile [
59 ../users/julm/ssh/oignon.pub
60 ../users/julm/ssh/losurdo.pub
70 trusted-public-keys = map lib.readFile [
73 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
76 environment.systemPackages = [
77 #pkgs.riseup-vpn # Can't be installed by home-manager because it needs to install policy-kit rules
80 boot.extraModulePackages = [
81 #config.boot.kernelPackages.v4l2loopback
84 programs.fuse.userAllowOther = true;
86 systemd.automounts = [
87 { where = "/mnt/aubergine"; automountConfig.TimeoutIdleSec = "5 min"; }
91 # Use the user's gpg-agent session to query
92 # for the password of the SSH key when auto-mounting.
94 pkgs.writeScript "sshAsUser" ''
96 exec ${pkgs.sudo}/bin/sudo -i -u "$user" \
97 ${pkgs.openssh}/bin/ssh "$@"
105 "exec" # Override "user"'s noexec
109 "ssh_command=${sshAsUser}\\040julm"
112 "x-systemd.automount"
113 #"Compression=yes" # YMMV
114 # Disconnect approximately 2*15=30 seconds after a network failure
115 "ServerAliveCountMax=1"
116 "ServerAliveInterval=15"
123 device = "${pkgs.sshfs-fuse}/bin/sshfs#julm@aubergine.sp:/";
129 networking.firewall.extraCommands = ''
130 ip46tables -A nixos-fw -i wg-intra -p tcp -m tcp --dport 8000 -j ACCEPT
135 layout = "fr,us(altgr-intl)";
139 # Let the session be generated by home-manager
141 name = "home-manager";
143 ${pkgs.runtimeShell} $HOME/.hm-xsession &
151 services.displayManager = {
152 defaultSession = "home-manager";
153 #defaultSession = "none+xmonad";
154 #defaultSession = "mate";
155 #defaultSession = "cinnamon";
157 user = config.users.users.julm.name;
161 # This value determines the NixOS release with which your system is to be
162 # compatible, in order to avoid breaking some software such as database
163 # servers. You should change this only after NixOS release notes say you should.
164 system.stateVersion = "24.05"; # Did you read the comment?