79 lines
3.3 KiB
Nix
79 lines
3.3 KiB
Nix
{ 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
|
|
{
|
|
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
|
|
}
|