From 094d9d18879527033da7ab392ab07a383bc593a4 Mon Sep 17 00:00:00 2001 From: nhnn Date: Wed, 17 Jul 2024 20:45:23 +0300 Subject: [PATCH 1/5] feat: support binds for prometheus monitoring service --- sp-modules/monitoring/module.nix | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/sp-modules/monitoring/module.nix b/sp-modules/monitoring/module.nix index 90bf806..7ad8f83 100644 --- a/sp-modules/monitoring/module.nix +++ b/sp-modules/monitoring/module.nix @@ -6,8 +6,21 @@ in { default = false; type = lib.types.bool; }; + location = lib.mkOption { + type = lib.types.str; + }; }; config = lib.mkIf cfg.enable { + fileSystems = lib.mkIf config.selfprivacy.useBinds { + "/var/lib/prometheus2" = { + device = "/volumes/${cfg.location}/prometheus"; + options = [ + "bind" + "x-systemd.required-by=prometheus.service" + "x-systemd.before=prometheus.service" + ]; + }; + }; services.prometheus = { enable = true; port = 9001; @@ -30,4 +43,4 @@ in { ]; }; }; -} \ No newline at end of file +} From 960f4a3897c6f070670016ddd1bdc9ab9fc097d6 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 23 Jul 2024 02:34:57 +0300 Subject: [PATCH 2/5] feat(forgejo): Add a defaultTheme option --- sp-modules/gitea/module.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sp-modules/gitea/module.nix b/sp-modules/gitea/module.nix index 3a1deb9..0a23902 100644 --- a/sp-modules/gitea/module.nix +++ b/sp-modules/gitea/module.nix @@ -43,6 +43,11 @@ in type = lib.types.bool; description = "Require signin to view any page"; }; + defaultTheme = lib.mkOption { + default = "forgejo-auto"; + type = lib.types.enum [ "forgejo-auto" "forgejo-light" "forgejo-dark" "auto" "gitea" "arc-green" ]; + description = "The default theme for the gitea instance"; + }; }; config = lib.mkIf cfg.enable { From 63daf9d39f33b4d5a7487956429be3c7336eeb38 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Tue, 23 Jul 2024 02:37:58 +0300 Subject: [PATCH 3/5] fix(forgejo): Apply the selected theme --- sp-modules/gitea/module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sp-modules/gitea/module.nix b/sp-modules/gitea/module.nix index 0a23902..ca7d012 100644 --- a/sp-modules/gitea/module.nix +++ b/sp-modules/gitea/module.nix @@ -96,7 +96,7 @@ in ENABLED = false; }; ui = { - DEFAULT_THEME = "forgejo-auto"; + DEFAULT_THEME = cfg.defaultTheme; SHOW_USER_EMAIL = false; }; picture = { From b64e876929925bf53f898d2cfc32a1b75eac7c77 Mon Sep 17 00:00:00 2001 From: nhnn Date: Wed, 24 Jul 2024 06:40:38 +0300 Subject: [PATCH 4/5] fix: monitoring module requires selfprivacy.useBinds option --- sp-modules/monitoring/config-paths-needed.json | 1 + 1 file changed, 1 insertion(+) diff --git a/sp-modules/monitoring/config-paths-needed.json b/sp-modules/monitoring/config-paths-needed.json index 91fb203..3871a95 100644 --- a/sp-modules/monitoring/config-paths-needed.json +++ b/sp-modules/monitoring/config-paths-needed.json @@ -1,3 +1,4 @@ [ + [ "selfprivacy", "useBinds" ], [ "selfprivacy", "modules", "monitoring" ] ] From a6caa1898122866c4d0c00936b3ce23ba39d8345 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 26 Jul 2024 15:48:42 +0300 Subject: [PATCH 5/5] chore: Update nixpkgs --- flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/flake.lock b/flake.lock index b8bf414..1cb4715 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1719663039, - "narHash": "sha256-tXlrgAQygNIy49LDVFuPXlWD2zTQV9/F8pfoqwwPJyo=", + "lastModified": 1720535198, + "narHash": "sha256-zwVvxrdIzralnSbcpghA92tWu2DV2lwv89xZc8MTrbg=", "owner": "nixos", "repo": "nixpkgs", - "rev": "4a1e673523344f6ccc84b37f4413ad74ea19a119", + "rev": "205fd4226592cc83fd4c0885a3e4c9c400efabb5", "type": "github" }, "original": { @@ -44,4 +44,4 @@ }, "root": "root", "version": 7 -} \ No newline at end of file +}