Ability to use unstable packages
This commit is contained in:
parent
fe468eebd7
commit
25c00be8fd
19
flake.nix
19
flake.nix
|
@ -3,6 +3,7 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
unixpkgs.url = "nixpkgs";
|
||||
# OS
|
||||
disko = {
|
||||
url = "disko";
|
||||
|
@ -33,7 +34,7 @@
|
|||
nur.url = "github:nix-community/NUR";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, disko, nix-on-droid, stylix, ... }@attrs:
|
||||
outputs = { self, nixpkgs, unixpkgs, disko, nix-on-droid, stylix, ... }@attrs:
|
||||
let
|
||||
nixpkgsConfig = {
|
||||
config = {
|
||||
|
@ -43,6 +44,15 @@
|
|||
"nix-2.15.3"
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
(final: prev: { unstable = unixpkgs.legacyPackages.${prev.system}.pkgs; })
|
||||
];
|
||||
# Only allows importing packages, not NixOS modules. If that is needed, see:
|
||||
# https://discourse.nixos.org/t/how-to-use-unstable-nixpkgs-in-imports-with-flake/17414/7
|
||||
};
|
||||
homeManagerConfig = {
|
||||
sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||
extraSpecialArgs = attrs;
|
||||
};
|
||||
lib = {
|
||||
nixosSystem = { system, modules ? [ ] }: nixpkgs.lib.nixosSystem {
|
||||
|
@ -52,10 +62,7 @@
|
|||
self.nixosModules.dotfiles
|
||||
{
|
||||
nixpkgs = nixpkgsConfig;
|
||||
home-manager = {
|
||||
sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||
extraSpecialArgs = attrs;
|
||||
};
|
||||
home-manager = homeManagerConfig;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
@ -66,7 +73,7 @@
|
|||
modules = modules ++ [
|
||||
self.nixOnDroidModules.dotfiles
|
||||
{
|
||||
home-manager.sharedModules = [ self.homeManagerModules.dotfiles ];
|
||||
home-manager = homeManagerConfig;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue