2 ms·
Woah, I'm lost here. The idea is that it uses /etc/ssh/sshd_config as its input? (How do you handle upgrades, then?) What is d4ys2c8kzzcp3g4fv3ivy7a5nkayg7w2?
by geofft 6y ago
Woah, I'm lost here. The idea is that it uses /etc/ssh/sshd_config as its input? (How do you handle upgrades, then?) What is d4ys2c8kzzcp3g4fv3ivy7a5nkayg7w2?
- jbboehr 6y agoIn NixOS, typically the config files will be generated from scratch using the Nix language, see for example sshd [0] or bind [1]. `d4ys2c8kzzcp3g4fv3ivy7a5nkayg7w2` is a hash of the inputs to a derivation (a package in Nix terms). In a sense, at it's lowest level, a derivation is a function `f(x) -> y` where `x` is some Nix expressions (including the inputs and how to build it, often in bash) and `y` is a nix store path. The nix store path includes the hash which is a hash of `x`. For bind, the config file itself is a derivation, it just uses a plain string (interpolated with variables via Nix) into the writeText wrapper. [0]: https://github.com/NixOS/nixpkgs/blob/de493bd74921139860624e82ebe559d46f346632/nixos/modules/programs/ssh.nix#L223 https://github.com/NixOS/nixpkgs/blob/de493bd74921139860624e... [1]: https://github.com/NixOS/nixpkgs/blob/de493bd74921139860624e82ebe559d46f346632/nixos/modules/services/networking/bind.nix#L11 https://github.com/NixOS/nixpkgs/blob/de493bd74921139860624e...