mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-12 06:19:00 +00:00
programs/distrobox: add extraConfig option
This commit is contained in:
parent
f7b4539c6d
commit
f789aabd35
@ -38,7 +38,10 @@ let
|
|||||||
|
|
||||||
settingsFormat = distroboxConf { };
|
settingsFormat = distroboxConf { };
|
||||||
|
|
||||||
settingsFile = settingsFormat.generate "distrobox-settings" cfg.settings;
|
settingsFile = pkgs.writeText "distrobox-settings" ''
|
||||||
|
${toDistroboxConf cfg.settings}
|
||||||
|
${cfg.extraConfig}
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
options.programs.distrobox = {
|
options.programs.distrobox = {
|
||||||
@ -77,11 +80,20 @@ in
|
|||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extraConfig = lib.mkOption {
|
||||||
|
type = lib.types.lines;
|
||||||
|
default = "";
|
||||||
|
description = ''
|
||||||
|
Extra configuration to be appended to
|
||||||
|
{file}`/etc/distrobox/distrobox.conf`.
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
environment.systemPackages = [ cfg.package ];
|
environment.systemPackages = [ cfg.package ];
|
||||||
|
|
||||||
environment.etc."distrobox/distrobox.conf".source = lib.mkIf (cfg.settings != { }) settingsFile;
|
environment.etc."distrobox/distrobox.conf".source = settingsFile;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user