45 lines
1.0 KiB
Nix
45 lines
1.0 KiB
Nix
{
|
|
description = "Hyprland test flake with verify-config and normal run";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
hyprland,
|
|
...
|
|
}:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config.allowUnfree = true;
|
|
};
|
|
|
|
hyprPkg = hyprland.packages.${system}.hyprland;
|
|
configFile = "${self}/hyprland.lua";
|
|
in
|
|
{
|
|
apps.${system}.default = {
|
|
type = "app";
|
|
program = pkgs.writeShellScript "hyprland-verify" ''
|
|
exec ${hyprPkg}/bin/Hyprland --config ${configFile} --verify-config
|
|
'';
|
|
};
|
|
|
|
apps.${system}.run = {
|
|
type = "app";
|
|
program = pkgs.writeShellScript "hyprland-run" ''
|
|
exec ${hyprPkg}/bin/Hyprland --config ${configFile}
|
|
'';
|
|
};
|
|
|
|
# Optional: damit `nix build` etwas Sinnvolles baut
|
|
packages.${system}.default = hyprPkg;
|
|
};
|
|
}
|