Home manager version stable/unstable
This commit is contained in:
parent
d781b5f7c1
commit
023dc8a6d5
40
flake.lock
40
flake.lock
@ -7,11 +7,11 @@
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1715217706,
|
||||
"narHash": "sha256-yEB5SEHc+o3WJpUPw455OdLy9A+gffvCJX8DZ7NCkuo=",
|
||||
"lastModified": 1715822638,
|
||||
"narHash": "sha256-Z4ZoyK8jYRmBZwMaEZLEmAilrfdpekwwwohliqC14/E=",
|
||||
"owner": "nix-community",
|
||||
"repo": "disko",
|
||||
"rev": "8eb1b315eef89f3bdc5c9814d1b207c6d64f0046",
|
||||
"rev": "476eef8d85aa09389ae7baf6e6b60357f6a01432",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -21,6 +21,27 @@
|
||||
}
|
||||
},
|
||||
"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": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
@ -42,11 +63,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1715106579,
|
||||
"narHash": "sha256-gZMgKEGiK6YrwGBiccZ1gemiUwjsZ1Zv49KYOgmX2fY=",
|
||||
"lastModified": 1715668745,
|
||||
"narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8be0d8a1ed4f96d99b09aa616e2afd47acc3da89",
|
||||
"rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -58,11 +79,11 @@
|
||||
},
|
||||
"nixpkgs-unstable": {
|
||||
"locked": {
|
||||
"lastModified": 1715087517,
|
||||
"narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=",
|
||||
"lastModified": 1715534503,
|
||||
"narHash": "sha256-5ZSVkFadZbFP1THataCaSf0JH2cAH3S29hU9rrxTEqk=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "b211b392b8486ee79df6cdfb1157ad2133427a29",
|
||||
"rev": "2057814051972fa1453ddfb0d98badbea9b83c06",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -76,6 +97,7 @@
|
||||
"inputs": {
|
||||
"disko": "disko",
|
||||
"home-manager": "home-manager",
|
||||
"home-manager-unstable": "home-manager-unstable",
|
||||
"nixpkgs": "nixpkgs",
|
||||
"nixpkgs-unstable": "nixpkgs-unstable"
|
||||
}
|
||||
|
16
flake.nix
16
flake.nix
@ -12,6 +12,11 @@
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager-unstable = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
@ -36,6 +41,13 @@
|
||||
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.
|
||||
overlay-unstable = final: prev: {
|
||||
unstable = import inputs.nixpkgs-unstable {
|
||||
@ -65,12 +77,12 @@
|
||||
modules = [
|
||||
config
|
||||
inputs.disko.nixosModules.disko
|
||||
inputs.home-manager.nixosModules.default
|
||||
home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# Function to configure home-manager for a user.
|
||||
mkHome = config: inputs.home-manager.lib.homeManagerConfiguration {
|
||||
mkHome = config: home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
|
Loading…
Reference in New Issue
Block a user