Prepare all dependencies within hyprland flake
This commit is contained in:
@@ -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} = {
|
||||||
type = "app";
|
default = {
|
||||||
program = pkgs.writeShellScript "hyprland-verify" ''
|
type = "app";
|
||||||
exec ${hyprPkg}/bin/Hyprland --config ${configFile} --verify-config
|
program = "${verifyScript}";
|
||||||
'';
|
};
|
||||||
|
|
||||||
|
run = {
|
||||||
|
type = "app";
|
||||||
|
program = "${runScript}";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
apps.${system}.run = {
|
packages.${system}.default = hypr;
|
||||||
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