Prepare all dependencies within hyprland flake

This commit is contained in:
Nina Chlóe Kassandra Reiß
2026-06-19 07:55:37 +02:00
parent 60a646a44f
commit 93b5ef0648
+24 -27
View File
@@ -1,44 +1,41 @@
{
description = "Hyprland test flake with verify-config and normal run";
description = "Hyprland test wrapper from nixpkgs only";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland.url = "github:hyprwm/Hyprland";
};
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
outputs =
{
self,
nixpkgs,
hyprland,
...
}:
{ self, nixpkgs, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
config.allowUnfree = false;
};
hyprPkg = hyprland.packages.${system}.hyprland;
hypr = pkgs.hyprland;
configFile = "${self}/hyprland.lua";
verifyScript = pkgs.writeShellScript "hyprland-verify" ''
exec ${hypr}/bin/Hyprland --config ${configFile} --verify-config
'';
runScript = pkgs.writeShellScript "hyprland-run" ''
exec ${hypr}/bin/Hyprland --config ${configFile}
'';
in
{
apps.${system}.default = {
type = "app";
program = pkgs.writeShellScript "hyprland-verify" ''
exec ${hyprPkg}/bin/Hyprland --config ${configFile} --verify-config
'';
apps.${system} = {
default = {
type = "app";
program = "${verifyScript}";
};
run = {
type = "app";
program = "${runScript}";
};
};
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;
packages.${system}.default = hypr;
};
}