Compare commits
No commits in common. "c529d67a470660522a132379cf27c2c7aecdce62" and "fc6087bc8de0d5425640f037ec9d66ce323a2bb3" have entirely different histories.
c529d67a47
...
fc6087bc8d
2 changed files with 25 additions and 12 deletions
|
@ -3,7 +3,7 @@ name: Update flake.lock
|
||||||
on:
|
on:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: 0 0 * * 1
|
- 0 0 * * 1
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update_flake_lock:
|
update_flake_lock:
|
||||||
|
|
|
@ -5,23 +5,36 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
cfg = config.services.reposilite;
|
cfg = config.services.reposilite;
|
||||||
|
|
||||||
|
inherit
|
||||||
|
(lib)
|
||||||
|
getExe
|
||||||
|
literalExpression
|
||||||
|
mdDoc
|
||||||
|
mkDefault
|
||||||
|
mkEnableOption
|
||||||
|
mkIf
|
||||||
|
mkOption
|
||||||
|
mkPackageOption
|
||||||
|
types
|
||||||
|
;
|
||||||
in {
|
in {
|
||||||
options.services.reposilite = {
|
options.services.reposilite = {
|
||||||
enable = lib.mkEnableOption "reposilite";
|
enable = mkEnableOption "reposilite";
|
||||||
package = lib.mkPackageOption pkgs "reposilite" {};
|
package = mkPackageOption pkgs "reposilite" {};
|
||||||
environmentFile = lib.mkOption {
|
environmentFile = mkOption {
|
||||||
description = lib.mdDoc ''
|
description = mdDoc ''
|
||||||
Environment file as defined in {manpage}`systemd.exec(5)`
|
Environment file as defined in {manpage}`systemd.exec(5)`
|
||||||
'';
|
'';
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = types.nullOr types.path;
|
||||||
default = null;
|
default = null;
|
||||||
example = lib.literalExpression ''
|
example = literalExpression ''
|
||||||
"/run/agenix.d/1/reposilite"
|
"/run/agenix.d/1/reposilite"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
users = {
|
users = {
|
||||||
users.reposilite = {
|
users.reposilite = {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
@ -33,17 +46,17 @@ in {
|
||||||
|
|
||||||
systemd.services."reposilite" = {
|
systemd.services."reposilite" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
wantedBy = lib.mkDefault ["multi-user.target"];
|
wantedBy = mkDefault ["multi-user.target"];
|
||||||
after = lib.mkDefault ["network.target"];
|
after = mkDefault ["network.target"];
|
||||||
script = ''
|
script = ''
|
||||||
${lib.getExe cfg.package}
|
${getExe cfg.package}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
|
|
||||||
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
EnvironmentFile = mkIf (cfg.environmentFile != null) cfg.environmentFile;
|
||||||
|
|
||||||
StateDirectory = "reposilite";
|
StateDirectory = "reposilite";
|
||||||
StateDirectoryMode = "0700";
|
StateDirectoryMode = "0700";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue