diff options
Diffstat (limited to 'host/Rory-nginx/services/containers')
22 files changed, 71 insertions, 312 deletions
diff --git a/host/Rory-nginx/services/containers/draupnir-cme/container.nix b/host/Rory-nginx/services/containers/draupnir-cme/container.nix index 75ce709..6ea20a4 100755 --- a/host/Rory-nginx/services/containers/draupnir-cme/container.nix +++ b/host/Rory-nginx/services/containers/draupnir-cme/container.nix @@ -1,9 +1,4 @@ -{ - pkgs, - lib, - nixpkgs-Draupnir, - ... -}: +{ nixpkgs-Draupnir, ... }: { privateNetwork = true; @@ -12,21 +7,15 @@ inherit nixpkgs-Draupnir; }; config = + { lib, pkgs, ... }: { - lib, - pkgs, - ... - }: - { - imports = [ + imports = [ + ../shared.nix ./root.nix + ./services/draupnir.nix "${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; - nixpkgs.overlays = [ - (final: prev: { - draupnir = nixpkgs-Draupnir.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; - }) - ]; + nixpkgs.overlays = [ (final: prev: { draupnir = nixpkgs-Draupnir.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; }) ]; }; hostAddress = "192.168.100.16"; localAddress = "192.168.100.17"; diff --git a/host/Rory-nginx/services/containers/draupnir-cme/root.nix b/host/Rory-nginx/services/containers/draupnir-cme/root.nix index cf6f8c0..aa9bae8 100755 --- a/host/Rory-nginx/services/containers/draupnir-cme/root.nix +++ b/host/Rory-nginx/services/containers/draupnir-cme/root.nix @@ -1,31 +1,6 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { - imports = [ - ./services/draupnir.nix - ]; - - environment.systemPackages = with pkgs; [ - neofetch - lnav - zsh - lsd - htop - btop - duf - kitty.terminfo - neovim - jq - yq - pv - dig - ]; - environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 nameserver 8.4.4.8 @@ -34,9 +9,12 @@ ''; networking.hosts = { - "192.168.100.16" = [ "matrix.rory.gay" "rory.gay" ]; + "192.168.100.16" = [ + "matrix.rory.gay" + "rory.gay" + ]; }; - + networking.firewall = { enable = true; }; diff --git a/host/Rory-nginx/services/containers/draupnir-cme/services/draupnir.nix b/host/Rory-nginx/services/containers/draupnir-cme/services/draupnir.nix index c23680c..cf59809 100755 --- a/host/Rory-nginx/services/containers/draupnir-cme/services/draupnir.nix +++ b/host/Rory-nginx/services/containers/draupnir-cme/services/draupnir.nix @@ -1,14 +1,10 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { services.draupnir = { enable = true; accessTokenFile = "/etc/draupnir-access-token"; + homeserverUrl = "https://matrix.rory.gay"; settings = { managementRoom = "#draupnir-cme:rory.gay"; @@ -16,15 +12,12 @@ autojoinOnlyIfManager = true; # ... but we don't want the bot to be invited to eg. Matrix HQ... automaticallyRedactForReasons = [ "*" ]; # Always autoredact fasterMembershipChecks = true; - homeserverUrl = "https://matrix.rory.gay"; backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit pollReports = false; admin.enableMakeRoomAdminCommand = false; - commands.ban.defaultReasons = [ - "spam" - ]; + commands.ban.defaultReasons = [ "spam" ]; }; }; } diff --git a/host/Rory-nginx/services/containers/draupnir-linux-mint/container.nix b/host/Rory-nginx/services/containers/draupnir-linux-mint/container.nix index 57a14bf..6a126f1 100755 --- a/host/Rory-nginx/services/containers/draupnir-linux-mint/container.nix +++ b/host/Rory-nginx/services/containers/draupnir-linux-mint/container.nix @@ -1,9 +1,4 @@ -{ - pkgs, - lib, - nixpkgs-Draupnir, - ... -}: +{ nixpkgs-Draupnir, ... }: { privateNetwork = true; @@ -12,21 +7,15 @@ inherit nixpkgs-Draupnir; }; config = + { lib, pkgs, ... }: { - lib, - pkgs, - ... - }: - { - imports = [ + imports = [ + ../shared.nix ./root.nix + ./services/draupnir.nix "${nixpkgs-Draupnir}/nixos/modules/services/matrix/draupnir.nix" ]; - nixpkgs.overlays = [ - (final: prev: { - draupnir = nixpkgs-Draupnir.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; - }) - ]; + nixpkgs.overlays = [ (final: prev: { draupnir = nixpkgs-Draupnir.legacyPackages.${pkgs.stdenv.hostPlatform.system}.draupnir; }) ]; }; hostAddress = "192.168.100.18"; localAddress = "192.168.100.19"; diff --git a/host/Rory-nginx/services/containers/draupnir-linux-mint/root.nix b/host/Rory-nginx/services/containers/draupnir-linux-mint/root.nix index bea6255..2254695 100755 --- a/host/Rory-nginx/services/containers/draupnir-linux-mint/root.nix +++ b/host/Rory-nginx/services/containers/draupnir-linux-mint/root.nix @@ -1,31 +1,6 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { - imports = [ - ./services/draupnir.nix - ]; - - environment.systemPackages = with pkgs; [ - neofetch - lnav - zsh - lsd - htop - btop - duf - kitty.terminfo - neovim - jq - yq - pv - dig - ]; - environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 nameserver 8.4.4.8 @@ -34,9 +9,12 @@ ''; networking.hosts = { - "192.168.100.18" = [ "matrix.rory.gay" "rory.gay" ]; + "192.168.100.18" = [ + "matrix.rory.gay" + "rory.gay" + ]; }; - + networking.firewall = { enable = true; }; diff --git a/host/Rory-nginx/services/containers/draupnir-linux-mint/services/draupnir.nix b/host/Rory-nginx/services/containers/draupnir-linux-mint/services/draupnir.nix index 1eb159b..042651a 100755 --- a/host/Rory-nginx/services/containers/draupnir-linux-mint/services/draupnir.nix +++ b/host/Rory-nginx/services/containers/draupnir-linux-mint/services/draupnir.nix @@ -1,14 +1,10 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { services.draupnir = { enable = true; accessTokenFile = "/etc/draupnir-access-token"; + homeserverUrl = "https://matrix.rory.gay"; settings = { managementRoom = "#draupnir-linux-mint:rory.gay"; @@ -16,7 +12,6 @@ autojoinOnlyIfManager = true; # ... but we don't want the bot to be invited to eg. Matrix HQ... automaticallyRedactForReasons = [ "*" ]; # Always autoredact fasterMembershipChecks = true; - homeserverUrl = "https://matrix.rory.gay"; backgroundDelayMS = 10; # delay isn't needed, I don't mind the performance hit pollReports = false; diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix index 08e6760..987348e 100755 --- a/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix +++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/container.nix @@ -1,9 +1,4 @@ -{ - pkgs, - lib, - conduit, - ... -}: +{ conduit, ... }: { privateNetwork = true; @@ -19,7 +14,11 @@ ... }: { - imports = [ ./root.nix ]; + imports = [ + ../shared.nix + ./services/nginx.nix + ./services/conduit.nix + ]; environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 nameserver 8.4.4.8 @@ -28,14 +27,9 @@ ''; networking.firewall = { enable = true; - allowedTCPPorts = [ - 80 - 5432 - ]; + allowedTCPPorts = [ 80 ]; }; }; hostAddress = "192.168.100.14"; localAddress = "192.168.100.15"; - hostAddress6 = "fc00::5"; - localAddress6 = "fc00::6"; } diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix deleted file mode 100755 index a9929d2..0000000 --- a/host/Rory-nginx/services/containers/matrixunittests-conduit/root.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - config, - pkgs, - lib, - conduit, - ... -}: - -{ - imports = [ - ./services/nginx.nix - ./services/conduit.nix - ./services/pantalaimon.nix - ]; - - environment.systemPackages = with pkgs; [ - wget - neofetch - lnav - zsh - git - lsd - htop - btop - duf - kitty.terminfo - neovim - tmux - jq - yq - pv - dig - cloud-utils - ]; -} diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix index 6713b26..3df71be 100755 --- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix +++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/conduit.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - conduit, - ... -}: +{ pkgs, conduit, ... }: { services.matrix-conduit = { diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix index 0678047..0d7874e 100755 --- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix +++ b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/nginx.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { services = { diff --git a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix b/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix deleted file mode 100755 index da95e76..0000000 --- a/host/Rory-nginx/services/containers/matrixunittests-conduit/services/pantalaimon.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services.pantalaimon-headless = { - instances."localhost" = { - homeserver = "http://localhost:6167"; - ssl = false; - extraSettings = { - "DropOldKeys" = true; - "UseKeyring" = false; - }; - }; - }; - -} diff --git a/host/Rory-nginx/services/containers/matrixunittests/container.nix b/host/Rory-nginx/services/containers/matrixunittests/container.nix index 5273b4e..3ef68bf 100755 --- a/host/Rory-nginx/services/containers/matrixunittests/container.nix +++ b/host/Rory-nginx/services/containers/matrixunittests/container.nix @@ -1,9 +1,4 @@ -{ - pkgs, - lib, - conduit, - ... -}: +{ conduit, ... }: { privateNetwork = true; @@ -19,7 +14,11 @@ ... }: { - imports = [ ./root.nix ]; + imports = [ + ../shared.nix + ./services/nginx.nix + ./services/conduit.nix + ]; environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 nameserver 8.4.4.8 diff --git a/host/Rory-nginx/services/containers/matrixunittests/root.nix b/host/Rory-nginx/services/containers/matrixunittests/root.nix deleted file mode 100755 index a9929d2..0000000 --- a/host/Rory-nginx/services/containers/matrixunittests/root.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ - config, - pkgs, - lib, - conduit, - ... -}: - -{ - imports = [ - ./services/nginx.nix - ./services/conduit.nix - ./services/pantalaimon.nix - ]; - - environment.systemPackages = with pkgs; [ - wget - neofetch - lnav - zsh - git - lsd - htop - btop - duf - kitty.terminfo - neovim - tmux - jq - yq - pv - dig - cloud-utils - ]; -} diff --git a/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix b/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix index 573075e..b33117f 100755 --- a/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix +++ b/host/Rory-nginx/services/containers/matrixunittests/services/conduit.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - conduit, - ... -}: +{ pkgs, conduit, ... }: { services.matrix-conduit = { diff --git a/host/Rory-nginx/services/containers/matrixunittests/services/nginx.nix b/host/Rory-nginx/services/containers/matrixunittests/services/nginx.nix index 98d2e52..0236182 100755 --- a/host/Rory-nginx/services/containers/matrixunittests/services/nginx.nix +++ b/host/Rory-nginx/services/containers/matrixunittests/services/nginx.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { services = { diff --git a/host/Rory-nginx/services/containers/matrixunittests/services/pantalaimon.nix b/host/Rory-nginx/services/containers/matrixunittests/services/pantalaimon.nix deleted file mode 100755 index da95e76..0000000 --- a/host/Rory-nginx/services/containers/matrixunittests/services/pantalaimon.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -{ - services.pantalaimon-headless = { - instances."localhost" = { - homeserver = "http://localhost:6167"; - ssl = false; - extraSettings = { - "DropOldKeys" = true; - "UseKeyring" = false; - }; - }; - }; - -} diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/container.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/container.nix index 4ddffeb..837ae11 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/container.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/container.nix @@ -1,9 +1,4 @@ -{ - pkgs, - lib, - conduit, - ... -}: +{ conduit, ... }: { privateNetwork = true; @@ -19,7 +14,10 @@ ... }: { - imports = [ ./root.nix ]; + imports = [ + ./root.nix + ../shared.nix + ]; environment.etc."resolv.conf".text = '' nameserver 8.8.8.8 nameserver 8.4.4.8 diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix index a9929d2..7e7c355 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/root.nix @@ -1,8 +1,4 @@ { - config, - pkgs, - lib, - conduit, ... }: @@ -13,23 +9,4 @@ ./services/pantalaimon.nix ]; - environment.systemPackages = with pkgs; [ - wget - neofetch - lnav - zsh - git - lsd - htop - btop - duf - kitty.terminfo - neovim - tmux - jq - yq - pv - dig - cloud-utils - ]; } diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix index bbc042c..db9df9a 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/conduit.nix @@ -1,10 +1,4 @@ -{ - config, - pkgs, - lib, - conduit, - ... -}: +{ pkgs, conduit, ... }: { services.matrix-conduit = { diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/nginx.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/nginx.nix index 0f9fad4..9d8041a 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/nginx.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/nginx.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ pkgs, ... }: { services = { diff --git a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/pantalaimon.nix b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/pantalaimon.nix index da95e76..335176f 100755 --- a/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/pantalaimon.nix +++ b/host/Rory-nginx/services/containers/pluralcontactbotpoc/services/pantalaimon.nix @@ -1,9 +1,4 @@ -{ - config, - pkgs, - lib, - ... -}: +{ ... }: { services.pantalaimon-headless = { diff --git a/host/Rory-nginx/services/containers/shared.nix b/host/Rory-nginx/services/containers/shared.nix new file mode 100644 index 0000000..f267ff0 --- /dev/null +++ b/host/Rory-nginx/services/containers/shared.nix @@ -0,0 +1,17 @@ +{ pkgs, ... }: +{ + environment.systemPackages = with pkgs; [ + neofetch + lnav + zsh + git + lsd + htop + btop + duf + kitty.terminfo + neovim + jq + dig + ]; +} |