]> Git — Sourcephile - sourcephile-nix.git/blob - machines/losurdo/users.nix
apparmor: update to upstream nixpkgs#101071
[sourcephile-nix.git] / machines / 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 };
24 groups = {
25 adbusers.members = [
26 users."julm".name
27 ];
28 dialout.members = [
29 users."julm".name
30 ];
31 tor.members = [
32 users."julm".name
33 ];
34 wheel.members = [
35 users."julm".name
36 ];
37 };
38 };
39
40 security.gnupg.secrets."/root/.ssh/id_ed25519" = {
41 gpg = "${gnupg.store}/ssh/root.ssh-ed25519.gpg";
42 };
43
44 networking.nftables.ruleset = lib.concatMapStringsSep "\n"
45 (rule: "add rule inet filter fw2net meta skuid ${users.julm.name} " + rule) [
46 ''tcp dport {25,465} counter accept comment "SMTP"''
47 ''tcp dport 43 counter accept comment "Whois"''
48 ''tcp dport 993 counter accept comment "IMAPS"''
49 ''tcp dport 6697 counter accept comment "IRCS"''
50 ''tcp dport 5222 counter accept comment "XMPP"''
51 ''tcp dport 11371 counter accept comment "HKP"''
52 ''tcp dport {9009,9010,9011,9012,9013} counter accept comment "croc"''
53 ''udp dport 33434-33523 counter accept comment "traceroute"''
54 #''ip protocol tcp counter accept comment "all"''
55 ];
56 }