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
+20 -23
View File
@@ -1,44 +1,41 @@
{ {
description = "Hyprland test flake with verify-config and normal run"; description = "Hyprland test wrapper from nixpkgs only";
inputs = { inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05";
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
hyprland.url = "github:hyprwm/Hyprland";
};
outputs = outputs =
{ { self, nixpkgs, ... }:
self,
nixpkgs,
hyprland,
...
}:
let let
system = "x86_64-linux"; system = "x86_64-linux";
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
config.allowUnfree = true; config.allowUnfree = false;
}; };
hyprPkg = hyprland.packages.${system}.hyprland; hypr = pkgs.hyprland;
configFile = "${self}/hyprland.lua"; 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 in
{ {
apps.${system}.default = { apps.${system} = {
default = {
type = "app"; type = "app";
program = pkgs.writeShellScript "hyprland-verify" '' program = "${verifyScript}";
exec ${hyprPkg}/bin/Hyprland --config ${configFile} --verify-config
'';
}; };
apps.${system}.run = { run = {
type = "app"; type = "app";
program = pkgs.writeShellScript "hyprland-run" '' program = "${runScript}";
exec ${hyprPkg}/bin/Hyprland --config ${configFile} };
'';
}; };
# Optional: damit `nix build` etwas Sinnvolles baut packages.${system}.default = hypr;
packages.${system}.default = hyprPkg;
}; };
} }