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 = {
|
||||
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 = {
|
||||
apps.${system} = {
|
||||
default = {
|
||||
type = "app";
|
||||
program = pkgs.writeShellScript "hyprland-verify" ''
|
||||
exec ${hyprPkg}/bin/Hyprland --config ${configFile} --verify-config
|
||||
'';
|
||||
program = "${verifyScript}";
|
||||
};
|
||||
|
||||
apps.${system}.run = {
|
||||
run = {
|
||||
type = "app";
|
||||
program = pkgs.writeShellScript "hyprland-run" ''
|
||||
exec ${hyprPkg}/bin/Hyprland --config ${configFile}
|
||||
'';
|
||||
program = "${runScript}";
|
||||
};
|
||||
};
|
||||
|
||||
# Optional: damit `nix build` etwas Sinnvolles baut
|
||||
packages.${system}.default = hyprPkg;
|
||||
packages.${system}.default = hypr;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user