diff options
| author | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-25 22:32:59 -0600 |
|---|---|---|
| committer | Collin Williams <96917990+bluedragon1221@users.noreply.github.com> | 2026-01-25 22:32:59 -0600 |
| commit | 94f08f5ca042cd2d65379b13767096936f8028ce (patch) | |
| tree | 2de57e60d2a375c808f039e560fa42be8e79b2f4 /modules | |
| parent | 606b7ae3bb2b45e094132dbec4574faa4317331f (diff) | |
changes
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 = { |
