Make home manager stable
This commit is contained in:
41
nix/flake.lock
generated
41
nix/flake.lock
generated
@@ -37,19 +37,41 @@
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
"nixpkgs-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1770586272,
|
||||
"narHash": "sha256-Ucci8mu8QfxwzyfER2DQDbvW9t1BnTUJhBmY7ybralo=",
|
||||
"lastModified": 1770260404,
|
||||
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "b1f916ba052341edc1f80d4b2399f1092a4873ca",
|
||||
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager-wsl": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs-wsl-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1763992789,
|
||||
"narHash": "sha256-WHkdBlw6oyxXIra/vQPYLtqY+3G8dUVZM8bEXk0t8x4=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "44831a7eaba4360fb81f2acc5ea6de5fde90aaa3",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-25.05",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
@@ -78,7 +100,7 @@
|
||||
"inputs": {
|
||||
"flake-compat": "flake-compat",
|
||||
"nixpkgs": [
|
||||
"nixpkgs-work-stable"
|
||||
"nixpkgs-wsl-stable"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
@@ -111,7 +133,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-home-stable": {
|
||||
"nixpkgs-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1770464364,
|
||||
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
|
||||
@@ -127,7 +149,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs-work-stable": {
|
||||
"nixpkgs-wsl-stable": {
|
||||
"locked": {
|
||||
"lastModified": 1767313136,
|
||||
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
||||
@@ -146,11 +168,12 @@
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"home-manager-wsl": "home-manager-wsl",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixos-wsl": "nixos-wsl",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-home-stable": "nixpkgs-home-stable",
|
||||
"nixpkgs-work-stable": "nixpkgs-work-stable",
|
||||
"nixpkgs-stable": "nixpkgs-stable",
|
||||
"nixpkgs-wsl-stable": "nixpkgs-wsl-stable",
|
||||
"sops-nix": "sops-nix",
|
||||
"tasksquire": "tasksquire"
|
||||
}
|
||||
|
||||
@@ -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 ];
|
||||
|
||||
@@ -11,4 +11,7 @@
|
||||
|
||||
# Home Manager release version
|
||||
home.stateVersion = "25.05";
|
||||
|
||||
# Disable version mismatch warning (intentionally using HM 25.11 with nixpkgs 25.05)
|
||||
home.enableNixpkgsReleaseCheck = false;
|
||||
}
|
||||
@@ -18,7 +18,7 @@
|
||||
# Language servers
|
||||
yaml-language-server
|
||||
marksman
|
||||
dockerfile-language-server
|
||||
pkgs.unstable.dockerfile-language-server # Use unstable for latest LSP features
|
||||
|
||||
# Secrets management
|
||||
sops
|
||||
|
||||
@@ -43,10 +43,10 @@ in
|
||||
|
||||
(lib.mkIf cfg.enable {
|
||||
home.packages =
|
||||
(lib.optional cfg.claude-code.enable pkgs.claude-code) ++
|
||||
(lib.optional cfg.opencode.enable pkgs.opencode) ++
|
||||
(lib.optional cfg.gemini-cli.enable pkgs.gemini-cli) ++
|
||||
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.bubblewrap);
|
||||
(lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++
|
||||
(lib.optional cfg.opencode.enable pkgs.unstable.opencode) ++
|
||||
(lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++
|
||||
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);
|
||||
})
|
||||
];
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
{ config, pkgs, ... }:
|
||||
{ config, pkgs, lib, ... }:
|
||||
|
||||
{
|
||||
programs.git = {
|
||||
@@ -59,6 +59,7 @@
|
||||
];
|
||||
};
|
||||
|
||||
# Difftastic - modern diff tool
|
||||
programs.difftastic = {
|
||||
enable = true;
|
||||
git.enable = true;
|
||||
|
||||
@@ -71,7 +71,9 @@
|
||||
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
||||
];
|
||||
|
||||
initLua = builtins.concatStringsSep "\n" [
|
||||
# Use extraLuaConfig for home-manager 25.11 compatibility
|
||||
# (initLua was renamed from extraLuaConfig in later versions)
|
||||
extraLuaConfig = builtins.concatStringsSep "\n" [
|
||||
(lib.strings.fileContents ../../../nvim/base.lua)
|
||||
(lib.strings.fileContents ../../../nvim/keymaps.lua)
|
||||
(lib.strings.fileContents ../../../nvim/plugins.lua)
|
||||
|
||||
13
nix/modules/overlays/unstable.nix
Normal file
13
nix/modules/overlays/unstable.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
# Overlay to provide unstable packages under pkgs.unstable.* namespace
|
||||
# This allows using stable packages by default while selectively using
|
||||
# unstable versions for specific packages (e.g., LLM development tools)
|
||||
#
|
||||
# Usage: Pass nixpkgs input when applying overlay:
|
||||
# overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
||||
|
||||
nixpkgs: final: prev: {
|
||||
unstable = import nixpkgs {
|
||||
inherit (prev) system;
|
||||
config.allowUnfree = true;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user