Various tweaks

- Untested: make dongle gateways device specific
- try to fix network config when usbc-dongle is not avail
- disable broken autoLogin

Signed-off-by: Tristan Druyen <tristan@vault81.de>
This commit is contained in:
Tristan D. 2023-09-19 00:21:50 +02:00
parent 5515a11608
commit ea93b74da5
Signed by: tristan
SSH key fingerprint: SHA256:U7y6eMb7CQDaTHv9XoX6/BaQnPqyxxKc+Xnfcefi6rY
2 changed files with 29 additions and 12 deletions

View file

@ -78,8 +78,18 @@
layout = "us"; layout = "us";
xkbVariant = "alt-intl"; xkbVariant = "alt-intl";
displayManager.sddm.enable = true;
desktopManager.plasma5.enable = true; desktopManager.plasma5.enable = true;
# Sddm
displayManager = {
sddm.enable = true;
defaultSession = "plasmawayland";
# autoLogin = {
# enable = true;
# user = "tristand";
# };
};
}; };
services.printing.enable = true; services.printing.enable = true;
@ -97,13 +107,6 @@
jack.enable = true; jack.enable = true;
}; };
# Define a user account. Don't forget to set a password with passwd.
# Enable automatic login for the user.
services.xserver.displayManager.defaultSession = "plasmawayland";
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "tristand";
environment.sessionVariables = { environment.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
MOZ_USE_XINPUT2 = "1"; MOZ_USE_XINPUT2 = "1";

View file

@ -40,12 +40,26 @@
}; };
}; };
defaultGateway = { # TODO delete if network specific gateway is validated to work
address = "192.168.0.5"; # defaultGateway = {
interface = "enp5s0f4u1u1c2"; # address = "192.168.0.5";
}; # interface = "enp5s0f4u1u1c2";
# };
}; };
# TODO validate his works
systemd.network.networks.enp5s0f4u1u1c2.gateway = "192.168.0.5";
# This manually configures the automatically created network-adresses service to be more flexible
# regarding booting without the the device being available on boot
# It prevents slow timeouts & errors on boot while preserving Plug & Play ability
systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.ConditionPathExists = "/sys/class/net/enp5s0f4u1u1c2";
systemd.services.network-addresses-enp5s0f4u1u1c2.unitConfig.BindsTo = lib.mkForce null;
services.udev.extraRules = ''
ACTION=="add", KERNEL=="enp5s0f4u1u1c2", TAG+="systemd", ENV{SYSTEMD_WANTS}="network-addresses-enp5s0f4u1u1c2.service"
ACTION=="remove", KERNEL=="enp5s0f4u1u1c2", RUN+="${pkgs.systemd}/bin/systemctl stop network-addresses-enp5s0f4u1u1c2.service"
'';
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware = { hardware = {