mirror of
https://github.com/nix-community/home-manager
synced 2024-11-20 10:09:45 +01:00
pueue: add module
This commit is contained in:
parent
ae474885f7
commit
7bb4576f46
4 changed files with 70 additions and 0 deletions
2
.github/CODEOWNERS
vendored
2
.github/CODEOWNERS
vendored
|
@ -421,6 +421,8 @@ Makefile @thiagokokada
|
||||||
|
|
||||||
/modules/services/poweralertd.nix @ThibautMarty
|
/modules/services/poweralertd.nix @ThibautMarty
|
||||||
|
|
||||||
|
/modules/services/pueue.nix @AndersonTorres
|
||||||
|
|
||||||
/modules/services/pulseeffects.nix @jonringer
|
/modules/services/pulseeffects.nix @jonringer
|
||||||
|
|
||||||
/modules/services/random-background.nix @rycee
|
/modules/services/random-background.nix @rycee
|
||||||
|
|
|
@ -653,6 +653,14 @@ in
|
||||||
A new module is available: 'programs.bashmount'.
|
A new module is available: 'programs.bashmount'.
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
time = "2022-08-25T21:01:37+00:00";
|
||||||
|
condition = hostPlatform.isLinux;
|
||||||
|
message = ''
|
||||||
|
A new module is available: 'services.pueue'.
|
||||||
|
'';
|
||||||
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -244,6 +244,7 @@ let
|
||||||
./services/plex-mpv-shim.nix
|
./services/plex-mpv-shim.nix
|
||||||
./services/polybar.nix
|
./services/polybar.nix
|
||||||
./services/poweralertd.nix
|
./services/poweralertd.nix
|
||||||
|
./services/pueue.nix
|
||||||
./services/pulseeffects.nix
|
./services/pulseeffects.nix
|
||||||
./services/random-background.nix
|
./services/random-background.nix
|
||||||
./services/recoll.nix
|
./services/recoll.nix
|
||||||
|
|
59
modules/services/pueue.nix
Normal file
59
modules/services/pueue.nix
Normal file
|
@ -0,0 +1,59 @@
|
||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
with lib;
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
cfg = config.services.pueue;
|
||||||
|
yamlFormat = pkgs.formats.yaml { };
|
||||||
|
configFile = yamlFormat.generate "pueue.yaml" cfg.settings;
|
||||||
|
|
||||||
|
in {
|
||||||
|
meta.maintainers = [ maintainers.AndersonTorres ];
|
||||||
|
|
||||||
|
options.services.pueue = {
|
||||||
|
enable = mkEnableOption "Pueue, CLI process scheduler and manager";
|
||||||
|
|
||||||
|
package = mkPackageOption pkgs "pueue" { };
|
||||||
|
|
||||||
|
settings = mkOption {
|
||||||
|
type = yamlFormat.type;
|
||||||
|
default = { };
|
||||||
|
example = literalExpression ''
|
||||||
|
{
|
||||||
|
daemon = {
|
||||||
|
default_parallel_tasks = 2;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
description = ''
|
||||||
|
Configuration written to
|
||||||
|
<filename>$XDG_CONFIG_HOME/pueue/pueue.yml</filename>.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
assertions =
|
||||||
|
[ (hm.assertions.assertPlatform "services.pueue" pkgs platforms.linux) ];
|
||||||
|
|
||||||
|
home.packages = [ cfg.package ];
|
||||||
|
|
||||||
|
xdg.configFile."pueue/pueue.yml".source = configFile;
|
||||||
|
|
||||||
|
systemd.user = {
|
||||||
|
services.pueued = {
|
||||||
|
Unit = {
|
||||||
|
Description = "Pueue Daemon - CLI process scheduler and manager";
|
||||||
|
};
|
||||||
|
|
||||||
|
Service = {
|
||||||
|
Restart = "on-failure";
|
||||||
|
ExecStart = "${cfg.package}/bin/pueued -v -c ${configFile}";
|
||||||
|
};
|
||||||
|
|
||||||
|
Install.WantedBy = [ "default.target" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue