nova-shell/flake.nix
2026-04-10 10:49:48 +02:00

72 lines
1.7 KiB
Nix

{
description = "nova-shell - minimal Quickshell bar for niri";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
quickshell = {
url = "git+https://git.outfoxxed.me/outfoxxed/quickshell";
inputs.nixpkgs.follows = "nixpkgs";
};
treefmt-nix = {
url = "github:numtide/treefmt-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
quickshell,
treefmt-nix,
...
}:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
treefmt-config = {
projectRootFile = "flake.nix";
programs.nixfmt.enable = true;
};
forAllSystems =
fn:
nixpkgs.lib.genAttrs systems (
system:
fn rec {
pkgs = nixpkgs.legacyPackages.${system};
treefmt-eval = treefmt-nix.lib.evalModule pkgs treefmt-config;
}
);
in
{
formatter = forAllSystems ({ treefmt-eval, ... }: treefmt-eval.config.build.wrapper);
packages = forAllSystems (
{ pkgs, ... }:
rec {
nova-shell = pkgs.callPackage ./nix/package.nix {
quickshell = quickshell.packages.${pkgs.stdenv.hostPlatform.system}.default.override {
withX11 = false;
withI3 = false;
};
};
default = nova-shell;
}
);
checks = forAllSystems (
{ pkgs, treefmt-eval }:
{
formatting = treefmt-eval.config.build.check self;
build = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
}
);
homeModules.default = import ./nix/hm-module.nix self;
homeManagerModules.default = self.homeModules.default;
};
}