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