mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-22 04:57:56 +03:00
nixos/networkmanager: cleanup, fix example rendering
This commit is contained in:
parent
dd7ea9090d
commit
ad0ca163e1
@ -30,8 +30,7 @@ let
|
|||||||
configFile = pkgs.writeText "NetworkManager.conf" (lib.concatStringsSep "\n" [
|
configFile = pkgs.writeText "NetworkManager.conf" (lib.concatStringsSep "\n" [
|
||||||
(mkSection "main" {
|
(mkSection "main" {
|
||||||
plugins = "keyfile";
|
plugins = "keyfile";
|
||||||
dhcp = cfg.dhcp;
|
inherit (cfg) dhcp dns;
|
||||||
dns = cfg.dns;
|
|
||||||
# If resolvconf is disabled that means that resolv.conf is managed by some other module.
|
# If resolvconf is disabled that means that resolv.conf is managed by some other module.
|
||||||
rc-manager =
|
rc-manager =
|
||||||
if config.networking.resolvconf.enable then "resolvconf"
|
if config.networking.resolvconf.enable then "resolvconf"
|
||||||
@ -341,7 +340,6 @@ in
|
|||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
[ {
|
[ {
|
||||||
source = pkgs.writeText "upHook" '''
|
source = pkgs.writeText "upHook" '''
|
||||||
|
|
||||||
if [ "$2" != "up" ]; then
|
if [ "$2" != "up" ]; then
|
||||||
logger "exit: event $2 != up"
|
logger "exit: event $2 != up"
|
||||||
exit
|
exit
|
||||||
@ -351,7 +349,8 @@ in
|
|||||||
logger "Device $DEVICE_IFACE coming up"
|
logger "Device $DEVICE_IFACE coming up"
|
||||||
''';
|
''';
|
||||||
type = "basic";
|
type = "basic";
|
||||||
} ]'';
|
} ]
|
||||||
|
'';
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
A list of scripts which will be executed in response to network events.
|
A list of scripts which will be executed in response to network events.
|
||||||
'';
|
'';
|
||||||
|
Loading…
Reference in New Issue
Block a user