extract systemConfiguration into its own output module
This commit is contained in:
parent
f9b4f0bc9c
commit
56c667cfd5
@ -9,6 +9,7 @@ let
|
|||||||
inherit (pkgs) runCommand;
|
inherit (pkgs) runCommand;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
imports = [ ./system-configuration.nix ];
|
||||||
options = {
|
options = {
|
||||||
boot.initramfs = {
|
boot.initramfs = {
|
||||||
enable = mkEnableOption "initramfs";
|
enable = mkEnableOption "initramfs";
|
||||||
@ -22,14 +23,6 @@ in
|
|||||||
filesystem
|
filesystem
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
systemConfiguration = mkOption {
|
|
||||||
type = types.package;
|
|
||||||
description = ''
|
|
||||||
pkgs.systemconfig for the configured filesystem,
|
|
||||||
contains 'activate' and 'init' commands
|
|
||||||
'';
|
|
||||||
internal = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
config = mkIf config.boot.initramfs.enable {
|
config = mkIf config.boot.initramfs.enable {
|
||||||
@ -53,8 +46,6 @@ in
|
|||||||
file /init ${pkgs.preinit}/bin/preinit 0755 0 0
|
file /init ${pkgs.preinit}/bin/preinit 0755 0 0
|
||||||
SPECIALS
|
SPECIALS
|
||||||
'';
|
'';
|
||||||
systemConfiguration =
|
|
||||||
pkgs.systemconfig config.filesystem.contents;
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
28
modules/outputs/system-configuration.nix
Normal file
28
modules/outputs/system-configuration.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
config
|
||||||
|
, pkgs
|
||||||
|
, lib
|
||||||
|
, ...
|
||||||
|
}:
|
||||||
|
let
|
||||||
|
inherit (lib) mkEnableOption mkOption mkIf types;
|
||||||
|
inherit (pkgs) runCommand;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options = {
|
||||||
|
system.outputs = {
|
||||||
|
systemConfiguration = mkOption {
|
||||||
|
type = types.package;
|
||||||
|
description = ''
|
||||||
|
pkgs.systemconfig for the configured filesystem,
|
||||||
|
contains 'activate' and 'init' commands
|
||||||
|
'';
|
||||||
|
internal = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
config = {
|
||||||
|
system.outputs.systemConfiguration =
|
||||||
|
pkgs.systemconfig config.filesystem.contents;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user