cleanup network manager

This commit is contained in:
Casper V. Kristensen 2023-08-25 00:59:39 +02:00
parent 56cba51af3
commit 4524fd56ea
3 changed files with 15 additions and 6 deletions

View file

@ -27,7 +27,6 @@
environment.persistence."/nix/persist" = {
hideMounts = true;
directories = [
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
{ directory = "/tmp"; user = "root"; group = "root"; mode = "1777"; } # see comment above
{ directory = "/var/db/sudo/lectured"; user = "root"; group = "root"; mode = "0700"; } # with great power comes great responsibility, we get it
{ directory = "/var/log"; user = "root"; group = "root"; mode = "0755"; }

View file

@ -18,7 +18,6 @@
# with a proper secret management scheme, such as agenix.
passwordFile = "/nix/persist/passwordfile";
extraGroups = [
"networkmanager"
"wheel" # allows sudo
"video" # allows controlling brightness
# todo: systemd-journal, audio, input, power, nix ?

View file

@ -8,10 +8,21 @@
};
};
# systemd-networkd-wait-online can timeout and fail if there are no
# network interfaces available for it to manage. When systemd-networkd is
# enabled but a different service is responsible for managing the system's
# internet connection (for example, NetworkManager), this service is unnecessary and can be disabled.
# Allow our user to configure the network
users.extraGroups.networkmanager.members = [ "caspervk" ];
# Persist WiFi passwords and other network configuration
environment.persistence."/nix/persist" = {
directories = [
{ directory = "/etc/NetworkManager/system-connections"; user = "root"; group = "root"; mode = "0700"; }
];
};
# systemd-networkd-wait-online can timeout and fail if there are no network
# interfaces available for it to manage. When systemd-networkd is enabled but
# a different service is responsible for managing the system's internet
# connection (for example, NetworkManager), this service is unnecessary and
# can be disabled.
# https://search.nixos.org/options?channel=23.05&show=systemd.network.wait-online.enable
systemd.network.wait-online.enable = false;
}