Files
nixpkgs/nixos/modules/services/desktops/gnome/gcr-ssh-agent.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

50 lines
1.3 KiB
Nix

{
config,
options,
pkgs,
lib,
...
}:
let
cfg = config.services.gnome.gcr-ssh-agent;
opts = options.services.gnome.gcr-ssh-agent;
sshCfg = config.programs.ssh;
sshOpts = options.programs.ssh;
in
{
meta = {
maintainers = lib.teams.gnome.members;
};
options = {
services.gnome.gcr-ssh-agent = {
enable = lib.mkOption {
default = config.services.gnome.gnome-keyring.enable;
defaultText = lib.literalExpression "config.services.gnome.gnome-keyring.enable";
example = true;
description = "Whether to enable GCR SSH agent.";
type = lib.types.bool;
};
package = lib.mkPackageOption pkgs "GCR" {
default = [ "gcr_4" ];
};
};
};
config = lib.mkIf cfg.enable {
assertions = lib.singleton {
assertion = !sshCfg.startAgent;
message = ''
`${sshOpts.startAgent}' (defined in ${lib.showFiles sshOpts.startAgent.files}) and `${opts.enable}' (defined in ${lib.showFiles opts.enable.files}) cannot both be enabled at the same time.
These options conflict because only one SSH agent can be installed at a time.'';
};
systemd = {
packages = [ cfg.package ];
user.services.gcr-ssh-agent.wantedBy = [ "default.target" ];
user.sockets.gcr-ssh-agent.wantedBy = [ "sockets.target" ];
};
};
}