cleanup names

This commit is contained in:
mjallen18
2025-08-26 20:28:55 -05:00
parent 02085e7ff1
commit d6ae29f16f
56 changed files with 1406 additions and 1336 deletions

View File

@@ -10,9 +10,9 @@ let
# Create a persistent directory for wallpapers
wallpaperDir = "/var/lib/wallpapers";
# Default fallback wallpaper (included in the system)
defaultWallpaper = pkgs.runCommand "default-wallpaper" {} ''
defaultWallpaper = pkgs.runCommand "default-wallpaper" { } ''
mkdir -p $out
cp ${pkgs.nixos-artwork.wallpapers.nineish-dark-gray}/share/backgrounds/nixos/nix-wallpaper-nineish-dark-gray.png $out/default.jpg
'';
@@ -22,10 +22,10 @@ let
WALLPAPER_DIR="${wallpaperDir}"
IMG_PATH="$WALLPAPER_DIR/current.jpg"
FALLBACK_PATH="$WALLPAPER_DIR/fallback.jpg"
# Ensure directory exists
mkdir -p "$WALLPAPER_DIR"
# Copy to the standard location for other services
ln -sf "$IMG_PATH" /run/wallpaper.jpg
@@ -58,10 +58,10 @@ let
WALLPAPER_DIR="${wallpaperDir}"
IMG_PATH="$WALLPAPER_DIR/current.jpg"
FALLBACK_PATH="$WALLPAPER_DIR/fallback.jpg"
# Ensure directory exists
mkdir -p "$WALLPAPER_DIR"
# Copy to the standard location for other services
ln -sf "$IMG_PATH" /run/wallpaper.jpg
@@ -89,7 +89,6 @@ let
'';
# Select the appropriate wallpaper script based on the configuration
wallpaper-script = if cfg.wallpaperSource == "nasa" then nasa-wallpaper else bing-wallpaper;
sddmThemeName = "sddm-astronaut-theme";
sddmThemePkg = pkgs.sddm-astronaut.override {
@@ -101,22 +100,22 @@ let
# The script to use based on the selected wallpaper source
wallpaper-command = if cfg.wallpaperSource == "nasa" then "nasa-wallpaper" else "bing-wallpaper";
# System activation script to ensure wallpaper is available early in boot
wallpaper-activation-script = ''
# Create wallpaper directory if it doesn't exist
mkdir -p ${wallpaperDir}
# Copy default wallpaper as fallback if it doesn't exist
if [ ! -f ${wallpaperDir}/fallback.jpg ]; then
cp ${defaultWallpaper}/default.jpg ${wallpaperDir}/fallback.jpg
fi
# If no current wallpaper exists, use the fallback
if [ ! -f ${wallpaperDir}/current.jpg ]; then
cp ${wallpaperDir}/fallback.jpg ${wallpaperDir}/current.jpg
fi
# Create symlink for Plymouth and SDDM
ln -sf ${wallpaperDir}/current.jpg /run/wallpaper.jpg
'';
@@ -130,10 +129,10 @@ in
nasa-wallpaper
pkgs.jq
];
# Add system activation script to ensure wallpaper is available early
system.activationScripts.wallpaper = wallpaper-activation-script;
# Configure Plymouth to use the same wallpaper
boot.plymouth = {
enable = true;
@@ -211,22 +210,25 @@ in
TimeoutSec = "10s"; # Limit how long we wait for network
};
};
# Create a service that runs very early in boot to ensure wallpaper is available
early-wallpaper-setup = {
enable = true;
description = "Setup wallpaper early in boot process";
wantedBy = [ "multi-user.target" "plymouth-start.service" ];
wantedBy = [
"multi-user.target"
"plymouth-start.service"
];
before = [ "plymouth-start.service" ];
script = ''
# Ensure wallpaper directory exists
mkdir -p ${wallpaperDir}
# If no current wallpaper exists, use the fallback
if [ ! -f ${wallpaperDir}/current.jpg ]; then
cp ${wallpaperDir}/fallback.jpg ${wallpaperDir}/current.jpg
fi
# Create symlink for Plymouth and SDDM
ln -sf ${wallpaperDir}/current.jpg /run/wallpaper.jpg
'';

View File

@@ -3,9 +3,12 @@ with lib;
{
options.mjallen.desktop.hyprland = {
enable = mkEnableOption "enable hyprland desktop environment";
wallpaperSource = mkOption {
type = types.enum [ "bing" "nasa" ];
type = types.enum [
"bing"
"nasa"
];
default = "bing";
description = "Source for the wallpaper (bing or nasa)";
};