Skip to content
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: install an ssh client #3668

Merged
merged 1 commit into from
May 13, 2023

Conversation

gmacon
Copy link
Contributor

@gmacon gmacon commented Feb 10, 2023

Fixes: #3667

Description

Add programs.ssh.package option and install the ssh client. It's not clear to me if this change is backwards-compatible or not, but at least we have something concrete to look at now.

Checklist

  • Change is backwards compatible.

  • Code formatted with ./format.

  • Code tested through nix-shell --pure tests -A run.all.

  • Test cases updated/added. See example.

  • Commit messages are formatted like

    {component}: {description}
    
    {long description}
    

    See CONTRIBUTING for more information and recent commit messages for examples.

  • If this PR adds a new module

    • Added myself as module maintainer. See example.

    • Added myself and the module files to .github/CODEOWNERS.

@gmacon gmacon requested a review from rycee as a code owner February 10, 2023 21:39
@gmacon gmacon force-pushed the 3667-programs-ssh-package branch from 2412aca to b65cf8c Compare May 12, 2023 14:06
@rycee rycee force-pushed the 3667-programs-ssh-package branch 2 times, most recently from 54e27a8 to 4487280 Compare May 13, 2023 14:43
@rycee rycee force-pushed the 3667-programs-ssh-package branch from 4487280 to 6702b22 Compare May 13, 2023 14:52
@rycee rycee merged commit 6702b22 into nix-community:master May 13, 2023
3 checks passed
@rycee
Copy link
Member

rycee commented May 13, 2023

Thanks! Merged to master now.

@gmacon gmacon deleted the 3667-programs-ssh-package branch May 13, 2023 15:37
@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/collision-between-ssh/28228/2

@thefloweringash
Copy link

thefloweringash commented May 19, 2023

Is there an easy way to turn this off? I want to use the version provided by Apple that provides integration with the macOS keychain. I tried setting programs.ssh.package = null, but that "is not of type `package'".

For now I'm using

{
  programs.ssh = { 
    package = pkgs.runCommand "home-manager-3668" {} ''
      mkdir $out
    '';
  };
}

@ncfavier
Copy link
Member

There should be, and I think we shouldn't merge this until there is. See also #3375

@rycee
Copy link
Member

rycee commented May 19, 2023

I think using programs.ssh.package = pkgs.emptyDirectory is the best solution. You could always alias the emptyDirectory to something shorter or more descriptive, if you want. E.g., programs.ssh.package = pkgs.nil or programs.ssh.package = pkgs.intentionallyLeftEmpty.

@ncfavier
Copy link
Member

NixOS/nixpkgs#232808

roberth pushed a commit to NixOS/nixpkgs that referenced this pull request May 22, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.
github-actions bot pushed a commit to arcnmx/nixpkgs-lib that referenced this pull request May 23, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.
@lilyball
Copy link

Personally, I think this should just be reverted. SSH is usually installed at the system level, not the user level. And if I, as a user, want to use a different SSH client, I can just add it to home.packages myself.

The programs.ssh module is all about the user-level configuration for SSH, not about making SSH available to the system. Just because I want to configure SSH for my user shouldn't implicitly change the SSH client I'm using.

@ncfavier
Copy link
Member

Suggesting a middle ground: #4016

rycee pushed a commit to rycee/nixpkgs that referenced this pull request May 28, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.

(cherry picked from commit 4a56b26)
Mic92 pushed a commit to Mic92/nixpkgs that referenced this pull request May 30, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.
github-actions bot pushed a commit to nix-community/nixpkgs.lib that referenced this pull request May 31, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.
rycee pushed a commit to rycee/nixpkgs that referenced this pull request Jun 11, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.

(cherry picked from commit 4a56b26)
rycee pushed a commit to rycee/nixpkgs that referenced this pull request Jun 13, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.

(cherry picked from commit 4a56b26)
rycee pushed a commit to rycee/nixpkgs that referenced this pull request Jun 17, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.

(cherry picked from commit 4a56b26)
rycee pushed a commit to rycee/nixpkgs that referenced this pull request Jun 18, 2023
It is sometimes useful to allow setting a package option to `null` to
skip installing the package. See
nix-community/home-manager#3668 (comment)
for example.

(cherry picked from commit 4a56b26)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add programs.ssh.package option
7 participants