diff --git a/flake.lock b/flake.lock index 881de66..fab3281 100644 --- a/flake.lock +++ b/flake.lock @@ -514,6 +514,21 @@ "type": "github" } }, + "nixos-boot": { + "locked": { + "lastModified": 1722927293, + "narHash": "sha256-8oCsiFyAuidAdhSz60Lu8+TwCPHxaeWixyv0xT0mLt4=", + "owner": "Melkor333", + "repo": "nixos-boot", + "rev": "afaed735149d0a06f234e54dd2d9db2e18dc64ae", + "type": "github" + }, + "original": { + "owner": "Melkor333", + "repo": "nixos-boot", + "type": "github" + } + }, "nixos-hardware": { "locked": { "lastModified": 1757103352, @@ -745,6 +760,7 @@ "niri": "niri", "nix-flatpak": "nix-flatpak", "nix-mineral": "nix-mineral", + "nixos-boot": "nixos-boot", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_6", "stylix": "stylix", diff --git a/flake.nix b/flake.nix index 2ebd617..b973181 100644 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ }; gnome-mobile.url = "github:chuangzhu/nixpkgs-gnome-mobile"; nix-flatpak.url = "github:gmodena/nix-flatpak"; + nixos-boot.url = "github:Melkor333/nixos-boot"; }; outputs = @@ -90,81 +91,86 @@ }; # Packages - packages = let cutieMobileImages = inputs.self.nixosConfigurations.cutie.config.mobile.outputs.android.android-fastboot-images; in { - default = cutieMobileImages; - cutie-mobile-images = - inputs.self.nixosConfigurations.cutie.config.mobile.outputs.android.android-fastboot-images; - hello-kitty-cursors = pkgs.stdenv.mkDerivation { - pname = "hello-kitty-cursors"; - version = "1.0.0"; + packages = + let + cutieMobileImages = + inputs.self.nixosConfigurations.cutie.config.mobile.outputs.android.android-fastboot-images; + in + { + default = cutieMobileImages; + cutie-mobile-images = + inputs.self.nixosConfigurations.cutie.config.mobile.outputs.android.android-fastboot-images; + hello-kitty-cursors = pkgs.stdenv.mkDerivation { + pname = "hello-kitty-cursors"; + version = "1.0.0"; - src = pkgs.fetchzip { - url = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip"; - sha256 = "sha256-p4US/gftDL0ne4l0dHUIKKZy2oibkOqdJ3fMisySnNM="; - stripRoot = false; - }; + src = pkgs.fetchzip { + url = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip"; + sha256 = "sha256-p4US/gftDL0ne4l0dHUIKKZy2oibkOqdJ3fMisySnNM="; + stripRoot = false; + }; - installPhase = '' - mkdir -p $out/share/icons/HelloKitty - for file in ${inputs.self}/cursors/*; do - if [ -e "$file" ]; then - cp "$file" "$out/share/icons/HelloKitty/" + installPhase = '' + mkdir -p $out/share/icons/HelloKitty + for file in ${inputs.self}/cursors/*; do + if [ -e "$file" ]; then + cp "$file" "$out/share/icons/HelloKitty/" + else + echo "Warning: File $file does not exist." + fi + done + + # Adjust the path to index.theme if necessary + if [ -e "${inputs.self}/index.theme" ]; then + cp "${inputs.self}/index.theme" "$out/share/icons/HelloKitty/" else - echo "Warning: File $file does not exist." + echo "Warning: index.theme does not exist." fi - done + ''; - # Adjust the path to index.theme if necessary - if [ -e "${inputs.self}/index.theme" ]; then - cp "${inputs.self}/index.theme" "$out/share/icons/HelloKitty/" - else - echo "Warning: index.theme does not exist." - fi - ''; + meta = with lib; { + description = "Hello Kitty Cursor theme"; + homepage = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip"; + license = licenses.gpl2Only; + }; + }; - meta = with lib; { - description = "Hello Kitty Cursor theme"; - homepage = "https://www.rw-designer.com/cursor-downloadset/hello-kitty.zip"; - license = licenses.gpl2Only; + wallpapers = pkgs.stdenv.mkDerivation { + name = "wallpapers"; + src = ./assets; + + buildInputs = with pkgs; [ ffmpeg ]; + + 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; + }; }; }; - wallpapers = pkgs.stdenv.mkDerivation { - name = "wallpapers"; - src = ./assets; - - buildInputs = with pkgs; [ ffmpeg ]; - - 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; - }; - }; - }; - # Development shell devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ @@ -208,6 +214,8 @@ inputs.determinate.nixosModules.default inputs.musnix.nixosModules.musnix + inputs.nixos-boot.nixosModules.default + inputs.home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; @@ -248,6 +256,8 @@ inputs.stylix.nixosModules.stylix ./modules/stylix.nix ./modules/firefox-nixos.nix + ./modules/boot.nix + ./modules/binfmt.nix ]; }; }; diff --git a/hosts/p50/configuration.nix b/hosts/p50/configuration.nix index b279c19..ecf0530 100644 --- a/hosts/p50/configuration.nix +++ b/hosts/p50/configuration.nix @@ -2,8 +2,9 @@ # your system. Help is available in the configuration.nix(5) man page, on # https://search.nixos.org/options and in the NixOS manual (`nixos-help`). -{ pkgs -, ... +{ + pkgs, + ... }: { diff --git a/modules/binfmt.nix b/modules/binfmt.nix new file mode 100644 index 0000000..46ec12d --- /dev/null +++ b/modules/binfmt.nix @@ -0,0 +1,33 @@ +{ ... }: +{ + boot.binfmt.emulatedSystems = [ + "aarch64-linux" + "aarch64_be-linux" + "alpha-linux" + "armv6l-linux" + "armv7l-linux" + "i386-linux" + "i486-linux" + "i586-linux" + "i686-linux" + "i686-windows" + "loongarch64-linux" + "mips-linux" + "mips64-linux" + "mips64-linuxabin32" + "mips64el-linux" + "mips64el-linuxabin32" + "mipsel-linux" + "powerpc-linux" + "powerpc64-linux" + "powerpc64le-linux" + "riscv32-linux" + "riscv64-linux" + "s390x-linux" + "sparc-linux" + "sparc64-linux" + "wasm32-wasi" + "wasm64-wasi" + "x86_64-windows" + ]; +} diff --git a/modules/boot.nix b/modules/boot.nix new file mode 100644 index 0000000..fd3a429 --- /dev/null +++ b/modules/boot.nix @@ -0,0 +1,16 @@ +{ lib, ... }: +{ + nixos-boot = { + enable = true; + + # Different colors + # bgColor.red = 100; # 0 - 255 + # bgColor.green = 100; # 0 - 255 + # bgColor.blue = 100; # 0 - 255 + + # If you want to make sure the theme is seen when your computer starts too fast + # duration = 3; # in seconds + }; + + boot.plymouth.theme = lib.mkForce "load_unload"; +} diff --git a/modules/home.nix b/modules/home.nix index 7cf0039..032b2f8 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -1,6 +1,7 @@ -{ config -, pkgs -, ... +{ + config, + pkgs, + ... }: { imports = [ @@ -128,6 +129,8 @@ jetbrains.idea-community jdk gradle + + dust ]; # basic configuration of git, please change to your own programs.git = { diff --git a/modules/nix.nix b/modules/nix.nix index d90cbe0..7516349 100644 --- a/modules/nix.nix +++ b/modules/nix.nix @@ -14,10 +14,12 @@ substituters = [ "https://nix-gaming.cachix.org" "https://attic.mildlyfunctional.gay/nixbsd" + "https://ai.cachix.org" ]; trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" "nixbsd:gwcQlsUONBLrrGCOdEboIAeFq9eLaDqfhfXmHZs1mgc=" + "ai.cachix.org-1:N9dzRK+alWwoKXQlnn0H6aUx0lU/mspIoz8hMvGvbbc=" ]; }; } diff --git a/modules/wallpaper.nix b/modules/wallpaper.nix index dbc0594..97b674d 100644 --- a/modules/wallpaper.nix +++ b/modules/wallpaper.nix @@ -1,10 +1,17 @@ -{ pkgs -, inputs -, ... +{ + pkgs, + inputs, + ... }: { - programs.mpvpaper = { + programs.wpaperd = { enable = true; + settings = { + eDP-1 = { + path = ../assets/wp6553608.jpg; + apply-shadow = true; + }; + }; }; }