From 7b6b65cd1dc0335c6020c4d1b4c57930208c495b Mon Sep 17 00:00:00 2001 From: Daniel Patterson Date: Mon, 4 Aug 2025 00:10:39 +0100 Subject: [PATCH] make zed work --- flake.nix | 4 +- hosts/common/default.nix | 2 - hosts/common/graphical/default.nix | 2 +- modules/gitea/default.nix | 1 - users/configs/desktop/sway/default.nix | 59 ++++++++++++++------------ users/daniel/default.nix | 21 +++++++++ 6 files changed, 55 insertions(+), 34 deletions(-) diff --git a/flake.nix b/flake.nix index 5665c6f..63070fb 100644 --- a/flake.nix +++ b/flake.nix @@ -49,9 +49,6 @@ golink.overlays.default nixgl.overlay zig.overlays.default - (final: prev: { - zen-browser = zen-browser.packages.${prev.system}.default; - }) ]; pkgs = @@ -114,6 +111,7 @@ extraSpecialArgs = { inherit hostname; inherit headless; + inherit inputs; }; }; } diff --git a/hosts/common/default.nix b/hosts/common/default.nix index f5aa2a9..589dd3c 100644 --- a/hosts/common/default.nix +++ b/hosts/common/default.nix @@ -83,8 +83,6 @@ in { nnn ripgrep wget - zed-editor - zen-browser zsh ]; diff --git a/hosts/common/graphical/default.nix b/hosts/common/graphical/default.nix index 2d52221..7893734 100644 --- a/hosts/common/graphical/default.nix +++ b/hosts/common/graphical/default.nix @@ -97,7 +97,7 @@ ]; extraRules = '' # Raspberry Pi Picoprobe - SUBSYSTEM="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666" + # SUBSYSTEM="usb", ATTRS{idVendor}=="2e8a", ATTRS{idProduct}=="0003", MODE="0666" ''; }; diff --git a/modules/gitea/default.nix b/modules/gitea/default.nix index f7c5052..0ad9a0e 100644 --- a/modules/gitea/default.nix +++ b/modules/gitea/default.nix @@ -9,7 +9,6 @@ owner = "gitea"; group = "gitea"; }; - }; services.gitea = { diff --git a/users/configs/desktop/sway/default.nix b/users/configs/desktop/sway/default.nix index 3be6295..84b51e2 100644 --- a/users/configs/desktop/sway/default.nix +++ b/users/configs/desktop/sway/default.nix @@ -23,6 +23,9 @@ in { wayland.windowManager.sway = { enable = true; + extraConfigEarly = '' + exec systemctl --user import-environment PATH + ''; config = { startup = [ {command = "swaybg -i ~/wallpapers/wallpaper.jpg";} @@ -52,34 +55,36 @@ in { natural_scroll = "enabled"; }; }; - output = if hostname == "sidon" - then { - DP-3 = { - position = "0 600"; - scale = "1.33"; + output = + if hostname == "sidon" + then { + DP-3 = { + position = "0 600"; + scale = "1.33"; + }; + HDMI-A-1 = { + position = "2880 0"; + scale = "1.33"; + transform = "270"; + }; + } + else { + eDP-1 = { + scale = "1.33"; + }; + DP-3 = { + position = "0 0"; + scale = "1.33"; + }; + DP-4 = { + position = "2880 0"; + scale = "1.33"; + }; + HDMI-A-1 = { + position = "2880 0"; + scale = "1.33"; + }; }; - HDMI-A-1 = { - position = "2880 0"; - scale = "1.33"; - transform = "270"; - }; - } else { - eDP-1 = { - scale = "1.33"; - }; - DP-3 = { - position = "0 0"; - scale = "1.33"; - }; - DP-4 = { - position = "2880 0"; - scale = "1.33"; - }; - HDMI-A-1 = { - position = "2880 0"; - scale = "1.33"; - }; - }; workspaceOutputAssign = [ { output = "HDMI-A-1"; diff --git a/users/daniel/default.nix b/users/daniel/default.nix index 3491bab..7db49ae 100644 --- a/users/daniel/default.nix +++ b/users/daniel/default.nix @@ -4,6 +4,7 @@ fetchurl, hostname, headless, + inputs, ... }: let cliPackages = with pkgs; [ @@ -70,6 +71,7 @@ wl-clipboard xclip zathura + zed-editor ]; defaultUser = "daniel"; @@ -79,6 +81,7 @@ in { ../configs/system ] ++ lib.optionals (!headless) [ + inputs.zen-browser.homeModules.beta ../configs/desktop ] ++ lib.optionals (builtins.pathExists ./host-specific/${hostname}) [ @@ -118,6 +121,22 @@ in { stateVersion = "21.05"; }; + xdg.portal = { + enable = true; + extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + xdg-desktop-portal-wlr + ]; + xdgOpenUsePortal = true; + config = { + common = { + default = "gtk"; + "org.freedesktop.impl.portal.Screencast" = "wlr"; + "org.freedesktop.impl.portal.Screenshot" = "wlr"; + }; + }; + }; + programs = { # Let Home Manager install and manage itself. home-manager.enable = true; @@ -163,6 +182,8 @@ in { vscode.enable = true; + zen-browser.enable = true; + zsh = { enable = true; autosuggestion.enable = true;