fix sddm theme and background preloading
This commit is contained in:
@@ -4,13 +4,14 @@ let
|
||||
|
||||
bing-wallpaper = pkgs.writeScriptBin "bing-wallpaper" ''
|
||||
# Directory to store wallpapers
|
||||
IMG_PATH="/tmp/wallpaper.jpg"
|
||||
IMG_PATH="/run/wallpaper.jpg"
|
||||
|
||||
# Download if not already downloaded
|
||||
URL=$(curl -s "https://www.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1" | \
|
||||
jq -r '.images[0].url')
|
||||
FULL_URL="https://www.bing.com$URL"
|
||||
curl -s -o "$IMG_PATH" "$FULL_URL"
|
||||
echo "Downloaded $FULL_URL to $IMG_PATH successfully"
|
||||
'';
|
||||
in
|
||||
{
|
||||
@@ -28,6 +29,11 @@ in
|
||||
extraPackages = [ theme.sddm.package ];
|
||||
theme = theme.sddm.themeName;
|
||||
wayland.enable = true;
|
||||
settings = {
|
||||
Theme = {
|
||||
ThemeDir = "${theme.sddm.package}/share/sddm/themes";
|
||||
};
|
||||
};
|
||||
};
|
||||
# Disable gdm
|
||||
gdm.enable = lib.mkForce false;
|
||||
@@ -60,6 +66,7 @@ in
|
||||
systemd = {
|
||||
services = {
|
||||
preload-bing-wallpaper = {
|
||||
enable = true;
|
||||
wants = [ "network.target" ];
|
||||
after = [ "network.target" ];
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
@@ -72,6 +79,9 @@ in
|
||||
script = ''
|
||||
bing-wallpaper
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
};
|
||||
};
|
||||
};
|
||||
user.services.polkit-gnome-authentication-agent-1 = {
|
||||
|
||||
Reference in New Issue
Block a user