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