]> Git — Sourcephile - julm/julm-nix.git/blob - hosts/aubergine.nix
aubergine: lte: fix NetworkManager
[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 "dialout"
34 "networkmanager"
35 "tor"
36 "wheel"
37 ];
38 createHome = true;
39 openssh.authorizedKeys.keys = map lib.readFile [
40 ../users/root/ssh/losurdo.pub
41 ../users/julm/ssh/losurdo.pub
42 ../users/julm/ssh/oignon.pub
43 ../users/julm/ssh/redmi.pub
44 ];
45 };
46 users.root = {
47 hashedPassword = "!";
48 openssh.authorizedKeys.keys =
49 config.users.users.julm.openssh.authorizedKeys.keys;
50 };
51 users.sevy = {
52 isNormalUser = true;
53 uid = 1001;
54 hashedPassword = "!";
55 extraGroups = [
56 ];
57 createHome = true;
58 openssh.authorizedKeys.keys = map lib.readFile [
59 ../users/sevy/ssh/patate.pub
60 ];
61 };
62 };
63
64 #systemd.services.nix-daemon.serviceConfig.LoadCredentialEncrypted =
65 # "secret-key-files:" + aubergine/nix/secret-key-files;
66 nix = {
67 extraOptions = ''
68 #secret-key-files = /run/credentials/nix-daemon.service/secret-key-files.pem
69 '';
70 settings = {
71 substituters = [
72 #"http://nix-localcache.losurdo.wg"
73 #"ssh://nix-ssh@losurdo.wg?priority=30"
74 #"ssh://nix-ssh@oignon.wg?priority=30"
75 ];
76 trusted-public-keys = map lib.readFile [
77 ../users/root/nix/oignon.pub
78 ];
79 };
80 nixPath = lib.mkForce [ "nixpkgs=${inputs.nixpkgs}" ];
81 };
82 #environment.etc."nixpkgs".source = pkgs.path;
83 #environment.etc."nixpkgs-overlays".source = inputs.self + "/nixpkgs";
84
85 nix.settings.allowed-users = [ config.users.users."nix-ssh".name ];
86 nix.sshServe = {
87 enable = true;
88 keys = map lib.readFile [
89 ../users/julm/ssh/losurdo.pub
90 ../users/sevy/ssh/patate.pub
91 ../users/julm/ssh/oignon.pub
92 ];
93 };
94
95 environment.systemPackages = [
96 ];
97
98 boot.extraModulePackages = [
99 #config.boot.kernelPackages.v4l2loopback
100 ];
101
102 # This value determines the NixOS release with which your system is to be
103 # compatible, in order to avoid breaking some software such as database
104 # servers. You should change this only after NixOS release notes say you should.
105 system.stateVersion = "22.11"; # Did you read the comment?
106 }