diff options
Diffstat (limited to '')
| -rw-r--r-- | hosts/by-name/server2/configuration.nix | 15 | ||||
| -rw-r--r-- | hosts/by-name/server3/configuration.nix | 17 | ||||
| -rw-r--r-- | modules/common/vhack/default.nix | 62 |
3 files changed, 42 insertions, 52 deletions
diff --git a/hosts/by-name/server2/configuration.nix b/hosts/by-name/server2/configuration.nix index ba08d87..94b4f75 100644 --- a/hosts/by-name/server2/configuration.nix +++ b/hosts/by-name/server2/configuration.nix @@ -6,6 +6,7 @@ imports = [ ./networking.nix # network configuration that just works ./hardware.nix + ../../../modules/common/vhack ]; sils = { @@ -20,7 +21,7 @@ enable = true; fqdn = "atuin-sync.vhack.eu"; }; - backup = { + services.backup = { enable = true; privateSshKey = ./secrets/backup/backupssh.age; privatePassword = ./secrets/backup/backuppass.age; @@ -54,7 +55,6 @@ enable = true; secretFile = ./secrets/etesync/secret_file.age; }; - fail2ban.enable = true; git-server = { enable = true; domain = "git.foss-syndicate.org"; @@ -154,14 +154,6 @@ "source.vhack.eu" = "https://source.foss-syndicate.org"; }; }; - nixconfig.enable = true; - openssh.enable = true; - persist = { - enable = true; - directories = [ - "/var/log" - ]; - }; redlib.enable = false; rust-motd.enable = true; sharkey = { @@ -188,11 +180,8 @@ enable = true; fqdn = "taskchampion.vhack.eu"; }; - users.enable = true; }; - boot.tmp.cleanOnBoot = true; - zramSwap.enable = true; networking.hostName = "server2"; networking.domain = "vhack.eu"; diff --git a/hosts/by-name/server3/configuration.nix b/hosts/by-name/server3/configuration.nix index f7ee7d3..78901bb 100644 --- a/hosts/by-name/server3/configuration.nix +++ b/hosts/by-name/server3/configuration.nix @@ -2,15 +2,17 @@ imports = [ ./networking.nix # network configuration that just works ./hardware.nix + ../../../modules/common/vhack ]; vhack = { - backup = { + services.backup = { enable = true; privateSshKey = ./secrets/backup/backupssh.age; privatePassword = ./secrets/backup/backuppass.age; user = "u384702-sub4"; }; + dns = { enable = true; openFirewall = true; @@ -31,7 +33,6 @@ # TODO: Also provide something for Loki <2026-07-19> }; - fail2ban.enable = true; rocie = { enable = true; domain = "rocie.vhack.eu"; @@ -70,19 +71,11 @@ name = "vhack"; url = "vhack.eu"; }; - nixconfig.enable = true; - openssh.enable = true; peertube = { enable = true; peertubeGeneral = ./secrets/peertube/general.age; smtpPasswordFile = ./secrets/peertube/smtp.age; }; - persist = { - enable = true; - directories = [ - "/var/log" - ]; - }; stalwart-mail = { # enable = false; # fqdn = "mail.vhack.eu"; @@ -102,13 +95,9 @@ # openFirewall = true; # principals = null; }; - postgresql.enable = true; rust-motd.enable = true; - users.enable = true; }; - boot.tmp.cleanOnBoot = true; - zramSwap.enable = true; networking.hostName = "server3"; networking.domain = "vhack.eu"; diff --git a/modules/common/vhack/default.nix b/modules/common/vhack/default.nix index 9189a28..4ea5885 100644 --- a/modules/common/vhack/default.nix +++ b/modules/common/vhack/default.nix @@ -1,30 +1,42 @@ {...}: { - vhack.users = { - enable = true; - users = [ - { - name = "soispha"; - groups = ["wheel"]; - uid = 1000; - password = "$y$jFT$3.8XmUyukZvpExMUxDZkI.$IVrJgm8ysNDF/0vDD2kF6w73ozXgr1LMVRNN4Bq7pv1"; - sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIME4ZVa+IoZf6T3U08JG93i6QIAJ4amm7mkBzO14JSkz cardno:000F_18F83532"; - } - { - name = "jaki"; - uid = 1001; - groups = ["wheel"]; - password = "$y$jFT$KpFnahVCE9JbE.5P3us8o.$ZzSxCusWqe3sL7b6DLgOXNNUf114tiiptM6T8lDxtKC"; - sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7Oumr5IYtTTIKRFvDnofGXXiDLBQE9jVF+7UE+4G5 vhack.eu"; - } - ]; - }; + vhack = { + anubis.enable = true; + + users = { + enable = true; + users = [ + { + name = "soispha"; + groups = ["wheel"]; + uid = 1000; + password = "$y$jFT$3.8XmUyukZvpExMUxDZkI.$IVrJgm8ysNDF/0vDD2kF6w73ozXgr1LMVRNN4Bq7pv1"; + sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIME4ZVa+IoZf6T3U08JG93i6QIAJ4amm7mkBzO14JSkz cardno:000F_18F83532"; + } + { + name = "jaki"; + uid = 1001; + groups = ["wheel"]; + password = "$y$jFT$KpFnahVCE9JbE.5P3us8o.$ZzSxCusWqe3sL7b6DLgOXNNUf114tiiptM6T8lDxtKC"; + sshKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILn7Oumr5IYtTTIKRFvDnofGXXiDLBQE9jVF+7UE+4G5 vhack.eu"; + } + ]; + }; + + postgresql.enable = true; + fail2ban.enable = true; + nixconfig.enable = true; + openssh.enable = true; - vhack.persist = { - enable = true; + persist = { + enable = true; - directories = [ - "/etc/nixos" - "/var/lib/systemd" - ]; + directories = [ + "/etc/nixos" + "/var/lib/systemd" + "/var/log" + ]; + }; }; + boot.tmp.cleanOnBoot = true; + zramSwap.enable = true; } |
