Personal Nix flake
nixos home-manager nix
1
fork

Configure Feed

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

chore: Merge pull request #15 from lpchaim/develop

chore: Merge branch "develop" into main

authored by

Luna Perroni and committed by
GitHub
c95f3430 b2373642

+113 -105
+2 -1
.github/actions/nix-setup/action.yml
··· 11 11 using: "composite" 12 12 steps: 13 13 - uses: wimpysworld/nothing-but-nix@main 14 - - uses: cachix/install-nix-action@V28 14 + - uses: samueldr/lix-gha-installer-action@v2025-10-27 15 15 with: 16 16 extra_nix_config: | 17 + extra-experimental-features = flakes nix-command pipe-operator 17 18 system = ${{ inputs.system }} 18 19 - uses: DeterminateSystems/magic-nix-cache-action@v8 19 20 with:
+5 -5
nix/apps/ci.nix
··· 20 20 (name: subject: { 21 21 inherit name; 22 22 derivation = lib.escapeShellArg (mkDerivationPath name); 23 - system = subject.system or subject.pkgs.system; 23 + system = subject.system or subject.pkgs.stdenv.hostPlatform.system; 24 24 }) 25 25 output; 26 26 getNestedOutputInfo = mkDerivationPath: output: ··· 53 53 (system: name: ''.#devShells.${system}."${name}"'') 54 54 self.devShells; 55 55 }; 56 - ciInfoFile = lib.pipe ciInfo [ 57 - builtins.toJSON 58 - (pkgs.writeText "ci-info") 59 - ]; 56 + ciInfoFile = 57 + ciInfo 58 + |> builtins.toJSON 59 + |> (pkgs.writeText "ci-info"); 60 60 program = 61 61 pkgs.writers.writeNuBin 62 62 "cimatrix"
+2 -1
nix/home/modules/de/hyprland/plugins/default.nix
··· 5 5 pkgs, 6 6 ... 7 7 }: let 8 + inherit (pkgs.stdenv.hostPlatform) system; 8 9 cfg = config.my.de.hyprland.plugins; 9 10 in { 10 11 options.my.de.hyprland.plugins.enable = lib.mkEnableOption "Hyprland plugins"; ··· 15 16 "SUPER, apostrophe, hyprexpo:expo, toggle" 16 17 ]; 17 18 }; 18 - wayland.windowManager.hyprland.plugins = with inputs.hyprland-plugins.packages.${pkgs.system}; [ 19 + wayland.windowManager.hyprland.plugins = with inputs.hyprland-plugins.packages.${system}; [ 19 20 hyprexpo 20 21 ]; 21 22 };
+5 -5
nix/home/modules/scripts/default.nix
··· 19 19 home.packages = builtins.attrValues cfg.byName; 20 20 home.file = 21 21 lib.mkIf config.programs.carapace.enable 22 - (lib.pipe cfg.byName [ 23 - (lib.filterAttrs 24 - (_: script: lib.strings.hasInfix "/bin/nu" script.interpreter)) 25 - (lib.concatMapAttrs 22 + ( 23 + cfg.byName 24 + |> (lib.filterAttrs (_: script: lib.strings.hasInfix "/bin/nu" script.interpreter)) 25 + |> (lib.concatMapAttrs 26 26 (name: script: { 27 27 ".config/carapace/specs/${name}.yaml".source = 28 28 pkgs.runCommand ··· 35 35 > $out 36 36 ''; 37 37 })) 38 - ]); 38 + ); 39 39 }; 40 40 }
+3 -4
nix/home/modules/theming/default.nix
··· 5 5 ... 6 6 }: let 7 7 matchTheme = theme: 8 - lib.pipe config.stylix.base16Scheme [ 9 - builtins.toString 10 - (builtins.match "^.*/themes/.*${theme}.*$") 11 - ]; 8 + config.stylix.base16Scheme 9 + |> builtins.toString 10 + |> (builtins.match "^.*/themes/.*${theme}.*$"); 12 11 in 13 12 lib.mkIf config.stylix.enable (lib.mkMerge [ 14 13 {
+6 -7
nix/lib/config.nix
··· 2 2 assets = ../../assets; 3 3 filter = prefix: (name: type: type == "regular" && lib.strings.hasPrefix prefix name); 4 4 assetWithPrefix = prefix: 5 - lib.pipe (builtins.readDir assets) [ 6 - (lib.filterAttrs (filter prefix)) 7 - builtins.attrNames 8 - builtins.head 9 - (x: assets + /${x}) 10 - ]; 5 + (builtins.readDir assets) 6 + |> (lib.filterAttrs (filter prefix)) 7 + |> builtins.attrNames 8 + |> builtins.head 9 + |> (x: assets + /${x}); 11 10 in rec { 12 11 name.user = "lpchaim"; 13 12 name.full = "Luna Perroni"; ··· 26 25 accept-flake-config = true; 27 26 builders-use-substitutes = true; 28 27 auto-optimise-store = true; 29 - extra-experimental-features = "flakes nix-command"; 28 + extra-experimental-features = "flakes nix-command pipe-operator"; 30 29 extra-substituters = [ 31 30 # The NixOS and nix-community ones are set by default 32 31 "https://lpchaim.cachix.org"
+63 -66
nix/lib/loaders.nix
··· 9 9 filterFn ? (x: true), 10 10 recursive ? false, 11 11 }: 12 - lib.pipe path [ 13 - (path: 14 - if recursive 15 - then 16 - (inputs.haumea.lib.load { 17 - src = path; 18 - loader = inputs.haumea.lib.loaders.path; 19 - }) 20 - else 21 - (lib.pipe path [ 22 - builtins.readDir 23 - (builtins.mapAttrs (name: type: 24 - if (type == "directory" && builtins.pathExists (path + /${name}/default.nix)) 25 - then (path + /${name}/default.nix) 26 - else (path + /${name}))) 27 - (lib.concatMapAttrs (name: path: {${lib.removeSuffix ".nix" name} = path;})) 28 - ])) 29 - (attr: builtins.removeAttrs attr ["default" "default.nix"]) 30 - (lib.filterAttrsRecursive (_: path: filterFn path)) 31 - ]; 12 + path 13 + |> (path: 14 + if recursive 15 + then 16 + (inputs.haumea.lib.load { 17 + src = path; 18 + loader = inputs.haumea.lib.loaders.path; 19 + }) 20 + else 21 + ( 22 + path 23 + |> builtins.readDir 24 + |> (builtins.mapAttrs (name: type: 25 + if (type == "directory" && builtins.pathExists (path + /${name}/default.nix)) 26 + then (path + /${name}/default.nix) 27 + else (path + /${name}))) 28 + |> (lib.concatMapAttrs (name: path: {${lib.removeSuffix ".nix" name} = path;})) 29 + )) 30 + |> (attr: builtins.removeAttrs attr ["default" "default.nix"]) 31 + |> (lib.filterAttrsRecursive (_: path: filterFn path)); 32 32 33 33 # Lists files as paths 34 34 list = { ··· 36 36 filterFn ? (x: true), 37 37 recursive ? false, 38 38 }: 39 - lib.pipe path [ 40 - (path: read {inherit path recursive;}) 41 - (lib.collect builtins.isPath) 42 - (builtins.filter (path: filterFn path)) 43 - (builtins.map (path: 44 - lib.pipe path [ 45 - builtins.toString 46 - (lib.removeSuffix "/default.nix") 47 - (x: /. + x) 48 - ])) 49 - ]; 39 + read {inherit path recursive;} 40 + |> (lib.collect builtins.isPath) 41 + |> (builtins.filter (path: 42 + path 43 + |> builtins.toString 44 + |> filterFn)) 45 + |> (builtins.map ( 46 + path: 47 + path 48 + |> builtins.toString 49 + |> (lib.removeSuffix "/default.nix") 50 + |> (x: /. + x) 51 + )); 50 52 51 53 # Lists files ending in default.nix 52 54 listDefault = path: ··· 80 82 81 83 # Imports modules ending in default.nix 82 84 importDefault = path: args: 83 - lib.pipe path [ 84 - listDefault 85 - (builtins.map (path: import path args)) 86 - ]; 85 + path 86 + |> listDefault 87 + |> (builtins.map (path: import path args)); 87 88 88 89 # Imports modules not ending in default.nix 89 90 importNonDefault = path: args: 90 - lib.pipe path [ 91 - listNonDefault 92 - (builtins.map (path: import path args)) 93 - ]; 91 + path 92 + |> listNonDefault 93 + |> (builtins.map (path: import path args)); 94 94 95 95 # Loads modules while preserving directory structure 96 96 load = { ··· 99 99 filterFn ? (x: true), 100 100 loader ? inputs.haumea.lib.loaders.default, 101 101 }: 102 - lib.pipe path [ 103 - (path: 104 - inputs.haumea.lib.load { 105 - inherit loader; 106 - src = path; 107 - inputs = args; 108 - }) 109 - (attr: builtins.removeAttrs attr ["default"]) 110 - ]; 102 + path 103 + |> (path: 104 + inputs.haumea.lib.load { 105 + inherit loader; 106 + src = path; 107 + inputs = args; 108 + }) 109 + |> (attr: builtins.removeAttrs attr ["default"]); 111 110 112 111 # Loads files ending in default.nix while preserving directory structure 113 112 loadDefault = path: args: ··· 125 124 126 125 # Runs callPackage on files ending in default.nix, always recursive 127 126 callPackageDefault = path: pkgs: 128 - lib.pipe path [ 129 - (path: 130 - read { 131 - inherit path; 132 - filterFn = lib.hasSuffix "default.nix"; 133 - }) 134 - (builtins.mapAttrs (_: path: 135 - lib.callPackageWith (builtins.removeAttrs pkgs ["root"]) path {})) 136 - ]; 127 + path 128 + |> (path: 129 + read { 130 + inherit path; 131 + filterFn = lib.hasSuffix "default.nix"; 132 + }) 133 + |> (builtins.mapAttrs (_: path: 134 + lib.callPackageWith (builtins.removeAttrs pkgs ["root"]) path {})); 137 135 138 136 # Runs callPackage on files not ending in default.nix, always recursive 139 137 callPackageNonDefault = path: pkgs: 140 - lib.pipe path [ 141 - (path: 142 - read { 143 - inherit path; 144 - filterFn = path: ! (lib.hasSuffix "default.nix" path); 145 - }) 146 - (builtins.mapAttrs (_: path: 147 - lib.callPackageWith (builtins.removeAttrs pkgs ["root"]) path {})) 148 - ]; 138 + path 139 + |> (path: 140 + read { 141 + inherit path; 142 + filterFn = path: ! (lib.hasSuffix "default.nix" path); 143 + }) 144 + |> (builtins.mapAttrs (_: path: 145 + lib.callPackageWith (builtins.removeAttrs pkgs ["root"]) path {})); 149 146 }
+3 -4
nix/lib/storage/default.nix
··· 3 3 ntfs = import ./ntfs.nix; 4 4 5 5 mkSafePath = path: 6 - lib.pipe path [ 7 - (lib.strings.removePrefix "/") 8 - (builtins.replaceStrings ["/"] ["-"]) 9 - ]; 6 + path 7 + |> (lib.strings.removePrefix "/") 8 + |> (builtins.replaceStrings ["/"] ["-"]); 10 9 }
+6 -6
nix/modules/ezConfigs.nix
··· 14 14 nixos = rec { 15 15 configurationsDirectory = "${root}/nixos/configs"; 16 16 modulesDirectory = "${root}/nixos/modules"; 17 - hosts = lib.pipe configurationsDirectory [ 18 - builtins.readDir 19 - (lib.filterAttrs (_: type: type == "directory")) 20 - (lib.concatMapAttrs (name: _: { 17 + hosts = 18 + configurationsDirectory 19 + |> builtins.readDir 20 + |> (lib.filterAttrs (_: type: type == "directory")) 21 + |> (lib.concatMapAttrs (name: _: { 21 22 ${name}.userHomeModules = ["lpchaim"]; 22 - })) 23 - ]; 23 + })); 24 24 }; 25 25 home = { 26 26 configurationsDirectory = "${root}/home/configs";
+2
nix/nixos/modules/nix/default.nix
··· 2 2 config, 3 3 inputs, 4 4 lib, 5 + pkgs, 5 6 ... 6 7 }: let 7 8 inherit (inputs.self.lib.config) nix; ··· 19 20 !nhCfg.enable || !nhCfg.clean.enable; 20 21 dates = "weekly"; 21 22 }; 23 + nix.package = pkgs.lixPackageSets.stable.lix; 22 24 nixpkgs = { 23 25 inherit (nix.pkgs) config; 24 26 overlays = builtins.attrValues inputs.self.overlays;
+4 -4
nix/nixos/modules/tailscale/default.nix
··· 37 37 tags = 38 38 cfg.advertise.tags 39 39 ++ lib.optionals cfg.trusted ["trusted"]; 40 - formattedTags = lib.pipe tags [ 41 - (map (it: "tag:${it}")) 42 - (builtins.concatStringsSep ",") 43 - ]; 40 + formattedTags = 41 + tags 42 + |> (map (it: "tag:${it}")) 43 + |> (builtins.concatStringsSep ","); 44 44 in { 45 45 inherit (cfg) authKeyParameters; 46 46 enable = true;
+10
nix/overlays/lix.nix
··· 1 + # As instructed on https://lix.systems/add-to-config/ 2 + {inputs, ...}: final: prev: { 3 + inherit 4 + (prev.lixPackageSets.stable) 5 + nixpkgs-review 6 + nix-eval-jobs 7 + nix-fast-build 8 + colmena 9 + ; 10 + }
+2 -2
nix/overlays/nixpkgsVersions.nix
··· 2 2 inherit (inputs.self.lib) mkPkgs; 3 3 in (final: prev: { 4 4 stable = mkPkgs { 5 - inherit (prev) system; 5 + inherit (prev.stdenv.hostPlatform) system; 6 6 nixpkgs = inputs.stable; 7 7 }; 8 8 unstable = mkPkgs { 9 - inherit (prev) system; 9 + inherit (prev.stdenv.hostPlatform) system; 10 10 nixpkgs = inputs.unstable; 11 11 }; 12 12 })