feat: add nix flake
This commit is contained in:
parent
178a636025
commit
e15d9b79be
4 changed files with 221 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/result
|
||||||
84
default.nix
Normal file
84
default.nix
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
{
|
||||||
|
rev,
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
makeWrapper,
|
||||||
|
makeFontsConf,
|
||||||
|
fish,
|
||||||
|
ddcutil,
|
||||||
|
brightnessctl,
|
||||||
|
app2unit,
|
||||||
|
cava,
|
||||||
|
networkmanager,
|
||||||
|
lm_sensors,
|
||||||
|
grim,
|
||||||
|
swappy,
|
||||||
|
wl-clipboard,
|
||||||
|
libqalculate,
|
||||||
|
inotify-tools,
|
||||||
|
bluez,
|
||||||
|
bash,
|
||||||
|
hyprland,
|
||||||
|
material-symbols,
|
||||||
|
gcc,
|
||||||
|
quickshell,
|
||||||
|
aubio,
|
||||||
|
pipewire,
|
||||||
|
}: let
|
||||||
|
runtimeDeps = [
|
||||||
|
fish
|
||||||
|
ddcutil
|
||||||
|
brightnessctl
|
||||||
|
app2unit
|
||||||
|
cava
|
||||||
|
networkmanager
|
||||||
|
lm_sensors
|
||||||
|
grim
|
||||||
|
swappy
|
||||||
|
wl-clipboard
|
||||||
|
libqalculate
|
||||||
|
inotify-tools
|
||||||
|
bluez
|
||||||
|
bash
|
||||||
|
hyprland
|
||||||
|
];
|
||||||
|
fontconfig = makeFontsConf {
|
||||||
|
fontDirectories = [material-symbols];
|
||||||
|
};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "caelestia-shell";
|
||||||
|
version = "${rev}";
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
nativeBuildInputs = [gcc makeWrapper];
|
||||||
|
buildInputs = [quickshell aubio pipewire];
|
||||||
|
propogatedBuildInputs = runtimeDeps;
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
mkdir -p bin
|
||||||
|
g++ -std=c++17 -Wall -Wextra \
|
||||||
|
-I${pipewire.dev}/include/pipewire-0.3 \
|
||||||
|
-I${pipewire.dev}/include/spa-0.2 \
|
||||||
|
-I${aubio}/include/aubio \
|
||||||
|
assets/beat_detector.cpp \
|
||||||
|
-o bin/beat_detector \
|
||||||
|
-lpipewire-0.3 -laubio
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm755 bin/beat_detector $out/bin/beat_detector
|
||||||
|
makeWrapper ${quickshell}/bin/qs $out/bin/caelestia-shell \
|
||||||
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
||||||
|
--set FONTCONFIG_FILE "${fontconfig}" \
|
||||||
|
--set CAELESTIA_BD_PATH $out/bin/beat_detector \
|
||||||
|
--add-flags '-p ${./.}'
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "A very segsy desktop shell";
|
||||||
|
homepage = "https://github.com/caelestia-dots/shell";
|
||||||
|
license = lib.licenses.gpl3Only;
|
||||||
|
mainProgram = "caelestia-shell";
|
||||||
|
};
|
||||||
|
}
|
||||||
69
flake.lock
generated
Normal file
69
flake.lock
generated
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"app2unit": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752557494,
|
||||||
|
"narHash": "sha256-GIcH+k321WBUl//gBypaJkLRMrKDemcSpzADJoyUdec=",
|
||||||
|
"owner": "soramanew",
|
||||||
|
"repo": "app2unit",
|
||||||
|
"rev": "574d764446997e30218a29a6b9871fb1b9c6554d",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "soramanew",
|
||||||
|
"repo": "app2unit",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752480373,
|
||||||
|
"narHash": "sha256-JHQbm+OcGp32wAsXTE/FLYGNpb+4GLi5oTvCxwSoBOA=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "62e0f05ede1da0d54515d4ea8ce9c733f12d9f08",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"quickshell": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1752486994,
|
||||||
|
"narHash": "sha256-/11zPRDdPPn61GXDyvDes9otFTP5lLqmETAtwMdeYWI=",
|
||||||
|
"ref": "refs/heads/master",
|
||||||
|
"rev": "5ac9096c1c63f6940c6b95f1118b540dfe029278",
|
||||||
|
"revCount": 632,
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://git.outfoxxed.me/outfoxxed/quickshell"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"app2unit": "app2unit",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"quickshell": "quickshell"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
67
flake.nix
Normal file
67
flake.nix
Normal file
|
|
@ -0,0 +1,67 @@
|
||||||
|
{
|
||||||
|
description = "Desktop shell for Caelestia dots";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
|
quickshell = {
|
||||||
|
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
app2unit = {
|
||||||
|
url = "github:soramanew/app2unit";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
} @ inputs: let
|
||||||
|
forAllSystems = fn:
|
||||||
|
nixpkgs.lib.genAttrs nixpkgs.lib.platforms.linux (
|
||||||
|
system: fn nixpkgs.legacyPackages.${system}
|
||||||
|
);
|
||||||
|
in {
|
||||||
|
formatter = forAllSystems (pkgs: pkgs.alejandra);
|
||||||
|
|
||||||
|
packages = forAllSystems (pkgs: rec {
|
||||||
|
caelestia-shell = pkgs.callPackage ./default.nix {
|
||||||
|
rev = self.rev or self.dirtyRev;
|
||||||
|
quickshell = inputs.quickshell.packages.${pkgs.system}.default.override {
|
||||||
|
withX11 = false;
|
||||||
|
withI3 = false;
|
||||||
|
};
|
||||||
|
app2unit = inputs.app2unit.packages.${pkgs.system}.default;
|
||||||
|
};
|
||||||
|
default = caelestia-shell;
|
||||||
|
});
|
||||||
|
|
||||||
|
# devShells = forAllSystems (pkgs: {
|
||||||
|
# default = let
|
||||||
|
# qtDeps = with pkgs.kdePackages; [
|
||||||
|
# inputs.quickshell.packages.${pkgs.system}.default
|
||||||
|
# qtbase
|
||||||
|
# qtdeclarative
|
||||||
|
# ];
|
||||||
|
# qmlPath = pkgs.lib.makeSearchPath "lib/qt-6/qml" qtDeps;
|
||||||
|
# in
|
||||||
|
# pkgs.mkShellNoCC {
|
||||||
|
# inputsFrom = [self.packages.${pkgs.system}.caelestia-shell];
|
||||||
|
# packages =
|
||||||
|
# qtDeps
|
||||||
|
# ++ [
|
||||||
|
# (inputs.caelestia-cli.packages.${pkgs.system}.default.override {
|
||||||
|
# discordBin = "equibop";
|
||||||
|
# qtctStyle = "Breeze";
|
||||||
|
# })
|
||||||
|
# ];
|
||||||
|
# shellHook = ''
|
||||||
|
# export QML2_IMPORT_PATH="$QML2_IMPORT_PATH:${qmlPath}"
|
||||||
|
# '';
|
||||||
|
# };
|
||||||
|
# });
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue