mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
refactor: finish initial move to modules-only [WIP]
This commit is contained in:
parent
e7e59715d8
commit
27679d38fd
34 changed files with 1934 additions and 1617 deletions
|
|
@ -1,29 +1,32 @@
|
|||
{ pkgs, ... }:
|
||||
{ lib, config, pkgs, ... }:
|
||||
{
|
||||
systemd.user.services.yubikey-touch-detector = {
|
||||
Unit = {
|
||||
Description = "Detects when your YubiKey is waiting for a touch";
|
||||
Requires = [ "yubikey-touch-detector.socket" ];
|
||||
options.swarselsystems.modules.yubikeytouch = lib.mkEnableOption "yubikey touch detector service settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.yubikeytouch {
|
||||
systemd.user.services.yubikey-touch-detector = {
|
||||
Unit = {
|
||||
Description = "Detects when your YubiKey is waiting for a touch";
|
||||
Requires = [ "yubikey-touch-detector.socket" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.yubikey-touch-detector}/bin/yubikey-touch-detector --libnotify";
|
||||
EnvironmentFile = "-%E/yubikey-touch-detector/service.conf";
|
||||
};
|
||||
Install = {
|
||||
Also = [ "yubikey-touch-detector.socket" ];
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.yubikey-touch-detector}/bin/yubikey-touch-detector --libnotify";
|
||||
EnvironmentFile = "-%E/yubikey-touch-detector/service.conf";
|
||||
};
|
||||
Install = {
|
||||
Also = [ "yubikey-touch-detector.socket" ];
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
systemd.user.sockets.yubikey-touch-detector = {
|
||||
Unit = {
|
||||
Description = "Unix socket activation for YubiKey touch detector service";
|
||||
};
|
||||
Socket = {
|
||||
ListenStream = "%t/yubikey-touch-detector.socket";
|
||||
RemoveOnStop = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "sockets.target" ];
|
||||
systemd.user.sockets.yubikey-touch-detector = {
|
||||
Unit = {
|
||||
Description = "Unix socket activation for YubiKey touch detector service";
|
||||
};
|
||||
Socket = {
|
||||
ListenStream = "%t/yubikey-touch-detector.socket";
|
||||
RemoveOnStop = true;
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "sockets.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue