meta: reorganize nix-os and hosts to single directory nixos
This commit is contained in:
parent
be46e02c61
commit
cb05ce5b44
76 changed files with 54 additions and 52 deletions
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
cfg = config.unstable;
|
||||
unstableOverlay = self.overlays.unstableWithMeta;
|
||||
in
|
||||
{
|
||||
options.unstable = {
|
||||
enable = lib.mkEnableOption ''
|
||||
use of unstable packages in configuration. You can use `unstablePkgs` in configuration modules
|
||||
'' // { default = true; };
|
||||
};
|
||||
config = {
|
||||
_module.args.unstablePkgs = if config.unstable.enable then pkgs.unstable else pkgs;
|
||||
nixpkgs.overlays = lib.mkIf cfg.enable [ unstableOverlay ];
|
||||
system.extraSystemBuilderCmds = lib.mkIf config.unstable.enable ''
|
||||
echo ${pkgs.unstableVersion} > $out/nixos-unstable-version
|
||||
'';
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue