flake: nixos-wallpaper use flake input

This commit is contained in:
陈浩南 2024-09-28 14:11:13 +08:00
parent 024598227a
commit 17725727bc
5 changed files with 25 additions and 18 deletions

View File

@ -24,11 +24,11 @@
"blog": {
"flake": false,
"locked": {
"lastModified": 1726563057,
"narHash": "sha256-0BuPxaijAnZvkYCFACLqhj3DRcb1gPJh6fXb+rfjOwc=",
"lastModified": 1727514234,
"narHash": "sha256-8js4LZVm+xwJo4up35OuC+o9VAVjYXg+3+Us5u161g8=",
"ref": "refs/heads/main",
"rev": "837cd77a8ea5217bc18d155c977c28c73e29db15",
"revCount": 1,
"rev": "261474057255e9891db234a79fbf9f4358d36cab",
"revCount": 4,
"type": "git",
"url": "https://git.chn.moe/chn/blog.git"
},
@ -968,6 +968,22 @@
"type": "github"
}
},
"nixos-wallpaper": {
"flake": false,
"locked": {
"lastModified": 1715952274,
"narHash": "sha256-i2L4L9mV/wOl6QV+d8pyLZUHS+QIFJN5lYuQrP+CSjk=",
"ref": "refs/heads/main",
"rev": "1ad78b20b21c9f4f7ba5f4c897f74276763317eb",
"revCount": 1,
"type": "git",
"url": "https://git.chn.moe/chn/nixos-wallpaper.git"
},
"original": {
"type": "git",
"url": "https://git.chn.moe/chn/nixos-wallpaper.git"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1727148179,
@ -1415,6 +1431,7 @@
"nix-index-database": "nix-index-database",
"nix-vscode-extensions": "nix-vscode-extensions",
"nixos-hardware": "nixos-hardware",
"nixos-wallpaper": "nixos-wallpaper",
"nixpkgs": "nixpkgs",
"nixpkgs-22.05": "nixpkgs-22.05",
"nixpkgs-22.11": "nixpkgs-22.11",

View File

@ -72,9 +72,7 @@
py4vasp = { url = "github:vasp-dev/py4vasp"; flake = false; };
pocketfft = { url = "github:/mreineck/pocketfft"; flake = false; };
blog = { url = "git+https://git.chn.moe/chn/blog.git"; flake = false; };
# does not support lfs yet
# nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
nixos-wallpaper = { url = "git+https://git.chn.moe/chn/nixos-wallpaper.git"; flake = false; };
};
outputs = inputs: let localLib = import ./flake/lib.nix inputs.nixpkgs.lib; in

View File

@ -1,10 +1,2 @@
{ inputs }: 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;
};
}
{}

View File

@ -102,7 +102,7 @@ inputs:
baloofilerc."Basic Settings".Indexing-Enabled.value = false;
plasmarc.Wallpapers.usersWallpapers.value =
let
inherit (inputs.topInputs.self.src) nixos-wallpaper;
inherit (inputs.topInputs) 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}")

View File

@ -2,7 +2,7 @@ inputs:
{
config.home-manager.users.chn.config.programs.plasma.configFile =
let
inherit (inputs.topInputs.self.src) nixos-wallpaper;
inherit (inputs.topInputs) nixos-wallpaper;
wallpaper =
{
pc = "${nixos-wallpaper}/pixiv-117612023.png";