From 836ec67a008ce16c57ea5071ef901154f7e93ea9 Mon Sep 17 00:00:00 2001 From: tdback Date: Fri, 27 Dec 2024 19:09:34 -0500 Subject: fix: remove pipe-operators experimental feature im going to hold off on using the pipe-operators until they are an official part of the nix language. in its current state portability gets hurt for any modules using the feature, since one has to manually opt-in. in the end, it's just a syntax change! --- modules/customs/cgit/default.nix | 6 ++++-- modules/profiles/common/default.nix | 6 +----- modules/profiles/libvirtd/default.nix | 8 +++----- modules/profiles/wireshark/default.nix | 8 +++----- modules/scripts/zquota/default.nix | 9 ++++++--- 5 files changed, 17 insertions(+), 20 deletions(-) (limited to 'modules') diff --git a/modules/customs/cgit/default.nix b/modules/customs/cgit/default.nix index a6fd79a..dc30d2a 100644 --- a/modules/customs/cgit/default.nix +++ b/modules/customs/cgit/default.nix @@ -22,12 +22,14 @@ let ); mkCgitAssets = pkg: files: - builtins.map (f: '' + strings.concatStringsSep "\n" ( + builtins.map (f: '' handle_path /${f} { root * ${pkg}/cgit/${f} file_server } - '') files |> strings.concatStringsSep "\n"; + '') files + ); in { disabledModules = [ "services/networking/cgit.nix" ]; diff --git a/modules/profiles/common/default.nix b/modules/profiles/common/default.nix index c25fece..67d228a 100644 --- a/modules/profiles/common/default.nix +++ b/modules/profiles/common/default.nix @@ -3,11 +3,7 @@ nix = { settings = { trusted-users = [ "@wheel" "root" ]; - experimental-features = lib.mkDefault [ - "nix-command" - "flakes" - "pipe-operators" - ]; + experimental-features = lib.mkDefault [ "nix-command" "flakes" ]; auto-optimise-store = true; }; gc = { diff --git a/modules/profiles/libvirtd/default.nix b/modules/profiles/libvirtd/default.nix index fa617d1..222fdab 100644 --- a/modules/profiles/libvirtd/default.nix +++ b/modules/profiles/libvirtd/default.nix @@ -13,9 +13,7 @@ programs.virt-manager.enable = true; # Add any users in the 'wheel' group to the 'libvirtd' group. - users.groups.libvirtd.members = let users = config.users.users; in - builtins.attrNames users - |> builtins.filter ( - x: builtins.elem "wheel" users.${x}.extraGroups - ); + users.groups.libvirtd.members = + with builtins; let users = config.users.users; in + filter (u: elem "wheel" users.${u}.extraGroups) (attrNames users); } diff --git a/modules/profiles/wireshark/default.nix b/modules/profiles/wireshark/default.nix index d4d0627..ab741ff 100644 --- a/modules/profiles/wireshark/default.nix +++ b/modules/profiles/wireshark/default.nix @@ -6,9 +6,7 @@ }; # Add any users in the 'wheel' group to the 'wireshark' group. - users.groups.wireshark.members = let users = config.users.users; in - builtins.attrNames users - |> builtins.filter ( - x: builtins.elem "wheel" users.${x}.extraGroups - ); + users.groups.wireshark.members = + with builtins; let users = config.users.users; in + filter (u: elem "wheel" users.${u}.extraGroups) (attrNames users); } diff --git a/modules/scripts/zquota/default.nix b/modules/scripts/zquota/default.nix index cfa08ee..cc0f08f 100644 --- a/modules/scripts/zquota/default.nix +++ b/modules/scripts/zquota/default.nix @@ -64,9 +64,12 @@ in systemd.services."zquota" = { description = "Perform and report scheduled quota checks on ZFS datasets."; serviceConfig.Type = "oneshot"; - script = strings.concatStringsSep "\n" <| mapAttrsToList ( - dataset: quota: "/run/current-system/sw/bin/zquota ${dataset} ${builtins.toString quota}" - ) cfg.quotas; + script = + strings.concatStringsSep "\n" ( + mapAttrsToList ( + dataset: quota: "/run/current-system/sw/bin/zquota ${dataset} ${builtins.toString quota}" + ) cfg.quotas + ); }; systemd.timers."zquota" = { wantedBy = [ "timers.target" ]; -- cgit v1.2.3