From 0500315ae0a4ac6ab3557c51de1e68a5c4f33da5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:38:11 +0300 Subject: [PATCH 1/8] chore(nextcloud): Upgrade Nextcloud to v25 --- nextcloud/nextcloud.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud/nextcloud.nix b/nextcloud/nextcloud.nix index 5c5fad4..9c2a1df 100644 --- a/nextcloud/nextcloud.nix +++ b/nextcloud/nextcloud.nix @@ -11,7 +11,7 @@ in }; services.nextcloud = { enable = cfg.nextcloud.enable; - package = pkgs.nextcloud24; + package = pkgs.nextcloud25; hostName = "cloud.${cfg.domain}"; # Use HTTPS for links From 9c662d9629dd95b440042cc6196aa1e6321e71d5 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:38:48 +0300 Subject: [PATCH 2/8] chore: Change channel of overlay for testing --- configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configuration.nix b/configuration.nix index 91732e9..1f2ba8c 100644 --- a/configuration.nix +++ b/configuration.nix @@ -1,6 +1,6 @@ { config, pkgs, lib, ... }: let - url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/redis.tar.gz"; + url-overlay = "https://git.selfprivacy.org/SelfPrivacy/selfprivacy-nix-repo/archive/22-11.tar.gz"; nix-overlay = (import (builtins.fetchTarball url-overlay)); in { From 497cf28ecca92793122bbcfb84feeb89db575546 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:50:40 +0300 Subject: [PATCH 3/8] fix: Change Gitea settings due to Nix deprecations --- git/gitea.nix | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/git/gitea.nix b/git/gitea.nix index ed53667..e9d4454 100644 --- a/git/gitea.nix +++ b/git/gitea.nix @@ -13,10 +13,6 @@ in gitea = { enable = cfg.gitea.enable; stateDir = "/var/lib/gitea"; - log = { - rootPath = "/var/lib/gitea/log"; - level = "Warn"; - }; user = "gitea"; database = { type = "sqlite3"; @@ -40,7 +36,6 @@ in rootUrl = "https://git.${cfg.domain}/"; httpAddress = "0.0.0.0"; httpPort = 3000; - cookieSecure = true; settings = { mailer = { ENABLED = false; @@ -58,6 +53,13 @@ in repository = { FORCE_PRIVATE = false; }; + session = { + COOKIE_SECURE = true; + }; + log = { + ROOT_PATH = "/var/lib/gitea/log"; + LEVEL = "Warn"; + }; }; }; }; From 2e175f8c107ef7c32e16f3c56fd71c3377f2bfea Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:50:54 +0300 Subject: [PATCH 4/8] feat: Add state version --- configuration.nix | 1 + variables-module.nix | 7 +++++++ variables.nix | 1 + 3 files changed, 9 insertions(+) diff --git a/configuration.nix b/configuration.nix index 1f2ba8c..513f854 100644 --- a/configuration.nix +++ b/configuration.nix @@ -89,6 +89,7 @@ in allowReboot = config.services.userdata.autoUpgrade.allowReboot; channel = "https://channel.selfprivacy.org/nixos-selfpricacy"; }; + system.stateVersion = config.services.userdata.stateVersion; nix = { optimise.automatic = true; gc = { diff --git a/variables-module.nix b/variables-module.nix index 6fd24f9..82b1db5 100644 --- a/variables-module.nix +++ b/variables-module.nix @@ -41,6 +41,13 @@ in type = types.nullOr types.bool; }; }; + stateVersion = mkOption { + description = '' + State version of the server + ''; + type = types.string; + default = "22.11"; + }; ######################## # Server admin options # ######################## diff --git a/variables.nix b/variables.nix index d129077..b9a7366 100644 --- a/variables.nix +++ b/variables.nix @@ -7,6 +7,7 @@ in hostname = lib.attrsets.attrByPath [ "hostname" ] null jsonData; domain = lib.attrsets.attrByPath [ "domain" ] null jsonData; timezone = lib.attrsets.attrByPath [ "timezone" ] "Europe/Uzhgorod" jsonData; + stateVersion = lib.attrsets.attrByPath [ "stateVersion" ] "22.05" jsonData; autoUpgrade = { enable = lib.attrsets.attrByPath [ "autoUpgrade" "enable" ] true jsonData; allowReboot = lib.attrsets.attrByPath [ "autoUpgrade" "allowReboot" ] true jsonData; From bdaf88208f7ec7e37f275754caf537e31dbb0099 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 14:54:14 +0300 Subject: [PATCH 5/8] fix: Huey version --- api/api-module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api-module.nix b/api/api-module.nix index 4d830f0..360084e 100644 --- a/api/api-module.nix +++ b/api/api-module.nix @@ -98,7 +98,7 @@ in wantedBy = [ "network-online.target" ]; serviceConfig = { User = "root"; - ExecStart = "${pkgs.python39Packages.huey}/bin/huey_consumer.py selfprivacy_api.task_registry.huey"; + ExecStart = "${pkgs.python310Packages.huey}/bin/huey_consumer.py selfprivacy_api.task_registry.huey"; Restart = "always"; RestartSec = "5"; }; From d7edf5a95d9de2ea7a45c058e489636867b56cfd Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 15:03:39 +0300 Subject: [PATCH 6/8] chore(mailserver): Bump Mailserver to 22.11 release --- mailserver/system/mailserver.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mailserver/system/mailserver.nix b/mailserver/system/mailserver.nix index 9076374..ac328a2 100644 --- a/mailserver/system/mailserver.nix +++ b/mailserver/system/mailserver.nix @@ -6,10 +6,10 @@ in imports = [ (builtins.fetchTarball { # Pick a commit from the branch you are interested in - url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/f535d812/nixos-mailserver-f535d812.tar.gz"; + url = "https://gitlab.com/simple-nixos-mailserver/nixos-mailserver/-/archive/6d0d9fb9/nixos-mailserver-6d0d9fb9.tar.gz"; # And set its hash - sha256 = "sha256:0csx2i8p7gbis0n5aqpm57z5f9cd8n9yabq04bg1h4mkfcf7mpl6"; + sha256 = "sha256:0h35al73p15z9v8zb6hi5nq987sfl5wp4rm5c8947nlzlnsjl61x"; }) ]; From a5b965f08fc08c8e383fa88b6caf18f26d3c1dd8 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 15:09:13 +0300 Subject: [PATCH 7/8] fix(api): Python version --- api/api-module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api-module.nix b/api/api-module.nix index 360084e..ca70f42 100644 --- a/api/api-module.nix +++ b/api/api-module.nix @@ -76,7 +76,7 @@ in PYTHONUNBUFFERED = "1"; ENABLE_SWAGGER = (if cfg.enableSwagger then "1" else "0"); B2_BUCKET = cfg.b2Bucket; - PYTHONPATH = pkgs.selfprivacy-graphql-api.pythonPath + ":${pkgs.selfprivacy-graphql-api}/lib/python3.9/site-packages/"; + PYTHONPATH = pkgs.selfprivacy-graphql-api.pythonPath + ":${pkgs.selfprivacy-graphql-api}/lib/python3.10/site-packages/"; } // config.networking.proxy.envVars; path = [ "/var/" From 9a8af62e0b217444264abee8c8a08cac011d0556 Mon Sep 17 00:00:00 2001 From: Inex Code Date: Fri, 17 Mar 2023 15:10:47 +0300 Subject: [PATCH 8/8] fix: State Version type --- variables-module.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variables-module.nix b/variables-module.nix index 82b1db5..4fc7ada 100644 --- a/variables-module.nix +++ b/variables-module.nix @@ -45,7 +45,7 @@ in description = '' State version of the server ''; - type = types.string; + type = types.str; default = "22.11"; }; ########################