diff --git a/README.md b/README.md new file mode 100644 index 0000000..8cfdf7e --- /dev/null +++ b/README.md @@ -0,0 +1,61 @@ +# NixOS configuration + +The default package set is NixOS 26.05. Home Manager and AAGL use their +matching 26.05 release branches. `drivebystation-nix` uses the standard +`pkgs.linuxPackages` kernel from stable, including matching external modules. + +## Packages from unstable + +`inputs.nixpkgs-unstable` is a separate package set, pinned in `flake.lock`. +Select individual applications explicitly, as with Trilium and JetBrains +Toolbox in the desktop host: + +```nix +unstablePkgs.trilium-desktop +``` + +The host defines `unstablePkgs` by importing the separate input with +`allowUnfree = true`. Use `pkgs.` for stable packages. Unstable +applications retain their own dependencies; the system package set stays on +stable. + +Update the stable inputs and the application exceptions independently: + +```sh +nix flake update nixpkgs home-manager aagl +nix flake update nixpkgs-unstable +``` + +The existing Mutter tearing override remains experimental. Its compatibility +and B580 graphics behavior require testing when changing the desktop stack. + +## Validate and boot + +```sh +nix build .#nixosConfigurations.drivebystation-nix.config.system.build.toplevel --no-link +sudo nixos-rebuild boot --flake .#drivebystation-nix +``` + +Only run the boot command after the build succeeds. Keep the previous working +generation available in the boot menu, then test networking, graphics, and +the webcam loopback after reboot. Git restores configuration sources; booting +the previous generation restores the previous system closure. + +Whole-flake checks currently also evaluate an unfinished WSL host referencing +the disabled `nixos-wsl` input. Validate the desktop target directly until that +separate host configuration is repaired. + +## Migration validation (2026-10-17) + +The complete `drivebystation-nix` system built successfully without activation. +Its closure contains Linux 6.18.56, patched Mutter 50.5, GNOME Shell 50.5, +libdrm 2.4.133, r8125 9.016.01, and v4l2loopback 0.15.3. The explicit unstable +applications are Trilium 0.106.0 and JetBrains Toolbox 3.8.1.88030. + +Nix syntax and Git whitespace checks pass. `nix flake check --no-build` stops +at the existing WSL input error described above. The edited Nix files retain +the repository's existing formatting; `nixpkgs-fmt --check` reports formatting +differences, including on the original flake before migration. + +Boot, networking, B580 graphics, and tearing behavior still require runtime +testing. The migration does not add Intel tearing kernel patches. diff --git a/flake.lock b/flake.lock index fce8aa0..6868496 100644 --- a/flake.lock +++ b/flake.lock @@ -60,15 +60,16 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1787517695, - "narHash": "sha256-Z119G3qLJx22frNHO3/seMs7fCCvxe9NJJRfN4Jadew=", + "lastModified": 1789138195, + "narHash": "sha256-cvK9QXAzcgYYg6WsMSfzSE78QyCbNoRMF25GIZ0pz1s=", "owner": "ezKEa", "repo": "aagl-gtk-on-nix", - "rev": "4bb57072d963aa47f14894383a5560cf290e296a", + "rev": "decd5655d94eec05b6d5beacb9a652f8ca95344e", "type": "github" }, "original": { "owner": "ezKEa", + "ref": "release-26.05", "repo": "aagl-gtk-on-nix", "type": "github" } @@ -159,22 +160,6 @@ } }, "flake-compat_3": { - "flake": false, - "locked": { - "lastModified": 1767039857, - "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", - "owner": "NixOS", - "repo": "flake-compat", - "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-compat_4": { "flake": false, "locked": { "lastModified": 1650374568, @@ -190,24 +175,6 @@ "type": "github" } }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": "nixpkgs-lib" - }, - "locked": { - "lastModified": 1788306937, - "narHash": "sha256-lbrI1UYVpFgKSsyrU9oeF7FHfnu8nLD9ja0ou9f2rxk=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "f16b25b8c3d2809b87925d0b76652d7821a75c68", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, "flake-utils": { "inputs": { "systems": "systems" @@ -309,15 +276,16 @@ ] }, "locked": { - "lastModified": 1788355065, - "narHash": "sha256-gAz5oTI7ur34CfuakQduiQd/2ZhO62Bn2XXg08nZYYQ=", + "lastModified": 1791938526, + "narHash": "sha256-yNYK2pdk3bCtJrpblrNYA6hZKdybWUeyTtx74+OEJFo=", "owner": "nix-community", "repo": "home-manager", - "rev": "d9d750e4fc11c10cab2da677bdd31e427f3a3a71", + "rev": "32904dfe1cf86039f3c8c9f41f94e1cfd76dbb34", "type": "github" }, "original": { "owner": "nix-community", + "ref": "release-26.05", "repo": "home-manager", "type": "github" } @@ -442,39 +410,18 @@ "type": "github" } }, - "nix-cachyos-kernel": { - "inputs": { - "flake-compat": "flake-compat_3", - "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1788379544, - "narHash": "sha256-EMfRomvn1lAErvY/Q3bQL+PwEi+5hbBwI0ZI5SRC/WM=", - "owner": "xddxdd", - "repo": "nix-cachyos-kernel", - "rev": "d1c3cadc796061778cf7f62bdbfaf68cf3c3c654", - "type": "github" - }, - "original": { - "owner": "xddxdd", - "ref": "release", - "repo": "nix-cachyos-kernel", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1788329703, - "narHash": "sha256-fHvRW4JUchuw6QNzQ50BfzeYe0TnjKml1V8PVRjntSI=", + "lastModified": 1791883866, + "narHash": "sha256-yvkDdToRZ4IgPc9tSBzzCYJvTLf8n5eE3rgUkpCuD5A=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "090e478bd64824e2122328df47a7efb74fdaf0c1", + "rev": "a033e66ab94a6bedf2c3d58d93a36319d3cbbbaf", "type": "github" }, "original": { "owner": "NixOS", - "ref": "nixos-unstable-small", + "ref": "nixos-26.05", "repo": "nixpkgs", "type": "github" } @@ -495,28 +442,13 @@ "type": "github" } }, - "nixpkgs-lib": { + "nixpkgs-unstable": { "locked": { - "lastModified": 1788057806, - "narHash": "sha256-DTQSMxzDWmT0zhguthvegnVkn7CFqGCv4IHCzk5ZUpM=", - "owner": "nix-community", - "repo": "nixpkgs.lib", - "rev": "596e2e3940e09b2abbeb03f75fa1828c57fcd72c", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "nixpkgs.lib", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1788179007, - "narHash": "sha256-hn1oU2rue2SYK8dAr8+WNZWtbsz1S2W5mnHlSEuh3bo=", + "lastModified": 1791956154, + "narHash": "sha256-jBYGPi4udQ9uo4KQp9m2J0546nJVQitG15gvZSaVVAs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "34ab99075ac4f7e40cf037eef32cb1c360bb85e9", + "rev": "55bfb4d7437bd4e09ab7cba58a43bd68eb310044", "type": "github" }, "original": { @@ -526,7 +458,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_2": { "locked": { "lastModified": 1789286504, "narHash": "sha256-eiEK7cKZORNEvX0GeF3RtNEF/JXhgf2RqSp3230q13E=", @@ -589,8 +521,8 @@ "home-manager": "home-manager", "lanzaboote": "lanzaboote", "millennium": "millennium", - "nix-cachyos-kernel": "nix-cachyos-kernel", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs", + "nixpkgs-unstable": "nixpkgs-unstable", "simple-wallpaper-engine": "simple-wallpaper-engine", "snowfall-lib": "snowfall-lib", "sops-nix": "sops-nix", @@ -606,11 +538,11 @@ ] }, "locked": { - "lastModified": 1785476452, - "narHash": "sha256-/CXwCFPS41rb/JI2VitKCgVK6V5E6/sfw5ke3B9zyVQ=", + "lastModified": 1785907205, + "narHash": "sha256-Ds1vTi53af4wDMAveSR/K0JnywDslLwmgwhVIiwnNmY=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "6ef009bf4c4873cdc1a621826722bdea7c03e62c", + "rev": "c5cb13481d718fac906aa9cfd85f9b60e1a546cb", "type": "github" }, "original": { @@ -663,7 +595,7 @@ }, "snowfall-lib": { "inputs": { - "flake-compat": "flake-compat_4", + "flake-compat": "flake-compat_3", "flake-utils-plus": "flake-utils-plus", "nixpkgs": [ "nixpkgs" @@ -792,7 +724,7 @@ "glslang-WallpaperEngine": "glslang-WallpaperEngine", "json": "json", "kissfft": "kissfft", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_2", "quickjs": "quickjs", "stb": "stb" }, diff --git a/flake.nix b/flake.nix index ac25191..26555ee 100644 --- a/flake.nix +++ b/flake.nix @@ -3,7 +3,9 @@ inputs = { # nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05"; - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; # Use nixos-unstable for latest kernel and packages + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + # Application exceptions; keep the system and graphics stack on stable. + nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable"; # nixos-wsl = { # url = "github:nix-community/NixOS-WSL/main"; # inputs.nixpkgs.follows = "nixpkgs"; @@ -27,7 +29,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; home-manager = { - url = "github:nix-community/home-manager"; + url = "github:nix-community/home-manager/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; # anikki = { @@ -43,10 +45,9 @@ # inputs.nixpkgs.follows = "nixpkgs"; # }; aagl = { - url = "github:ezKEa/aagl-gtk-on-nix"; + url = "github:ezKEa/aagl-gtk-on-nix/release-26.05"; inputs.nixpkgs.follows = "nixpkgs"; }; - nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; wallpaperengine.url = "path:/home/andreas/Projects/linwallpaap/linux-wallpaperengine"; simple-wallpaper-engine = { url = "github:Maxnights/simple-linux-wallpaperengine-gui"; @@ -100,9 +101,6 @@ src = ./.; overlays = with inputs; [ - # Use the exact kernel versions as defined in this repo. - # Guarantees you have binary cache. - nix-cachyos-kernel.overlays.pinned inputs.millennium.overlays.default ]; diff --git a/systems/x86_64-linux/drivebystation-nix/configuration.nix b/systems/x86_64-linux/drivebystation-nix/configuration.nix index 66eb387..f0d5df6 100644 --- a/systems/x86_64-linux/drivebystation-nix/configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/configuration.nix @@ -15,6 +15,9 @@ ]; + # Use the default kernel maintained by the stable nixpkgs release. + boot.kernelPackages = pkgs.linuxPackages; + # Bootloader. # boot.loader.systemd-boot.enable = true; # managed by lanzaboote boot.loader.efi.canTouchEfiVariables = true; @@ -266,7 +269,7 @@ services.mullvad-vpn = { enable = true; - gui.enable = true; + package = pkgs.mullvad-vpn; }; fonts = { diff --git a/systems/x86_64-linux/drivebystation-nix/default.nix b/systems/x86_64-linux/drivebystation-nix/default.nix index 0baa5f8..eae78b2 100644 --- a/systems/x86_64-linux/drivebystation-nix/default.nix +++ b/systems/x86_64-linux/drivebystation-nix/default.nix @@ -29,6 +29,11 @@ let # inherit (lib.my-namespace) systemPackages; inherit pkgs; installedPackages = lib.my-namespace.mkPackages pkgs; + # Explicit application exceptions; all other packages use stable pkgs. + unstablePkgs = import inputs.nixpkgs-unstable { + system = pkgs.stdenv.hostPlatform.system; + config.allowUnfree = true; + }; in { # inherit system; @@ -87,7 +92,7 @@ in spotify appimage-run prismlauncher #replaces broken minecraft package - trilium-desktop + unstablePkgs.trilium-desktop terraform virt-manager nil @@ -170,7 +175,7 @@ in my-namespace.cs-demo-manager vscode-modernized zed-editor - jetbrains-toolbox + unstablePkgs.jetbrains-toolbox (pkgs.writeShellScriptBin "switch-to-desktop" '' #!/bin/sh diff --git a/systems/x86_64-linux/drivebystation-nix/hardware/hardware-configuration.nix b/systems/x86_64-linux/drivebystation-nix/hardware/hardware-configuration.nix index 0d8b85f..d6f6ada 100644 --- a/systems/x86_64-linux/drivebystation-nix/hardware/hardware-configuration.nix +++ b/systems/x86_64-linux/drivebystation-nix/hardware/hardware-configuration.nix @@ -14,11 +14,7 @@ ./acer-monitor-edid.nix ./samsung-monitor-edid.nix ]; - # boot.kernelPackages = pkgs.linuxPackages_latest; - boot.kernelPackages = pkgs.cachyosKernels.linuxPackages-cachyos-latest; hardware.enableRedistributableFirmware = true; - # boot.kernelPackages = pkgs.linuxKernel.packages.linux_xanmod_latest; - # boot.kernelPackages = pkgs.linuxPackages; boot.loader.efi.canTouchEfiVariables = true; boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.kernelModules = [ "kvm-amd" "r8125" "4vl2loopback" ];