]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/aubergine.nix
aubergine: sftp: do not bind on off2
[julm/julm-nix.git] / hosts / aubergine.nix
1 { config, pkgs, lib, inputs, ... }:
2 {
3 imports = [
4 ../nixos/profiles/router.nix
5 #../nixos/profiles/debug.nix
6 ../nixos/profiles/lang-fr.nix
7 #../nixos/profiles/tor.nix
8 ../nixos/profiles/networking/remote.nix
9 aubergine/hardware.nix
10 aubergine/nebula.nix
11 aubergine/networking.nix
12 aubergine/printing.nix
13 aubergine/nginx.nix
14 aubergine/backup.nix
15 aubergine/sftp.nix
16 ];
17
18 # Lower kernel's security for better performances
19 security.kernel.mitigations = "off";
20
21 home-manager.users.julm = {
22 imports = [ ../homes/julm.nix ];
23 };
24 users = {
25 users.julm = {
26 isNormalUser = true;
27 uid = 1000;
28 # Put the hashedPassword in /nix/store, but it will also be in /etc/passwd
29 # which is already world readable.
30 # printf %s $(mkpasswd -m yescrypt)
31 hashedPassword = lib.readFile aubergine/users/julm/login/hashedPassword.clear;
32 extraGroups = [
33 "adbusers"
34 "audio"
35 "dialout"
36 "networkmanager"
37 "tor"
38 "video"
39 "wheel"
40 "wireshark"
41 ];
42 createHome = true;
43 openssh.authorizedKeys.keys = map lib.readFile [
44 ../users/root/ssh/losurdo.pub
45 ../users/julm/ssh/losurdo.pub
46 ../users/julm/ssh/oignon.pub
47 ../users/julm/ssh/pumpkin.pub
48 ../users/julm/ssh/redmi.pub
49 ];
50 };
51 users.root = {
52 hashedPassword = "!";
53 openssh.authorizedKeys.keys =
54 config.users.users.julm.openssh.authorizedKeys.keys;
55 };
56 users.sevy = {
57 isNormalUser = true;
58 uid = 1001;
59 hashedPassword = "!";
60 extraGroups = [
61 ];
62 createHome = true;
63 openssh.authorizedKeys.keys = map lib.readFile [
64 ../users/sevy/ssh/patate.pub
65 ];
66 };
67 };
68
69 #systemd.services.nix-daemon.serviceConfig.LoadCredentialEncrypted =
70 # "secret-key-files:" + aubergine/nix/secret-key-files;
71 nix = {
72 extraOptions = ''
73 #secret-key-files = /run/credentials/nix-daemon.service/secret-key-files.pem
74 '';
75 settings = {
76 substituters = [
77 #"http://nix-localcache.losurdo.wg"
78 #"ssh://nix-ssh@losurdo.wg?priority=30"
79 #"ssh://nix-ssh@oignon.wg?priority=30"
80 ];
81 trusted-public-keys = map lib.readFile [
82 #../users/root/nix/oignon.pub
83 #../users/root/nix/pumpkin.pub
84 ];
85 };
86 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
87 };
88 #environment.etc."nixpkgs".source = pkgs.path;
89 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
90
91 nix.settings.allowed-users = [ config.users.users."nix-ssh".name ];
92 nix.sshServe = {
93 enable = true;
94 keys = map lib.readFile [
95 ../users/julm/ssh/losurdo.pub
96 ../users/sevy/ssh/patate.pub
97 ../users/julm/ssh/oignon.pub
98 ../users/julm/ssh/pumpkin.pub
99 ];
100 };
101
102 environment.systemPackages = [
103 ];
104
105 boot.extraModulePackages = [
106 #config.boot.kernelPackages.v4l2loopback
107 ];
108
109 # This value determines the NixOS release with which your system is to be
110 # compatible, in order to avoid breaking some software such as database
111 # servers. You should change this only after NixOS release notes say you should.
112 system.stateVersion = "22.11"; # Did you read the comment?
113 }