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