Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

refactor: Remove redundant pipe operator parentheses

+58 -59
+3 -3
nix/flakeModules/ezConfigs.nix
··· 17 17 hosts = 18 18 configurationsDirectory 19 19 |> builtins.readDir 20 - |> (lib.filterAttrs (_: type: type == "directory")) 21 - |> (lib.concatMapAttrs (name: _: { 20 + |> lib.filterAttrs (_: type: type == "directory") 21 + |> lib.concatMapAttrs (name: _: { 22 22 ${name}.userHomeModules = ["lpchaim"]; 23 - })); 23 + }); 24 24 }; 25 25 home = { 26 26 configurationsDirectory = "${root}/home/configs";
+7 -2
nix/home/modules/cli/starship/default.nix
··· 16 16 php.symbol = " "; 17 17 }; 18 18 }; 19 - home.file.${config.programs.starship.configPath}.source = 19 + home.file.${config.programs.starship.configPath}.source = let 20 + settingsFile = 21 + config.programs.starship.settings 22 + |> builtins.toJSON 23 + |> pkgs.writeText "starship-settings"; 24 + in 20 25 lib.mkForce 21 26 (pkgs.runCommand 22 27 "starship-settings" ··· 26 31 starship preset nerd-font-symbols 27 32 | from toml 28 33 | merge deep ( 29 - open '${config.programs.starship.settings |> builtins.toJSON |> (pkgs.writeText "starship-settings")}' 34 + open '${settingsFile}' 30 35 | from json 31 36 ) 32 37 | to toml
+5 -7
nix/home/modules/scripts/default.nix
··· 26 26 lib.mkIf config.programs.carapace.enable 27 27 ( 28 28 cfg.byName 29 - |> (lib.filterAttrs (_: script: lib.strings.hasInfix "/bin/nu" script.interpreter)) 30 - |> ( 31 - lib.concatMapAttrs 32 - (name: script: { 33 - "${specPath}/${name}.yaml".source = carapaceSpecFromNuScript script; 34 - }) 35 - ) 29 + |> lib.filterAttrs (_: script: lib.strings.hasInfix "/bin/nu" script.interpreter) 30 + |> lib.concatMapAttrs 31 + (name: script: { 32 + "${specPath}/${name}.yaml".source = carapaceSpecFromNuScript script; 33 + }) 36 34 ); 37 35 }; 38 36 }
+2 -2
nix/home/modules/theming/default.nix
··· 6 6 }: let 7 7 matchTheme = theme: 8 8 config.stylix.base16Scheme 9 - |> builtins.toString 10 - |> (builtins.match "^.*/themes/.*${theme}.*$"); 9 + |> toString 10 + |> builtins.match "^.*/themes/.*${theme}.*$"; 11 11 in 12 12 lib.mkIf config.stylix.enable (lib.mkMerge [ 13 13 {
+10 -10
nix/legacyPackages/ciMatrix.nix
··· 47 47 ciInfo = { 48 48 homeConfigurations = 49 49 self.homeConfigurations 50 - |> (lib.filterAttrs (_: home: home._module.specialArgs.osConfig == {})) # Standalone only 50 + |> lib.filterAttrs (_: home: home._module.specialArgs.osConfig == {}) # Standalone only 51 51 |> filterToBuild 52 - |> (getOutputInfo (name: ".#homeConfigurations.${name}.activationPackage")) 53 - |> (spreadBranchOrDefault []); 52 + |> getOutputInfo (name: ".#homeConfigurations.${name}.activationPackage") 53 + |> spreadBranchOrDefault []; 54 54 nixosConfigurations = 55 55 self.nixosConfigurations 56 56 |> filterToBuild 57 - |> (getOutputInfo (name: ".#nixosConfigurations.${name}.config.system.build.toplevel")) 58 - |> (spreadBranchOrDefault []); 57 + |> getOutputInfo (name: ".#nixosConfigurations.${name}.config.system.build.toplevel") 58 + |> spreadBranchOrDefault []; 59 59 packages = 60 60 self.packages 61 61 |> filterPerSystemToBuild 62 - |> (getPerSystemOutputInfo (system: name: ".#packages.${system}.${name}")) 63 - |> (spreadBranchOrDefault ["main" "develop"]); 62 + |> getPerSystemOutputInfo (system: name: ".#packages.${system}.${name}") 63 + |> spreadBranchOrDefault ["main" "develop"]; 64 64 devShells = 65 65 self.devShells 66 66 |> filterPerSystemToBuild 67 - |> (getPerSystemOutputInfo (system: name: ".#devShells.${system}.${name}")) 68 - |> (spreadBranchOrDefault ["main" "develop"]); 67 + |> getPerSystemOutputInfo (system: name: ".#devShells.${system}.${name}") 68 + |> spreadBranchOrDefault ["main" "develop"]; 69 69 }; 70 70 in { 71 71 legacyPackages.ciMatrix = 72 72 ciInfo 73 73 |> builtins.toJSON 74 - |> (pkgs.writeText "ci-matrix"); 74 + |> pkgs.writeText "ci-matrix"; 75 75 }; 76 76 }
+2 -6
nix/lib/config.nix
··· 1 - { 2 - inputs, 3 - lib, 4 - ... 5 - }: let 1 + {lib, ...}: let 6 2 assets = ../../assets; 7 3 filter = prefix: (name: type: type == "regular" && lib.strings.hasPrefix prefix name); 8 4 assetWithPrefix = prefix: 9 5 (builtins.readDir assets) 10 - |> (lib.filterAttrs (filter prefix)) 6 + |> lib.filterAttrs (filter prefix) 11 7 |> builtins.attrNames 12 8 |> builtins.head 13 9 |> (x: assets + /${x});
+24 -24
nix/lib/loaders.nix
··· 21 21 ( 22 22 path 23 23 |> builtins.readDir 24 - |> (builtins.mapAttrs (name: type: 24 + |> builtins.mapAttrs (name: type: 25 25 if (type == "directory" && builtins.pathExists (path + /${name}/default.nix)) 26 26 then (path + /${name}/default.nix) 27 - else (path + /${name}))) 28 - |> (lib.concatMapAttrs (name: path: {${lib.removeSuffix ".nix" name} = path;})) 27 + else (path + /${name})) 28 + |> lib.concatMapAttrs (name: path: {${lib.removeSuffix ".nix" name} = path;}) 29 29 )) 30 30 |> (attr: removeAttrs attr ["default" "default.nix"]) 31 - |> (lib.filterAttrsRecursive (_: path: filterFn path)); 31 + |> lib.filterAttrsRecursive (_: path: filterFn path); 32 32 33 33 # Lists files as paths 34 34 list = { ··· 37 37 recursive ? false, 38 38 }: 39 39 read {inherit path recursive;} 40 - |> (lib.collect builtins.isPath) 41 - |> (builtins.filter (path: 40 + |> lib.collect builtins.isPath 41 + |> builtins.filter (path: 42 42 path 43 43 |> toString 44 - |> filterFn)) 45 - |> (map ( 44 + |> filterFn) 45 + |> map ( 46 46 path: 47 47 path 48 48 |> toString 49 - |> (lib.removeSuffix "/default.nix") 49 + |> lib.removeSuffix "/default.nix" 50 50 |> (x: /. + x) 51 - )); 51 + ); 52 52 53 53 # Lists files ending in default.nix 54 54 listDefault = path: ··· 84 84 importDefault = path: args: 85 85 path 86 86 |> listDefault 87 - |> (map (path: import path args)); 87 + |> map (path: import path args); 88 88 89 89 # Imports modules not ending in default.nix 90 90 importNonDefault = path: args: 91 91 path 92 92 |> listNonDefault 93 - |> (map (path: import path args)); 93 + |> map (path: import path args); 94 94 95 95 # Loads modules while preserving directory structure 96 96 load = { ··· 102 102 inherit path filterFn; 103 103 recursive = true; 104 104 } 105 - |> (lib.mapAttrsRecursiveCond 106 - builtins.isAttrs 107 - (_: x: let 108 - mod = import x; 109 - in 110 - if builtins.isAttrs mod 111 - then mod 112 - else mod args)) 105 + |> lib.mapAttrsRecursiveCond 106 + builtins.isAttrs 107 + (_: x: let 108 + mod = import x; 109 + in 110 + if builtins.isAttrs mod 111 + then mod 112 + else mod args) 113 113 |> (attr: removeAttrs attr ["default"]); 114 114 115 115 # Loads files ending in default.nix while preserving directory structure ··· 134 134 inherit path; 135 135 filterFn = lib.hasSuffix "default.nix"; 136 136 }) 137 - |> (builtins.mapAttrs (_: path: 138 - lib.callPackageWith (removeAttrs pkgs ["root"]) path {})); 137 + |> builtins.mapAttrs (_: path: 138 + lib.callPackageWith (removeAttrs pkgs ["root"]) path {}); 139 139 140 140 # Runs callPackage on files not ending in default.nix, always recursive 141 141 callPackageNonDefault = path: pkgs: ··· 145 145 inherit path; 146 146 filterFn = path: ! (lib.hasSuffix "default.nix" path); 147 147 }) 148 - |> (builtins.mapAttrs (_: path: 149 - lib.callPackageWith (removeAttrs pkgs ["root"]) path {})); 148 + |> builtins.mapAttrs (_: path: 149 + lib.callPackageWith (removeAttrs pkgs ["root"]) path {}); 150 150 }
+2 -2
nix/lib/storage/default.nix
··· 4 4 5 5 mkSafePath = path: 6 6 path 7 - |> (lib.strings.removePrefix "/") 8 - |> (builtins.replaceStrings ["/"] ["-"]); 7 + |> lib.strings.removePrefix "/" 8 + |> builtins.replaceStrings ["/"] ["-"]; 9 9 }
+1 -1
nix/nixos/modules/ssh/default.nix
··· 16 16 AddKeysToAgent = lib.mkDefault true; 17 17 AllowAgentForwarding = lib.mkDefault false; 18 18 PasswordAuthentication = lib.mkDefault false; 19 - PermitRootLogin = lib.mkDefault false; 19 + PermitRootLogin = lib.mkDefault "no"; 20 20 }; 21 21 }; 22 22 };
+2 -2
nix/nixos/modules/tailscale/default.nix
··· 39 39 ++ lib.optionals cfg.trusted ["trusted"]; 40 40 formattedTags = 41 41 tags 42 - |> (map (it: "tag:${it}")) 43 - |> (builtins.concatStringsSep ","); 42 + |> map (it: "tag:${it}") 43 + |> builtins.concatStringsSep ","; 44 44 in { 45 45 inherit (cfg) authKeyParameters; 46 46 enable = true;