commit b5a4fde24d8dcf693f3b53322a1404139da9bc0c
parent 31c2cddd2a5c2aa1feff9bfe62b39b645f1a48d2
Author: MTRNord <mtrnord1@gmail.com>
Date: Tue, 10 Oct 2023 16:56:47 +0200
try to allow github actions
Diffstat:
3 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/flake.lock b/flake.lock
@@ -34,6 +34,18 @@
"type": "github"
}
},
+ "github_meta": {
+ "flake": false,
+ "locked": {
+ "narHash": "sha256-fZ/8EbMraNEKidvg+tY3hEvaX/cuhMoBKQ0a+eLNN80=",
+ "type": "file",
+ "url": "https://api.github.com/meta"
+ },
+ "original": {
+ "type": "file",
+ "url": "https://api.github.com/meta"
+ }
+ },
"hardware": {
"locked": {
"lastModified": 1695887975,
@@ -221,6 +233,7 @@
"root": {
"inputs": {
"docker-utils": "docker-utils",
+ "github_meta": "github_meta",
"hardware": "hardware",
"home-manager": "home-manager",
"impermanence": "impermanence",
diff --git a/flake.nix b/flake.nix
@@ -27,6 +27,10 @@
kubenix.url = "github:hall/kubenix";
docker-utils.url = "github:collinarnett/docker-utils";
+ github_meta = {
+ flake = false;
+ url = "https://api.github.com/meta";
+ };
};
outputs = { self, nixpkgs, nixpkgs-unstable, nixpkgs-discourse, home-manager, sops-nix, docker-utils, ... }@inputs:
diff --git a/nixos/worker-2/configuration.nix b/nixos/worker-2/configuration.nix
@@ -1,7 +1,11 @@
# This is your system's configuration file.
# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
-{ inputs, outputs, lib, config, pkgs, ... }: {
+{ inputs, outputs, lib, config, pkgs, ... }:
+let
+ github_metadata_json = builtins.fromJSON inputs.github_meta;
+in
+{
# You can import other NixOS modules here
imports = [
# If you want to use modules your own flake exports (from modules/nixos):
@@ -126,7 +130,7 @@
launch=gsqlite3
master=yes
webserver-address=0.0.0.0
- webserver-allow-from=127.0.0.1,::1,10.244.0.0/16,31.17.243.193
+ webserver-allow-from=127.0.0.1,::1,10.244.0.0/16,31.17.243.193,${builtins.concatStringsSep "," github_metadata_json.actions}
webserver-port=8081
api=yes
gsqlite3-database=/persist/var/lib/pdns/pdns.db