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,
|
||||
zstd,
|
||||
dotnetCorePackages,
|
||||
postgres,
|
||||
}: let
|
||||
version = "v2025.1-beta5.patch2.security1";
|
||||
in
|
||||
|
@ -26,6 +27,7 @@ in
|
|||
|
||||
buildInputs = [
|
||||
dotnetCorePackages.sdk_9_0
|
||||
postgres
|
||||
];
|
||||
|
||||
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
Reference in a new issue