diff options
author | Jonas Heinrich <onny@project-insanity.org> | 2023-11-07 10:21:48 +0100 |
---|---|---|
committer | Jonas Heinrich <onny@project-insanity.org> | 2023-11-07 10:21:48 +0100 |
commit | 31f01ff1794cc2e4369d5f43c3f26ee44d70e316 (patch) | |
tree | 5a8cd0334387cd21708d6d2d8c805afb279b5254 /nixos/modules | |
parent | a845c1b2d62614f80de711d7cecbd0688c53429e (diff) |
nixos/printing: Fix openFirewall option
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/printing/cupsd.nix | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/nixos/modules/services/printing/cupsd.nix b/nixos/modules/services/printing/cupsd.nix index 25367f8e61d4..3a2744303474 100644 --- a/nixos/modules/services/printing/cupsd.nix +++ b/nixos/modules/services/printing/cupsd.nix @@ -109,11 +109,10 @@ let getGutenprint = pkgs: head (filterGutenprint pkgs); parsePorts = addresses: let - splitAddress = addr: lib.strings.splitString ":" addr; - extractPort = addr: builtins.elemAt (builtins.tail (splitAddress addr)) 0; - toInt = str: lib.strings.toInt str; + splitAddress = addr: strings.splitString ":" addr; + extractPort = addr: builtins.foldl' (a: b: b) "" (splitAddress addr); in - builtins.map (address: toInt (extractPort address)) addresses; + builtins.map (address: strings.toInt (extractPort address)) addresses; in |