1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-27 10:07:44 +00:00

treewide: get rid of attrValues pattern because nixd doesn't support goto def on it

This commit is contained in:
RGBCube 2025-07-22 03:17:23 +03:00
parent 30d4b5e421
commit 372df8b48a
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
11 changed files with 160 additions and 196 deletions

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrNames attrValues filterAttrs hasPrefix head mkAliasOptionModule mkIf;
inherit (lib) attrNames filterAttrs hasPrefix head mkAliasOptionModule mkIf;
in {
imports = [(mkAliasOptionModule [ "secrets" ] [ "age" "secrets" ])];
@ -12,10 +12,8 @@ in {
environment = mkIf config.isDesktop {
shellAliases.agenix = "agenix --identity ~/.ssh/id";
systemPackages = attrValues {
inherit (pkgs)
agenix
;
};
systemPackages = [
pkgs.agenix
];
};
}

View file

@ -129,49 +129,47 @@ in {
shellAliases.e = config.editor.defaultAlias;
variables.EDITOR = config.editor.defaultAlias;
systemPackages = mkIf config.isDesktop <| attrValues {
inherit (pkgs)
systemPackages = mkIf config.isDesktop [
# CMAKE
cmake-language-server
pkgs.cmake-language-server
# GO
gopls
pkgs.gopls
# HTML
vscode-langservers-extracted
pkgs.vscode-langservers-extracted
# KOTLIN
kotlin-language-server
pkgs.kotlin-language-server
# LATEX
texlab
pkgs.texlab
# LUA
lua-language-server
pkgs.lua-language-server
# MARKDOWN
markdown-oxide
pkgs.markdown-oxide
# NIX
nixfmt-rfc-style
nixd
pkgs.nixfmt-rfc-style
pkgs.nixd
# PYTHON
basedpyright
pkgs.basedpyright
# RUST
rust-analyzer-nightly
lldb
pkgs.rust-analyzer-nightly
pkgs.lldb
# TYPESCRIPT & OTHERS
deno
pkgs.deno
# YAML
yaml-language-server
pkgs.yaml-language-server
# ZIG
zls
;
};
pkgs.zls
];
};
}

View file

@ -1,5 +1,5 @@
{ self, config, lib, pkgs, ... }: let
inherit (lib) attrValues head mkAfter enabled merge mkIf;
inherit (lib) head mkAfter enabled merge mkIf;
inherit (lib.strings) match;
in {
environment.shellAliases = merge {
@ -68,12 +68,10 @@ in {
"ask-git" = "gh copilot suggest --target git --";
};
environment.systemPackages = attrValues {
inherit (pkgs)
git-absorb
tig
;
};
environment.systemPackages = [
pkgs.git-absorb
pkgs.tig
];
home-manager.sharedModules = [
(homeArgs: let

View file

@ -1,14 +1,12 @@
{ self, config, lib, pkgs, ... }: let
inherit (lib) attrValues enabled head mkIf;
inherit (lib) enabled head mkIf;
in {
environment.systemPackages = attrValues {
inherit (pkgs)
difftastic
jjui
mergiraf
radicle-node
;
};
environment.systemPackages = [
pkgs.difftastic
pkgs.jjui
pkgs.mergiraf
pkgs.radicle-node
];
home-manager.sharedModules = [{
programs.jujutsu = enabled {

View file

@ -1,5 +1,5 @@
{ self, config, inputs, lib, pkgs, ... }: let
inherit (lib) attrValues attrsToList concatStringsSep const disabled filter filterAttrs flip id isType mapAttrs mapAttrsToList match merge mkAfter optionalAttrs optionals;
inherit (lib) attrsToList concatStringsSep const disabled filter filterAttrs flip id isType mapAttrs mapAttrsToList merge mkAfter optionalAttrs optionals;
inherit (lib.strings) toJSON;
registryMap = inputs
@ -53,13 +53,11 @@ in {
nix.optimise.automatic = true;
environment.systemPackages = attrValues {
inherit (pkgs)
nh
nix-index
nix-output-monitor
;
};
environment.systemPackages = [
pkgs.nh
pkgs.nix-index
pkgs.nix-output-monitor
];
home-manager.sharedModules = [{
programs.nushell.configFile.text = mkAfter /* nu */ ''

View file

@ -1,76 +1,65 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrValues optionalAttrs;
inherit (lib) optionals;
in {
unfree.allowedNames = [ "claude-code" ];
environment.systemPackages = attrValues <| {
inherit (pkgs)
asciinema
cowsay
curlHTTP3
dig
doggo
eza
fastfetch
fd
hyperfine
jc
moreutils
openssl
p7zip
pstree
rsync
sd
timg
tokei
typos
uutils-coreutils-noprefix
xh
yazi
yt-dlp
;
environment.systemPackages = [
pkgs.asciinema
pkgs.cowsay
pkgs.curlHTTP3
pkgs.dig
pkgs.doggo
pkgs.eza
pkgs.fastfetch
pkgs.fd
pkgs.hyperfine
pkgs.jc
pkgs.moreutils
pkgs.openssl
pkgs.p7zip
pkgs.pstree
pkgs.rsync
pkgs.sd
pkgs.timg
pkgs.tokei
pkgs.typos
pkgs.uutils-coreutils-noprefix
pkgs.xh
pkgs.yazi
pkgs.yt-dlp
(pkgs.fortune.override { withOffensive = true; })
] ++ optionals config.isLinux [
pkgs.traceroute
pkgs.usbutils
pkgs.strace
] ++ optionals config.isDesktop [
pkgs.claude-code
fortune = pkgs.fortune.override { withOffensive = true; };
} // optionalAttrs config.isLinux {
inherit (pkgs)
traceroute
usbutils
strace
;
} // optionalAttrs config.isDesktop {
inherit (pkgs)
claude-code
pkgs.clang_16
pkgs.clang-tools_16
pkgs.deno
pkgs.gh
pkgs.go
pkgs.lld
pkgs.zig
clang_16
clang-tools_16
deno
gh
go
lld
zig
pkgs.qbittorrent
] ++ optionals (config.isLinux && config.isDesktop) [
pkgs.thunderbird
qbittorrent
;
} // optionalAttrs (config.isLinux && config.isDesktop) {
inherit (pkgs)
thunderbird
pkgs.whatsapp-for-linux
whatsapp-for-linux
pkgs.element-desktop
pkgs.zulip
pkgs.fractal
element-desktop
zulip
fractal
pkgs.obs-studio
obs-studio
pkgs.krita
krita
pkgs.libreoffice
libreoffice
;
inherit (pkgs.hunspellDicts)
en_US
en_GB-ize
;
};
pkgs.en_US
pkgs.en_GB-ize
];
}

View file

@ -1,34 +1,31 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrValues makeLibraryPath mkIf;
inherit (lib) makeLibraryPath mkIf;
in {
environment.variables = {
CARGO_NET_GIT_FETCH_WITH_CLI = "true";
LIBRARY_PATH = mkIf config.isDarwin <| makeLibraryPath <| attrValues {
inherit (pkgs)
libiconv
;
};
LIBRARY_PATH = mkIf config.isDarwin <| makeLibraryPath [
pkgs.libiconv
];
};
environment.systemPackages = attrValues {
inherit (pkgs)
cargo-deny
cargo-expand
cargo-fuzz
cargo-nextest
environment.systemPackages = [
pkgs.cargo-deny
pkgs.cargo-expand
pkgs.cargo-fuzz
pkgs.cargo-nextest
evcxr
pkgs.evcxr
taplo
;
pkgs.taplo
fenix = pkgs.fenix.complete.withComponents [
(pkgs.fenix.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
];
};
}

View file

@ -1,14 +1,12 @@
{ lib, pkgs, ... }: let
inherit (lib) attrValues enabled;
inherit (lib) enabled;
in {
environment.systemPackages = attrValues {
inherit (pkgs)
carapace
fish
zsh
inshellisense
;
};
environment.systemPackages = [
pkgs.carapace
pkgs.fish
pkgs.zsh
pkgs.inshellisense
];
home-manager.sharedModules = [{
programs.carapace = enabled;

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrValues disabled merge mkIf;
inherit (lib) disabled merge mkIf;
in merge
(mkIf config.isDesktop {
@ -9,17 +9,15 @@ in merge
packages = [ pkgs.terminus_font ];
};
fonts.packages = attrValues {
sans = config.theme.font.sans.package;
mono = config.theme.font.mono.package;
fonts.packages = [
config.theme.font.sans.package
config.theme.font.mono.package
inherit (pkgs)
noto-fonts
noto-fonts-cjk-sans
noto-fonts-lgc-plus
noto-fonts-emoji
;
};
pkgs.noto-fonts
pkgs.noto-fonts-cjk-sans
pkgs.noto-fonts-lgc-plus
pkgs.noto-fonts-emoji
];
})
(mkIf config.isServer {

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrValues enabled merge mkIf flatten range;
inherit (lib) enabled merge mkIf flatten range;
in merge <| mkIf config.isDesktop {
hardware.graphics = enabled;
@ -19,20 +19,18 @@ in merge <| mkIf config.isDesktop {
programs.xwayland = enabled;
environment.systemPackages = attrValues {
inherit (pkgs)
brightnessctl
grim
hyprpicker
slurp
swappy
swaybg
wl-clipboard
wtype
xdg-utils
xwaylandvideobridge
;
};
environment.systemPackages = [
pkgs.brightnessctl
pkgs.grim
pkgs.hyprpicker
pkgs.slurp
pkgs.swappy
pkgs.swaybg
pkgs.wl-clipboard
pkgs.wtype
pkgs.xdg-utils
pkgs.xwaylandvideobridge
];
home-manager.sharedModules = [{
wayland.windowManager.hyprland = enabled {

View file

@ -1,25 +1,19 @@
{ config, lib, pkgs, ... }: let
inherit (lib) attrValues enabled merge mkIf;
inherit (lib) enabled merge mkIf;
in merge <| mkIf config.isDesktop {
programs.thunar = enabled {
plugins = attrValues {
inherit (pkgs.xfce)
thunar-archive-plugin
thunar-media-tags-plugin
thunar-volman
;
};
plugins = [
pkgs.xfce.thunar-archive-plugin
pkgs.xfce.thunar-media-tags-plugin
pkgs.xfce.thunar-volman
];
};
environment.systemPackages = attrValues {
inherit (pkgs)
ark
ffmpegthumbnailer
libgsf
;
environment.systemPackages = [
pkgs.ark
pkgs.ffmpegthumbnailer
pkgs.libgsf
inherit (pkgs.xfce)
tumbler
;
};
pkgs.xfce.tumbler
];
}