Turn into flake
This commit is contained in:
@@ -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;
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user