mirror of
https://github.com/CHN-beta/nixos.git
synced 2026-01-12 04:19:22 +08:00
packages.desktop: auto add wallpaper
This commit is contained in:
10
flake.nix
10
flake.nix
@@ -204,5 +204,15 @@
|
||||
CMAKE_EXPORT_COMPILE_COMMANDS = "1";
|
||||
};
|
||||
};
|
||||
src = let inherit (inputs.self.packages.x86_64-linux) pkgs; in
|
||||
{
|
||||
nixos-wallpaper = pkgs.fetchgit
|
||||
{
|
||||
url = "https://git.chn.moe/chn/nixos-wallpaper.git";
|
||||
rev = "1ad78b20b21c9f4f7ba5f4c897f74276763317eb";
|
||||
sha256 = "0faahbzsr44bjmwr6508wi5hg59dfb57fzh5x6jh7zwmv4pzhqlb";
|
||||
fetchLFS = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -95,13 +95,21 @@ inputs:
|
||||
[{
|
||||
config.programs =
|
||||
{
|
||||
plasma =
|
||||
plasma =
|
||||
{
|
||||
enable = true;
|
||||
configFile =
|
||||
{
|
||||
plasma-localerc = { Formats.LANG.value = "en_US.UTF-8"; Translations.LANGUAGE.value = "zh_CN"; };
|
||||
baloofilerc."Basic Settings".Indexing-Enabled.value = false;
|
||||
plasmarc.Wallpapers.usersWallpapers.value =
|
||||
let
|
||||
inherit (inputs.topInputs.self.src) nixos-wallpaper;
|
||||
isPicture = f: builtins.elem (inputs.lib.last (inputs.lib.splitString "." f))
|
||||
[ "png" "jpg" "jpeg" "webp" ];
|
||||
in builtins.concatStringsSep "," (builtins.map (f: "${nixos-wallpaper}/${f.name}")
|
||||
(builtins.filter (f: (isPicture f.name) && (f.value == "regular"))
|
||||
(inputs.localLib.attrsToList (builtins.readDir nixos-wallpaper))));
|
||||
};
|
||||
powerdevil =
|
||||
let config =
|
||||
|
||||
@@ -2,13 +2,7 @@ inputs:
|
||||
{
|
||||
config.home-manager.users.chn.config.programs.plasma.configFile =
|
||||
let
|
||||
nixos-wallpaper = inputs.pkgs.fetchgit
|
||||
{
|
||||
url = "https://git.chn.moe/chn/nixos-wallpaper.git";
|
||||
rev = "1ad78b20b21c9f4f7ba5f4c897f74276763317eb";
|
||||
sha256 = "0faahbzsr44bjmwr6508wi5hg59dfb57fzh5x6jh7zwmv4pzhqlb";
|
||||
fetchLFS = true;
|
||||
};
|
||||
inherit (inputs.topInputs.self.src) nixos-wallpaper;
|
||||
wallpaper =
|
||||
{
|
||||
pc = "${nixos-wallpaper}/pixiv-117612023.png";
|
||||
|
||||
Reference in New Issue
Block a user