Revert "fix: Remove |> operator to fix ci"

This reverts commit 6a7b5838bc.
This commit is contained in:
ulic-youthlic 2025-11-08 03:53:33 +08:00
parent ff78d71406
commit 4205a8bcb3
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
13 changed files with 122 additions and 167 deletions

View file

@ -21,6 +21,7 @@ jobs:
extra_nix_config: | extra_nix_config: |
trusted-public-keys = youthlic.cachix.org-1:zkUZ/ZGGF5fZxvg5WO3K8XAsUAPFmQKWbnAFb3W5x+Y= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= trusted-public-keys = youthlic.cachix.org-1:zkUZ/ZGGF5fZxvg5WO3K8XAsUAPFmQKWbnAFb3W5x+Y= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs= chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8= nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
substituters = https://youthlic.cachix.org/ https://niri.cachix.org/ https://nix-community.cachix.org/ https://chaotic-nyx.cachix.org/ https://cache.nixos.org/ substituters = https://youthlic.cachix.org/ https://niri.cachix.org/ https://nix-community.cachix.org/ https://chaotic-nyx.cachix.org/ https://cache.nixos.org/
experimental-features = nix-command flakes pipe-operator
- uses: cachix/cachix-action@v14 - uses: cachix/cachix-action@v14
with: with:
name: youthlic name: youthlic

View file

@ -39,20 +39,16 @@ in
}; };
config = { config = {
flake.deploy.nodes = flake.deploy.nodes =
with lib; [
pipe "Cape"
[ "Akun"
"Cape" ]
"Akun" |> map (
] hostName:
[ mkDeployNode {
(map ( inherit hostName;
hostName: }
mkDeployNode { )
inherit hostName; |> lib.foldr (a: b: a // b) { };
}
))
(foldr (a: b: a // b) { })
];
}; };
} }

View file

@ -9,20 +9,18 @@ let
inherit (self) outputs; inherit (self) outputs;
homeModules = homeModules =
( (
with lib; (rootPath + "/home")
pipe (rootPath + "/home") [ |> builtins.readDir
builtins.readDir |> lib.filterAttrs (_key: value: value == "directory")
(filterAttrs (_key: value: value == "directory")) |> lib.filterAttrs (
(filterAttrs ( key: _value:
key: _value: !builtins.elem key [
!builtins.elem key [ "modules"
"modules" "extra"
"extra" ]
] )
)) |> builtins.attrNames
builtins.attrNames |> (with lib; flip genAttrs (name: import (rootPath + "/home/${name}/modules")))
(flip genAttrs (name: import (rootPath + "/home/${name}/modules")))
]
) )
// { // {
default = import "${toString rootPath}/home/modules"; default = import "${toString rootPath}/home/modules";
@ -71,15 +69,12 @@ let
in in
{ {
flake = { flake = {
homeConfigurations = homeConfigurations = lib.foldr (a: b: a // b) { } (
with lib; [
foldr (a: b: a // b) { } ( # Hostname
pipe ]
[ |> map (hostName: makeHomeConfiguration { inherit hostName; })
# Hostname );
]
[ (map (hostName: makeHomeConfiguration { inherit hostName; })) ]
);
inherit homeModules; inherit homeModules;
}; };
} }

View file

@ -30,13 +30,11 @@ in
}; };
}; };
in in
with lib; [
pipe "Tytonidae"
[ "Cape"
"Tytonidae" "Akun"
"Cape" ]
"Akun" |> (with lib; flip genAttrs makeNixosConfiguration);
]
[ (flip genAttrs makeNixosConfiguration) ];
}; };
} }

View file

@ -11,11 +11,9 @@ let
in in
{ {
flake.overlays = flake.overlays =
with lib; [
pipe "modifications"
[ "additions"
"modifications" ]
"additions" |> (with lib; flip genAttrs (name: importWithArgs (rootPath + "/overlays/${name}")));
]
[ (flip genAttrs (name: importWithArgs (rootPath + "/overlays/${name}"))) ];
} }

View file

@ -17,22 +17,14 @@ in
programs.alacritty = { programs.alacritty = {
enable = true; enable = true;
package = pkgs.alacritty_git; package = pkgs.alacritty_git;
settings = settings = (./alacritty.toml |> builtins.readFile |> builtins.fromTOML) // {
( colors = lib.mkForce { };
with lib; font.size = lib.mkForce 16;
pipe ./alacritty.toml [ window.opacity = lib.mkForce 0.8;
builtins.readFile general.import = [
builtins.fromTOML "${pkgs.alacritty-theme}/share/alacritty-theme/gruvbox_dark.toml"
] ];
) };
// {
colors = lib.mkForce { };
font.size = lib.mkForce 16;
window.opacity = lib.mkForce 0.8;
general.import = [
"${pkgs.alacritty-theme}/share/alacritty-theme/gruvbox_dark.toml"
];
};
}; };
}; };
} }

View file

@ -56,12 +56,7 @@ in
enable = true; enable = true;
defaultEditor = true; defaultEditor = true;
extraPackages = cfg.extraPackages; extraPackages = cfg.extraPackages;
settings = settings = ./config.toml |> builtins.readFile |> builtins.fromTOML;
with lib;
pipe ./config.toml [
builtins.readFile
builtins.fromTOML
];
languages = lib.recursiveUpdate { languages = lib.recursiveUpdate {
language-server = { language-server = {
neocmakelsp = { neocmakelsp = {

View file

@ -9,15 +9,13 @@
{ {
config = { config = {
environment.etc = environment.etc =
with lib; inputs
pipe inputs [ |> lib.mapAttrs' (
(mapAttrs' ( name: value:
name: value: lib.nameValuePair "nix/inputs/${name}" {
lib.nameValuePair "nix/inputs/${name}" { source = value;
source = value; }
} );
))
];
nixpkgs = { nixpkgs = {
config = { config = {
allowUnfree = true; allowUnfree = true;
@ -74,7 +72,9 @@
experimental-features = [ experimental-features = [
"nix-command" "nix-command"
"flakes" "flakes"
]; ]
++ (lib.optional config.lix.enable "pipe-operator")
++ (lib.optional (!config.lix.enable) "pipe-operators");
warn-dirty = false; warn-dirty = false;
system-features = [ system-features = [
"kvm" "kvm"
@ -85,17 +85,15 @@
}; };
package = pkgs.nix; package = pkgs.nix;
registry = registry =
with lib; inputs
pipe inputs [ |> lib.filterAttrs (name: _value: name != "nixpkgs")
(filterAttrs (name: _value: name != "nixpkgs")) |> lib.mapAttrs (
(mapAttrs ( _name: value: {
_name: value: { flake = lib.mkForce {
flake = lib.mkForce { outPath = value;
outPath = value; };
}; }
} );
))
];
}; };
}; };
} }

View file

@ -3,22 +3,18 @@ final: prev:
let let
inherit (prev) lib; inherit (prev) lib;
in in
with lib; [
pipe ./TrackersListCollection.nix
[ ./OuterWildsTextAdventure.nix
./TrackersListCollection.nix ./editor-runtime.nix
./OuterWildsTextAdventure.nix ./wallpapers.nix
./editor-runtime.nix ./rime-yuhaostar.nix
./wallpapers.nix ./rime-all.nix
./rime-yuhaostar.nix ./nixvim.nix
./rime-all.nix ./doom-emacs.nix
./nixvim.nix ./osu-lazer-bin.nix # typochecker: disable-line
./doom-emacs.nix
./osu-lazer-bin.nix # typochecker: disable-line
./pkgsNoCuda.nix ./pkgsNoCuda.nix
] ]
[ |> map (file: import file args)
(map (file: import file args)) |> (overlays: (lib.composeManyExtensions overlays) final prev)
(overlays: (lib.composeManyExtensions overlays) final prev)
]

View file

@ -3,26 +3,22 @@ final: prev:
let let
inherit (prev) lib; inherit (prev) lib;
in in
with lib; [
pipe ./niri.nix
[ ./spotifyx.nix
./niri.nix ./radicle-explorer.nix
./spotifyx.nix ./wshowkeys.nix
./radicle-explorer.nix # ./QQ.nix
./wshowkeys.nix ./helix.nix
# ./QQ.nix ./cliphist.nix
./helix.nix ./zulip.nix
./cliphist.nix ./spotifyd.nix
./zulip.nix ./nautilus.nix
./spotifyd.nix ./neovim-nightly.nix
./nautilus.nix ./vim.nix
./neovim-nightly.nix
./vim.nix
# Nur # Nur
./nur.nix ./nur.nix
] ]
[ |> map (file: import file args)
(map (file: import file args)) |> (overlays: (lib.composeManyExtensions overlays) final prev)
(overlays: (lib.composeManyExtensions overlays) final prev)
]

View file

@ -60,30 +60,26 @@ let
runHook postFixup runHook postFixup
''; '';
}; };
grammars = with lib; pipe srcs [ (filterAttrs (key: _: hasPrefix "tree-sitter-" key)) ]; grammars = srcs |> lib.filterAttrs (key: _: lib.hasPrefix "tree-sitter-" key);
queries = queries =
with lib; grammars
pipe grammars [ |> lib.mapAttrsToList (
(mapAttrsToList ( _: value: ''
_: value: '' mkdir -p $out/${value.name}
mkdir -p $out/${value.name}
ln -s ${value.src}/queries/* $out/${value.name}/ ln -s ${value.src}/queries/* $out/${value.name}/
'' ''
)) );
];
grammarLinks = grammarLinks =
with lib; grammars
pipe grammars [ |> builtins.mapAttrs (
(builtins.mapAttrs ( _: v: {
_: v: { inherit (v) name;
inherit (v) name; value = buildGrammar v;
value = buildGrammar v; }
} )
)) |> lib.mapAttrsToList (_: value: "ln -s ${value.value}/${value.name}.so $out/${value.name}.so");
(mapAttrsToList (_: value: "ln -s ${value.value}/${value.name}.so $out/${value.name}.so"))
];
grammarDir = runCommandLocal "helix-grammars" { } '' grammarDir = runCommandLocal "helix-grammars" { } ''
mkdir -p $out mkdir -p $out

View file

@ -7,10 +7,9 @@
let let
wallpapers = wallpapers =
with lib; with lib;
pipe srcs [ srcs
(filterAttrs (name: _value: hasPrefix "wallpaper" name)) |> filterAttrs (name: _value: hasPrefix "wallpaper" name)
(concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}")) |> concatMapAttrsStringSep "\n" (name: value: "ln -s ${value.src} $out/${name}");
];
in in
runCommandLocal "wallpapers" { } '' runCommandLocal "wallpapers" { } ''
mkdir -p $out mkdir -p $out

View file

@ -1,6 +1,6 @@
{ {
perSystem = perSystem =
{ pkgs, lib, ... }: { pkgs, ... }:
{ {
treefmt = { treefmt = {
programs = { programs = {
@ -41,12 +41,7 @@
}; };
typos = typos =
let let
config = config = ./.typos.toml |> builtins.readFile |> builtins.fromTOML;
with lib;
pipe ./.typos.toml [
builtins.readFile
builtins.fromTOML
];
in in
{ {
enable = true; enable = true;