chore: improve code formatting and configuration across multiple files
CI / Flake check (aarch64-linux) (push) Failing after 17m27s
CI / Flake check (x86_64-linux) (push) Failing after 53m5s
CI / Pre-commit checks (x86_64-linux) (push) Successful in 11s

The diff shows comprehensive code cleanup and formatting improvements across 18 files, including cleaner argument structures, additional package configurations, and improved formatting in the `home/terminal/software/git.nix` hook script.
This commit is contained in:
2026-07-20 06:50:52 +02:00
parent 4ee5658053
commit 62c70dab19
18 changed files with 272 additions and 182 deletions
Generated
+21
View File
@@ -308,11 +308,32 @@
"nixos-24-05": "nixos-24-05", "nixos-24-05": "nixos-24-05",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"rustlock": "rustlock",
"sops-nix": "sops-nix", "sops-nix": "sops-nix",
"systems": "systems_3", "systems": "systems_3",
"zen-browser": "zen-browser" "zen-browser": "zen-browser"
} }
}, },
"rustlock": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1782663473,
"narHash": "sha256-wPpiuL3EVvNb3+9QgRGtopZXbebb9uUs3Slwuigvh8w=",
"owner": "JorySeverijnse",
"repo": "rustlock",
"rev": "76039750623825172fbee93adae8bb48d4ad36ad",
"type": "github"
},
"original": {
"owner": "JorySeverijnse",
"repo": "rustlock",
"type": "github"
}
},
"sops-nix": { "sops-nix": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
+5
View File
@@ -104,6 +104,11 @@
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
rustlock = {
url = "github:JorySeverijnse/rustlock";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-db = { nix-index-db = {
url = "github:Mic92/nix-index-database"; url = "github:Mic92/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
+1 -1
View File
@@ -43,7 +43,7 @@
"Mod+B".spawn._args = ["zen"]; "Mod+B".spawn._args = ["zen"];
"Mod+Return".spawn._args = ["alacritty"]; "Mod+Return".spawn._args = ["alacritty"];
"Mod+Q".close-window = {}; "Mod+Q".close-window = {};
"Mod+Shift+P".spawn._args = ["rofi-powermenu"]; "Mod+Shift+P".spawn._args = ["rustlock" "--screenshots" "--clock" "--effect-blur" "7x5" "--effect-vignette" "0.5:0.5"];
"Mod+S".switch-preset-column-width = {}; "Mod+S".switch-preset-column-width = {};
"Mod+F".fullscreen-window = {}; "Mod+F".fullscreen-window = {};
"Mod+1".set-column-width = "25%"; "Mod+1".set-column-width = "25%";
+8 -8
View File
@@ -22,16 +22,16 @@
-m opencode/north-mini-code-free \ -m opencode/north-mini-code-free \
"You are an expert software engineer writing professional Git commit messages. "You are an expert software engineer writing professional Git commit messages.
Create a clean Conventional Commit for the provided diff. Create a clean Conventional Commit for the provided diff.
Rules: Rules:
- Format: type(optional scope): imperative description - Format: type(optional scope): imperative description
- Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore - Allowed types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
- First line: maximum 72 characters, starts with capital letter, imperative present tense - First line: maximum 72 characters, starts with capital letter, imperative present tense
- If relevant, add a blank line followed by a short body explaining the motivation and key changes - If relevant, add a blank line followed by a short body explaining the motivation and key changes
- Be concise and professional. No emojis, no markdown. - Be concise and professional. No emojis, no markdown.
Output ONLY the commit message. Do not add any extra text, quotes, or explanations." \ Output ONLY the commit message. Do not add any extra text, quotes, or explanations." \
2>/dev/null > "$1" 2>/dev/null > "$1"
# Fallback if generation failed or timed out # Fallback if generation failed or timed out
+27 -6
View File
@@ -1,8 +1,8 @@
{ {
config, config,
inputs,
lib, lib,
pkgs, pkgs,
inputs,
... ...
}: { }: {
imports = [ imports = [
@@ -172,19 +172,40 @@
sops = { sops = {
defaultSopsFile = ./../../secrets/secrets.yaml; defaultSopsFile = ./../../secrets/secrets.yaml;
secrets = { secrets = {
gitea_laptop = { owner = "someone"; group = "users"; mode = "0400"; }; gitea_laptop = {
github_laptop = { owner = "someone"; group = "users"; mode = "0400"; }; owner = "someone";
hetzner_server = { owner = "someone"; group = "users"; mode = "0400"; }; group = "users";
mode = "0400";
};
github_laptop = {
owner = "someone";
group = "users";
mode = "0400";
};
hetzner_server = {
owner = "someone";
group = "users";
mode = "0400";
};
}; };
}; };
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (_self: super: {
cisco-secure-client = super.callPackage ../../pkgs/cisco-secure-client {}; cisco-secure-client = super.callPackage ../../pkgs/cisco-secure-client {};
}) })
]; ];
environment.systemPackages = [pkgs.cryptsetup pkgs.age pkgs.nixd pkgs.apparmor-parser pkgs.xdg-desktop-portal-wlr]; security.pam.services.rustlock.text = "auth include login";
environment.systemPackages = with pkgs; [
cryptsetup
age
nixd
apparmor-parser
xdg-desktop-portal-wlr
inputs.rustlock.packages.${pkgs.stdenv.hostPlatform.system}.default
];
} }
+2 -3
View File
@@ -5,7 +5,6 @@
}: let }: let
# shorten paths # shorten paths
inherit (inputs.nixpkgs.lib) nixosSystem; inherit (inputs.nixpkgs.lib) nixosSystem;
lib = inputs.nixpkgs.lib;
# Server uses its own pinned 24.05 nixpkgs (kept isolated from the laptop's unstable) # Server uses its own pinned 24.05 nixpkgs (kept isolated from the laptop's unstable)
nixosSystem24 = inputs.nixos-24-05.lib.nixosSystem; nixosSystem24 = inputs.nixos-24-05.lib.nixosSystem;
unstablePkgs = import inputs.nixpkgs-unstable {system = "x86_64-linux";}; unstablePkgs = import inputs.nixpkgs-unstable {system = "x86_64-linux";};
@@ -60,7 +59,7 @@ in {
++ sharedModules ++ sharedModules
++ [ ++ [
"${mod}/services/location.nix" "${mod}/services/location.nix"
({ config, ... }: { ({...}: {
boot.loader.limine.bootMode = "uefi"; boot.loader.limine.bootMode = "uefi";
}) })
]; ];
@@ -74,7 +73,7 @@ in {
++ sharedModules ++ sharedModules
++ [ ++ [
"${mod}/services/location.nix" "${mod}/services/location.nix"
({ config, ... }: { ({...}: {
boot.loader.limine.bootMode = "bios"; boot.loader.limine.bootMode = "bios";
boot.loader.limine.biosDevice = "/dev/nvme0n1"; boot.loader.limine.biosDevice = "/dev/nvme0n1";
}) })
+39 -16
View File
@@ -1,8 +1,18 @@
{ lib, stdenv, fetchurl, dpkg, makeWrapper, patchelf {
, coreutils, systemd, glib, zlib, xz, curl, libxml2 lib,
}: stdenv,
fetchurl,
let dpkg,
makeWrapper,
patchelf,
coreutils,
systemd,
glib,
zlib,
xz,
curl,
libxml2,
}: let
version = "5.1.17.3394"; version = "5.1.17.3394";
# libxml2's "out" output has lib/libxml2.so.16 # libxml2's "out" output has lib/libxml2.so.16
libxml2_out = libxml2.out; libxml2_out = libxml2.out;
@@ -10,9 +20,16 @@ let
# System library RPATH for all bundled ELF binaries (cisco's own lib dir is # System library RPATH for all bundled ELF binaries (cisco's own lib dir is
# appended during fixupPhase via $out) # appended during fixupPhase via $out)
sysRpath = lib.makeLibraryPath [ sysRpath = lib.makeLibraryPath [
systemd glib zlib xz stdenv.cc.cc.lib curl libxml2_out systemd
glib
zlib
xz
stdenv.cc.cc.lib
curl
libxml2_out
]; ];
in stdenv.mkDerivation { in
stdenv.mkDerivation {
pname = "cisco-secure-client"; pname = "cisco-secure-client";
inherit version; inherit version;
@@ -21,10 +38,16 @@ in stdenv.mkDerivation {
sha256 = "5c4cafb4694e64cbf041481f5df3d70389399926f8aa2a469d480c0555b58c2c"; sha256 = "5c4cafb4694e64cbf041481f5df3d70389399926f8aa2a469d480c0555b58c2c";
}; };
nativeBuildInputs = [ dpkg makeWrapper patchelf ]; nativeBuildInputs = [dpkg makeWrapper patchelf];
buildInputs = [ buildInputs = [
systemd glib zlib xz stdenv.cc.cc.lib curl libxml2_out systemd
glib
zlib
xz
stdenv.cc.cc.lib
curl
libxml2_out
]; ];
dontStrip = true; dontStrip = true;
@@ -89,18 +112,18 @@ in stdenv.mkDerivation {
# Wrap vpn CLI wrapProgram renames the original to .vpn-wrapped # Wrap vpn CLI wrapProgram renames the original to .vpn-wrapped
wrapProgram "$out/cisco/secureclient/bin/vpn" \ wrapProgram "$out/cisco/secureclient/bin/vpn" \
--prefix LD_LIBRARY_PATH : "$ldPath" \ --prefix LD_LIBRARY_PATH : "$ldPath" \
--prefix PATH : ${lib.makeBinPath [ coreutils ]} --prefix PATH : ${lib.makeBinPath [coreutils]}
# Create $out/bin/ wrappers for all user-facing executables # Create $out/bin/ wrappers for all user-facing executables
mkdir -p "$out/bin" mkdir -p "$out/bin"
makeWrapper "$out/cisco/secureclient/bin/vpn" "$out/bin/vpn" \ makeWrapper "$out/cisco/secureclient/bin/vpn" "$out/bin/vpn" \
--prefix LD_LIBRARY_PATH : "$ldPath" \ --prefix LD_LIBRARY_PATH : "$ldPath" \
--prefix PATH : ${lib.makeBinPath [ coreutils ]} --prefix PATH : ${lib.makeBinPath [coreutils]}
makeWrapper "$out/cisco/secureclient/bin/vpnagentd" "$out/bin/vpnagentd" \ makeWrapper "$out/cisco/secureclient/bin/vpnagentd" "$out/bin/vpnagentd" \
--prefix LD_LIBRARY_PATH : "$ldPath" \ --prefix LD_LIBRARY_PATH : "$ldPath" \
--prefix PATH : ${lib.makeBinPath [ coreutils ]} --prefix PATH : ${lib.makeBinPath [coreutils]}
for cli in acinstallhelper manifesttool_vpn vpndownloader-cli; do for cli in acinstallhelper manifesttool_vpn vpndownloader-cli; do
if [ -f "$out/cisco/secureclient/bin/$cli" ]; then if [ -f "$out/cisco/secureclient/bin/$cli" ]; then
@@ -115,12 +138,12 @@ in stdenv.mkDerivation {
meta = with lib; { meta = with lib; {
description = "Cisco Secure Client (AnyConnect successor) VPN client"; description = "Cisco Secure Client (AnyConnect successor) VPN client";
homepage = "https://www.cisco.com/site/us/en/products/security/secure-client/index.html"; homepage = "https://www.cisco.com/site/us/en/products/security/secure-client/index.html";
sourceProvenance = with sourceTypes; [ binaryNativeCode ]; sourceProvenance = with sourceTypes; [binaryNativeCode];
license = { license = {
name = "Cisco Secure Client EULA proprietary, not redistributable"; name = "Cisco Secure Client EULA proprietary, not redistributable";
url = "https://www.cisco.com/c/en/us/products/security/secure-client/eula.html"; url = "https://www.cisco.com/c/en/us/products/security/secure-client/eula.html";
}; };
platforms = [ "x86_64-linux" ]; platforms = ["x86_64-linux"];
maintainers = [ ]; maintainers = [];
}; };
} }
@@ -22,5 +22,11 @@
../../modules/services/backup.nix ../../modules/services/backup.nix
]; ];
# Only 4GB RAM — limit nix builds to one core at a time to avoid OOM
nix.settings = {
cores = 1;
max-jobs = 1;
};
system.stateVersion = "24.05"; system.stateVersion = "24.05";
} }
+1 -1
View File
@@ -17,7 +17,7 @@
swapDevices = [ swapDevices = [
{ {
device = "/swap"; device = "/swap";
size = 2048; size = 8192;
} }
]; ];
+1 -1
View File
@@ -1 +1 @@
disabled = ["empty_pattern"] disabled = ["empty_pattern", "repeated_keys"]
+5 -3
View File
@@ -1,5 +1,8 @@
{ config, lib, pkgs, ... }: {
config,
lib,
...
}:
# Fingerprint scanner configuration # Fingerprint scanner configuration
# #
# Enable on laptops with a fingerprint reader: # Enable on laptops with a fingerprint reader:
@@ -10,7 +13,6 @@
# hardware.fingerprint.todDriver = pkgs.libfprint-2-tod1-goodix; # hardware.fingerprint.todDriver = pkgs.libfprint-2-tod1-goodix;
# #
# Reference: https://wiki.nixos.org/wiki/Fingerprint_scanner # Reference: https://wiki.nixos.org/wiki/Fingerprint_scanner
let let
cfg = config.hardware.fingerprint; cfg = config.hardware.fingerprint;
in { in {
+14 -9
View File
@@ -1,5 +1,9 @@
{ config, lib, pkgs, self, ... }: {
config,
lib,
pkgs,
...
}:
# Cisco Secure Client (proprietary VPN client, successor to AnyConnect) # Cisco Secure Client (proprietary VPN client, successor to AnyConnect)
# #
# Package: pkgs/cisco-secure-client — fetches the Linux pre-deployment .tgz # Package: pkgs/cisco-secure-client — fetches the Linux pre-deployment .tgz
@@ -11,12 +15,13 @@
# }); # });
# #
# Reference: https://github.com/NixOS/nixpkgs/issues/265443 # Reference: https://github.com/NixOS/nixpkgs/issues/265443
let let
cfg = config.work.cisco; cfg = config.work.cisco;
in { in {
options.work.cisco = { options.work.cisco = {
enable = lib.mkEnableOption "Cisco Secure Client" // { enable =
lib.mkEnableOption "Cisco Secure Client"
// {
default = false; default = false;
}; };
@@ -41,14 +46,14 @@ in {
]; ];
# Load the tun module required by the VPN client # Load the tun module required by the VPN client
boot.kernelModules = [ "tun" ]; boot.kernelModules = ["tun"];
systemd.services.cisco-vpnagentd = { systemd.services.cisco-vpnagentd = {
description = "Cisco Secure Client VPN Agent Daemon"; description = "Cisco Secure Client VPN Agent Daemon";
# vpnagentd daemonizes itself; tracked via PID file. # vpnagentd daemonizes itself; tracked via PID file.
after = [ "network-online.target" "NetworkManager.service" ]; after = ["network-online.target" "NetworkManager.service"];
wants = [ "network-online.target" ]; wants = ["network-online.target"];
wantedBy = [ "multi-user.target" ]; wantedBy = ["multi-user.target"];
serviceConfig = { serviceConfig = {
Type = "forking"; Type = "forking";
@@ -81,7 +86,7 @@ in {
"CAP_CHOWN" "CAP_CHOWN"
"CAP_FOWNER" "CAP_FOWNER"
]; ];
DeviceAllow = [ "/dev/net/tun rw" ]; DeviceAllow = ["/dev/net/tun rw"];
PrivateTmp = true; PrivateTmp = true;
ProtectSystem = "full"; ProtectSystem = "full";
ProtectHome = false; ProtectHome = false;
+1 -1
View File
@@ -1,4 +1,4 @@
{ config, lib, ... }: { {...}: {
imports = [ imports = [
./overlay.nix ./overlay.nix
./cisco.nix ./cisco.nix
+11 -5
View File
@@ -1,5 +1,10 @@
{ config, lib, pkgs, inputs, ... }: {
config,
lib,
pkgs,
inputs,
...
}:
# Himmelblau: Microsoft Entra ID authentication for Linux # Himmelblau: Microsoft Entra ID authentication for Linux
# #
# Authenticates Linux users against the digistate.nl Entra ID tenant. # Authenticates Linux users against the digistate.nl Entra ID tenant.
@@ -14,7 +19,6 @@
# References: # References:
# - https://himmelblau-idm.org/docs/ # - https://himmelblau-idm.org/docs/
# - https://github.com/himmelblau-idm/himmelblau # - https://github.com/himmelblau-idm/himmelblau
let let
cfg = config.work.himmelblau; cfg = config.work.himmelblau;
in { in {
@@ -23,7 +27,9 @@ in {
]; ];
options.work.himmelblau = { options.work.himmelblau = {
enable = lib.mkEnableOption "Himmelblau Entra ID authentication" // { enable =
lib.mkEnableOption "Himmelblau Entra ID authentication"
// {
default = false; default = false;
}; };
}; };
@@ -32,7 +38,7 @@ in {
services.himmelblau = { services.himmelblau = {
enable = true; enable = true;
settings = { settings = {
domain = [ "digistate.nl" ]; domain = ["digistate.nl"];
# Uncomment and set to Entra ID group Object IDs or names to # Uncomment and set to Entra ID group Object IDs or names to
# restrict which users can authenticate: # restrict which users can authenticate:
# pam_allow_groups = [ "ENTRA-GROUP-GUID-HERE" ]; # pam_allow_groups = [ "ENTRA-GROUP-GUID-HERE" ];
+6 -3
View File
@@ -1,10 +1,13 @@
{ config, lib, pkgs, inputs, ... }: {
config,
lib,
inputs,
...
}:
# Microsoft Defender for Endpoint # Microsoft Defender for Endpoint
# #
# References: # References:
# - https://github.com/epetousis/nix-mdatp # - https://github.com/epetousis/nix-mdatp
let let
cfg = config.work.mdatp; cfg = config.work.mdatp;
in { in {
+2 -3
View File
@@ -1,8 +1,7 @@
{ config, lib, pkgs, ... }: {...}: {
{
# Overlay to add cisco-secure-client to pkgs # Overlay to add cisco-secure-client to pkgs
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (_self: super: {
cisco-secure-client = super.callPackage ./pkgs/cisco-secure-client {}; cisco-secure-client = super.callPackage ./pkgs/cisco-secure-client {};
}) })
]; ];