Turn into flake

This commit is contained in:
Nina Chlóe Kassandra Reiß
2026-06-18 22:39:31 +02:00
parent eff5d95def
commit eea394fce4
+44
View File
@@ -0,0 +1,44 @@
{
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;
};
}