[NixOS] A ton of stuff

This commit is contained in:
2025-12-19 15:03:12 -08:00
parent b2230c993a
commit f79e7a527c
6 changed files with 142 additions and 72 deletions

View File

@@ -16,7 +16,6 @@ makeEnable config "myModules.code" true {
github-mcp-server
gitea-mcp-server
playwright-mcp
mcp-language-server
# C
clang

104
nixos/flake.lock generated
View File

@@ -125,11 +125,11 @@
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1761588595,
"narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=",
"lastModified": 1765121682,
"narHash": "sha256-4VBOP18BFeiPkyhy9o4ssBNQEvfvv1kXkasAYd0+rrA=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5",
"rev": "65f23138d8d09a92e30f1e5c87611b23ef451bf3",
"type": "github"
},
"original": {
@@ -1102,11 +1102,11 @@
]
},
"locked": {
"lastModified": 1764304195,
"narHash": "sha256-bO7FN/bF6gG7TlZpKAZjO3VvfsLaPFkefeUfJJ7F/7w=",
"lastModified": 1765980955,
"narHash": "sha256-rB45jv4uwC90vM9UZ70plfvY/2Kdygs+zlQ07dGQFk4=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "86ff0ef506c209bb397849706e85cc3a913cb577",
"rev": "89c9508bbe9b40d36b3dc206c2483ef176f15173",
"type": "github"
},
"original": {
@@ -1237,11 +1237,11 @@
"nixpkgs-regression": "nixpkgs-regression"
},
"locked": {
"lastModified": 1764297209,
"narHash": "sha256-Cw6wMDlFXOZp8mjaJ8wDh1ZAwCMC8n7nrV3cPyggbAc=",
"lastModified": 1766109967,
"narHash": "sha256-+g7NKESoxqTSMu0JS+Jqswe0/Wb1SfWPGJQ/WimXV1Q=",
"owner": "NixOS",
"repo": "nix",
"rev": "048a58d331184cc399a00c5f2135e63fa5751c3f",
"rev": "f1f99b65982b319b13e653e1eadb9adcbeed08b9",
"type": "github"
},
"original": {
@@ -1256,11 +1256,11 @@
"nixpkgs": "nixpkgs_7"
},
"locked": {
"lastModified": 1761469061,
"narHash": "sha256-JeYQuRLnMJkO+i1J2Zx80r+zjA1C59vJvuRlBUjAIqM=",
"lastModified": 1765760526,
"narHash": "sha256-568coDEa/sXmxeXR5FWNpCnLUcAofJL7tjjrnVsKu3I=",
"owner": "nixified-ai",
"repo": "flake",
"rev": "b35ad969edb807534c22e428044b30762aa0dc08",
"rev": "13a6cdbec0dd778685282b469e39669db85ce140",
"type": "github"
},
"original": {
@@ -1291,11 +1291,11 @@
"nixpkgs": "nixpkgs_8"
},
"locked": {
"lastModified": 1764072830,
"narHash": "sha256-ezkjlUCohD9o9c47Ey0/I4CamSS0QEORTqGvyGqMud0=",
"lastModified": 1765841014,
"narHash": "sha256-55V0AJ36V5Egh4kMhWtDh117eE3GOjwq5LhwxDn9eHg=",
"owner": "nix-community",
"repo": "NixOS-WSL",
"rev": "c7832dd786175e20f2697179e0e03efadffe4201",
"rev": "be4af8042e7a61fa12fda58fe9a3b3babdefe17b",
"type": "github"
},
"original": {
@@ -1526,18 +1526,15 @@
},
"nixpkgs_6": {
"locked": {
"lastModified": 1761597516,
"narHash": "sha256-wxX7u6D2rpkJLWkZ2E932SIvDJW8+ON/0Yy8+a5vsDU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "daf6dc47aa4b44791372d6139ab7b25269184d55",
"type": "github"
"lastModified": 1763948260,
"narHash": "sha256-zZk7fn2ARAqmLwaYTpxBJmj81KIdz11NiWt7ydHHD/M=",
"rev": "1c8ba8d3f7634acac4a2094eef7c32ad9106532c",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/25.05/nixos-25.05.813095.1c8ba8d3f763/nixexprs.tar.xz"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"repo": "nixpkgs",
"type": "github"
"type": "tarball",
"url": "https://channels.nixos.org/nixos-25.05/nixexprs.tar.xz"
}
},
"nixpkgs_7": {
@@ -1558,11 +1555,11 @@
},
"nixpkgs_8": {
"locked": {
"lastModified": 1763678758,
"narHash": "sha256-+hBiJ+kG5IoffUOdlANKFflTT5nO3FrrR2CA3178Y5s=",
"lastModified": 1765472234,
"narHash": "sha256-9VvC20PJPsleGMewwcWYKGzDIyjckEz8uWmT0vCDYK0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "117cc7f94e8072499b0a7aa4c52084fa4e11cc9b",
"rev": "2fbfb1d73d239d2402a8fe03963e37aab15abe8b",
"type": "github"
},
"original": {
@@ -1574,11 +1571,11 @@
},
"nixpkgs_9": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"lastModified": 1765779637,
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
"type": "github"
},
"original": {
@@ -1596,11 +1593,11 @@
"osx-kvm": "osx-kvm"
},
"locked": {
"lastModified": 1763116921,
"narHash": "sha256-3VVTu6U8/VWXbjI9yYkQsDF5593qxQptJu6p43mSfYM=",
"lastModified": 1764686341,
"narHash": "sha256-CnvesUXyktZygnHURa4bk9eCxNAI/Am9Y/b6vBNhS/A=",
"owner": "matthewcroughan",
"repo": "nixtheplanet",
"rev": "34afe2e9964181c9342095dbbdb330f92243786d",
"rev": "0c0e433fa01789d33a191adb0533a6bca817383f",
"type": "github"
},
"original": {
@@ -1727,11 +1724,11 @@
"nixpkgs": "nixpkgs_13"
},
"locked": {
"lastModified": 1760979580,
"narHash": "sha256-WkBoaVS+QyzkmtLsW8QDHyJ5ibYq9pFocM6p/o9ewPY=",
"lastModified": 1765249330,
"narHash": "sha256-6805Vrau1Kl04DiMnwczAS+soq9he7/CHMojs5wF9k8=",
"ref": "refs/heads/master",
"rev": "ad681a129e7e133c2a6d0e6acc217bc9df009840",
"revCount": 134,
"rev": "de0d81084b486c6d1bd8a61adaabb42bfe9ba997",
"revCount": 137,
"type": "git",
"url": "ssh://gitea@dev.railbird.ai:1123/railbird/secrets-flake.git"
},
@@ -2042,17 +2039,18 @@
]
},
"locked": {
"lastModified": 1764319014,
"narHash": "sha256-OM69cuN5IIIkEy7UUDSsgkwzIvOnWvzYm/F1+ptpMjA=",
"ref": "refs/heads/bump-flake-dependencies",
"rev": "a7a7e620da2d9b51a6b841bbaf763ac1313e7d4e",
"revCount": 1617,
"type": "git",
"url": "file:./taffybar"
"lastModified": 1760591109,
"narHash": "sha256-O21ayp5v2eccXdcwNjTK5ZB99ruK0Zt9CUaw5Rye42g=",
"owner": "taffybar",
"repo": "taffybar",
"rev": "b256a711416036ca124fc9b3f89e7c957535e465",
"type": "github"
},
"original": {
"type": "git",
"url": "file:./taffybar"
"owner": "taffybar",
"ref": "master",
"repo": "taffybar",
"type": "github"
}
},
"taffybar_2": {
@@ -2117,11 +2115,11 @@
},
"unstable_3": {
"locked": {
"lastModified": 1764242076,
"narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=",
"lastModified": 1765779637,
"narHash": "sha256-KJ2wa/BLSrTqDjbfyNx70ov/HdgNBCBBSQP3BIzKnv4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4",
"rev": "1306659b587dc277866c7b69eb97e5f07864d8c4",
"type": "github"
},
"original": {
@@ -2270,11 +2268,11 @@
"unstable": "unstable_3"
},
"locked": {
"lastModified": 1763949843,
"narHash": "sha256-aJXmGPWKjXs7cagVzUE3fd2Fpc+sXnknM446AxHgvH0=",
"lastModified": 1765612933,
"narHash": "sha256-JWI46deXUQhyUF8pfeJuLZS2PUF5yXnwKg5J3nQJ3ag=",
"owner": "xmonad",
"repo": "xmonad",
"rev": "97edef37a3ae10012272d692b5e1bc9b7013fc14",
"rev": "dd4145d84151c22d8f0a7cf1dbf3508efe1b27b2",
"type": "github"
},
"original": {

View File

@@ -129,18 +129,20 @@
}: let
# Nixpkgs PR patches - just specify PR number and hash
nixpkgsPRPatches = [
# codex
{
pr = 433540; # Rumno service PR
hash = "sha256-CC1fyR2hjEgKjtsm6t9ZrYFG+ebYs5vjapZ3g5IaPvg=";
pr = 471196;
hash = "sha256-ga72k+HHFWBh32E5TyUgXgAQNaIlT6gTunHJtlLT8bM=";
}
{
pr = 472157;
hash = "sha256-UU6TtoNXb2UpRPXrW4jLhfcNyvf4yCR0bvf9O/1j7gY=";
}
## end codex
{
pr = 434160; # git-sync-rs package
hash = "sha256-zjzjmC1XJmwfHr/YXFyYsqUFR5MHSoxWWyxIR35YNbM=";
}
{
pr = 436061;
hash = "sha256-HZquaNBB+w5Hm5kdzvaGg7QAOgAf/EPBO7o7pKkIrMY=";
}
# claude-code
# {
# pr = 464698;
@@ -153,23 +155,51 @@
];
# Custom patches that don't fit the PR template
customPatches = [
nixpkgsCustomPatches = [
{
url = "https://github.com/colonelpanic8/nixpkgs/commit/e1fc6c25b91d3d49dd02a156237721f12dbd86b2.patch";
hash = "sha256-cKXudynZcZno5xGo7M0J9jl7ABUjZgDyhNhXrn8nBPY=";
}
];
# Convert PR patches to full patch format
prPatchesToPatches = prPatches:
# Home-manager PR patches - just specify PR number and hash
homeManagerPRPatches = [
# Example:
# {
# pr = 1234;
# hash = "sha256-...";
# }
];
# Custom home-manager patches that don't fit the PR template
homeManagerCustomPatches = [
{
url = "https://github.com/colonelpanic8/home-manager/commit/92f4b7aa5254f8bcddc9ef86e04ea5314410d10b.patch";
hash = "sha256-RQl5daVpCqQi05l9QfTEz2PpQxmsv/HYnXrgXbqbwWk=";
}
];
# Convert PR patches to full patch format for nixpkgs
nixpkgsPrPatchesToPatches = prPatches:
map (p: {
url = "https://patch-diff.githubusercontent.com/raw/NixOS/nixpkgs/pull/${toString p.pr}.patch";
hash = p.hash;
})
prPatches;
# Combine all patches
allPatches = (prPatchesToPatches nixpkgsPRPatches) ++ customPatches;
# Convert PR patches to full patch format for home-manager
homeManagerPrPatchesToPatches = prPatches:
map (p: {
url = "https://patch-diff.githubusercontent.com/raw/nix-community/home-manager/pull/${toString p.pr}.patch";
hash = p.hash;
})
prPatches;
# Combine all nixpkgs patches
allNixpkgsPatches = (nixpkgsPrPatchesToPatches nixpkgsPRPatches) ++ nixpkgsCustomPatches;
# Combine all home-manager patches
allHomeManagerPatches = (homeManagerPrPatchesToPatches homeManagerPRPatches) ++ homeManagerCustomPatches;
machinesFilepath = ./machines;
machineFilenames = builtins.attrNames (builtins.readDir machinesFilepath);
@@ -212,25 +242,57 @@
patchedSource = bootstrapPkgs.applyPatches {
name = "nixpkgs-patched";
src = nixpkgs;
patches = map bootstrapPkgs.fetchpatch allPatches;
patches = map bootstrapPkgs.fetchpatch allNixpkgsPatches;
prePatch = ''
mkdir -p pkgs/by-name/an/antigravity
'';
};
# Get eval-config from patched source
evalConfig = import "${patchedSource}/nixos/lib/eval-config.nix";
# Apply patches to home-manager source (only if there are patches)
patchedHomeManagerSource =
if allHomeManagerPatches == []
then home-manager
else
bootstrapPkgs.applyPatches {
name = "home-manager-patched";
src = home-manager;
patches = map bootstrapPkgs.fetchpatch allHomeManagerPatches;
};
# Import the patched home-manager flake
patchedHomeManager =
if allHomeManagerPatches == []
then home-manager
else import "${patchedHomeManagerSource}/flake.nix";
# Get the NixOS module from the patched source
patchedHomeManagerModule =
if allHomeManagerPatches == []
then home-manager.nixosModules.home-manager
else import "${patchedHomeManagerSource}/nixos";
# Create a modified inputs with patched home-manager
patchedInputs = inputs // {
home-manager = inputs.home-manager // {
nixosModules = inputs.home-manager.nixosModules // {
home-manager = patchedHomeManagerModule;
};
# Also provide the patched source path for any direct imports
outPath = patchedHomeManagerSource.outPath or "${patchedHomeManagerSource}";
};
};
in
evalConfig {
inherit system;
modules = baseModules ++ modules;
specialArgs =
rec {
inherit inputs machineNames;
inputs = patchedInputs;
inherit machineNames;
makeEnable = (import ./make-enable.nix) nixpkgs.lib;
keys = import ./keys.nix;
usersInfo = (import ./users.nix) {
pkgs = {zsh = "zsh";};
inherit keys inputs system;
inherit keys system;
inputs = patchedInputs;
};
realUsers = (
builtins.attrNames

View File

@@ -6,7 +6,6 @@
inputs.nixos-hardware.nixosModules.asus-rog-strix-g834jzr
];
hardware.nvidia.open = true;
myModules.base.enable = true;
myModules.desktop.enable = true;
myModules.xmonad.enable = true;
@@ -49,6 +48,8 @@
services.xserver.dpi = 96;
boot.kernelPackages = pkgs.linuxPackages_latest;
# See https://github.com/NixOS/nixpkgs/issues/467814 for why this was needed
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta;
boot.initrd.availableKernelModules = [ "vmd" "xhci_pci" "thunderbolt" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ "nvidia" "nvidia_drm" "nvidia_uvm" "nvidia_modeset" ];
boot.kernelModules = [ "kvm-intel" ];

View File

@@ -16,8 +16,8 @@ makeEnable config "myModules.nvidia" false {
};
hardware.nvidia.open = true;
hardware.graphics.enable32Bit = true;
hardware.graphics.extraPackages = [ config.boot.kernelPackages.nvidia_x11.out ];
hardware.graphics.extraPackages32 = [ config.boot.kernelPackages.nvidia_x11.lib32 ];
hardware.graphics.extraPackages = [ config.hardware.nvidia.package.out ];
hardware.graphics.extraPackages32 = [ config.hardware.nvidia.package.lib32 ];
services.xserver = {
videoDrivers = [ "nvidia" ];
};

View File

@@ -53,12 +53,22 @@ makeEnable config "myModules.xmonad" true {
services.network-manager-applet.enable = true;
# Disable the XDG autostart for nm-applet since we're managing it via systemd.
# The XDG autostart races with the systemd service and doesn't use --indicator.
xdg.configFile."autostart/nm-applet.desktop".text = ''
[Desktop Entry]
Hidden=true
'';
services.udiskie = {
enable = true;
tray = "always";
};
services.status-notifier-watcher.enable = true;
services.status-notifier-watcher = {
enable = true;
flags = ["--log-level" "DEBUG"];
};
services.autorandr.enable = true;