home/modules: start background tasks in background.slice
This commit is contained in:
@@ -25,6 +25,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${lib.getExe cfg.package} prune";
|
||||
|
||||
@@ -32,6 +32,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${lib.getExe cfg.package} --refresh-keys";
|
||||
|
||||
@@ -32,6 +32,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${lib.getExe cfg.package} --update-trustdb";
|
||||
|
||||
@@ -31,6 +31,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||
|
||||
@@ -26,6 +26,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --execute=reload";
|
||||
|
||||
@@ -25,6 +25,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
CPUSchedulingPolicy = "idle";
|
||||
IOSchedulingClass = "idle";
|
||||
ExecStart = "${lib.getExe pkgs.flock} %t/newsboat.lock ${lib.getExe package} --vacuum";
|
||||
|
||||
@@ -44,6 +44,7 @@ in
|
||||
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||
name = "fetch-nix-index-database";
|
||||
runtimeInputs = with pkgs; [
|
||||
|
||||
@@ -61,6 +61,7 @@ in
|
||||
Unit.Description = "Watchdog that moves screenshots from all prismlauncher minecraft instances into a common dir";
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
ExecStart = lib.getExe (pkgs.writeShellApplication {
|
||||
name = "prismlauncher-move-minecraft-screenshots.sh";
|
||||
runtimeInputs = with pkgs; [ coreutils findutils ];
|
||||
|
||||
@@ -115,6 +115,7 @@ in
|
||||
Unit.Description = "Downloads directory watchdog, sorts the downloads directory";
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
SyslogIdentifier = mapping.unitName;
|
||||
ExecStart = let
|
||||
script = pkgs.writeShellApplication {
|
||||
|
||||
@@ -36,6 +36,7 @@ in
|
||||
};
|
||||
Service = {
|
||||
Type = "oneshot";
|
||||
Slice = "background.slice";
|
||||
ExecStart = "${lib.getExe pkgs.mpc-cli} update --wait";
|
||||
|
||||
PrivateUsers = true;
|
||||
|
||||
Reference in New Issue
Block a user