1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-07-31 12:07:48 +00:00

Compare commits

...

5 commits

20 changed files with 200 additions and 231 deletions

2
.gitignore vendored
View file

@ -2,8 +2,6 @@
!.gitignore
!docs/
!hosts/
!hosts/**/

View file

@ -1,7 +1,8 @@
lib: lib.nixosSystem' ({ config, keys, lib, ... }: let
inherit (lib) collectNix remove;
in {
imports = collectNix ./. |> remove ./default.nix;
imports = collectNix ./.
|> remove ./default.nix;
secrets.id.file = ./id.age;
services.openssh.hostKeys = [{

View file

@ -1,7 +1,8 @@
lib: lib.nixosSystem' ({ config, keys, lib, ... }: let
inherit (lib) collectNix remove;
in {
imports = collectNix ./. |> remove ./default.nix;
imports = collectNix ./.
|> remove ./default.nix;
secrets.id.file = ./id.age;
services.openssh.hostKeys = [{

View file

@ -1,7 +1,8 @@
lib: lib.nixosSystem' ({ config, keys, lib, ... }: let
inherit (lib) collectNix remove;
in {
imports = collectNix ./. |> remove ./default.nix;
imports = collectNix ./.
|> remove ./default.nix;
secrets.id.file = ./id.age;
services.openssh.hostKeys = [{

View file

@ -1,7 +1,8 @@
lib: lib.darwinSystem' ({ lib, ... }: let
lib: lib.darwinSystem' ({ config, lib, ... }: let
inherit (lib) collectNix remove;
in {
imports = collectNix ./. |> remove ./default.nix;
imports = collectNix ./.
|> remove ./default.nix;
type = "desktop";
@ -14,8 +15,8 @@ in {
home-manager.users.pala.home = {
stateVersion = "25.05";
homeDirectory = "/Users/pala";
homeDirectory = config.users.users.pala.home;
};
system.stateVersion = 5;
system.stateVersion = 5;
})

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

@ -66,10 +66,10 @@ in {
args.program = "{0}";
args.initCommands = let
primer = pkgs.runCommand "primer" {} (/* py */ ''
mkdir $out
echo '
# Why? Helix injections.
writeText = pkgs.writeText;
primer = writeText "primer.py" ''
import subprocess
import pathlib
import lldb
@ -82,9 +82,7 @@ in {
# Load lldb_lookup.py and execute lldb_commands with the correct path
lldb.debugger.HandleCommand(f"""command script import "{rustlib_etc / 'lldb_lookup.py'}" """)
lldb.debugger.HandleCommand(f"""command source -s 0 "{rustlib_etc / 'lldb_commands'}" """)
' > $out/primer.py
'');
'';
in [ "command script import ${primer}/primer.py" ];
}];
}
@ -129,49 +127,47 @@ in {
shellAliases.e = config.editor.defaultAlias;
variables.EDITOR = config.editor.defaultAlias;
systemPackages = mkIf config.isDesktop <| attrValues {
inherit (pkgs)
# CMAKE
cmake-language-server
systemPackages = mkIf config.isDesktop [
# CMAKE
pkgs.cmake-language-server
# GO
gopls
# GO
pkgs.gopls
# HTML
vscode-langservers-extracted
# HTML
pkgs.vscode-langservers-extracted
# KOTLIN
kotlin-language-server
# KOTLIN
pkgs.kotlin-language-server
# LATEX
texlab
# LATEX
pkgs.texlab
# LUA
lua-language-server
# LUA
pkgs.lua-language-server
# MARKDOWN
markdown-oxide
# MARKDOWN
pkgs.markdown-oxide
# NIX
nixfmt-rfc-style
nil
# NIX
pkgs.nixfmt-rfc-style
pkgs.nixd
# PYTHON
basedpyright
# PYTHON
pkgs.basedpyright
# RUST
rust-analyzer-nightly
lldb
# RUST
pkgs.rust-analyzer-nightly
pkgs.lldb
# TYPESCRIPT & OTHERS
deno
# TYPESCRIPT & OTHERS
pkgs.deno
# YAML
yaml-language-server
# YAML
pkgs.yaml-language-server
# ZIG
zls
;
};
# ZIG
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,10 +1,13 @@
{ lib, pkgs, ... }: let
inherit (lib) attrValues;
{ pkgs, ... }: let
package = pkgs.python314;
in {
environment.systemPackages = attrValues {
inherit (pkgs)
python314
uv
;
environmennt.variables = {
UV_PYTHON_PREFERENCE = "system";
UV_PYTHON = "${package}";
};
environment.systemPackages = [
package
pkgs.uv
];
}

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,34 +19,20 @@ 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 = [{
xdg.configFile."xkb/symbols/tr-swapped-i".text = ''
default partial
xkb_symbols "basic" {
include "tr(basic)"
name[Group1]="Turkish (i and ı swapped)";
key <AC11> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ idotless, Iabovedot, paragraph , none ]};
key <AD08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ i , I , apostrophe, dead_caron ]};
};
'';
wayland.windowManager.hyprland = enabled {
systemd = enabled {
enableXdgAutostart = true;

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: let
inherit (lib) const genAttrs merge mkIf;
in merge {
console.keyMap = pkgs.writeText "trq-swapped-i.map" ''
console.keyMap = pkgs.writeText "trq-swapped-i.map" /* hs */ ''
include "${pkgs.kbd}/share/keymaps/i386/qwerty/trq.map"
keycode 23 = i
@ -11,6 +11,20 @@ in merge {
keycode 40 = +dotlessi +Idotabove
'';
home-manager.sharedModules = [{
xdg.configFile."xkb/symbols/tr-swapped-i".text = /* rs */ ''
default partial
xkb_symbols "basic" {
include "tr(basic)"
name[Group1]="Turkish (i and ı swapped)";
key <AC11> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ idotless, Iabovedot, paragraph , none ]};
key <AD08> { type[group1] = "FOUR_LEVEL_SEMIALPHABETIC", [ i , I , apostrophe, dead_caron ]};
};
'';
}];
i18n.defaultLocale = "C.UTF-8";
} <| mkIf config.isDesktop {
i18n.extraLocaleSettings = genAttrs [

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
];
}