Home manager version stable/unstable

This commit is contained in:
GRMrGecko 2024-05-16 00:35:55 -05:00
parent d781b5f7c1
commit 023dc8a6d5
2 changed files with 45 additions and 11 deletions

View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1715217706, "lastModified": 1715822638,
"narHash": "sha256-yEB5SEHc+o3WJpUPw455OdLy9A+gffvCJX8DZ7NCkuo=", "narHash": "sha256-Z4ZoyK8jYRmBZwMaEZLEmAilrfdpekwwwohliqC14/E=",
"owner": "nix-community", "owner": "nix-community",
"repo": "disko", "repo": "disko",
"rev": "8eb1b315eef89f3bdc5c9814d1b207c6d64f0046", "rev": "476eef8d85aa09389ae7baf6e6b60357f6a01432",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -21,6 +21,27 @@
} }
}, },
"home-manager": { "home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1715381426,
"narHash": "sha256-wPuqrAQGdv3ISs74nJfGb+Yprm23U/rFpcHFFNWgM94=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "ab5542e9dbd13d0100f8baae2bc2d68af901f4b4",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-23.11",
"repo": "home-manager",
"type": "github"
}
},
"home-manager-unstable": {
"inputs": { "inputs": {
"nixpkgs": [ "nixpkgs": [
"nixpkgs" "nixpkgs"
@ -42,11 +63,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1715106579, "lastModified": 1715668745,
"narHash": "sha256-gZMgKEGiK6YrwGBiccZ1gemiUwjsZ1Zv49KYOgmX2fY=", "narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8be0d8a1ed4f96d99b09aa616e2afd47acc3da89", "rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -58,11 +79,11 @@
}, },
"nixpkgs-unstable": { "nixpkgs-unstable": {
"locked": { "locked": {
"lastModified": 1715087517, "lastModified": 1715534503,
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", "rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -76,6 +97,7 @@
"inputs": { "inputs": {
"disko": "disko", "disko": "disko",
"home-manager": "home-manager", "home-manager": "home-manager",
"home-manager-unstable": "home-manager-unstable",
"nixpkgs": "nixpkgs", "nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable" "nixpkgs-unstable": "nixpkgs-unstable"
} }

View File

@ -12,6 +12,11 @@
}; };
home-manager = { home-manager = {
url = "github:nix-community/home-manager/release-23.11";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager-unstable = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
@ -36,6 +41,13 @@
inputs.nixpkgs-unstable inputs.nixpkgs-unstable
); );
# Based on loaded settings, set the home-manager version.
home-manager = (if (settings.packages == "stable")
then
inputs.home-manager
else
inputs.home-manager-unstable
);
# Setup an overlay for unstable packages to include on stable environments. # Setup an overlay for unstable packages to include on stable environments.
overlay-unstable = final: prev: { overlay-unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable { unstable = import inputs.nixpkgs-unstable {
@ -65,12 +77,12 @@
modules = [ modules = [
config config
inputs.disko.nixosModules.disko inputs.disko.nixosModules.disko
inputs.home-manager.nixosModules.default home-manager.nixosModules.default
]; ];
}; };
# Function to configure home-manager for a user. # Function to configure home-manager for a user.
mkHome = config: inputs.home-manager.lib.homeManagerConfiguration { mkHome = config: home-manager.lib.homeManagerConfiguration {
inherit pkgs; inherit pkgs;
extraSpecialArgs = { extraSpecialArgs = {
inherit inputs; inherit inputs;