meow
This commit is contained in:
parent
44d708329a
commit
7dd32c7a17
9 changed files with 168 additions and 56 deletions
110
flake.nix
110
flake.nix
|
|
@ -35,7 +35,11 @@
|
|||
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
musnix.url = "github:musnix/musnix";
|
||||
nix-mineral = {
|
||||
url = "github:cynicsketch/nix-mineral";
|
||||
flake = false;
|
||||
};
|
||||
};
|
||||
|
||||
outputs =
|
||||
|
|
@ -53,10 +57,12 @@
|
|||
stylix,
|
||||
comin,
|
||||
firefox-addons,
|
||||
musnix,
|
||||
nix-mineral,
|
||||
}:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
lib = pkgs.lib;
|
||||
|
||||
# Configure treefmt
|
||||
|
|
@ -90,48 +96,90 @@
|
|||
};
|
||||
in
|
||||
{
|
||||
packages.${system}.wallpapers = pkgs.stdenv.mkDerivation {
|
||||
name = "wallpapers";
|
||||
src = ./assets;
|
||||
packages.${system} = {
|
||||
hello-kitty-cursors = pkgs.stdenv.mkDerivation {
|
||||
pname = "hello-kitty-cursors";
|
||||
version = "1.0.0";
|
||||
|
||||
buildInputs = with pkgs; [ ffmpeg ];
|
||||
src = pkgs.fetchzip {
|
||||
url = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip";
|
||||
sha256 = "sha256-p4US/gftDL0ne4l0dHUIKKZy2oibkOqdJ3fMisySnNM="; # Replace with the actual hash of the zip file
|
||||
stripRoot = false;
|
||||
};
|
||||
|
||||
buildPhase = ''
|
||||
# Create output directory
|
||||
mkdir -p $out/share/wallpapers
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/icons/HelloKitty
|
||||
for file in ${self}/cursors/*; do
|
||||
if [ -e "$file" ]; then
|
||||
cp "$file" "$out/share/icons/HelloKitty/"
|
||||
else
|
||||
echo "Warning: File $file does not exist."
|
||||
fi
|
||||
done
|
||||
|
||||
# Copy static wallpaper
|
||||
cp "wp6553608.jpg" "$out/share/wallpapers/static-wallpaper.jpg"
|
||||
# Adjust the path to index.theme if necessary
|
||||
if [ -e "${self}/index.theme" ]; then
|
||||
cp "${self}/index.theme" "$out/share/icons/HelloKitty/"
|
||||
else
|
||||
echo "Warning: index.theme does not exist."
|
||||
fi
|
||||
'';
|
||||
|
||||
# Copy original animated wallpaper
|
||||
cp "Anime Live Wallpaper - Anime Cat Girl Snow - HD - no copyright [SiMc3l0ido0].mp4" \
|
||||
"$out/share/wallpapers/anime-cat-girl-snow.mp4"
|
||||
meta = with nixpkgs.lib; {
|
||||
description = "Hello Kitty Cursor theme";
|
||||
homepage = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip";
|
||||
license = licenses.gpl2Only;
|
||||
maintainers = with maintainers; [ your-maintainer-name ]; # Replace with your name
|
||||
};
|
||||
};
|
||||
|
||||
# Create optimized version
|
||||
${pkgs.ffmpeg}/bin/ffmpeg -i "Anime Live Wallpaper - Anime Cat Girl Snow - HD - no copyright [SiMc3l0ido0].mp4" \
|
||||
-vf "scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080" \
|
||||
-r 30 -c:v libx264 -crf 28 -preset medium \
|
||||
-t 30 -an "$out/share/wallpapers/anime-cat-girl-snow-optimized.mp4"
|
||||
'';
|
||||
wallpapers = pkgs.stdenv.mkDerivation {
|
||||
name = "wallpapers";
|
||||
src = ./assets;
|
||||
|
||||
installPhase = ''
|
||||
# Files are already in the right place from buildPhase
|
||||
echo "Wallpapers installed to $out/share/wallpapers"
|
||||
'';
|
||||
buildInputs = with pkgs; [ ffmpeg ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Personal wallpaper collection";
|
||||
platforms = platforms.linux;
|
||||
buildPhase = ''
|
||||
# Create output directory
|
||||
mkdir -p $out/share/wallpapers
|
||||
|
||||
# Copy static wallpaper
|
||||
cp "wp6553608.jpg" "$out/share/wallpapers/static-wallpaper.jpg"
|
||||
|
||||
# Copy original animated wallpaper
|
||||
cp "Anime Live Wallpaper - Anime Cat Girl Snow - HD - no copyright [SiMc3l0ido0].mp4" \
|
||||
"$out/share/wallpapers/anime-cat-girl-snow.mp4"
|
||||
|
||||
# Create optimized version
|
||||
${pkgs.ffmpeg}/bin/ffmpeg -i "Anime Live Wallpaper - Anime Cat Girl Snow - HD - no copyright [SiMc3l0ido0].mp4" \
|
||||
-vf "scale=1920:1080:force_original_aspect_ratio=increase,crop=1920:1080" \
|
||||
-r 30 -c:v libx264 -crf 28 -preset medium \
|
||||
-t 30 -an "$out/share/wallpapers/anime-cat-girl-snow-optimized.mp4"
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
# Files are already in the right place from buildPhase
|
||||
echo "Wallpapers installed to $out/share/wallpapers"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Personal wallpaper collection";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations.p50 = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = { inherit inputs; };
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
"${nix-mineral}/nix-mineral.nix"
|
||||
niri.nixosModules.niri
|
||||
nixos-hardware.nixosModules.lenovo-thinkpad-p50
|
||||
./configuration.nix
|
||||
determinate.nixosModules.default
|
||||
musnix.nixosModules.musnix
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
|
|
@ -149,6 +197,8 @@
|
|||
{
|
||||
imports = [
|
||||
./modules/home.nix
|
||||
./modules/bottom.nix
|
||||
./modules/htop.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
|
|
@ -166,12 +216,6 @@
|
|||
inputs.self.packages.${pkgs.system}.wallpapers
|
||||
}/share/wallpapers/anime-cat-girl-snow-optimized.mp4";
|
||||
};
|
||||
|
||||
# Configure dconf settings here or inside home.nix
|
||||
# Example:
|
||||
# home.sessionVariables = {
|
||||
# XDG_CURRENT_DESKTOP = "GNOME";
|
||||
# };
|
||||
};
|
||||
}
|
||||
c3d2-user-module.nixosModule
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue