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