Compare commits
2 commits
024ea1168a
...
a89d69d201
Author | SHA1 | Date | |
---|---|---|---|
|
a89d69d201 | ||
|
95e5f7d8b2 |
|
@ -3,6 +3,7 @@
|
||||||
lib,
|
lib,
|
||||||
pkgs,
|
pkgs,
|
||||||
utils,
|
utils,
|
||||||
|
config,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (lib) types;
|
inherit (lib) types;
|
||||||
|
@ -10,8 +11,9 @@
|
||||||
in {
|
in {
|
||||||
options.services.musicomp.jobs = lib.mkOption {
|
options.services.musicomp.jobs = lib.mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Periodic jobs to run with musicomp.
|
Compression jobs to run with musicomp.
|
||||||
'';
|
'';
|
||||||
|
default = {};
|
||||||
# type = types.attrsOf (types.submodule ({name, ...}: {
|
# type = types.attrsOf (types.submodule ({name, ...}: {
|
||||||
type = types.attrsOf (types.submodule {
|
type = types.attrsOf (types.submodule {
|
||||||
options = {
|
options = {
|
||||||
|
@ -70,9 +72,8 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
description = ''
|
description = ''
|
||||||
Periodic compression jobs to run with musicomp.
|
Compression job to run with musicomp.
|
||||||
'';
|
'';
|
||||||
default = {};
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -82,10 +83,8 @@ in {
|
||||||
(
|
(
|
||||||
name: job:
|
name: job:
|
||||||
lib.nameValuePair "musicomp-jobs-${name}" {
|
lib.nameValuePair "musicomp-jobs-${name}" {
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
restartIfChanged = false;
|
restartIfChanged = false;
|
||||||
# TODO
|
|
||||||
wants = ["network-online.target"];
|
|
||||||
after = ["network-online.target"];
|
|
||||||
|
|
||||||
script = ''
|
script = ''
|
||||||
${lib.optionalString job.inhibitsSleep ''
|
${lib.optionalString job.inhibitsSleep ''
|
||||||
|
|
Loading…
Reference in a new issue