From e65d7c392e77b247f49d5f8723257e3edf71bd2e Mon Sep 17 00:00:00 2001 From: Tyler Mayoff Date: Sun, 14 Sep 2025 22:28:34 -0400 Subject: [PATCH] trying to get GTK4 apps working --- dot_config/flake/home/niri.nix | 51 +++++++++++-------- .../flake/machines/wash/configuration.nix | 11 ++-- dot_config/flake/modules/nixos/niri.nix | 30 +++++++++++ dot_config/flake/modules/nixos/podman.nix | 16 ++++++ 4 files changed, 82 insertions(+), 26 deletions(-) create mode 100644 dot_config/flake/modules/nixos/niri.nix create mode 100644 dot_config/flake/modules/nixos/podman.nix diff --git a/dot_config/flake/home/niri.nix b/dot_config/flake/home/niri.nix index 381aa90..16df044 100644 --- a/dot_config/flake/home/niri.nix +++ b/dot_config/flake/home/niri.nix @@ -22,6 +22,20 @@ in { wlsunset ]; + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gnome pkgs.xdg-desktop-portal-gtk]; + # wlr.enable = true; + config = { + niri = { + default = ["gnome" "gtk"]; + "org.freedesktop.impl.portal.Access" = ["gtk"]; + "org.freedesktop.impl.portal.Notification" = ["gtk"]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + }; + }; + }; + home.shellAliases = { restart-shell = "${noctalia} kill && niri msg action spawn -- \"${noctalia}\""; }; @@ -176,11 +190,10 @@ in { # You can change how the focus ring looks. focus-ring = { - # // Uncomment this line to disable the focus ring. - # // off + enable = true; - # // How many logical pixels the ring extends out from the windows. - # width 4 + # How many logical pixels the ring extends out from the windows. + width = 4; # // Colors can be set in a variety of ways: # // - CSS named colors: "red" @@ -188,10 +201,10 @@ in { # // - CSS-like notation: "rgb(255, 127, 0)", rgba(), hsl() and a few others. # // Color of the ring on the active monitor. - # active-color "#7fc8ff" + active.color = "#7fc8ff"; # // Color of the ring on inactive monitors. - # inactive-color "#505050" + inactive.color = "#505050"; # // You can also use gradients. They take precedence over solid colors. # // Gradients are rendered the same as CSS linear-gradient(angle, from, to). @@ -209,22 +222,20 @@ in { # // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" }; - # // You can also add a border. It's similar to the focus ring, but always visible. - # border { - # // The settings are the same as for the focus ring. - # // If you enable the border, you probably want to disable the focus ring. - # off + # You can also add a border. It's similar to the focus ring, but always visible. + border = { + enable = false; - # width 4 - # active-color "#ffc87f" - # inactive-color "#505050" + # width 4 + # active-color "#ffc87f" + # inactive-color "#505050" - # // Color of the border around windows that request your attention. - # urgent-color "#9b0000" + # // Color of the border around windows that request your attention. + # urgent-color "#9b0000" - # // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view" - # // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" - # } + # // active-gradient from="#ffbb66" to="#ffc880" angle=45 relative-to="workspace-view" + # // inactive-gradient from="#505050" to="#808080" angle=45 relative-to="workspace-view" + }; # // You can enable drop shadows for windows. # shadow { @@ -330,7 +341,7 @@ in { { clip-to-geometry = true; geometry-corner-radius = let - r = 20.0; + r = 10.0; in { bottom-left = r; bottom-right = r; diff --git a/dot_config/flake/machines/wash/configuration.nix b/dot_config/flake/machines/wash/configuration.nix index 092144d..ff17462 100644 --- a/dot_config/flake/machines/wash/configuration.nix +++ b/dot_config/flake/machines/wash/configuration.nix @@ -1,5 +1,4 @@ { - inputs, outputs, pkgs, ... @@ -13,8 +12,9 @@ ../../modules/nixos/gnome.nix # ../../modules/nixos/android-studio.nix # ../../modules/nixos/docker.nix + ../../modules/nixos/podman.nix - inputs.niri.nixosModules.niri + ../../modules/nixos/niri.nix ]; nixpkgs = { @@ -93,7 +93,7 @@ geoProviderUrl = "https://api.beacondb.net/v1/geolocate"; }; - services.flatpak.enable = true; + # services.flatpak.enable = true; services.power-profiles-daemon.enable = true; services.logind.lidSwitch = "suspend-then-hibernate"; @@ -124,6 +124,8 @@ # jetbrains.rider pre-commit + + unstable.vivaldi ]; fonts.packages = with pkgs; [ @@ -135,9 +137,6 @@ services.desktopManager.cosmic.enable = true; - programs.niri.enable = true; - programs.niri.package = pkgs.niri-unstable; - # Install firefox. programs.firefox.enable = true; diff --git a/dot_config/flake/modules/nixos/niri.nix b/dot_config/flake/modules/nixos/niri.nix new file mode 100644 index 0000000..a2f09ab --- /dev/null +++ b/dot_config/flake/modules/nixos/niri.nix @@ -0,0 +1,30 @@ +{ + inputs, + pkgs, + ... +}: { + imports = [ + inputs.niri.nixosModules.niri + ]; + + niri-flake.cache.enable = true; + programs.niri.enable = true; + # programs.niri.package = pkgs.niri-unstable; + + xdg.portal = { + enable = true; + extraPortals = [pkgs.xdg-desktop-portal-gnome pkgs.xdg-desktop-portal-gtk]; + wlr.enable = true; + config = { + sway = { + default = ["gtk"]; + }; + niri = { + default = ["gnome" "gtk"]; + "org.freedesktop.impl.portal.Access" = ["gtk"]; + "org.freedesktop.impl.portal.Notification" = ["gtk"]; + "org.freedesktop.impl.portal.Secret" = ["gnome-keyring"]; + }; + }; + }; +} diff --git a/dot_config/flake/modules/nixos/podman.nix b/dot_config/flake/modules/nixos/podman.nix new file mode 100644 index 0000000..edf3eec --- /dev/null +++ b/dot_config/flake/modules/nixos/podman.nix @@ -0,0 +1,16 @@ +{pkgs, ...}: { + virtualisation.containers.enable = true; + + virtualisation = { + podman = { + enable = true; + dockerCompat = true; + }; + }; + + environment.systemPackages = with pkgs; [ + dive + podman-tui + podman-compose + ]; +}