diff --git a/flake.lock b/flake.lock index cba26eb..eda6d51 100644 --- a/flake.lock +++ b/flake.lock @@ -974,10 +974,10 @@ "pre-commit-hooks": "pre-commit-hooks_2" }, "locked": { - "dirtyRev": "c2b389938b166987c4a4fb867ccaa8ff530ddc71-dirty", - "dirtyShortRev": "c2b3899-dirty", - "lastModified": 1703274021, - "narHash": "sha256-r5y1DmRxlKF3rlJoIULeq1lGVGWbTZxmNGlQ0jW8ZjQ=", + "dirtyRev": "f4a871a401059ff0662ef86a059742d47d45a5bc-dirty", + "dirtyShortRev": "f4a871a-dirty", + "lastModified": 1703274528, + "narHash": "sha256-3bmxjxILyOrmjPYJvGZqcBgQPPgUd2cIxFAbvmag0kE=", "type": "git", "url": "file:///home/patrick/repos/nix/nixos-extra-modules" }, diff --git a/modules/config/home-manager.nix b/modules/config/home-manager.nix index 2f3988a..ec668ac 100644 --- a/modules/config/home-manager.nix +++ b/modules/config/home-manager.nix @@ -17,9 +17,10 @@ home.stateVersion = stateVersion; } inputs.nix-index-database.hmModules.nix-index - inputs.wired-notify.homeManagerModules.default - inputs.spicetify-nix.homeManagerModule + inputs.nixos-extra-modules.homeManagerModules.default inputs.nixvim.homeManagerModules.nixvim + inputs.spicetify-nix.homeManagerModule + inputs.wired-notify.homeManagerModules.default ]; }; # HM zsh needs this or else the startup order is fucked diff --git a/users/common/graphical/Xorg/default.nix b/users/common/graphical/Xorg/default.nix index 6cdb6a8..46d14df 100644 --- a/users/common/graphical/Xorg/default.nix +++ b/users/common/graphical/Xorg/default.nix @@ -7,7 +7,7 @@ ../. ./rofi.nix ./i3.nix - ./wallpapers.nix ]; + xsession.wallpapers.enable = true; home.file.".xinitrc".source = ./xinitrc; } diff --git a/users/common/graphical/Xorg/i3.nix b/users/common/graphical/Xorg/i3.nix index 1f81548..900fd1f 100644 --- a/users/common/graphical/Xorg/i3.nix +++ b/users/common/graphical/Xorg/i3.nix @@ -11,17 +11,13 @@ flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"]; }; stylix.targets.i3.enable = true; + xsession.windowManager.i3 = { enable = true; + enableSystemdTarget = true; config = { startup = [ - {command = "xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rate 60.00 --output DP-4 --mode 2560x1440 --pos 1920x720 --primary --rate 144 --output HDMI-0 --pos 0x1080 --rate 60.00";} - {command = "systemctl --user start set-wallpaper.timer streamdeck.service";} - { - command = "${pkgs.systemd}/bin/systemctl --user start i3-session.target"; - always = false; - notification = false; - } + {command = "${pkgs.xorg.xrandr}/bin/xrandr --output DVI-D-0 --mode 1920x1080 --pos 0x0 --rate 60.00 --output DP-4 --mode 2560x1440 --pos 1920x720 --primary --rate 144 --output HDMI-0 --pos 0x1080 --rate 60.00";} ]; menu = "rofi -show drun"; keybindings = let diff --git a/users/common/graphical/Xorg/wallpapers.nix b/users/common/graphical/Xorg/wallpapers.nix deleted file mode 100644 index eaf58ec..0000000 --- a/users/common/graphical/Xorg/wallpapers.nix +++ /dev/null @@ -1,44 +0,0 @@ -{ - config, - pkgs, - ... -}: let - wallpaper-folder = "${config.home.homeDirectory}/.local/share/wallpapers"; - exe = - pkgs.writeShellScript "set-wallpaper" - '' - ${pkgs.feh}/bin/feh --no-fehbg --bg-fill --randomize \ - $( ${pkgs.findutils}/bin/find ${wallpaper-folder} | ${pkgs.ripgrep}/bin/rg ".*(\.png|\.jpg)$") - ''; -in { - systemd.user = { - timers = { - set-wallpaper = { - Unit = { - Description = "Set a random wallpaper every 3 minutes"; - }; - Timer = { - OnUnitActiveSec = "3 min"; - OnActiveSec = "3 min"; - }; - Install.WantedBy = [ - "timers.target" - ]; - }; - }; - services = { - set-wallpaper = { - Unit = { - Description = "Set a random wallpaper on all X displays"; - ConditionEnvironment = "DISPLAY"; - }; - Service = { - Type = "oneshot"; - ExecStart = - exe; - }; - }; - }; - }; - home.persistence."/state".directories = [".local/share/wallpapers"]; -} diff --git a/users/common/graphical/Xorg/xinitrc b/users/common/graphical/Xorg/xinitrc index 67b849b..2695e35 100644 --- a/users/common/graphical/Xorg/xinitrc +++ b/users/common/graphical/Xorg/xinitrc @@ -7,7 +7,7 @@ # copied from nixos wiki # https://nixos.wiki/wiki/Using_X_without_a_Display_Manager if test -z "$DBUS_SESSION_BUS_ADDRESS"; then - eval $(dbus-launch --exit-with-session --sh-syntax) + eval "$(dbus-launch --exit-with-session --sh-syntax)" fi systemctl --user import-environment PATH DISPLAY XAUTHORITY XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID DBUS_SESSION_BUS_ADDRESS || true