-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
ssh-agent: init module #4178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ssh-agent: init module #4178
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1132,7 +1132,15 @@ in | |
| time = "2023-06-17T22:18:22+00:00"; | ||
| condition = config.programs.zsh.enable; | ||
| message = '' | ||
| A new modules is available: 'programs.zsh.antidote' | ||
| A new module is available: 'programs.zsh.antidote' | ||
| ''; | ||
| } | ||
|
|
||
| { | ||
| time = "2023-06-30T14:46:22+00:00"; | ||
| condition = config.services.ssh-agent.enable; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If I understand correctly, this will now only render the news item for people that already have the service enabled.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I assume this is a mistake. My guess is that it should be since it is Linux-only. |
||
| message = '' | ||
| A new module is available: 'services.ssh-agent' | ||
| ''; | ||
| } | ||
| ]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| { config, options, lib, pkgs, ... }: | ||
|
|
||
| let | ||
|
|
||
| cfg = config.services.ssh-agent; | ||
|
|
||
| in { | ||
| meta.maintainers = [ lib.maintainers.lheckemann ]; | ||
|
|
||
| options = { | ||
| services.ssh-agent = { | ||
| enable = lib.mkEnableOption "OpenSSH private key agent"; | ||
| }; | ||
| }; | ||
|
|
||
| config = lib.mkIf cfg.enable { | ||
| home.sessionVariablesExtra = '' | ||
| if [[ -z "$SSH_AUTH_SOCK" ]]; then | ||
| export SSH_AUTH_SOCK=$XDG_RUNTIME_DIR/ssh-agent | ||
| fi | ||
| ''; | ||
|
|
||
| systemd.user.services.ssh-agent = { | ||
| Install.WantedBy = [ "default.target" ]; | ||
|
|
||
| Unit = { | ||
| Description = "SSH authentication agent"; | ||
| Documentation = "man:ssh-agent(1)"; | ||
| }; | ||
|
|
||
| Service = { | ||
| ExecStart = "${pkgs.openssh}/bin/ssh-agent -D -a %t/ssh-agent"; | ||
| }; | ||
| }; | ||
| }; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.