From 2d69f55eba8d5b8739d2a21e53e143e7be48da29 Mon Sep 17 00:00:00 2001 From: kenji Date: Tue, 1 Jul 2025 09:22:28 -0500 Subject: [PATCH] n --- packages/quickshell/default.nix | 81 ++++++++++++++++++++++++++++++--- system/font.nix | 1 + system/services.nix | 1 + 3 files changed, 77 insertions(+), 6 deletions(-) diff --git a/packages/quickshell/default.nix b/packages/quickshell/default.nix index a75b8c0..f5ac7ee 100644 --- a/packages/quickshell/default.nix +++ b/packages/quickshell/default.nix @@ -1,9 +1,78 @@ +{ pkgs, inputs, ... }: # Make sure 'inputs' is passed to this module if it's separate from flake.nix +# If this is configuration.nix, 'inputs' might need to be destructured from 'config' or similar +# e.g. { config, pkgs, inputs, ... }: + +let + # Define caelestia-cli as a derivation + caelestia-cli-pkg = pkgs.callPackage ({ stdenv, fetchFromGitHub, gitMinimal }: + stdenv.mkDerivation { + pname = "caelestia-cli"; + version = "git"; # Or the commit date/hash + + # Use the 'caelestia-cli-src' input defined in your flake.nix + src = fetchFromGitHub { + owner = "caelestia-dots"; + repo = "cli"; + rev = inputs.caelestia-cli-src.rev; # Use the revision from the flake input + # You'll get the correct sha256 after the first `nixos-rebuild switch` or `home-manager switch` + # Just put a placeholder like "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" + # and Nix will tell you the correct one. + sha256 = "sha256-wQzSssFp/W6g7Y1qC/4P558V+6H1R+5Z4A3k8N1Y0M4="; # REPLACE THIS WITH THE ACTUAL SHA256 + }; + + # If caelestia-cli needs to be built (e.g., it's a Rust/Go/Python project), + # you'll need to specify build inputs and phases. + # From a quick look, it appears to be a Python script, so it might need python interpreter and dependencies. + # Example for a Python script: + buildInputs = with pkgs; [ python3 ]; + installPhase = '' + mkdir -p $out/bin + # Assuming the main executable is 'caelestia.py' or similar in the root + # If it's a single script, you might need to copy it and make it executable. + cp $src/caelestia.py $out/bin/caelestia-cli # Adjust filename as needed + chmod +x $out/bin/caelestia-cli + ''; + # If it has Python dependencies, you might need buildPythonPackage + # or to add them to buildInputs and ensure they are in the python path. + # For a simpler script, just copying might be enough. + # You may need to inspect the 'cli' repo more closely for its build instructions. + # If it's pure shell script, 'stdenv.mkDerivation' is fine with just 'installPhase'. + # If it's a Python project with setup.py, consider using pkgs.python3Packages.buildPythonPackage + # or pkgs.buildPythonApplication. + } + ) { }; # The {} passes no extra args to callPackage here, as we get all its dependencies via 'with pkgs;' + +in { - pkgs, - inputs, - ... -}: { - imports = [ - inputs.quickshell.packages.${pkgs.system}.default + home.packages = with pkgs; + [ + # Standard Nixpkgs packages + ddcutil + brightnessctl + app2unit # Verify if this is in nixpkgs or needs a custom definition + cava + networkmanager # If you intend to use NetworkManager commands in the shell + lm-sensors + fish + aubio + libpipewire + grim + swappy + libqalculate + + # Custom packages defined via flakes + caelestia-cli-pkg # This is your custom-built package + inputs.quickshell.packages.${pkgs.system}.default # From quickshell flake input + ]; + + # Additional configurations as discussed before: + fonts.fontconfig.enable = true; + fonts.packages = with pkgs; [ + material-symbols + jetbrains-mono-nerd ]; + + # Uncomment and configure if needed: + # services.sensors.enable = true; + # networking.networkmanager.enable = true; # If this is a Home Manager config, this should likely be in configuration.nix } diff --git a/system/font.nix b/system/font.nix index e171d1c..6cf33b7 100644 --- a/system/font.nix +++ b/system/font.nix @@ -8,5 +8,6 @@ in { fonts.packages = with pkgs; [ unlisted-fonts.rubik nerd-fonts.jetbrains-mono + material-symbols ]; } diff --git a/system/services.nix b/system/services.nix index f846a55..7e3f0f6 100644 --- a/system/services.nix +++ b/system/services.nix @@ -4,5 +4,6 @@ libinput.enable = true; blueman.enable = true; printing.enable = true; + sensors.enable = true; }; }