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

fix: don't repeat pkgs.\w too much, add taplo, tokei, typos

This commit is contained in:
RGBCube 2025-03-25 21:06:27 +03:00
parent 79c9526b1b
commit 25d008fc47
Signed by: RGBCube
SSH key fingerprint: SHA256:CzqbPcfwt+GxFYNnFVCqoN5Itn4YFrshg1TrnACpA5M
13 changed files with 213 additions and 154 deletions

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) const enabled genAttrs mkAfter mkIf;
inherit (lib) attrValues const enabled genAttrs mkAfter mkIf;
in {
environment = {
variables.EDITOR = "hx";
@ -213,47 +213,57 @@ in {
};
}];
environment.systemPackages = mkIf config.isDesktop [
# CMAKE
pkgs.cmake-language-server
environment.systemPackages = mkIf config.isDesktop <| attrValues {
inherit (pkgs)
# CMAKE
cmake-language-server
# GO
pkgs.gopls
# GO
gopls
# HTML
pkgs.vscode-langservers-extracted
pkgs.nodePackages_latest.prettier
# HTML
vscode-langservers-extracted
# KOTLIN
pkgs.kotlin-language-server
# KOTLIN
kotlin-language-server
# LATEX
pkgs.texlab
# LATEX
texlab
# LUA
pkgs.lua-language-server
# LUA
lua-language-server
# MARKDOWN
pkgs.marksman
# MARKDOWN
marksman
# NIX
pkgs.alejandra
pkgs.nil
# NIX
alejandra
nil
# PYTHON
pkgs.python311Packages.python-lsp-server
# RUST
pkgs.rust-analyzer-nightly
pkgs.lldb
# RUST
rust-analyzer-nightly
lldb
# TYPESCRIPT & OTHERS
pkgs.deno
# TYPESCRIPT & OTHERS
deno
# YAML
pkgs.yaml-language-server
# YAML
yaml-language-server
# ZIG
pkgs.zls
];
# ZIG
zls
;
inherit (pkgs.python311Packages)
# PYTHON
# TODO: Replace with basedpyright.
python-lsp-server
;
inherit (pkgs.nodePackages_latest)
# HTML
prettier
;
};
}

View file

@ -1,10 +1,12 @@
{ self, config, lib, pkgs, ... }: let
inherit (lib) enabled getExe head;
inherit (lib) attrValues enabled getExe head;
in {
environment.systemPackages = [
pkgs.difftastic
pkgs.radicle-node
];
environment.systemPackages = attrValues {
inherit (pkgs)
difftastic
radicle-node
;
};
home-manager.sharedModules = [(homeArgs: let
homeConfig = homeArgs.config;

View file

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

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) enabled filter first foldl' getExe last match mkIf nameValuePair optionalAttrs readFile removeAttrs splitString;
inherit (lib) attrValues enabled filter first foldl' getExe last match mkIf nameValuePair optionalAttrs readFile removeAttrs splitString;
in {
environment = optionalAttrs config.isLinux {
sessionVariables.SHELLS = getExe pkgs.nushell;
@ -20,10 +20,12 @@ in {
tree = "tree -CF --dirsfirst";
};
systemPackages = [
pkgs.fish # For completions.
pkgs.zoxide # For completions and better cd.
];
systemPackages = attrValues {
inherit (pkgs)
fish # For completions.
zoxide # For completions and better cd.
;
};
variables.STARSHIP_LOG = "error";
};

View file

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

View file

@ -1,6 +1,10 @@
{ pkgs, ... }: {
environment.systemPackages = [
pkgs.python314
pkgs.uv
];
{ lib, pkgs, ... }: let
inherit (lib) attrValues;
in {
environment.systemPackages = attrValues {
inherit (pkgs)
python314
uv
;
};
}

View file

@ -1,18 +1,24 @@
{ pkgs, ... }: {
{ lib, pkgs, ... }: let
inherit (lib) attrValues;
in {
environment.variables.CARGO_NET_GIT_FETCH_WITH_CLI = "true";
environment.systemPackages = [
pkgs.cargo-expand
pkgs.cargo-fuzz
environment.systemPackages = attrValues {
inherit (pkgs)
cargo-expand
cargo-fuzz
pkgs.evcxr
evcxr
(pkgs.fenix.complete.withComponents [
taplo
;
fenix = pkgs.fenix.complete.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
])
];
];
};
}

View file

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

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: let
inherit (lib) enabled merge mkIf flatten range;
inherit (lib) attrValues enabled merge mkIf flatten range;
in merge <| mkIf config.isDesktop {
hardware.graphics = enabled;
@ -19,18 +19,20 @@ in merge <| mkIf config.isDesktop {
programs.xwayland = enabled;
environment.systemPackages = [
pkgs.brightnessctl
pkgs.grim
# pkgs.hyprpicker
pkgs.slurp
pkgs.swappy
pkgs.swaybg
pkgs.wl-clipboard
pkgs.wtype
pkgs.xdg-utils
pkgs.xwaylandvideobridge
];
environment.systemPackages = attrValues {
inherit (pkgs)
brightnessctl
grim
hyprpicker
slurp
swappy
swaybg
wl-clipboard
wtype
xdg-utils
xwaylandvideobridge
;
};
home-manager.sharedModules = [{
xdg.configFile."xkb/symbols/tr-swapped-i".text = ''

View file

@ -1,10 +1,12 @@
{ config, pkgs, lib, ... }: let
inherit (lib) merge mkIf;
inherit (lib) attrValues merge mkIf;
in merge <| mkIf config.isDesktop {
# Steam uses 32-bit drivers for some unholy fucking reason.
hardware.graphics.enable32Bit = true;
environment.systemPackages = [
pkgs.steam
];
environment.systemPackages = attrValues {
inherit (pkgs)
steam
;
};
}

View file

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