1 Commits

Author SHA1 Message Date
6e980df23f Providing flake for Nix users 2026-04-16 00:48:46 +02:00
5 changed files with 114 additions and 1 deletions

3
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.cache/
build/
.vscode/
.vscode/
result

View File

@@ -42,6 +42,34 @@ You have a few options of obtainting the program.
You may install this program [from the AUR.](https://aur.archlinux.org/packages/hyprland-toggle-tiling-git)
### Nix Flake (for Nix users)
This project provides a Nix flake for reproducible builds and easy installation.
#### Build the package
```shell
nix build git+ssh://gitea@typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling.git
```
The binary will be at `./result/bin/htt`.
#### Add to Home Manager
1. Add the flake as an input:
```shell
inputs.htt.url = "git+ssh://gitea@typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling.git";
```
2. Then include it in your configuration:
```shell
home.packages = [
inputs.htt.packages.${pkgs.system}.default
];
```
### Download the release
You can also [download the release binary.](https://typofelho.ddns.net/TypoMustakes/hyprland-toggle-tiling/releases)

37
default.nix Normal file
View File

@@ -0,0 +1,37 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.stdenv.mkDerivation rec {
pname = "hyprland-toggle-tiling";
version = "1.4.2";
src = pkgs.fetchFromGitHub {
owner = "TypoMustakes";
repo = "hyprland-toggle-tiling";
rev = "v${version}";
sha256 = "sha256-5mI5WiPjSU+/MgvTPNvE6Ck/WBnidaFwW9/xeL7MMWE=";
};
nativeBuildInputs = [
pkgs.cmake
pkgs.pkg-config
];
buildInputs = [
pkgs.hyprland
pkgs.nlohmann_json
];
cmakeFlags = [
"-DUSE_SYSTEM_JSON=ON"
];
cmakeBuildType = "Release";
meta = with pkgs.lib; {
description = "Toggle tiling and floating modes in Hyprland globally.";
homepage = "https://github.com/TypoMustakes/hyprland-toggle-tiling";
license = licenses.gpl3Only;
platforms = platforms.linux;
mainProgram = "htt";
};
}

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1775710090,
"narHash": "sha256-ar3rofg+awPB8QXDaFJhJ2jJhu+KqN/PRCXeyuXR76E=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4c1018dae018162ec878d42fec712642d214fdfa",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View File

@@ -0,0 +1,20 @@
{
description = "hyprland-toggle-tiling";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in
{
packages.${system}.default = pkgs.callPackage ./default.nix {};
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/htt";
};
};
}