1
Fork 0
mirror of https://github.com/RGBCube/ncc synced 2025-08-02 13:07:46 +00:00

Compare commits

..

No commits in common. "27a60aae67e3b9d1ce3960a803aecd0f236a0e2e" and "4bd1ec53affcc1e5b366c83468109cbee1669dad" have entirely different histories.

20 changed files with 231 additions and 200 deletions

2
.gitignore vendored
View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
{ self, config, inputs, lib, pkgs, ... }: let { 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 match merge mkAfter optionalAttrs optionals;
inherit (lib.strings) toJSON; inherit (lib.strings) toJSON;
registryMap = inputs registryMap = inputs
@ -53,11 +53,13 @@ in {
nix.optimise.automatic = true; nix.optimise.automatic = true;
environment.systemPackages = [ environment.systemPackages = attrValues {
pkgs.nh inherit (pkgs)
pkgs.nix-index nh
pkgs.nix-output-monitor nix-index
]; nix-output-monitor
;
};
home-manager.sharedModules = [{ home-manager.sharedModules = [{
programs.nushell.configFile.text = mkAfter /* nu */ '' programs.nushell.configFile.text = mkAfter /* nu */ ''

View file

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

View file

@ -1,13 +1,10 @@
{ pkgs, ... }: let { lib, pkgs, ... }: let
package = pkgs.python314; inherit (lib) attrValues;
in { in {
environmennt.variables = { environment.systemPackages = attrValues {
UV_PYTHON_PREFERENCE = "system"; inherit (pkgs)
UV_PYTHON = "${package}"; python314
uv
;
}; };
environment.systemPackages = [
package
pkgs.uv
];
} }

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
{ config, lib, pkgs, ... }: let { config, lib, pkgs, ... }: let
inherit (lib) const genAttrs merge mkIf; inherit (lib) const genAttrs merge mkIf;
in merge { in merge {
console.keyMap = pkgs.writeText "trq-swapped-i.map" /* hs */ '' console.keyMap = pkgs.writeText "trq-swapped-i.map" ''
include "${pkgs.kbd}/share/keymaps/i386/qwerty/trq.map" include "${pkgs.kbd}/share/keymaps/i386/qwerty/trq.map"
keycode 23 = i keycode 23 = i
@ -11,20 +11,6 @@ in merge {
keycode 40 = +dotlessi +Idotabove 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"; i18n.defaultLocale = "C.UTF-8";
} <| mkIf config.isDesktop { } <| mkIf config.isDesktop {
i18n.extraLocaleSettings = genAttrs [ i18n.extraLocaleSettings = genAttrs [

View file

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