From 12e7786854b82323471f1aa59bc5ddd4693a20eb Mon Sep 17 00:00:00 2001 From: Bruno BELANYI Date: Wed, 3 Dec 2025 14:39:03 +0000 Subject: [PATCH] programs/ssh: use 'toList' --- modules/programs/ssh.nix | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/modules/programs/ssh.nix b/modules/programs/ssh.nix index ed7185dfb..351a42b0f 100644 --- a/modules/programs/ssh.nix +++ b/modules/programs/ssh.nix @@ -151,14 +151,7 @@ let identityFile = mkOption { type = with types; either (listOf str) (nullOr str); default = [ ]; - apply = - p: - if p == null then - [ ] - else if lib.isString p then - [ p ] - else - p; + apply = p: if p == null then [ ] else lib.toList p; description = '' Specifies files from which the user identity is read. Identities will be tried in the given order. @@ -168,14 +161,7 @@ let identityAgent = mkOption { type = with types; either (listOf str) (nullOr str); default = [ ]; - apply = - p: - if p == null then - [ ] - else if lib.isString p then - [ p ] - else - p; + apply = p: if p == null then [ ] else lib.toList p; description = '' Specifies the location of the ssh identity agent. ''; @@ -265,14 +251,7 @@ let certificateFile = mkOption { type = with types; either (listOf str) (nullOr str); default = [ ]; - apply = - p: - if p == null then - [ ] - else if lib.isString p then - [ p ] - else - p; + apply = p: if p == null then [ ] else lib.toList p; description = '' Specifies files from which the user certificate is read. '';