started writing module
This commit is contained in:
parent
09a71fb1ac
commit
94cf4c2005
3 changed files with 55 additions and 0 deletions
|
@ -5,6 +5,7 @@
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
zstd,
|
zstd,
|
||||||
dotnetCorePackages,
|
dotnetCorePackages,
|
||||||
|
postgres,
|
||||||
}: let
|
}: let
|
||||||
version = "v2025.1-beta5.patch2.security1";
|
version = "v2025.1-beta5.patch2.security1";
|
||||||
in
|
in
|
||||||
|
@ -26,6 +27,7 @@ in
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
dotnetCorePackages.sdk_9_0
|
dotnetCorePackages.sdk_9_0
|
||||||
|
postgres
|
||||||
];
|
];
|
||||||
|
|
||||||
unpackPhase = ''
|
unpackPhase = ''
|
||||||
|
|
33
modules/fedi/iceshrimp/option.nix
Normal file
33
modules/fedi/iceshrimp/option.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
20
modules/fedi/iceshrimp/service.nix
Normal file
20
modules/fedi/iceshrimp/service.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue