Merge pull request #197870 from SuperSandro2000/udev-enable
This commit is contained in:
commit
00bde1ac69
2 changed files with 7 additions and 2 deletions
|
@ -192,7 +192,6 @@ in
|
||||||
###### interface
|
###### interface
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
boot.hardwareScan = mkOption {
|
boot.hardwareScan = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
|
@ -205,6 +204,9 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
services.udev = {
|
services.udev = {
|
||||||
|
enable = mkEnableOption (lib.mdDoc "udev") // {
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
packages = mkOption {
|
packages = mkOption {
|
||||||
type = types.listOf types.path;
|
type = types.listOf types.path;
|
||||||
|
@ -345,7 +347,7 @@ in
|
||||||
|
|
||||||
###### implementation
|
###### implementation
|
||||||
|
|
||||||
config = mkIf (!config.boot.isContainer) {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
services.udev.extraRules = nixosRules;
|
services.udev.extraRules = nixosRules;
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,9 @@ with lib;
|
||||||
# Containers should be light-weight, so start sshd on demand.
|
# Containers should be light-weight, so start sshd on demand.
|
||||||
services.openssh.startWhenNeeded = mkDefault true;
|
services.openssh.startWhenNeeded = mkDefault true;
|
||||||
|
|
||||||
|
# containers do not need to setup devices
|
||||||
|
services.udev.enable = false;
|
||||||
|
|
||||||
# Shut up warnings about not having a boot loader.
|
# Shut up warnings about not having a boot loader.
|
||||||
system.build.installBootLoader = lib.mkDefault "${pkgs.coreutils}/bin/true";
|
system.build.installBootLoader = lib.mkDefault "${pkgs.coreutils}/bin/true";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue