chore: flake update 04-07-2026

This commit is contained in:
2026-04-07 13:56:05 +05:00
parent 044e1e415e
commit cf4842a5b6
83 changed files with 581 additions and 352 deletions

View File

@@ -1,3 +1,4 @@
{...}: {
imports = [./host-spec.nix];
{ ... }:
{
imports = [ ./host-spec.nix ];
}

View File

@@ -3,7 +3,8 @@
config,
lib,
...
}: {
}:
{
options.hostSpec = {
username = lib.mkOption {
type = lib.types.str;
@@ -18,7 +19,7 @@
description = "The email of the user";
};
networking = lib.mkOption {
default = {};
default = { };
type = lib.types.attrsOf lib.types.anything;
description = "An attribute set of networking information";
};

View File

@@ -1,3 +1,4 @@
{...}: {
imports = [./yubikey-touch-detector.nix];
{ ... }:
{
imports = [ ./yubikey-touch-detector.nix ];
}

View File

@@ -4,13 +4,13 @@
pkgs,
...
}:
with lib; let
with lib;
let
cfg = config.services.yubikey-touch-detector;
in {
in
{
options.services.yubikey-touch-detector = {
enable =
mkEnableOption
"a tool to detect when your YubiKey is waiting for a touch";
enable = mkEnableOption "a tool to detect when your YubiKey is waiting for a touch";
package = mkOption {
type = types.package;
@@ -21,12 +21,11 @@ in {
'';
};
socket.enable =
mkEnableOption "starting the process only when the socket is used";
socket.enable = mkEnableOption "starting the process only when the socket is used";
extraArgs = mkOption {
type = types.listOf types.str;
default = ["--libnotify"];
default = [ "--libnotify" ];
defaultText = literalExpression ''[ "--libnotify" ]'';
description = ''
Extra arguments to pass to the tool. The arguments are not escaped.
@@ -35,7 +34,7 @@ in {
};
config = mkIf cfg.enable {
home.packages = [cfg.package];
home.packages = [ cfg.package ];
# Service description licensed under ISC
# See https://github.com/maximbaz/yubikey-touch-detector/blob/c9fdff7163361d6323e2de0449026710cacbc08a/LICENSE
@@ -47,27 +46,23 @@ in {
RemoveOnStop = true;
SocketMode = "0660";
};
Install.WantedBy = ["sockets.target"];
Install.WantedBy = [ "sockets.target" ];
};
# Same license thing for the description here
systemd.user.services.yubikey-touch-detector = {
Unit = {
Description = "Detects when your YubiKey is waiting for a touch";
Requires =
optionals cfg.socket.enable ["yubikey-touch-detector.socket"];
Requires = optionals cfg.socket.enable [ "yubikey-touch-detector.socket" ];
};
Service = {
ExecStart = "${cfg.package}/bin/yubikey-touch-detector ${
concatStringsSep " " cfg.extraArgs
}";
Environment = ["PATH=${lib.makeBinPath [pkgs.gnupg]}"];
ExecStart = "${cfg.package}/bin/yubikey-touch-detector ${concatStringsSep " " cfg.extraArgs}";
Environment = [ "PATH=${lib.makeBinPath [ pkgs.gnupg ]}" ];
Restart = "on-failure";
RestartSec = "1sec";
};
Install.Also =
optionals cfg.socket.enable ["yubikey-touch-detector.socket"];
Install.WantedBy = ["default.target"];
Install.Also = optionals cfg.socket.enable [ "yubikey-touch-detector.socket" ];
Install.WantedBy = [ "default.target" ];
};
};
}