diff --git a/home/rachel.nix b/home/rachel.nix index cca1742..d7dff28 100644 --- a/home/rachel.nix +++ b/home/rachel.nix @@ -95,9 +95,6 @@ in rec { file.".config/berry/autostart" = { source = ./berry_config; }; - file."bin/xinitrc" = { - source = ./xinitrc; - }; stateVersion = "23.11"; }; @@ -535,6 +532,15 @@ in rec { }; }; + xsession = { + enable = true; + initExtra = '' + xwallpaper --zoom "$HOME"/img/wallpaper + ''; + scriptPath = "bin/xinitrc"; + windowManager.command = "${pkgs.berry}/bin/berry"; + }; + systemd.user= { timers = { battery-check = { @@ -544,6 +550,7 @@ in rec { OnUnitActiveSec = "30s"; Unit = "battery-check.service"; }; + Install.WantedBy = [ "graphical-session.target" ]; }; }; services = { diff --git a/home/xinitrc b/home/xinitrc deleted file mode 100644 index e5cd1c6..0000000 --- a/home/xinitrc +++ /dev/null @@ -1,21 +0,0 @@ -cd "$HOME" - -if test -z "$DBUS_SESSION_BUS_ADDRESS"; then - eval $(dbus-launch --exit-with-session --sh-syntax) -fi -systemctl --user import-environment DISPLAY XAUTHORITY - -if command -v dbus-update-activation-environment >/dev/null 2>&1; then - dbus-update-activation-environment DISPLAY XAUTHORITY -fi - -xwallpaper --zoom "$HOME"/img/wallpaper - -systemctl stop --user sxhkd.scope -systemd-cat -t sxhkd systemd-run --user --scope --property=OOMPolicy=continue -u sxhkd sxhkd -m 1 & -systemctl restart --user dunst -systemctl restart --user picom -systemctl restart --user polybar -systemctl restart --user network-manager-applet -systemctl restart --user battery-check.timer -exec berry