From 199be9a7dbf4e7cd52ae3b3b08ab48d2ab2a69d7 Mon Sep 17 00:00:00 2001 From: kat witch Date: Sat, 4 Sep 2021 23:38:04 +0100 Subject: [PATCH] glauth: Further work --- config/modules/nixos/glauth.nix | 6 ++++-- config/services/glauth/default.nix | 1 + nix/sources.json | 6 +++--- overlays/exprs | 2 +- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config/modules/nixos/glauth.nix b/config/modules/nixos/glauth.nix index cde2d6d1..72d510d2 100644 --- a/config/modules/nixos/glauth.nix +++ b/config/modules/nixos/glauth.nix @@ -21,7 +21,7 @@ in }; database = { enable = mkEnableOption "use a database"; - local = mkEnableOption "local database creation"; + local = mkEnableOption "local database creation" // { default = true; }; type = mkOption { type = types.enum [ "postgres" @@ -77,7 +77,7 @@ in }; config = let - localCheck = dbcfg.local && dbcfg.host != "localhost"; + localCheck = dbcfg.local && dbcfg.enable && dbcfg.host == "localhost"; postgresCheck = localCheck && dbcfg.type == "postgres"; mysqlCheck = localCheck && dbcfg.type == "mysql"; in @@ -173,4 +173,6 @@ in }; }; }; + + meta.maintainers = with maintainers; [ kittywitch ]; } diff --git a/config/services/glauth/default.nix b/config/services/glauth/default.nix index 7f873e1f..183ec628 100644 --- a/config/services/glauth/default.nix +++ b/config/services/glauth/default.nix @@ -4,6 +4,7 @@ configFile = config.secrets.files.glauth-config-file.path; database = { enable = true; + local = true; type = "postgres"; passwordFile = config.secrets.files.glauth-postgres-file.path; }; diff --git a/nix/sources.json b/nix/sources.json index 99f2bd8c..bc5381ed 100644 --- a/nix/sources.json +++ b/nix/sources.json @@ -89,10 +89,10 @@ "homepage": null, "owner": "kittywitch", "repo": "nixexprs", - "rev": "90f41efe41ef038648a9b7bb3c86f82a94faec98", - "sha256": "125msdla0kk7jswcxyvbslwdl76v5dmpx3jb4i0psvxafyhr6zbx", + "rev": "2abdd7cea2cbd4ce229827ad71b6479d0eb4b85e", + "sha256": "0ifsm74l490zw6qwy75sw5r9fsl02pq17ckcmi384m37hk95724v", "type": "tarball", - "url": "https://github.com/kittywitch/nixexprs/archive/90f41efe41ef038648a9b7bb3c86f82a94faec98.tar.gz", + "url": "https://github.com/kittywitch/nixexprs/archive/2abdd7cea2cbd4ce229827ad71b6479d0eb4b85e.tar.gz", "url_template": "https://github.com///archive/.tar.gz" }, "niv": { diff --git a/overlays/exprs b/overlays/exprs index 90f41efe..2abdd7ce 160000 --- a/overlays/exprs +++ b/overlays/exprs @@ -1 +1 @@ -Subproject commit 90f41efe41ef038648a9b7bb3c86f82a94faec98 +Subproject commit 2abdd7cea2cbd4ce229827ad71b6479d0eb4b85e