git: merging in some upstream changes while still waiting for ther patch to be merged in

This commit is contained in:
silver 2024-06-27 13:19:12 +01:00
parent 09e7f8f0d4
commit e6954d3448
Signed by: silver
GPG key ID: 54E2C71918E93B74

View file

@ -12,19 +12,19 @@ with lib; {
enable = mkOption {
default = true;
type = types.bool;
description = lib.mdDoc "Whether to enable the ProxmoxLXC.";
description = lib.mdDoc "Whether to enable the Proxmox VE LXC module.";
};
privileged = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
description = ''
Whether to enable privileged mounts
'';
};
manageNetwork = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
description = ''
Whether to manage network interfaces through nix options
When false, systemd-networkd is enabled to accept network
configuration from proxmox.
@ -33,7 +33,7 @@ with lib; {
manageHostName = mkOption {
type = types.bool;
default = false;
description = lib.mdDoc ''
description = ''
Whether to manage hostname through nix options
When false, the hostname is picked up from /etc/hostname
populated by proxmox.
@ -68,6 +68,8 @@ with lib; {
loader.initScript.enable = true;
};
console.enable = true;
networking = mkIf (!cfg.manageNetwork) {
useDHCP = false;
useHostResolvConf = false;
@ -81,13 +83,14 @@ with lib; {
startWhenNeeded = mkDefault true;
};
systemd.mounts =
mkIf (!cfg.privileged)
[
systemd = {
mounts = mkIf (!cfg.privileged) [
{
where = "/sys/kernel/debug";
enable = false;
where = "/sys/kernel/debug";
}
];
services."getty@".unitConfig.ConditionPathExists = ["" "/dev/%I"];
};
};
}