changes
This commit is contained in:
@@ -17,7 +17,7 @@ let
|
||||
in
|
||||
{
|
||||
options.my-namespace.cosmic-desktop = {
|
||||
enable = mkEnableOption "Enable nvidia";
|
||||
enable = mkEnableOption "Enable cosmic";
|
||||
};
|
||||
imports = [ inputs.nixos-cosmic.nixosModules.default ];
|
||||
config = mkIf cfg.enable {
|
||||
|
||||
@@ -28,16 +28,17 @@ in
|
||||
};
|
||||
boot.kernelParams = [
|
||||
"nvidia.NVreg_PreserveVideoMemoryAllocations=1"
|
||||
"nvidia-drm.fbdev=1"
|
||||
"nvidia-drm.modeset=1"
|
||||
"amdgpu.modeset=0"
|
||||
"nvidia-drm.fbdev=0"
|
||||
"nvidia-drm.modeset=0"
|
||||
"amdgpu.modeset=1"
|
||||
];
|
||||
boot.initrd.kernelModules = [
|
||||
# "amdgpu"
|
||||
"nvidia"
|
||||
"nvidia-drm"
|
||||
"nvidiafb"
|
||||
# "nvidia-uvm"
|
||||
"nvidia_drm"
|
||||
"nvidia-uvm"
|
||||
"nvidia_uvm"
|
||||
# "nvidia-modeset"
|
||||
# "i2c-nvidia_gpu"
|
||||
];
|
||||
@@ -72,7 +73,7 @@ in
|
||||
amdgpuBusId = "PCI:50:0:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
} // lib.optionalAttrs config.nvidia-sync.enable {
|
||||
sync.enable = true;
|
||||
sync.enable = false;
|
||||
} // lib.optionalAttrs (config.nvidia-offload.enable) {
|
||||
offload = {
|
||||
enable = true;
|
||||
@@ -106,13 +107,14 @@ in
|
||||
Identifier "amdgpu"
|
||||
Driver "amdgpu"
|
||||
BusID "PCI:50:0:0"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
#Option "AllowNVIDIAGPUScreens"
|
||||
#Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
|
||||
Section "Screen"
|
||||
Identifier "amdgpu"
|
||||
Device "amdgpu"
|
||||
Option "AllowEmptyInitialConfiguration" "True"
|
||||
#Option "AllowEmptyInitialConfiguration" "True"
|
||||
EndSection
|
||||
'';
|
||||
# services.xserver.config = lib.mkForce ''
|
||||
@@ -146,4 +148,4 @@ in
|
||||
# EndSection
|
||||
# '';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
71
modules/nixos/wallpaper-engine-kde-plugin/default.nix
Normal file
71
modules/nixos/wallpaper-engine-kde-plugin/default.nix
Normal file
@@ -0,0 +1,71 @@
|
||||
{ lib, pkgs, inputs, config, namespace, ... }:
|
||||
|
||||
let
|
||||
# Import the plugin as a package derivation from your local repo
|
||||
# Pass the 'inputs' parameter explicitly to make wallpaper-engine-plugin-src available
|
||||
wallpaperEnginePkg = pkgs.callPackage ../../../packages/wallpaper-engine-kde-plugin/default.nix { inherit inputs; };
|
||||
in {
|
||||
options.${namespace}.wallpaper-engine-kde-plugin.enable =
|
||||
lib.mkEnableOption "Enable Wallpaper Engine KDE plugin";
|
||||
|
||||
config = lib.mkIf config.${namespace}.wallpaper-engine-kde-plugin.enable {
|
||||
# Add the imported package and helper script to systemPackages
|
||||
environment.systemPackages = [
|
||||
wallpaperEnginePkg
|
||||
(pkgs.writeShellScriptBin "wallpaper-engine-kde-setup" ''
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
STEAM_DIR="$HOME/.local/share/Steam"
|
||||
WORKSHOP_PATH="$STEAM_DIR/steamapps/workshop/content/431960"
|
||||
|
||||
echo "Wallpaper Engine KDE Plugin Setup Helper"
|
||||
echo "========================================"
|
||||
|
||||
# Check if Steam directory exists
|
||||
if [ -d "$STEAM_DIR" ]; then
|
||||
echo "✅ Steam directory found at: $STEAM_DIR"
|
||||
|
||||
if [ -d "$WORKSHOP_PATH" ]; then
|
||||
echo "✅ Workshop content directory found at: $WORKSHOP_PATH"
|
||||
echo " You can use this path in the wallpaper settings."
|
||||
else
|
||||
echo "⚠️ Workshop content directory not found at the expected location."
|
||||
echo " Please locate your Steam workshop content for Wallpaper Engine (app ID 431960)"
|
||||
fi
|
||||
else
|
||||
echo "⚠️ Steam directory not found at: $STEAM_DIR"
|
||||
echo " Please install Steam and Wallpaper Engine first."
|
||||
fi
|
||||
|
||||
# Check symlinks
|
||||
if [ -L "$HOME/.local/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde" ]; then
|
||||
echo "✅ Plugin symlink is correctly set up"
|
||||
else
|
||||
echo "⚠️ Plugin symlink not found, attempting to create it..."
|
||||
mkdir -p "$HOME/.local/share/plasma/wallpapers"
|
||||
ln -sf /run/current-system/sw/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde \
|
||||
"$HOME/.local/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde"
|
||||
echo " Done! Symlink created."
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "To use Wallpaper Engine wallpapers in KDE:"
|
||||
echo "1. Right-click on desktop → Configure Desktop and Wallpaper"
|
||||
echo "2. Select 'Wallpaper Engine' from the wallpaper type list"
|
||||
echo "3. Set the path to your workshop content directory"
|
||||
'')
|
||||
];
|
||||
|
||||
systemd.user.services.wallpaperEngineSymlink = {
|
||||
description = "Symlink Wallpaper Engine plugin for Plasma";
|
||||
wantedBy = [ "graphical-session.target" ];
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
ExecStartPre = "${pkgs.coreutils}/bin/mkdir -p %h/.local/share/plasma/wallpapers";
|
||||
ExecStart = "${pkgs.coreutils}/bin/ln -sfn /run/current-system/sw/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde %h/.local/share/plasma/wallpapers/com.github.catsout.wallpaperEngineKde";
|
||||
RemainAfterExit = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user