fix: Remove |> operator to fix ci
Some checks are pending
Test Cachix / tests (Akun) (push) Waiting to run
Test Cachix / tests (Cape) (push) Waiting to run
Test Cachix / tests (Tytonidae) (push) Waiting to run

This commit is contained in:
ulic-youthlic 2025-11-07 23:54:49 +08:00
parent 3b570cc47a
commit 6a7b5838bc
Signed by: youthlic
GPG key ID: 63E86C3C14A0D721
13 changed files with 167 additions and 122 deletions

View file

@ -21,7 +21,6 @@ jobs:
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=
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
with:
name: youthlic

View file

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

View file

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

View file

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

View file

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

View file

@ -17,7 +17,15 @@ in
programs.alacritty = {
enable = true;
package = pkgs.alacritty_git;
settings = (./alacritty.toml |> builtins.readFile |> builtins.fromTOML) // {
settings =
(
with lib;
pipe ./alacritty.toml [
builtins.readFile
builtins.fromTOML
]
)
// {
colors = lib.mkForce { };
font.size = lib.mkForce 16;
window.opacity = lib.mkForce 0.8;

View file

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

View file

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

View file

@ -3,6 +3,8 @@ final: prev:
let
inherit (prev) lib;
in
with lib;
pipe
[
./TrackersListCollection.nix
./OuterWildsTextAdventure.nix
@ -16,5 +18,7 @@ in
./pkgsNoCuda.nix
]
|> map (file: import file args)
|> (overlays: (lib.composeManyExtensions overlays) final prev)
[
(map (file: import file args))
(overlays: (lib.composeManyExtensions overlays) final prev)
]

View file

@ -3,6 +3,8 @@ final: prev:
let
inherit (prev) lib;
in
with lib;
pipe
[
./niri.nix
./spotifyx.nix
@ -20,5 +22,7 @@ in
# Nur
./nur.nix
]
|> map (file: import file args)
|> (overlays: (lib.composeManyExtensions overlays) final prev)
[
(map (file: import file args))
(overlays: (lib.composeManyExtensions overlays) final prev)
]

View file

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

View file

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

View file

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