]> Git — Sourcephile - sourcephile-nix.git/blob - machines/mermet/users.nix
doc: explain tributes in naming the machines
[sourcephile-nix.git] / machines / mermet / users.nix
1 { flakes, pkgs, lib, config, ... }:
2 let
3 inherit (builtins) readFile;
4 inherit (config.users) users;
5 in
6 {
7 imports = [
8 ../../members/julm.nix
9 ];
10
11 nix.trustedUsers = [
12 users."julm".name
13 ];
14
15 networking.nftables.ruleset = ''
16 add rule inet filter fw2net tcp dport {25,465} skuid ${users.julm.name} counter accept comment "SMTP"
17 add rule inet filter fw2net tcp dport 43 skuid ${users.julm.name} counter accept comment "Whois"
18 add rule inet filter fw2net tcp dport 563 skuid ${users.julm.name} counter accept comment "NNTPS"
19 add rule inet filter fw2net tcp dport 6697 skuid ${users.julm.name} counter accept comment "IRCS"
20 add rule inet filter fw2net tcp dport 11371 skuid ${users.julm.name} counter accept comment "HKP"
21 '';
22
23 users = {
24 mutableUsers = false;
25 users = {
26 root = {
27 openssh.authorizedKeys.keys = [
28 (readFile (flakes.secrets + "/machines/losurdo/root/ssh/id_ed25519.pub"))
29 ] ++
30 users."julm".openssh.authorizedKeys.keys;
31 };
32 };
33 groups = {
34 wheel = {
35 members = [
36 users."julm".name
37 ];
38 };
39 };
40 };
41 }