diff --git a/hosts/thinkpad/default.nix b/hosts/thinkpad/default.nix index 895fa1c..d8601ff 100755 --- a/hosts/thinkpad/default.nix +++ b/hosts/thinkpad/default.nix @@ -6,6 +6,7 @@ [ ./hardware-configuration.nix ./modules/networks + ./modules/greetd ./modules/snapper ../../shared/vim.nix ../../shared/sops.nix diff --git a/hosts/thinkpad/modules/greetd/default.nix b/hosts/thinkpad/modules/greetd/default.nix new file mode 100644 index 0000000..e36f099 --- /dev/null +++ b/hosts/thinkpad/modules/greetd/default.nix @@ -0,0 +1,11 @@ +{ config, pkgs, ...}: +{ + services.greetd = { + enable = true; + settings = { + default_session = { + command = "${pkgs.greetd.greetd}/bin/agreety --cmd Hyprland"; + }; + }; + }; +} diff --git a/hosts/thinkpad/modules/snapper/default.nix b/hosts/thinkpad/modules/snapper/default.nix index 14c1e18..f297143 100644 --- a/hosts/thinkpad/modules/snapper/default.nix +++ b/hosts/thinkpad/modules/snapper/default.nix @@ -9,6 +9,8 @@ ALLOW_USERS="rouven" TIMELINE_CREATE=yes TIMELINE_CLEANUP=yes + NUMBER_LIMIT=10 + NUMBER_CLEANUP=yes ''; }; home = { diff --git a/users/rouven/modules/hyprland/default.nix b/users/rouven/modules/hyprland/default.nix index 22f45f8..c89be23 100644 --- a/users/rouven/modules/hyprland/default.nix +++ b/users/rouven/modules/hyprland/default.nix @@ -1,6 +1,9 @@ -{ config, pkgs, hyprpaper, ... }: +{ config, pkgs, ... }: { - imports = [ ./waybar.nix ]; + imports = [ + ./hyprpaper.nix + ./waybar.nix + ]; wayland.windowManager.hyprland.enable = true; home.sessionVariables = { GRIM_DEFAULT_DIR = "~/Pictures/Screenshots/"; @@ -15,19 +18,12 @@ slurp swappy font-awesome - hyprpaper.packages.x86_64-linux.default swaylock-effects ]; xdg.configFile = { "hypr/hyprland.conf".source = ./hyprland.conf; - "hypr/hyprpaper.conf".text = '' - preload = ${../../../../images/wallpaper.png} - wallpaper =eDP-1, ${../../../../images/wallpaper.png} - wallpaper =HDMI-A-1, ${../../../../images/wallpaper.png} - ''; - "swaylock/config".text = '' indicator-radius=200 indicator-thickness=3 diff --git a/users/rouven/modules/hyprland/hyprland.conf b/users/rouven/modules/hyprland/hyprland.conf index e60d8f6..faf0154 100644 --- a/users/rouven/modules/hyprland/hyprland.conf +++ b/users/rouven/modules/hyprland/hyprland.conf @@ -4,10 +4,11 @@ monitor=eDP-1, 1920x1080, 0x0, 1 # See https://wiki.hyprland.org/Configuring/Keywords/ for more # Execute your favorite apps at launch - exec-once = waybar & hyprpaper + #exec-once = waybar & hyprpaper + #exec-once = hyprpaper - # temp fix since the foot service starts too early - exec-once = systemctl --user restart foot + # manually start the systemd target + exec-once = systemctl --user start hyprland-session.target # Source a file (multi-file configs) # source = ~/.config/hypr/myColors.conf diff --git a/users/rouven/modules/hyprland/hyprpaper.nix b/users/rouven/modules/hyprland/hyprpaper.nix new file mode 100644 index 0000000..1ee9e5c --- /dev/null +++ b/users/rouven/modules/hyprland/hyprpaper.nix @@ -0,0 +1,27 @@ +{ config, hyprpaper, ... }: +let + hyprpaper-pkg = hyprpaper.packages.x86_64-linux.default; +in +{ + home.packages = [ + hyprpaper-pkg + ]; + xdg.configFile."hypr/hyprpaper.conf".text = '' + preload = ${../../../../images/wallpaper.png} + wallpaper =eDP-1, ${../../../../images/wallpaper.png} + wallpaper =HDMI-A-1, ${../../../../images/wallpaper.png} + ''; + systemd.user.services.hyprpaper = { + Install.WantedBy = ["graphical-session.target"]; + Service = { + ExecStart = "${hyprpaper-pkg}/bin/hyprpaper"; + Restart = "on-failure"; + }; + Unit = { + After = "graphical-session.target"; + Descriptipon = "Blazing fast wayland wallpaper utility with IPC controls"; + Documentation = "https://github.com/hyprwm/hyprpaper"; + PartOf = "graphical-session.target"; + }; + }; +} diff --git a/users/rouven/modules/hyprland/waybar.nix b/users/rouven/modules/hyprland/waybar.nix index 924937f..dd8dadd 100644 --- a/users/rouven/modules/hyprland/waybar.nix +++ b/users/rouven/modules/hyprland/waybar.nix @@ -2,6 +2,7 @@ { programs.waybar = { enable = true; + systemd.enable = true; package = pkgs.waybar.overrideAttrs (oldAttrs: { mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; });