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

sshd: change location config file #41744

Merged
merged 1 commit into from Jun 9, 2018
Merged

sshd: change location config file #41744

merged 1 commit into from Jun 9, 2018

Conversation

Izorkin
Copy link
Contributor

@Izorkin Izorkin commented Jun 9, 2018

Motivation for this change

Change the location of the configuration file to the default - /etc/ssh/sshd_config

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@bachp
Copy link
Member

bachp commented Jun 9, 2018

@Izorkin Can you explain what's the benefit of doing this?

@Izorkin
Copy link
Contributor Author

Izorkin commented Jun 9, 2018

You can quickly see the current config. And in other distributions, the config is also located there. It is more convenient to navigate in the ssh configuration (/ etc / ssh / ssh_config) and sshd (/ etc / sshd_config)

@bhipple
Copy link
Contributor

bhipple commented Jun 9, 2018

It seems the right way to do this would be to keep the config file hashed in the nix store, but have an option to symlink it in /etc/ssh/sshd_config, like we do with the nixos configuration.nix system config.

@Izorkin
Copy link
Contributor Author

Izorkin commented Jun 9, 2018

l /etc/ssh/sshd_config                                                                                                                                 
lrwxrwxrwx 1 root root 27 июн  9 11:54 /etc/ssh/sshd_config -> /etc/static/ssh/sshd_config

l /etc/static/ssh/sshd_config                                                                                                                          
lrwxrwxrwx 1 root root 59 янв  1  1970 /etc/static/ssh/sshd_config -> /nix/store/rpn69zmjl0gx25bzmm2rkpkn05dz3wwp-etc-sshd_config

Copy link
Contributor

@xeji xeji left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The actual file content remains in the nix store, and this is more consistent with /etc/ssh/ssh_config

@xeji xeji merged commit 9ef30fd into NixOS:master Jun 9, 2018
@Izorkin Izorkin deleted the sshd-config branch June 10, 2018 07:35
@infinisil
Copy link
Member

This change was also proposed for nginx, which I was against for reasons, see #52098 (comment)

I guess it's not as prevalent with ssh though, so this is probably okay. But I'd still prefer it being linked directly and having a configFile option for viewing the file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants