mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
treewide: flatten single file modules
Some files don't need nesting and can be root level again to reduce conflicts with other PRs. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
parent
bda9deb791
commit
86402a17b6
424 changed files with 15 additions and 15 deletions
55
modules/services/blanket.nix
Normal file
55
modules/services/blanket.nix
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.services.blanket;
|
||||
|
||||
inherit (lib)
|
||||
mkIf
|
||||
mkEnableOption
|
||||
mkPackageOption
|
||||
hm
|
||||
platforms
|
||||
;
|
||||
in
|
||||
{
|
||||
meta.maintainers = [ lib.maintainers.daru-san ];
|
||||
|
||||
options.services.blanket = {
|
||||
enable = mkEnableOption "blanket";
|
||||
|
||||
package = mkPackageOption pkgs "blanket" { };
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
(hm.assertions.assertPlatform "services.blanket" pkgs platforms.linux)
|
||||
];
|
||||
|
||||
home.packages = [ cfg.package ];
|
||||
|
||||
systemd.user.services.blanket = {
|
||||
Unit = {
|
||||
Description = "Blanket daemon";
|
||||
Requires = [ "dbus.service" ];
|
||||
After = [ "graphical-session.target" ];
|
||||
PartOf = [
|
||||
"graphical-session.target"
|
||||
"pipewire.service"
|
||||
];
|
||||
};
|
||||
|
||||
Install.WantedBy = [ "graphical-session.target" ];
|
||||
|
||||
Service = {
|
||||
ExecStart = "${cfg.package}/bin/blanket --gapplication-service";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 5;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue