meta: reorganize nix-os and hosts to single directory nixos

This commit is contained in:
Wroclaw 2025-05-18 18:44:51 +02:00
parent be46e02c61
commit cb05ce5b44
76 changed files with 54 additions and 52 deletions

View file

@ -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
'';
};
}