Make home manager stable

This commit is contained in:
Martin Pander
2026-02-09 13:07:01 +01:00
parent 95dd2b7e5f
commit 05c7d3443a
8 changed files with 82 additions and 48 deletions

View File

@@ -2,23 +2,26 @@
description = "Unified Nix Configuration";
inputs = {
# Unstable for home-manager
# Unstable for standalone configurations and overlays
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# Stable for home system (aarch64 server)
nixpkgs-home-stable.url = "github:nixos/nixpkgs/nixos-25.11";
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
# Stable for work system (WSL)
nixpkgs-work-stable.url = "github:nixos/nixpkgs/nixos-25.05";
nixpkgs-wsl-stable.url = "github:nixos/nixpkgs/nixos-25.05";
nixos-wsl = {
url = "github:nix-community/NixOS-WSL";
inputs.nixpkgs.follows = "nixpkgs-work-stable";
inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs-stable";
};
home-manager-wsl = {
url = "github:nix-community/home-manager/release-25.05";
inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
};
nix-darwin = {
@@ -37,7 +40,7 @@
};
};
outputs = { self, nixpkgs, nixpkgs-home-stable, nixpkgs-work-stable, nixos-wsl, home-manager, nix-darwin, sops-nix, ... }@inputs:
outputs = { self, nixpkgs, nixpkgs-stable, nixpkgs-wsl-stable, nixos-wsl, home-manager, home-manager-wsl, nix-darwin, sops-nix, ... }@inputs:
let
linuxSystem = "x86_64-linux";
linuxAarchSystem = "aarch64-linux";
@@ -53,20 +56,9 @@
nixosConfigurations = {
# Work WSL
work = nixpkgs-work-stable.lib.nixosSystem {
work = nixpkgs-wsl-stable.lib.nixosSystem {
system = linuxSystem;
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;
};
};
specialArgs = { inherit self inputs; };
modules = [
nixos-wsl.nixosModules.wsl
./hosts/work/nixos/configuration.nix
@@ -76,9 +68,10 @@
home-manager.useUserPackages = false;
home-manager.extraSpecialArgs = {
inherit self inputs;
pkgs = import nixpkgs {
pkgs = import nixpkgs-wsl-stable {
system = linuxSystem;
config.allowUnfree = true;
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
};
};
home-manager.users.pan = import ./hosts/work/nixos/home.nix;
@@ -87,16 +80,12 @@
};
# Home
home = nixpkgs-home-stable.lib.nixosSystem {
home = nixpkgs-stable.lib.nixosSystem {
system = linuxAarchSystem;
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 {
pkgs = import nixpkgs-stable {
system = linuxAarchSystem;
config.allowUnfree = true;
};
@@ -109,9 +98,10 @@
home-manager.useUserPackages = false;
home-manager.extraSpecialArgs = {
inherit self inputs;
pkgs = import nixpkgs {
pkgs = import nixpkgs-stable {
system = linuxAarchSystem;
config.allowUnfree = true;
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
};
};
home-manager.users.martin = import ./hosts/home/nixos/home.nix;
@@ -130,18 +120,20 @@
# --- Standalone Home Manager ---
homeConfigurations = {
"pan@work" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
pkgs = import nixpkgs-stable {
system = linuxSystem;
config.allowUnfree = true;
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
};
extraSpecialArgs = { inherit self inputs; };
modules = [ ./hosts/work/nix/home.nix ];
};
"martin@mac" = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
pkgs = import nixpkgs-stable {
system = darwinSystem;
config.allowUnfree = true;
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
};
extraSpecialArgs = { inherit self inputs; };
modules = [ ./hosts/home/nix/home.nix ];