started writing module

This commit is contained in:
twoneis 2025-03-23 21:14:34 +01:00
parent 09a71fb1ac
commit 94cf4c2005
3 changed files with 55 additions and 0 deletions

View file

@ -5,6 +5,7 @@
makeWrapper,
zstd,
dotnetCorePackages,
postgres,
}: let
version = "v2025.1-beta5.patch2.security1";
in
@ -26,6 +27,7 @@ in
buildInputs = [
dotnetCorePackages.sdk_9_0
postgres
];
unpackPhase = ''

View file

@ -0,0 +1,33 @@
{
pkgs,
lib,
...
}: let
inherit
(lib)
mkOption
mkPackageOption
;
inherit (lib.types) nonEmptyStr attrsOf str;
in {
options = {
services.iceshrimp = {
user = mkOption {
type = nonEmptyStr;
default = "iceshrimp";
};
group = mkOption {
type = nonEmptyStr;
default = "iceshrimp";
};
package = mkPackageOption pkgs "iceshrimp" {};
config = mkOption {
type = attrsOf str;
default = ./default_config.nix;
};
};
};
}

View file

@ -0,0 +1,20 @@
{iceshrimp}: {
systemd.services.iceshrimp = {
enable = true;
description = "Iceshrimp.NET daemon";
requires = ["postgresql.service"];
after = ["postgersql.service"];
wantedBy = ["multi-user.target"];
serviceConfig = {
Type = "simple";
Restart = "on-failure";
ExecStart = "${iceshrimp}/bin/iceshrimp --migrate-and-start";
User = "iceshrimp";
Group = "iceshrimp";
};
};
}