From c92884a39aeb5d5247cee02e0b64a53e2b739ac5 Mon Sep 17 00:00:00 2001 From: xnm Date: Sat, 23 Nov 2024 17:11:09 +0200 Subject: [PATCH] update: added nvidia support in containters, enabled resolvconf & updated some configs --- home/.config/hypr/hyprland.conf | 14 ++++++++------ nixos/dns.nix | 2 +- nixos/lsp.nix | 2 +- nixos/nvidia.nix | 3 +++ nixos/virtualisation.nix | 4 ++++ 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/home/.config/hypr/hyprland.conf b/home/.config/hypr/hyprland.conf index 95d889b..d34bb83 100644 --- a/home/.config/hypr/hyprland.conf +++ b/home/.config/hypr/hyprland.conf @@ -69,12 +69,14 @@ decoration { passes = 2 } - drop_shadow = yes - shadow_range = 15 - shadow_offset = 0, 0 - shadow_render_power = 3 - col.shadow = $teal - col.shadow_inactive = 0xff$baseAlpha; + shadow { + enabled = true; + range = 15 + render_power = 3 + offset = 0, 0 + color = $teal + color_inactive = 0xff$baseAlpha; + } active_opacity = 0.7 inactive_opacity = 0.7 diff --git a/nixos/dns.nix b/nixos/dns.nix index afdfea6..c453565 100644 --- a/nixos/dns.nix +++ b/nixos/dns.nix @@ -13,7 +13,7 @@ # If using resolvconf: resolvconf = { - enable = false; # FIXME remember to delete /etc/resolv.conf after applying this config + enable = true; # FIXME remember to delete /etc/resolv.conf if you disable `resolvconf` useLocalResolver = true; }; diff --git a/nixos/lsp.nix b/nixos/lsp.nix index 553501d..0dc368e 100644 --- a/nixos/lsp.nix +++ b/nixos/lsp.nix @@ -20,7 +20,7 @@ gopls delve emmet-language-server - buf-language-server + buf cmake-language-server docker-compose-language-service vscode-extensions.vadimcn.vscode-lldb diff --git a/nixos/nvidia.nix b/nixos/nvidia.nix index 4974001..5bbd8b9 100644 --- a/nixos/nvidia.nix +++ b/nixos/nvidia.nix @@ -4,6 +4,9 @@ # Load nvidia driver for Xorg and Wayland services.xserver.videoDrivers = ["nvidia"]; + # Enable access to nvidia from containers (Docker, Podman) + hardware.nvidia-container-toolkit.enable = true; + hardware.nvidia = { # Modesetting is required. diff --git a/nixos/virtualisation.nix b/nixos/virtualisation.nix index f0a7ffe..885c258 100644 --- a/nixos/virtualisation.nix +++ b/nixos/virtualisation.nix @@ -19,11 +19,14 @@ # Create a `docker` alias for podman, to use it as a drop-in replacement dockerCompat = true; + dockerSocket.enable = true; # Required for containers under podman-compose to be able to talk to each other. defaultNetwork.settings.dns_enabled = true; }; }; + environment.variables.DBX_CONTAINER_MANAGER = "podman"; + users.extraGroups.podman.members = [ "xnm" ]; environment.systemPackages = with pkgs; [ # nerdctl @@ -38,6 +41,7 @@ podman-compose podman-tui + docker-compose # lazydocker # docker-credential-helpers ];