]> Git — Sourcephile - sourcephile-nix.git/blob - hosts/losurdo/users.nix
syncoid: upstream module
[sourcephile-nix.git] / hosts / losurdo / users.nix
1 { inputs, pkgs, lib, config, ... }:
2 let
3 inherit (config.security) gnupg;
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 users = {
16 mutableUsers = false;
17 users = {
18 root = {
19 openssh.authorizedKeys.keys =
20 users."julm".openssh.authorizedKeys.keys;
21 hashedPassword = "!";
22 };
23 gnupg = {
24 openssh.authorizedKeys.keys =
25 users."root".openssh.authorizedKeys.keys;
26 };
27 };
28 groups = {
29 adbusers.members = [
30 users."julm".name
31 ];
32 dialout.members = [
33 users."julm".name
34 ];
35 tor.members = [
36 users."julm".name
37 ];
38 wheel.members = [
39 users."julm".name
40 ];
41 gpg-agent.members = [
42 users."julm".name
43 ];
44 };
45 };
46
47 #security.gnupg.secrets."/root/.ssh/id_ed25519" = {
48 # gpg = "${gnupg.store}/ssh/root.ssh-ed25519.gpg";
49 #};
50
51 networking.nftables.ruleset = lib.concatMapStringsSep "\n"
52 (rule: "add rule inet filter fw2net meta skuid ${users.julm.name} " + rule) [
53 ''tcp dport {25,465} counter accept comment "SMTP"''
54 ''tcp dport 43 counter accept comment "Whois"''
55 ''tcp dport 993 counter accept comment "IMAPS"''
56 ''tcp dport 6697 counter accept comment "IRCS"''
57 ''tcp dport 2222 counter accept comment "SSH(boot)"''
58 ''tcp dport 5222 counter accept comment "XMPP"''
59 ''tcp dport 11371 counter accept comment "HKP"''
60 ''tcp dport {9009,9010,9011,9012,9013} counter accept comment "croc"''
61 ''udp dport 33434-33523 counter accept comment "traceroute"''
62 ''udp dport 60000-61000 counter accept comment "Mosh"''
63 #''ip protocol tcp counter accept comment "all"''
64 ];
65 }