From 4ac107ada96f1c4cf5e58e2a0b8aec82b2072696 Mon Sep 17 00:00:00 2001 From: Remy Moll Date: Thu, 30 Jan 2025 10:54:27 +0100 Subject: [PATCH] wip - fixes to import and config location --- flake.nix | 3 ++ hosts/spectre-x360-2018/default.nix | 4 +- modules/home-manager/flatpaks.nix | 9 ++++- .../home-manager/hyprland-customization.nix | 39 +++++++++++++----- modules/nixos/hyprland.nix | 40 +++++++++---------- 5 files changed, 59 insertions(+), 36 deletions(-) diff --git a/flake.nix b/flake.nix index 277a5cf..95bce6e 100644 --- a/flake.nix +++ b/flake.nix @@ -55,6 +55,9 @@ inputs.nix-flatpak.homeManagerModules.nix-flatpak inputs.walker.homeManagerModules.default ]; + + nixpkgs.overlays = [ inputs.hyprpanel.overlay ]; + # _module.args = { inherit inputs; }; } ]; }; diff --git a/hosts/spectre-x360-2018/default.nix b/hosts/spectre-x360-2018/default.nix index 05cac3b..cca75bb 100644 --- a/hosts/spectre-x360-2018/default.nix +++ b/hosts/spectre-x360-2018/default.nix @@ -4,8 +4,8 @@ imports = [ ./configuration.nix ./hardware-configuration.nix - ../../modules/nixos/flatpak.nix - ../../modules/nixos/hyprland.nix + # ../../modules/nixos/flatpak.nix + # ../../modules/nixos/hyprland.nix ../../modules/nixos/monitoring.nix ../../modules/nixos/nvidia.nix ../../modules/nixos/pipewire.nix diff --git a/modules/home-manager/flatpaks.nix b/modules/home-manager/flatpaks.nix index bfe3a2b..e875199 100644 --- a/modules/home-manager/flatpaks.nix +++ b/modules/home-manager/flatpaks.nix @@ -1,7 +1,12 @@ -{ lib, ... }: { +{ lib, pkgs, ... }: { services.flatpak.enable = true; - + xdg.portal.enable = true; + # install the xdg-desktop-portal-gtk package + # to enable the portal service + xdg.portal.extraPortals = with pkgs; [ + xdg-desktop-portal-gtk + ]; services.flatpak.update.auto.enable = false; services.flatpak.uninstallUnmanaged = false; diff --git a/modules/home-manager/hyprland-customization.nix b/modules/home-manager/hyprland-customization.nix index c6a0041..534e76e 100644 --- a/modules/home-manager/hyprland-customization.nix +++ b/modules/home-manager/hyprland-customization.nix @@ -1,8 +1,10 @@ {inputs, pkgs, ...}: { programs.kitty.enable = true; + wayland.windowManager.hyprland = { enable = true; + systemd.enable = true; settings = { "$mod" = "SUPER"; bind = @@ -14,12 +16,7 @@ "$mod, s, exec, code" ]; - # plugin.virtual-desktops = { - - # } - exec-once = [ - "${pkgs.hyprpanel}/bin/hyprpanel" - ]; + # plugin.virtual-desktops = {} }; plugins = [ @@ -30,6 +27,18 @@ ]; }; + imports = [ inputs.hyprpanel.homeManagerModules.hyprpanel ]; + + programs.hyprpanel = { + enable = true; + hyprland.enable = true; + overwrite.enable = true; + overlay.enable = true; + + # Add custom widgets + styling + }; + + programs.walker = { enable = true; runAsService = true; @@ -53,8 +62,18 @@ # ''; }; - # # Set waybar config - # ".config/waybar/config".text = '' - # '' - + + programs.hyprlock = { + enable = true; + settings = { + general = { + grace = 5; + no_fade_in = false; + disable_loading_bar = false; + }; + }; + # Style the lock screen + }; + + } diff --git a/modules/nixos/hyprland.nix b/modules/nixos/hyprland.nix index 47553ad..49c92d9 100644 --- a/modules/nixos/hyprland.nix +++ b/modules/nixos/hyprland.nix @@ -5,31 +5,27 @@ ... }: { - programs.uwsm.enable = true; + # programs.hyprland = { + # enable = true; + # xwayland.enable = false; + # systemd.enable = true; - programs.hyprland = { - enable = true; - xwayland.enable = false; - withUWSM = true; - }; - - # launch hyprland on login - # systemd.services.hyprland = { - # description = "Hyprland"; - # wantedBy = [ "graphical.target" ]; - # after = [ "display-manager.service" ]; - # serviceConfig = { - # Type = "simple"; - # ExecStart = "${pkgs.hyprland}/bin/hyprland"; - # Restart = "always"; - # RestartSec = "5"; - # User = config.var.username; - # }; # }; - environment.systemPackages = with pkgs; [ - waybar - ]; + # # launch hyprland on login + # # systemd.services.hyprland = { + # # description = "Hyprland"; + # # wantedBy = [ "graphical.target" ]; + # # after = [ "display-manager.service" ]; + # # serviceConfig = { + # # Type = "simple"; + # # ExecStart = "${pkgs.hyprland}/bin/hyprland"; + # # Restart = "always"; + # # RestartSec = "5"; + # # User = config.var.username; + # # }; + # # }; + # systemd.user.targets.hyprland-session.Unit.Wants = [ "xdg-desktop-autostart.target" ]; }