streamcontroller: move to own module
This commit is contained in:
35
home/programs/streamcontroller/default.nix
Normal file
35
home/programs/streamcontroller/default.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
with lib;
|
||||
let
|
||||
cfg = config.streamcontroller;
|
||||
in
|
||||
{
|
||||
options.streamcontroller = {
|
||||
enable = mkEnableOption "streamcontroller service";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.streamcontroller = {
|
||||
Unit = {
|
||||
Description = "Streamcontroller service";
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
Requisite = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Service = {
|
||||
ExecStart = "${pkgs.streamcontroller}/bin/streamcontroller -b";
|
||||
Restart = "on-failure";
|
||||
};
|
||||
|
||||
Install = {
|
||||
WantedBy = [ "graphical-session.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user