the desktop environment can be included via `self.nixosModules.nixos95` this will expose two options (for now): nixos95.enable -> enable the desktop environment nixos95.wallpaper -> path to the wallpaper to use currently the setup is closy coupled to this configuration, which will change in the future, so it can be used with any configuration
35 lines
782 B
Nix
35 lines
782 B
Nix
{ inputs, config, lib, pkgs, ... }: let
|
|
cfg = config.nixos95;
|
|
in {
|
|
|
|
options.nixos95 = {
|
|
|
|
wallpaper = lib.mkOption {
|
|
description = "The wallpaper to use";
|
|
type = lib.types.path;
|
|
default = "${inputs.self}/Ressources/Images/Wallpapers/Wallpaper-1.png";
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf cfg.enable {
|
|
|
|
home-manager.users.${cfg.user} = {
|
|
|
|
xdg.configFile = {
|
|
"xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml" = let
|
|
sed = lib.getExe pkgs.gnused;
|
|
desktop = pkgs.runCommand "desktop.xml" { } ''
|
|
${sed} -e "s|NIXOS-95_WALLPAPER|${cfg.wallpaper}|g" ${./dotfiles/xfce4-desktop.xml} > $out
|
|
'';
|
|
in {
|
|
force = true;
|
|
source = desktop;
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|