[shared] Home-manager unstable and fix nixpkgs unstable on system
This commit is contained in:
21
flake.lock
generated
21
flake.lock
generated
@@ -119,6 +119,26 @@
|
|||||||
"type": "github"
|
"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": {
|
"home-manager_2": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
@@ -256,6 +276,7 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"catppuccin": "catppuccin",
|
"catppuccin": "catppuccin",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
|
"home-manager-unstable": "home-manager-unstable",
|
||||||
"nixpkgs": "nixpkgs_2",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"nixpkgs-stable": "nixpkgs-stable",
|
"nixpkgs-stable": "nixpkgs-stable",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
|
22
flake.nix
22
flake.nix
@@ -19,6 +19,11 @@
|
|||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home-manager-unstable = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
#
|
#
|
||||||
# ========= Utilities =========
|
# ========= Utilities =========
|
||||||
#
|
#
|
||||||
@@ -45,6 +50,7 @@
|
|||||||
nixpkgs,
|
nixpkgs,
|
||||||
nixpkgs-unstable,
|
nixpkgs-unstable,
|
||||||
home-manager,
|
home-manager,
|
||||||
|
home-manager-unstable,
|
||||||
...
|
...
|
||||||
}@inputs:
|
}@inputs:
|
||||||
let
|
let
|
||||||
@@ -60,13 +66,6 @@
|
|||||||
"aarch64-linux"
|
"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 {
|
systems = import ./systems.nix {
|
||||||
inherit common;
|
inherit common;
|
||||||
};
|
};
|
||||||
@@ -92,6 +91,13 @@
|
|||||||
|
|
||||||
let
|
let
|
||||||
pkgs = if nixos.channel == "stable" then nixpkgs else nixpkgs-unstable;
|
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
|
in
|
||||||
pkgs.lib.nixosSystem {
|
pkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
@@ -110,7 +116,7 @@
|
|||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${hostName}
|
./hosts/${hostName}
|
||||||
home-manager.nixosModules.home-manager
|
hm.nixosModules.home-manager
|
||||||
{
|
{
|
||||||
home-manager = {
|
home-manager = {
|
||||||
# Backups conflicting files in case of error
|
# Backups conflicting files in case of error
|
||||||
|
Reference in New Issue
Block a user