From eea394fce4b2c80768faed9ecd34c6ee14c7a869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nina=20Chl=C3=B3e=20Kassandra=20Rei=C3=9F?= Date: Thu, 18 Jun 2026 22:39:31 +0200 Subject: [PATCH] Turn into flake --- flake.nix | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 flake.nix diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..b92e28f --- /dev/null +++ b/flake.nix @@ -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; + }; +}