mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 12:19:07 +00:00
flake-parts/setups/nixos: add Disko configs for each NixOS system
This commit is contained in:
parent
b95aa94cae
commit
acba42bd99
@ -313,6 +313,16 @@ let
|
|||||||
remoteBuild = true;
|
remoteBuild = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
diskoConfigs = lib.mkOption {
|
||||||
|
type = with lib.types; listOf str;
|
||||||
|
default = [ ];
|
||||||
|
example = [ "external-hdd" ];
|
||||||
|
description = ''
|
||||||
|
A list of declarative Disko configurations to be included alongside
|
||||||
|
the NixOS configuration.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config.modules = [
|
config.modules = [
|
||||||
@ -426,6 +436,19 @@ let
|
|||||||
}
|
}
|
||||||
))
|
))
|
||||||
|
|
||||||
|
# Then we include the Disko configuration (if there's any).
|
||||||
|
(lib.mkIf (config.diskoConfigs != [ ] (
|
||||||
|
let
|
||||||
|
diskoConfigs =
|
||||||
|
builtins.map (name: import ../../../configs/disko/${name}) config.diskoConfigs;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
imports =
|
||||||
|
[ inputs.disko.nixosModules.disko ]
|
||||||
|
++ (lib.lists.flatten diskoConfigs);
|
||||||
|
})
|
||||||
|
))
|
||||||
|
|
||||||
# Setting up the typical configuration.
|
# Setting up the typical configuration.
|
||||||
(
|
(
|
||||||
let
|
let
|
||||||
|
Loading…
Reference in New Issue
Block a user