Skip to content

Commit

Permalink
Merge pull request #197870 from SuperSandro2000/udev-enable
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Oct 30, 2022
2 parents 41a569d + 7fe3f63 commit 00bde1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nixos/modules/services/hardware/udev.nix
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ in
###### interface

options = {

boot.hardwareScan = mkOption {
type = types.bool;
default = true;
Expand All @@ -205,6 +204,9 @@ in
};

services.udev = {
enable = mkEnableOption (lib.mdDoc "udev") // {
default = true;
};

packages = mkOption {
type = types.listOf types.path;
Expand Down Expand Up @@ -345,7 +347,7 @@ in

###### implementation

config = mkIf (!config.boot.isContainer) {
config = mkIf cfg.enable {

services.udev.extraRules = nixosRules;

Expand Down
3 changes: 3 additions & 0 deletions nixos/modules/virtualisation/container-config.nix
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ with lib;
# Containers should be light-weight, so start sshd on demand.
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.
system.build.installBootLoader = lib.mkDefault "${pkgs.coreutils}/bin/true";

Expand Down

0 comments on commit 00bde1a

Please sign in to comment.