feat\!: major cleanup

This commit is contained in:
Jacob Bachmann 2025-08-19 00:49:40 +02:00
parent b971a645e3
commit 210c463d79
93 changed files with 34 additions and 4340 deletions

View file

@ -15,57 +15,17 @@
pkgs.git # distributed version control system
pkgs.gnumake # a tool to control the generation of non-source files from sources
pkgs.parallel # shell tool for executing jobs in parallel
pkgs.mercurial # a fast, lightweight scm system for very large distributed projects
pkgs.wget # tool for retrieving files using http, https, and ftp
pkgs.unstable.neovim-unwrapped # vim text editor fork focused on extensibility and agility
pkgs.neofetch # a fast, highly customizable system info script
pkgs.neovim # vim text editor fork focused on extensibility and agility
pkgs.eza # a modern, maintained replacement for ls
pkgs.ripgrep # a utility that combines the usability of the silver searcher with the raw speed of grep
pkgs.ripgrep-all # ripgrep, but also search in pdfs, e-books, office documents, zip, tar.gz, and more
pkgs.expect # a tool for automating interactive applications
pkgs.jq # a lightweight and flexible command-line json processor
pkgs.unzip # an extraction utility for archives compressed in .zip format
pkgs.unrar # utility for rar archives
pkgs.libsecret # a library for storing and retrieving passwords and other secrets
pkgs.xidel # command line tool to download and extract data from html/xml pages as well as json apis
pkgs.nvd # nix/nixos package version diff tool
pkgs.inotify-tools # a c library and a set of command-line programs providing a simple interface to inotify
pkgs.mkcert # a simple tool for making locally-trusted development certificates
pkgs.hexedit
pkgs.gdu # fast disk usage analyzer with console interface written in go
pkgs.duf # disk usage/free utility - a better 'df' alternative
]
++ lib.optionals (config.bchmnn.collections.cli-utils.enable && config.bchmnn.nvidia.enable) [
pkgs.nvtopPackages.full
]
++ lib.optionals config.bchmnn.collections.development.enable [
pkgs.gcc13
pkgs.clang
pkgs.cmake
pkgs.universal-ctags # a maintained ctags implementation
pkgs.unifdef # selectively remove c preprocessor conditionals
pkgs.doxygen # source code documentation generator tool
pkgs.rustc
pkgs.cargo # downloads your rust project's dependencies and builds your project
pkgs.go # go programming language
(pkgs.python312.withPackages (
p: with p; [
ptpython # an advanced python repl
ipython # ipython: productive interactive computing
pycryptodome # self-contained cryptographic library
gmpy2 # interface to gmp, mpfr, and mpc for python 3.7+
]
))
pkgs.lua
pkgs.nixpkgs-fmt
pkgs.openjdk17
pkgs.javaPackages.openjfx17
pkgs.gradle_7
pkgs.maven
pkgs.ant
pkgs.nodejs_20
pkgs.nodenv
pkgs.nodePackages.yarn
pkgs.nodePackages.pnpm
];
}

View file

@ -1,57 +0,0 @@
{
pkgs,
config,
lib,
...
}:
{
options.bchmnn = {
audio = {
enable = lib.mkEnableOption "audio";
pipewire-wine-fix = {
enable = lib.mkEnableOption "pipewire-wine-fix";
};
};
};
config = {
services.pipewire =
lib.mkIf (config.bchmnn.audio.enable && (!builtins.elem "gnome" config.bchmnn.gui.flavour))
{
enable = true;
audio.enable = true;
pulse.enable = true;
alsa.enable = true;
alsa.support32Bit = true;
jack.enable = true;
wireplumber.enable = true;
extraConfig.pipewire = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
"90-wine-config" = {
"context.properties" = {
# "default.clock.rate" = 48000;
"default.clock.allowed-rates" = [
44100
48000
];
# "default.clock.quantum" = 2048;
# "default.clock.min-quantum" = 1024;
};
};
};
extraConfig.pipewire-pulse = lib.mkIf config.bchmnn.audio.pipewire-wine-fix.enable {
"90-wine-config" = {
"pulse.properties" = {
"pulse.min.req" = "1024/48000";
# "pulse.min.frag" = "1024/48000";
# "pulse.min.quantum" = "1024/48000";
};
};
};
};
environment.systemPackages = lib.optionals config.bchmnn.audio.enable [
pkgs.alsa-utils
pkgs.pulseaudio
];
};
}

View file

@ -1,17 +0,0 @@
{ config, lib, ... }:
{
options.bchmnn = {
bluetooth = {
enable = lib.mkEnableOption "bluetooth";
};
};
config = lib.mkIf config.bchmnn.bluetooth.enable {
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
};
}

View file

@ -1,51 +0,0 @@
{ lib, pkgs, ... }:
{
options.bchmnn = {
bsprak = {
enable = lib.mkEnableOption "bsprak";
};
};
config = {
environment = {
# Tell nix to link header files of all installed packages
# in /run/current-system/sw/include
pathsToLink = [ "/include" ];
variables = {
# Tell compilers where to find the header files
CPATH = "/run/current-system/sw/include";
# Tell linker where to find shared objects
LIBRARY_PATH = "/run/current-system/sw/lib";
};
systemPackages = with pkgs; [
git
gcc
gnumake
cmake
python3
ninja
texinfo
pkg-config
bison
flex
curl
# the `.dev` syntax tells nix to also provide header files
gmp
gmp.dev
mpfr
mpfr.dev
libmpc
glib
glib.dev
pixman
expat
expat.dev
ncurses5
ncurses5.dev
];
};
};
}

View file

@ -4,31 +4,5 @@
la = "eza --group-directories-first --hyperlink --icons -la";
lt = "eza --group-directories-first --hyperlink --icons -la --tree";
llt = "unbuffer eza --group-directories-first --hyperlink --icons -la --tree | less -r";
gg = "cd ~/code";
# gs = "git status";
gl = "git log --oneline";
glg = "git log --oneline --graph --decorate --all";
gaa = "git add --all";
gc = "git commit -m";
gp = "git push";
ta = "tmux attach";
nec = "nvim --cmd \"cd $(readlink -f /etc/nixos)\"";
ncc = "sudo nixos-rebuild switch --upgrade-all --flake \"$(readlink -f /etc/nixos)\"";
nup = "sudo nix-channel --update";
ngc = "sudo nix-collect-garbage -d";
nda = "nixos-rebuild --flake path:\"$(readlink -f /etc/nixos)\"#APPA --build-host root@dryb.org --target-host root@dryb.org switch";
dcup = "docker-compose up --detach --remove-orphans";
dka = "docker kill $(docker ps -q)";
drmc = "docker container rm $(docker container ls -aq)";
drmi = "docker image rm $(docker image ls -aq)";
drmv = "docker volume rm $(docker volume ls -q)";
lsip = "curl -s 'https://nordvpn.com/wp-admin/admin-ajax.php?action=get_user_info_data' | jq";
xo = "xdg-open";
y = "yazi";
};
}

View file

@ -2,14 +2,8 @@
{
imports = [
./applications.nix
./audio.nix
./bluetooth.nix
./bsprak.nix
./keyd.nix
./network.nix
./nvidia.nix
./power.nix
./printing.nix
./profiling.nix
./security.nix
./shell.nix
@ -36,10 +30,6 @@
allowUnfreePredicate = (_: true);
};
};
mfcl3750cdwlpr = (super.callPackage ../../overlays/mfcl3750cdw.nix { }).driver;
mfcl3750cdwcupswrapper = (super.callPackage ../../overlays/mfcl3750cdw.nix { }).cupswrapper;
pppdf = (super.python3Packages.callPackage ../../overlays/pppdf { });
iglesia-light = (super.callPackage ../../overlays/fonts/iglesia-light.nix { });
})
];
config = {
@ -48,17 +38,6 @@
};
};
# provide libraries for non-nix binaries
# programs.nix-ld = {
# enable = true;
# libraries = [
# # glibc
# # libcxx
# # libllvm
# # ncurses
# ];
# };
system.stateVersion = "23.05";
time.timeZone = "Europe/Berlin";
@ -80,7 +59,6 @@
services.dbus = {
enable = true;
packages = with pkgs; [
gcr # gnome crypto services (daemon and tools)
dconf
];
};

View file

@ -1,73 +0,0 @@
{ pkgs, ... }:
let
nav = {
h = "left";
j = "down";
k = "up";
l = "right";
"0" = "home";
"4" = "end";
u = "pageup";
d = "pagedown";
q = "previoussong";
w = "playpause";
e = "nextsong";
};
alt = {
a = "ä";
o = "ö";
u = "ü";
s = "ß";
e = "";
};
altShift = {
a = "Ä";
o = "Ö";
u = "Ü";
};
in
{
environment.systemPackages = with pkgs; [ keyd ];
# Enable keyd and remap keys
services.keyd = {
enable = true;
keyboards.default = {
ids = [
"*"
"-04fe:0020" # HHKB
"-046d:102a" # Logitech G700s
"-046d:c07c" # Logitech G700s Rechargeable Gaming Mouse
];
settings = {
main = {
leftalt = "layer(meta)";
leftmeta = "layer(alt)";
altgr = "layer(control)";
rightalt = "layer(control)";
capslock = "layer(nav)";
};
alt = alt;
"alt+shift" = altShift;
meta = {
capslock = "overload(nav, capslock)";
};
nav = nav;
};
};
keyboards.hhkb = {
ids = [ "04fe:0020" ];
settings = {
main = {
rightmeta = "layer(control)";
leftcontrol = "layer(nav)";
};
alt = alt;
"alt+shift" = altShift;
meta = {
leftcontrol = "overload(nav, capslock)";
};
nav = nav;
};
};
};
}

View file

@ -17,13 +17,6 @@
enable = lib.mkEnableOption "networkd";
};
};
collections = {
vpn = {
dryborg = {
enable = lib.mkEnableOption "dryborg";
};
};
};
};
config = {
networking = {
@ -34,46 +27,6 @@
NetworkManager-wait-online.enable = false;
};
services.resolved.enable = (
config.bchmnn.network.nm.enable || config.bchmnn.collections.vpn.enable
);
environment.systemPackages = lib.optionals (config.bchmnn.collections.vpn.enable) [
pkgs.openvpn3
pkgs.mullvad-vpn
pkgs.wireguard-tools # tools for the wireguard secure network tunnel
];
services.mullvad-vpn.enable = config.bchmnn.collections.vpn.enable;
age.secrets =
lib.mkIf (config.bchmnn.collections.vpn.enable && config.bchmnn.collections.vpn.dryborg.enable)
{
keys-wireguard-dryborg-privatekey = {
file = ../../secrets/keys/wireguard/dryborg/privatekey.age;
};
keys-wireguard-dryborg-presharedkey = {
file = ../../secrets/keys/wireguard/dryborg/presharedkey.age;
};
};
networking.wg-quick.interfaces =
lib.mkIf (config.bchmnn.collections.vpn.enable && config.bchmnn.collections.vpn.dryborg.enable)
{
"vpn.dryb.org" = {
autostart = false;
privateKeyFile = config.age.secrets.keys-wireguard-dryborg-privatekey.path;
address = [ "10.200.200.1/24" ];
dns = [ "192.168.2.1" ];
peers = [
{
publicKey = "JY5fb0RS7C8WyPPEeymzuMSUeIhDtICGk1FYJgTRnTs=";
presharedKeyFile = config.age.secrets.keys-wireguard-dryborg-presharedkey.path;
allowedIPs = [ "0.0.0.0/0" ];
endpoint = "vpn.dryb.org:53280";
persistentKeepalive = 21;
}
];
};
};
services.resolved.enable = config.bchmnn.network.nm.enable;
};
}

View file

@ -1,17 +0,0 @@
{ config, lib, ... }:
{
options.bchmnn = {
nvidia = {
enable = lib.mkEnableOption "nvidia";
};
};
config = lib.mkIf config.bchmnn.nvidia.enable {
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
nvidiaSettings = true;
};
};
}

View file

@ -46,7 +46,7 @@
};
services.tlp = {
enable = !builtins.elem "gnome" config.bchmnn.gui.flavour;
enable = true;
settings = config.bchmnn.power.tlp.settings;
};

View file

@ -1,38 +0,0 @@
{
pkgs,
lib,
config,
...
}:
{
options.bchmnn = {
printing = {
enable = lib.mkEnableOption "printing";
};
};
config = lib.mkIf config.bchmnn.printing.enable {
services.printing = {
enable = true;
drivers = [ pkgs.mfcl3750cdwcupswrapper ];
};
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
hardware.printers = {
ensurePrinters = [
{
name = "Brother-MFC-L3750CDW-series";
location = "Home";
deviceUri = "dnssd://Brother%20MFC-L3750CDW%20series._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b4220094c09b";
model = "brother_mfcl3750cdw_printer_en.ppd";
}
];
ensureDefaultPrinter = "Brother-MFC-L3750CDW-series";
};
};
}

View file

@ -1,6 +1,4 @@
{
lib,
config,
pkgs,
...
}:
@ -12,12 +10,6 @@ in
enable = true;
};
users.users = lib.mkIf (config.bchmnn.home.enable) {
gandalf = {
shell = pkgs.zsh;
};
};
environment = {
shellAliases = common.aliases;
};

View file

@ -7,26 +7,15 @@
lib.mkIf config.bchmnn.collections.virtualisation.enable {
virtualisation = {
libvirtd.enable = true;
/*
podman = {
enable = true;
# create a `docker` alias for podman, to use it as a drop-in replacement
dockerCompat = true;
# required for containers under podman-compose to be able to talk to each other.
defaultNetwork.settings.dns_enabled = true;
};
*/
docker = {
enable = true;
};
oci-containers = {
backend = "docker";
# backend = "podman";
};
containers = {
enable = true;
};
};
hardware.nvidia-container-toolkit.enable = config.bchmnn.nvidia.enable;
environment.systemPackages = with pkgs; [ virtiofsd ];
}