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