mirror of
https://github.com/nix-community/home-manager.git
synced 2025-04-10 02:54:22 +00:00
lxqt-policykit-agent: init module
This commit is contained in:
parent
cc538c3793
commit
5503a758f9
5 changed files with 55 additions and 0 deletions
|
@ -349,6 +349,7 @@ let
|
|||
./services/linux-wallpaperengine.nix
|
||||
./services/listenbrainz-mpd.nix
|
||||
./services/lorri.nix
|
||||
./services/lxqt-policykit-agent.nix
|
||||
./services/macos-remap-keys
|
||||
./services/mako.nix
|
||||
./services/mbsync.nix
|
||||
|
|
29
modules/services/lxqt-policykit-agent.nix
Normal file
29
modules/services/lxqt-policykit-agent.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
let
|
||||
inherit (lib)
|
||||
mkEnableOption mkPackageOption types literalExpression mkIf maintainers;
|
||||
cfg = config.services.lxqt-policykit-agent;
|
||||
in {
|
||||
meta.maintainers = [ maintainers.bobvanderlinden ];
|
||||
|
||||
options = {
|
||||
services.lxqt-policykit-agent = {
|
||||
enable = mkEnableOption "LXQT Policykit Agent";
|
||||
package = mkPackageOption pkgs [ "lxqt" "lxqt-policykit" ] { };
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
systemd.user.services.lxqt-policykit-agent = {
|
||||
Unit = {
|
||||
Description = "LXQT PolicyKit Agent";
|
||||
After = [ "graphical-session-pre.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
|
||||
Install = { WantedBy = [ "graphical-session.target" ]; };
|
||||
|
||||
Service = { ExecStart = "${cfg.package}/bin/lxqt-policykit-agent"; };
|
||||
};
|
||||
};
|
||||
}
|
|
@ -511,6 +511,7 @@ in import nmtSrc {
|
|||
./modules/services/kanshi
|
||||
./modules/services/lieer
|
||||
./modules/services/linux-wallpaperengine
|
||||
./modules/services/lxqt-policykit-agent
|
||||
./modules/services/mopidy
|
||||
./modules/services/mpd
|
||||
./modules/services/mpd-mpris
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
services.lxqt-policykit-agent.enable = true;
|
||||
|
||||
nmt.script = ''
|
||||
clientServiceFile=home-files/.config/systemd/user/lxqt-policykit-agent.service
|
||||
|
||||
assertFileExists $clientServiceFile
|
||||
assertFileContent $clientServiceFile ${
|
||||
builtins.toFile "expected.service" ''
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@lxqt-policykit@/bin/lxqt-policykit-agent
|
||||
|
||||
[Unit]
|
||||
After=graphical-session-pre.target
|
||||
Description=LXQT PolicyKit Agent
|
||||
PartOf=graphical-session.target
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
1
tests/modules/services/lxqt-policykit-agent/default.nix
Normal file
1
tests/modules/services/lxqt-policykit-agent/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ lxqt-policykit-agent-basic-configuration = ./basic-configuration.nix; }
|
Loading…
Add table
Reference in a new issue