mirror of
https://git.sr.ht/~rouven/nixos-config
synced 2024-11-15 05:13:10 +01:00
integrated hyprland into systemd
This commit is contained in:
parent
2bb4bc7e38
commit
adc6afca11
|
@ -6,6 +6,7 @@
|
|||
[
|
||||
./hardware-configuration.nix
|
||||
./modules/networks
|
||||
./modules/greetd
|
||||
./modules/snapper
|
||||
../../shared/vim.nix
|
||||
../../shared/sops.nix
|
||||
|
|
11
hosts/thinkpad/modules/greetd/default.nix
Normal file
11
hosts/thinkpad/modules/greetd/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ...}:
|
||||
{
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.greetd}/bin/agreety --cmd Hyprland";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -9,6 +9,8 @@
|
|||
ALLOW_USERS="rouven"
|
||||
TIMELINE_CREATE=yes
|
||||
TIMELINE_CLEANUP=yes
|
||||
NUMBER_LIMIT=10
|
||||
NUMBER_CLEANUP=yes
|
||||
'';
|
||||
};
|
||||
home = {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
27
users/rouven/modules/hyprland/hyprpaper.nix
Normal file
27
users/rouven/modules/hyprland/hyprpaper.nix
Normal file
|
@ -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";
|
||||
};
|
||||
};
|
||||
}
|
|
@ -2,6 +2,7 @@
|
|||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd.enable = true;
|
||||
package = pkgs.waybar.overrideAttrs (oldAttrs: {
|
||||
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue