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