From 93b5ef064813453ed107d0866885ae19bea28941 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nina=20Chl=C3=B3e=20Kassandra=20Rei=C3=9F?= Date: Fri, 19 Jun 2026 07:55:37 +0200 Subject: [PATCH] Prepare all dependencies within hyprland flake --- flake.nix | 51 ++++++++++++++++++++++++--------------------------- 1 file changed, 24 insertions(+), 27 deletions(-) diff --git a/flake.nix b/flake.nix index b92e28f..9c0f505 100644 --- a/flake.nix +++ b/flake.nix @@ -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; }; }