diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/nix/nixos/default.nix | 3 | ||||
| -rw-r--r-- | modules/services/nixos/ssh.nix | 2 | ||||
| -rw-r--r-- | modules/user/nixos/default.nix | 13 |
3 files changed, 10 insertions, 8 deletions
diff --git a/modules/nix/nixos/default.nix b/modules/nix/nixos/default.nix index c817859..3aa8930 100644 --- a/modules/nix/nixos/default.nix +++ b/modules/nix/nixos/default.nix @@ -1,5 +1,6 @@ { config, + lib, pkgs, ... }: { @@ -22,7 +23,7 @@ nixpkgs.config.allowUnfree = true; - programs.nh = { + programs.nh = lib.mkIf config.collinux.terminal.programs.nh.enable { enable = true; flake = "/home/${config.collinux.user.name}/nixos"; clean.enable = true; diff --git a/modules/services/nixos/ssh.nix b/modules/services/nixos/ssh.nix index 23f8fc5..fa8b2ef 100644 --- a/modules/services/nixos/ssh.nix +++ b/modules/services/nixos/ssh.nix @@ -41,8 +41,6 @@ in { AuthenticationMethods = "publickey,keyboard-interactive:pam"; }; - knownHosts = builtins.mapAttrs (_: data: {publicKey = data.host_pubkey;}) hosts; - extraConfig = '' Match LocalPort 2222 AuthenticationMethods publickey diff --git a/modules/user/nixos/default.nix b/modules/user/nixos/default.nix index 7fbacd1..5a871af 100644 --- a/modules/user/nixos/default.nix +++ b/modules/user/nixos/default.nix @@ -29,11 +29,14 @@ in { programs.ssh = { systemd-ssh-proxy.enable = false; - knownHosts = builtins.mapAttrs (_: data: {publicKey = data.host_pubkey;}) hosts; - - extraConfig = '' - StrictHostKeyChecking accept-new - ''; + knownHosts = builtins.mapAttrs (_: data: + { + publicKey = data.host_pubkey; + } + // (lib.optionalAttrs (data ? hostnames) { + hostNames = data.hostnames; + })) + hosts; }; hjem = { |
