diff options
-rw-r--r-- | flake.lock | 22 | ||||
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | nix/programs/hypr/hyprland.nix | 64 | ||||
-rw-r--r-- | nix/programs/zsh/zshrc | 2 |
4 files changed, 50 insertions, 39 deletions
@@ -254,7 +254,9 @@ "hyprlang": "hyprlang_2", "hyprutils": "hyprutils", "hyprwayland-scanner": "hyprwayland-scanner", - "nixpkgs": "nixpkgs_2", + "nixpkgs": [ + "nixpkgs" + ], "pre-commit-hooks": "pre-commit-hooks", "systems": "systems_2", "xdph": "xdph" @@ -551,22 +553,6 @@ "locked": { "lastModified": 1737469691, "narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1737469691, - "narHash": "sha256-nmKOgAU48S41dTPIXAq0AHZSehWUn6ZPrUKijHAMmIk=", "owner": "nixos", "repo": "nixpkgs", "rev": "9e4d5190a9482a1fb9d18adf0bdb83c6e506eaab", @@ -636,7 +622,7 @@ "hyprland": "hyprland", "hyprland-plugins": "hyprland-plugins", "lanzaboote": "lanzaboote", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_2" } }, "rust-overlay": { @@ -12,6 +12,7 @@ lanzaboote.inputs.nixpkgs.follows = "nixpkgs"; # hyprland hyprland.url = "github:hyprwm/Hyprland"; + hyprland.inputs.nixpkgs.follows = "nixpkgs"; # hyprland plugins hyprland-plugins.url = "github:hyprwm/hyprland-plugins"; hyprland-plugins.inputs.hyprland.follows = "hyprland"; diff --git a/nix/programs/hypr/hyprland.nix b/nix/programs/hypr/hyprland.nix index 948b880..9d3f069 100644 --- a/nix/programs/hypr/hyprland.nix +++ b/nix/programs/hypr/hyprland.nix @@ -10,22 +10,55 @@ let in { - #xdg.portal = { - # enable = true; - # extraPortals = [ hyprland.xdg-desktop-portal-hyprland ]; - #}; + environment = { + variables = { + XDG_CURRENT_DESKTOP = "Hyprland"; + XDG_SESSION_TYPE = "wayland"; + XDG_SESSION_DESKTOP = "Hyprland"; + LIBSEAT_BACKEND = "logind"; + }; + sessionVariables = { + XCURSOR_THEME = "Adwaita"; + XCURSOR_SIZE = "24"; + + GTK_THEME = "Orchis-Teal-Dark"; + + MOZ_ENABLE_WAYLAND = "1"; + MOZ_USE_XINPUT = "1"; + _JAVA_AWT_WM_NONREPARENTING = "1"; + }; + }; + + xdg.portal = { + enable = true; + xdgOpenUsePortal = true; + config = { + common.default = ["gtk"]; + hyprland.default = ["gtk" "hyprland"]; + }; + extraPortals = [ + pkgs.xdg-desktop-portal-gtk + pkgs.xdg-desktop-portal-wlr + hyprland.xdg-desktop-portal-hyprland + ]; + }; nix.settings = { substituters = ["https://hyprland.cachix.org"]; - trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; + trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkGc="]; }; + programs.xwayland.enable = true; + home-manager.users.${config.user} = { wayland.windowManager.hyprland = { enable = true; package = hyprland.hyprland; + xwayland.enable = false; # FIXME: keeps crashing!!! + systemd.enable = true; + # Plugins plugins = [ hyprland-plugins.hyprexpo @@ -34,6 +67,12 @@ in # Config settings = { + + # Debug + debug.disable_logs = false; + debug.disable_time = false; + debug.enable_stdout_logs = true; + # Monitors monitor = map (monitor: "${monitor.name}, highres, auto, ${toString monitor.scale}" @@ -97,21 +136,6 @@ in ]; }; - # Environment - env = [ - "XDG_CURRENT_DESKTOP,Hyprland" - "XDG_SESSION_DESKTOP,Hyprland" - - "XCURSOR_THEME,Adwaita" - "XCURSOR_SIZE,24" - - "GTK_THEME,Orchis-Teal-Dark" - - "MOZ_ENABLE_WAYLAND,1" - "MOZ_USE_XINPUT,1" - "_JAVA_AWT_WM_NONREPARENTING,1" - ]; - # Input input = { kb_layout = "us"; diff --git a/nix/programs/zsh/zshrc b/nix/programs/zsh/zshrc index eedac23..b1c61a2 100644 --- a/nix/programs/zsh/zshrc +++ b/nix/programs/zsh/zshrc @@ -41,7 +41,7 @@ alias ssh='TERM=xterm-256color ssh' # xterm-kitty bad # nix rebuild alias rs="sudo nixos-rebuild switch --flake ~/.config/nix#$(hostname)" -alias rh="sudo home-manager switch --flake ~/.config/nix#$(hostname)" +alias rh="home-manager switch --flake ~/.config/nix#$(hostname)" # manpages export LESS_TERMCAP_md=$'\e[1;36m' |