From 95dd2b7e5f135510923a9567445127d90984560d Mon Sep 17 00:00:00 2001 From: Martin Pander Date: Mon, 9 Feb 2026 12:17:34 +0100 Subject: [PATCH] Use stable nixos --- nix/flake.lock | 60 ++++++++++++++++++++++++++++++--------- nix/flake.nix | 77 ++++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 109 insertions(+), 28 deletions(-) diff --git a/nix/flake.lock b/nix/flake.lock index e570e0b..171456c 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -41,11 +41,11 @@ ] }, "locked": { - "lastModified": 1770318660, - "narHash": "sha256-yFVde8QZK7Dc0Xa8eQDsmxLX4NJNfL1NKfctSyiQgMY=", + "lastModified": 1770586272, + "narHash": "sha256-Ucci8mu8QfxwzyfER2DQDbvW9t1BnTUJhBmY7ybralo=", "owner": "nix-community", "repo": "home-manager", - "rev": "471e6a065f9efed51488d7c51a9abbd387df91b8", + "rev": "b1f916ba052341edc1f80d4b2399f1092a4873ca", "type": "github" }, "original": { @@ -78,15 +78,15 @@ "inputs": { "flake-compat": "flake-compat", "nixpkgs": [ - "nixpkgs" + "nixpkgs-work-stable" ] }, "locked": { - "lastModified": 1769217863, - "narHash": "sha256-RY9kJDXD6+2Td/59LkZ0PFSereCXHdBX9wIkbYjRKCY=", + "lastModified": 1770494267, + "narHash": "sha256-LBKeSntmhCBj0tHFVFGfT4+KBmKi57gAnr240/F1Qkc=", "owner": "nix-community", "repo": "NixOS-WSL", - "rev": "38a5250e57f583662eac3b944830e4b9e169e965", + "rev": "843582709028607bf112d7cdc99af825e224a29b", "type": "github" }, "original": { @@ -97,11 +97,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770197578, - "narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", + "lastModified": 1770562336, + "narHash": "sha256-ub1gpAONMFsT/GU2hV6ZWJjur8rJ6kKxdm9IlCT0j84=", "owner": "nixos", "repo": "nixpkgs", - "rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", + "rev": "d6c71932130818840fc8fe9509cf50be8c64634f", "type": "github" }, "original": { @@ -111,12 +111,46 @@ "type": "github" } }, + "nixpkgs-home-stable": { + "locked": { + "lastModified": 1770464364, + "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.11", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-work-stable": { + "locked": { + "lastModified": 1767313136, + "narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-25.05", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nix-darwin": "nix-darwin", "nixos-wsl": "nixos-wsl", "nixpkgs": "nixpkgs", + "nixpkgs-home-stable": "nixpkgs-home-stable", + "nixpkgs-work-stable": "nixpkgs-work-stable", "sops-nix": "sops-nix", "tasksquire": "tasksquire" } @@ -128,11 +162,11 @@ ] }, "locked": { - "lastModified": 1770145881, - "narHash": "sha256-ktjWTq+D5MTXQcL9N6cDZXUf9kX8JBLLBLT0ZyOTSYY=", + "lastModified": 1770526836, + "narHash": "sha256-xbvX5Ik+0inJcLJtJ/AajAt7xCk6FOCrm5ogpwwvVDg=", "owner": "Mic92", "repo": "sops-nix", - "rev": "17eea6f3816ba6568b8c81db8a4e6ca438b30b7c", + "rev": "d6e0e666048a5395d6ea4283143b7c9ac704720d", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index 0be297f..de3fc74 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -2,11 +2,18 @@ description = "Unified Nix Configuration"; inputs = { + # Unstable for home-manager nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + # Stable for home system (aarch64 server) + nixpkgs-home-stable.url = "github:nixos/nixpkgs/nixos-25.11"; + + # Stable for work system (WSL) + nixpkgs-work-stable.url = "github:nixos/nixpkgs/nixos-25.05"; + nixos-wsl = { url = "github:nix-community/NixOS-WSL"; - inputs.nixpkgs.follows = "nixpkgs"; + inputs.nixpkgs.follows = "nixpkgs-work-stable"; }; home-manager = { @@ -30,7 +37,7 @@ }; }; - outputs = { self, nixpkgs, nixos-wsl, home-manager, nix-darwin, sops-nix, ... }@inputs: + outputs = { self, nixpkgs, nixpkgs-home-stable, nixpkgs-work-stable, nixos-wsl, home-manager, nix-darwin, sops-nix, ... }@inputs: let linuxSystem = "x86_64-linux"; linuxAarchSystem = "aarch64-linux"; @@ -46,33 +53,67 @@ nixosConfigurations = { # Work WSL - work = nixpkgs.lib.nixosSystem { + work = nixpkgs-work-stable.lib.nixosSystem { system = linuxSystem; - specialArgs = { inherit self inputs; }; + specialArgs = { + inherit self inputs; + # Provide both stable and unstable pkgs + pkgs-stable = import nixpkgs-work-stable { + system = linuxSystem; + config.allowUnfree = true; + }; + pkgs-unstable = import nixpkgs { + system = linuxSystem; + config.allowUnfree = true; + }; + }; modules = [ nixos-wsl.nixosModules.wsl ./hosts/work/nixos/configuration.nix home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit self inputs; }; + home-manager.useGlobalPkgs = false; + home-manager.useUserPackages = false; + home-manager.extraSpecialArgs = { + inherit self inputs; + pkgs = import nixpkgs { + system = linuxSystem; + config.allowUnfree = true; + }; + }; home-manager.users.pan = import ./hosts/work/nixos/home.nix; } ]; }; # Home - home = nixpkgs.lib.nixosSystem { + home = nixpkgs-home-stable.lib.nixosSystem { system = linuxAarchSystem; - specialArgs = { inherit self inputs; }; + specialArgs = { + inherit self inputs; + # Provide both stable and unstable pkgs + pkgs-stable = import nixpkgs-home-stable { + system = linuxAarchSystem; + config.allowUnfree = true; + }; + pkgs-unstable = import nixpkgs { + system = linuxAarchSystem; + config.allowUnfree = true; + }; + }; modules = [ ./hosts/home/nixos/configuration.nix home-manager.nixosModules.home-manager { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.extraSpecialArgs = { inherit self inputs; }; + home-manager.useGlobalPkgs = false; + home-manager.useUserPackages = false; + home-manager.extraSpecialArgs = { + inherit self inputs; + pkgs = import nixpkgs { + system = linuxAarchSystem; + config.allowUnfree = true; + }; + }; home-manager.users.martin = import ./hosts/home/nixos/home.nix; } ]; @@ -87,15 +128,21 @@ }; # --- Standalone Home Manager --- - homeConfigurations = { + homeConfigurations = { "pan@work" = home-manager.lib.homeManagerConfiguration { - pkgs = pkgsLinux; + pkgs = import nixpkgs { + system = linuxSystem; + config.allowUnfree = true; + }; extraSpecialArgs = { inherit self inputs; }; modules = [ ./hosts/work/nix/home.nix ]; }; "martin@mac" = home-manager.lib.homeManagerConfiguration { - pkgs = pkgsDarwin; + pkgs = import nixpkgs { + system = darwinSystem; + config.allowUnfree = true; + }; extraSpecialArgs = { inherit self inputs; }; modules = [ ./hosts/home/nix/home.nix ]; };