[shared] Home-manager unstable and fix nixpkgs unstable on system

This commit is contained in:
2025-10-18 13:16:19 +00:00
parent ca2c627815
commit a4a9b70a39
2 changed files with 35 additions and 8 deletions

21
flake.lock generated
View File

@@ -119,6 +119,26 @@
"type": "github"
}
},
"home-manager-unstable": {
"inputs": {
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1760662441,
"narHash": "sha256-mlDqR1Ntgs9uYYEAUR1IhamKBO0lxoNS4zGLzEZaY0A=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "722792af097dff5790f1a66d271a47759f477755",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"home-manager_2": {
"inputs": {
"nixpkgs": [
@@ -256,6 +276,7 @@
"inputs": {
"catppuccin": "catppuccin",
"home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"nixpkgs": "nixpkgs_2",
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",

View File

@@ -19,6 +19,11 @@
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs-unstable";
};
#
# ========= Utilities =========
#
@@ -45,6 +50,7 @@
nixpkgs,
nixpkgs-unstable,
home-manager,
home-manager-unstable,
...
}@inputs:
let
@@ -60,13 +66,6 @@
"aarch64-linux"
];
# ========== Extend lib with lib.custom ==========
# NOTE: This approach allows lib.custom to propagate into hm
# see: https://github.com/nix-community/home-manager/pull/3454
customLib = (_self: _super: { custom = import ./lib { inherit (nixpkgs) lib; }; });
lib = nixpkgs.lib.extend customLib;
libHm = home-manager.lib.extend customLib;
systems = import ./systems.nix {
inherit common;
};
@@ -92,6 +91,13 @@
let
pkgs = if nixos.channel == "stable" then nixpkgs else nixpkgs-unstable;
hm = if nixos.channel == "stable" then home-manager else home-manager-unstable;
# ========== Extend lib with lib.custom ==========
# NOTE: This approach allows lib.custom to propagate into hm
# see: https://github.com/nix-community/home-manager/pull/3454
customLib = (_self: _super: { custom = import ./lib { inherit (pkgs) lib; }; });
lib = pkgs.lib.extend customLib;
libHm = hm.lib.extend customLib;
in
pkgs.lib.nixosSystem {
inherit system;
@@ -110,7 +116,7 @@
};
modules = [
./hosts/${hostName}
home-manager.nixosModules.home-manager
hm.nixosModules.home-manager
{
home-manager = {
# Backups conflicting files in case of error