feat: moved wallpaper to extra modules
This commit is contained in:
parent
b0e2a9fb5f
commit
6ccbef9420
|
@ -974,10 +974,10 @@
|
||||||
"pre-commit-hooks": "pre-commit-hooks_2"
|
"pre-commit-hooks": "pre-commit-hooks_2"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"dirtyRev": "c2b389938b166987c4a4fb867ccaa8ff530ddc71-dirty",
|
"dirtyRev": "f4a871a401059ff0662ef86a059742d47d45a5bc-dirty",
|
||||||
"dirtyShortRev": "c2b3899-dirty",
|
"dirtyShortRev": "f4a871a-dirty",
|
||||||
"lastModified": 1703274021,
|
"lastModified": 1703274528,
|
||||||
"narHash": "sha256-r5y1DmRxlKF3rlJoIULeq1lGVGWbTZxmNGlQ0jW8ZjQ=",
|
"narHash": "sha256-3bmxjxILyOrmjPYJvGZqcBgQPPgUd2cIxFAbvmag0kE=",
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "file:///home/patrick/repos/nix/nixos-extra-modules"
|
"url": "file:///home/patrick/repos/nix/nixos-extra-modules"
|
||||||
},
|
},
|
||||||
|
|
|
@ -17,9 +17,10 @@
|
||||||
home.stateVersion = stateVersion;
|
home.stateVersion = stateVersion;
|
||||||
}
|
}
|
||||||
inputs.nix-index-database.hmModules.nix-index
|
inputs.nix-index-database.hmModules.nix-index
|
||||||
inputs.wired-notify.homeManagerModules.default
|
inputs.nixos-extra-modules.homeManagerModules.default
|
||||||
inputs.spicetify-nix.homeManagerModule
|
|
||||||
inputs.nixvim.homeManagerModules.nixvim
|
inputs.nixvim.homeManagerModules.nixvim
|
||||||
|
inputs.spicetify-nix.homeManagerModule
|
||||||
|
inputs.wired-notify.homeManagerModules.default
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
# HM zsh needs this or else the startup order is fucked
|
# HM zsh needs this or else the startup order is fucked
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
../.
|
../.
|
||||||
./rofi.nix
|
./rofi.nix
|
||||||
./i3.nix
|
./i3.nix
|
||||||
./wallpapers.nix
|
|
||||||
];
|
];
|
||||||
|
xsession.wallpapers.enable = true;
|
||||||
home.file.".xinitrc".source = ./xinitrc;
|
home.file.".xinitrc".source = ./xinitrc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,17 +11,13 @@
|
||||||
flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"];
|
flameshot.Install.WantedBy = lib.mkForce ["i3-session.target"];
|
||||||
};
|
};
|
||||||
stylix.targets.i3.enable = true;
|
stylix.targets.i3.enable = true;
|
||||||
|
|
||||||
xsession.windowManager.i3 = {
|
xsession.windowManager.i3 = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
enableSystemdTarget = true;
|
||||||
config = {
|
config = {
|
||||||
startup = [
|
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 = "${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";}
|
||||||
{command = "systemctl --user start set-wallpaper.timer streamdeck.service";}
|
|
||||||
{
|
|
||||||
command = "${pkgs.systemd}/bin/systemctl --user start i3-session.target";
|
|
||||||
always = false;
|
|
||||||
notification = false;
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
menu = "rofi -show drun";
|
menu = "rofi -show drun";
|
||||||
keybindings = let
|
keybindings = let
|
||||||
|
|
|
@ -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"];
|
|
||||||
}
|
|
|
@ -7,7 +7,7 @@
|
||||||
# copied from nixos wiki
|
# copied from nixos wiki
|
||||||
# https://nixos.wiki/wiki/Using_X_without_a_Display_Manager
|
# https://nixos.wiki/wiki/Using_X_without_a_Display_Manager
|
||||||
if test -z "$DBUS_SESSION_BUS_ADDRESS"; then
|
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
|
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
|
systemctl --user import-environment PATH DISPLAY XAUTHORITY XDG_CONFIG_DIRS XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID DBUS_SESSION_BUS_ADDRESS || true
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue