diff --git a/hosts/hackens-org/configuration.nix b/hosts/hackens-org/configuration.nix index a52e139..65f2df1 100644 --- a/hosts/hackens-org/configuration.nix +++ b/hosts/hackens-org/configuration.nix @@ -10,7 +10,7 @@ ./hardware-configuration.nix ./physical.nix ../../profiles/core-hackens - ./wiki.nix + ./wiki ./webpass.nix ./mosquitto.nix ./monitoring diff --git a/hosts/hackens-org/kfet2mqtt.nix b/hosts/hackens-org/kfet2mqtt.nix index 76262a5..9a67286 100644 --- a/hosts/hackens-org/kfet2mqtt.nix +++ b/hosts/hackens-org/kfet2mqtt.nix @@ -6,8 +6,8 @@ let ]); script = pkgs.fetchgit { url = "https://git.eleves.ens.fr/hackens/kfet2mqtt.git"; - rev = "30d948dc2f7b4a0b440445ef578b6ed718a53273"; - sha256 = "0d93jc0cwx1a8rhq9m0lwzqp53jsffr9qyswdkwydji14f3kwd4d"; + rev = "4a9ca954fd4405ccbabdb0793f1a2f76c7561a8e"; + sha256 = "1g4gv2mc0kd108yw8y6gbskg8zhnrlwdnza8mhii2n8jidh63485"; }; in { diff --git a/hosts/hackens-org/mosquitto.nix b/hosts/hackens-org/mosquitto.nix index 5612dc1..3ce009d 100644 --- a/hosts/hackens-org/mosquitto.nix +++ b/hosts/hackens-org/mosquitto.nix @@ -5,7 +5,7 @@ in { services.mosquitto = { enable = true; - logType = [ "all" ]; + #logType = [ "all" ]; listeners = [ { address = "0.0.0.0"; diff --git a/hosts/hackens-org/wiki.nix b/hosts/hackens-org/wiki/default.nix similarity index 98% rename from hosts/hackens-org/wiki.nix rename to hosts/hackens-org/wiki/default.nix index 71d67b8..78a6883 100644 --- a/hosts/hackens-org/wiki.nix +++ b/hosts/hackens-org/wiki/default.nix @@ -1,18 +1,20 @@ { pkgs, config, ... }: let - hostname = "new.hackens.org"; #config.my.subZone; - debug = false; #config.my.debug; + hostname = "new.hackens.org"; in { imports = [ - modules/custom-dokuwiki.nix + ../modules/custom-dokuwiki.nix ]; disabledModules = [ "services/web-apps/dokuwiki.nix" ]; + networking.firewall.allowedTCPPorts = [ 80 443 ]; + services.nginx.virtualHosts."${hostname}" = { enableACME = true; forceSSL = true; }; + services.dokuwiki.sites."${hostname}" = { enable = true; diff --git a/pubkeys/hackens-host.keys b/pubkeys/hackens-host.keys new file mode 100644 index 0000000..5d96db0 --- /dev/null +++ b/pubkeys/hackens-host.keys @@ -0,0 +1 @@ +ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO3EvmAE38YNp2pNfGbyyywInEDBpTz4yseOAqmnZS1m diff --git a/secrets/default.nix b/secrets/default.nix new file mode 100644 index 0000000..d2a4ed6 --- /dev/null +++ b/secrets/default.nix @@ -0,0 +1,5 @@ +{ ... }: +{ + imports = [ ]; + age.secrets."wikiOpenID".file = ./wiki-openID.age +} diff --git a/secrets/secrets.nix b/secrets/secrets.nix new file mode 100644 index 0000000..e231aa6 --- /dev/null +++ b/secrets/secrets.nix @@ -0,0 +1,7 @@ +let + lib = (import {}).lib; + readPubkeys = user: builtins.filter (k: k != "") (lib.splitString "\n" (builtins.readFile (./pubkeys + "/${user}.keys"))); +in +{ + "wiki-openID.age".publicKeys = (readPubkeys "sinavir") ++ (readPubkeys "hackens-host") ++ (readPubkeys "raito") ++ (readPubkeys "gdd") ++ (readPubkeys "backslash"); +}