From 6fbdea91b6020c711d858f075253427359b2cc75 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 4 Apr 2023 17:42:18 +0200 Subject: Move domain --- flake.nix | 4 ++-- host/Spacebar-nginx/configuration.nix | 2 +- .../hosts/spacebar.chat/internal/secrets.nix | 20 ++++++++++++++++++++ host/Spacebar-nginx/hosts/spacebar.local/secrets.nix | 20 -------------------- modules/base.nix | 1 + 5 files changed, 24 insertions(+), 23 deletions(-) create mode 100644 host/Spacebar-nginx/hosts/spacebar.chat/internal/secrets.nix delete mode 100644 host/Spacebar-nginx/hosts/spacebar.local/secrets.nix diff --git a/flake.nix b/flake.nix index 690dca1..16f584a 100755 --- a/flake.nix +++ b/flake.nix @@ -5,11 +5,11 @@ nixpkgs = { url = "github:NixOS/nixpkgs/nixos-unstable"; }; - home-manager = { + home-manager = { url = "github:nix-community/home-manager/master"; }; secrets = { - url = "git+http://secrets.spacebar.local/"; + url = "git+http://secrets.internal.spacebar.chat/"; flake = false; }; }; diff --git a/host/Spacebar-nginx/configuration.nix b/host/Spacebar-nginx/configuration.nix index 80af48f..91c84bb 100755 --- a/host/Spacebar-nginx/configuration.nix +++ b/host/Spacebar-nginx/configuration.nix @@ -38,7 +38,7 @@ "gateway.old.server.spacebar.chat" = import ./hosts/spacebar.chat/server/old/gateway.nix; # local only - "secrets.spacebar.local" = import ./hosts/spacebar.local/secrets.nix { inherit lib config; }; + "secrets.internal.spacebar.chat" = import ./hosts/spacebar.chat/internal/secrets.nix { inherit lib config; }; }; }; }; diff --git a/host/Spacebar-nginx/hosts/spacebar.chat/internal/secrets.nix b/host/Spacebar-nginx/hosts/spacebar.chat/internal/secrets.nix new file mode 100644 index 0000000..cc0e299 --- /dev/null +++ b/host/Spacebar-nginx/hosts/spacebar.chat/internal/secrets.nix @@ -0,0 +1,20 @@ +{ lib, config }: { + root = "/data/nginx/secrets"; + #use ip from ens18 + listenAddresses = [ + (lib.head config.networking.interfaces.ens18.ipv4.addresses).address + ]; + locations = { + "/" = { + extraConfig = + "autoindex on;" + + "allow 192.168.1.0/24;" + + "allow 127.0.0.1;" + + "deny all;" + ; + }; + "^~ /.well-known/acme-challenge/" = { + root = "/var/lib/acme/acme-challenge"; + }; + }; +} diff --git a/host/Spacebar-nginx/hosts/spacebar.local/secrets.nix b/host/Spacebar-nginx/hosts/spacebar.local/secrets.nix deleted file mode 100644 index cc0e299..0000000 --- a/host/Spacebar-nginx/hosts/spacebar.local/secrets.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ lib, config }: { - root = "/data/nginx/secrets"; - #use ip from ens18 - listenAddresses = [ - (lib.head config.networking.interfaces.ens18.ipv4.addresses).address - ]; - locations = { - "/" = { - extraConfig = - "autoindex on;" + - "allow 192.168.1.0/24;" + - "allow 127.0.0.1;" + - "deny all;" - ; - }; - "^~ /.well-known/acme-challenge/" = { - root = "/var/lib/acme/acme-challenge"; - }; - }; -} diff --git a/modules/base.nix b/modules/base.nix index 68f7c02..6fbd6ae 100755 --- a/modules/base.nix +++ b/modules/base.nix @@ -68,6 +68,7 @@ }; startWhenNeeded = true; }; + qemuGuest.enable = true; }; security = { -- cgit 1.4.1