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": {
|
"home-manager": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs-stable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770586272,
|
"lastModified": 1770260404,
|
||||||
"narHash": "sha256-Ucci8mu8QfxwzyfER2DQDbvW9t1BnTUJhBmY7ybralo=",
|
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "b1f916ba052341edc1f80d4b2399f1092a4873ca",
|
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nix-community",
|
"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",
|
"repo": "home-manager",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
@@ -78,7 +100,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs-work-stable"
|
"nixpkgs-wsl-stable"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
@@ -111,7 +133,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-home-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1770464364,
|
"lastModified": 1770464364,
|
||||||
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
|
"narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=",
|
||||||
@@ -127,7 +149,7 @@
|
|||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-work-stable": {
|
"nixpkgs-wsl-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1767313136,
|
"lastModified": 1767313136,
|
||||||
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
|
||||||
@@ -146,11 +168,12 @@
|
|||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"home-manager-wsl": "home-manager-wsl",
|
||||||
"nix-darwin": "nix-darwin",
|
"nix-darwin": "nix-darwin",
|
||||||
"nixos-wsl": "nixos-wsl",
|
"nixos-wsl": "nixos-wsl",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-home-stable": "nixpkgs-home-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-work-stable": "nixpkgs-work-stable",
|
"nixpkgs-wsl-stable": "nixpkgs-wsl-stable",
|
||||||
"sops-nix": "sops-nix",
|
"sops-nix": "sops-nix",
|
||||||
"tasksquire": "tasksquire"
|
"tasksquire": "tasksquire"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,23 +2,26 @@
|
|||||||
description = "Unified Nix Configuration";
|
description = "Unified Nix Configuration";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
# Unstable for home-manager
|
# Unstable for standalone configurations and overlays
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
# Stable for home system (aarch64 server)
|
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
||||||
nixpkgs-home-stable.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
||||||
|
|
||||||
# Stable for work system (WSL)
|
nixpkgs-wsl-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
||||||
nixpkgs-work-stable.url = "github:nixos/nixpkgs/nixos-25.05";
|
|
||||||
|
|
||||||
nixos-wsl = {
|
nixos-wsl = {
|
||||||
url = "github:nix-community/NixOS-WSL";
|
url = "github:nix-community/NixOS-WSL";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-work-stable";
|
inputs.nixpkgs.follows = "nixpkgs-wsl-stable";
|
||||||
};
|
};
|
||||||
|
|
||||||
home-manager = {
|
home-manager = {
|
||||||
url = "github:nix-community/home-manager";
|
url = "github:nix-community/home-manager/release-25.11";
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
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 = {
|
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
|
let
|
||||||
linuxSystem = "x86_64-linux";
|
linuxSystem = "x86_64-linux";
|
||||||
linuxAarchSystem = "aarch64-linux";
|
linuxAarchSystem = "aarch64-linux";
|
||||||
@@ -53,20 +56,9 @@
|
|||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
|
|
||||||
# Work WSL
|
# Work WSL
|
||||||
work = nixpkgs-work-stable.lib.nixosSystem {
|
work = nixpkgs-wsl-stable.lib.nixosSystem {
|
||||||
system = linuxSystem;
|
system = linuxSystem;
|
||||||
specialArgs = {
|
specialArgs = { inherit self inputs; };
|
||||||
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 = [
|
modules = [
|
||||||
nixos-wsl.nixosModules.wsl
|
nixos-wsl.nixosModules.wsl
|
||||||
./hosts/work/nixos/configuration.nix
|
./hosts/work/nixos/configuration.nix
|
||||||
@@ -76,9 +68,10 @@
|
|||||||
home-manager.useUserPackages = false;
|
home-manager.useUserPackages = false;
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs-wsl-stable {
|
||||||
system = linuxSystem;
|
system = linuxSystem;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager.users.pan = import ./hosts/work/nixos/home.nix;
|
home-manager.users.pan = import ./hosts/work/nixos/home.nix;
|
||||||
@@ -87,16 +80,12 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Home
|
# Home
|
||||||
home = nixpkgs-home-stable.lib.nixosSystem {
|
home = nixpkgs-stable.lib.nixosSystem {
|
||||||
system = linuxAarchSystem;
|
system = linuxAarchSystem;
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
# Provide both stable and unstable pkgs
|
# Provide both stable and unstable pkgs
|
||||||
pkgs-stable = import nixpkgs-home-stable {
|
pkgs = import nixpkgs-stable {
|
||||||
system = linuxAarchSystem;
|
|
||||||
config.allowUnfree = true;
|
|
||||||
};
|
|
||||||
pkgs-unstable = import nixpkgs {
|
|
||||||
system = linuxAarchSystem;
|
system = linuxAarchSystem;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
};
|
};
|
||||||
@@ -109,9 +98,10 @@
|
|||||||
home-manager.useUserPackages = false;
|
home-manager.useUserPackages = false;
|
||||||
home-manager.extraSpecialArgs = {
|
home-manager.extraSpecialArgs = {
|
||||||
inherit self inputs;
|
inherit self inputs;
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs-stable {
|
||||||
system = linuxAarchSystem;
|
system = linuxAarchSystem;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager.users.martin = import ./hosts/home/nixos/home.nix;
|
home-manager.users.martin = import ./hosts/home/nixos/home.nix;
|
||||||
@@ -130,18 +120,20 @@
|
|||||||
# --- Standalone Home Manager ---
|
# --- Standalone Home Manager ---
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"pan@work" = home-manager.lib.homeManagerConfiguration {
|
"pan@work" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs-stable {
|
||||||
system = linuxSystem;
|
system = linuxSystem;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
||||||
};
|
};
|
||||||
extraSpecialArgs = { inherit self inputs; };
|
extraSpecialArgs = { inherit self inputs; };
|
||||||
modules = [ ./hosts/work/nix/home.nix ];
|
modules = [ ./hosts/work/nix/home.nix ];
|
||||||
};
|
};
|
||||||
|
|
||||||
"martin@mac" = home-manager.lib.homeManagerConfiguration {
|
"martin@mac" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = import nixpkgs {
|
pkgs = import nixpkgs-stable {
|
||||||
system = darwinSystem;
|
system = darwinSystem;
|
||||||
config.allowUnfree = true;
|
config.allowUnfree = true;
|
||||||
|
overlays = [ (import ./modules/overlays/unstable.nix nixpkgs) ];
|
||||||
};
|
};
|
||||||
extraSpecialArgs = { inherit self inputs; };
|
extraSpecialArgs = { inherit self inputs; };
|
||||||
modules = [ ./hosts/home/nix/home.nix ];
|
modules = [ ./hosts/home/nix/home.nix ];
|
||||||
|
|||||||
@@ -11,4 +11,7 @@
|
|||||||
|
|
||||||
# Home Manager release version
|
# Home Manager release version
|
||||||
home.stateVersion = "25.05";
|
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
|
# Language servers
|
||||||
yaml-language-server
|
yaml-language-server
|
||||||
marksman
|
marksman
|
||||||
dockerfile-language-server
|
pkgs.unstable.dockerfile-language-server # Use unstable for latest LSP features
|
||||||
|
|
||||||
# Secrets management
|
# Secrets management
|
||||||
sops
|
sops
|
||||||
|
|||||||
@@ -43,10 +43,10 @@ in
|
|||||||
|
|
||||||
(lib.mkIf cfg.enable {
|
(lib.mkIf cfg.enable {
|
||||||
home.packages =
|
home.packages =
|
||||||
(lib.optional cfg.claude-code.enable pkgs.claude-code) ++
|
(lib.optional cfg.claude-code.enable pkgs.unstable.claude-code) ++
|
||||||
(lib.optional cfg.opencode.enable pkgs.opencode) ++
|
(lib.optional cfg.opencode.enable pkgs.unstable.opencode) ++
|
||||||
(lib.optional cfg.gemini-cli.enable pkgs.gemini-cli) ++
|
(lib.optional cfg.gemini-cli.enable pkgs.unstable.gemini-cli) ++
|
||||||
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.bubblewrap);
|
(lib.optional (cfg.bubblewrap.enable && pkgs.stdenv.isLinux) pkgs.unstable.bubblewrap);
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
{ config, pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
@@ -59,6 +59,7 @@
|
|||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Difftastic - modern diff tool
|
||||||
programs.difftastic = {
|
programs.difftastic = {
|
||||||
enable = true;
|
enable = true;
|
||||||
git.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 ]))
|
(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/base.lua)
|
||||||
(lib.strings.fileContents ../../../nvim/keymaps.lua)
|
(lib.strings.fileContents ../../../nvim/keymaps.lua)
|
||||||
(lib.strings.fileContents ../../../nvim/plugins.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