mirror of
https://github.com/nickolaj-jepsen/nixos.git
synced 2026-01-22 16:16:50 +01:00
refactor: desktop legacy module
This commit is contained in:
parent
5f56c011ab
commit
d463f4d1af
31 changed files with 630 additions and 577 deletions
60
modules/desktop/dms/background.nix
Normal file
60
modules/desktop/dms/background.nix
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
background = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "desktop-background";
|
||||
version = "0.2";
|
||||
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = lib.fileset.unions [
|
||||
./backgrounds/geometry.svg
|
||||
./backgrounds/unknown.svg
|
||||
];
|
||||
};
|
||||
|
||||
nativeBuildInputs = [pkgs.inkscape];
|
||||
|
||||
buildPhase = ''
|
||||
inkscape -w 3840 -h 2160 backgrounds/geometry.svg -o geometry.png
|
||||
inkscape -w 3840 -h 2160 backgrounds/unknown.svg -o unknown.png
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/backgrounds
|
||||
cp *.svg *.png $out/share/backgrounds
|
||||
'';
|
||||
};
|
||||
unknownPng = background + "/share/backgrounds/unknown.png";
|
||||
geometryPng = background + "/share/backgrounds/geometry.png";
|
||||
pngs = [
|
||||
unknownPng
|
||||
geometryPng
|
||||
];
|
||||
in {
|
||||
config = lib.mkIf config.fireproof.desktop.enable {
|
||||
fireproof.home-manager = {
|
||||
# Use hyprpaper as we can't currently set wallpapers through DMS
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = pngs;
|
||||
wallpaper = [",${builtins.head pngs}"];
|
||||
};
|
||||
};
|
||||
|
||||
programs.dankMaterialShell.default.settings = {
|
||||
# Disables wallpaper management in DMS to avoid conflicts with Hyprpaper
|
||||
screenPreferences.wallpaper = [];
|
||||
};
|
||||
|
||||
programs.dankMaterialShell.default.session = {
|
||||
# Attempt to set a default wallpaper on first run
|
||||
wallpaperPath = unknownPng;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue