mirror of
https://github.com/moons-14/dotfiles.git
synced 2026-10-06 07:28:12 +09:00
51 lines
1.0 KiB
Nix
51 lines
1.0 KiB
Nix
{
|
|
lib,
|
|
config,
|
|
...
|
|
}:
|
|
let
|
|
cfg = config.my.applications.ssh;
|
|
in
|
|
{
|
|
imports = [
|
|
./home.nix
|
|
./system.nix
|
|
];
|
|
|
|
options.my.applications.ssh = {
|
|
enable = lib.mkEnableOption "OpenSSH client";
|
|
|
|
defaultIdentityFile = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "~/.ssh/id_ed25519";
|
|
description = "Default SSH identity file";
|
|
};
|
|
|
|
addKeysToAgent = lib.mkOption {
|
|
type = lib.types.str;
|
|
default = "no";
|
|
description = "Add keys to SSH agent";
|
|
};
|
|
|
|
matchBlocks = lib.mkOption {
|
|
type = lib.types.attrs;
|
|
default = { };
|
|
description = "SSH match blocks";
|
|
};
|
|
|
|
githubIdentityFiles = lib.mkOption {
|
|
type = lib.types.listOf lib.types.str;
|
|
default = [
|
|
"~/.ssh/id_ed25519_sk_rk"
|
|
"~/.ssh/id_ed25519"
|
|
];
|
|
description = "SSH identity files for GitHub (tried in order)";
|
|
};
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
my.applications.ssh.system.enable = lib.mkDefault true;
|
|
my.applications.ssh.homeManager.enable = lib.mkDefault true;
|
|
};
|
|
}
|