From e0ad3bc362372492b1f4e318b722300f5ec03551 Mon Sep 17 00:00:00 2001 From: GHOSCHT <31184695+GHOSCHT@users.noreply.github.com> Date: Sun, 4 Feb 2024 20:53:09 +0100 Subject: [PATCH] Add heliox-cli --- flake.lock | 153 +++++++++++++++++++++++++++++++++---- flake.nix | 12 ++- home/features/cli/fish.nix | 2 +- hosts/adalbert/default.nix | 4 + 4 files changed, 153 insertions(+), 18 deletions(-) diff --git a/flake.lock b/flake.lock index 48418b8..cb183a8 100644 --- a/flake.lock +++ b/flake.lock @@ -62,8 +62,8 @@ }, "devshell": { "inputs": { - "nixpkgs": "nixpkgs_4", - "systems": "systems_4" + "nixpkgs": "nixpkgs_6", + "systems": "systems_5" }, "locked": { "lastModified": 1700815693, @@ -136,7 +136,25 @@ }, "flake-parts": { "inputs": { - "nixpkgs-lib": "nixpkgs-lib_2" + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1706830856, + "narHash": "sha256-a0NYyp+h9hlb7ddVz4LUn1vT/PLwqfrWYcHMvFB1xYg=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "b253292d9c0a5ead9bc98c4e9a26c6312e27d69f", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib_3" }, "locked": { "lastModified": 1698882062, @@ -260,6 +278,27 @@ "type": "github" } }, + "heliox-cli": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_3", + "systems": "systems_4", + "treefmt-nix": "treefmt-nix" + }, + "locked": { + "lastModified": 1706998936, + "narHash": "sha256-PQq7xYw/UizqftOnk2Q6DZmozbQ7CSMX/W5KsHRR2l0=", + "ref": "refs/heads/main", + "rev": "b3ec529d1cd3215266c1ec5da89b141e98d4431d", + "revCount": 5, + "type": "git", + "url": "https://git.ghoscht.com/heliox/cli/" + }, + "original": { + "type": "git", + "url": "https://git.ghoscht.com/heliox/cli/" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -283,7 +322,7 @@ }, "home-manager_2": { "inputs": { - "nixpkgs": "nixpkgs_5" + "nixpkgs": "nixpkgs_7" }, "locked": { "lastModified": 1701071203, @@ -302,8 +341,8 @@ "hyprland": { "inputs": { "hyprland-protocols": "hyprland-protocols", - "nixpkgs": "nixpkgs_6", - "systems": "systems_5", + "nixpkgs": "nixpkgs_8", + "systems": "systems_6", "wlroots": "wlroots", "xdph": "xdph" }, @@ -371,7 +410,7 @@ "nix-colors": { "inputs": { "base16-schemes": "base16-schemes", - "nixpkgs-lib": "nixpkgs-lib" + "nixpkgs-lib": "nixpkgs-lib_2" }, "locked": { "lastModified": 1706637303, @@ -404,6 +443,24 @@ } }, "nixpkgs-lib": { + "locked": { + "dir": "lib", + "lastModified": 1706550542, + "narHash": "sha256-UcsnCG6wx++23yeER4Hg18CXWbgNpqNXcHIo5/1Y+hc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "97b17f32362e475016f942bbdfda4a4a72a8a652", + "type": "github" + }, + "original": { + "dir": "lib", + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs-lib_2": { "locked": { "lastModified": 1697935651, "narHash": "sha256-qOfWjQ2JQSQL15KLh6D7xQhx0qgZlYZTYlcEiRuAMMw=", @@ -418,7 +475,7 @@ "type": "github" } }, - "nixpkgs-lib_2": { + "nixpkgs-lib_3": { "locked": { "dir": "lib", "lastModified": 1698611440, @@ -485,6 +542,38 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1706732774, + "narHash": "sha256-hqJlyJk4MRpcItGYMF+3uHe8HvxNETWvlGtLuVpqLU0=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "b8b232ae7b8b144397fdb12d20f592e5e7c1a64d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1705856552, + "narHash": "sha256-JXfnuEf5Yd6bhMs/uvM67/joxYKoysyE3M2k6T3eWbg=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "612f97239e2cc474c13c9dafa0df378058c5ad8d", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { "locked": { "lastModified": 1706718339, "narHash": "sha256-S+S97c/HzkO2A/YsU7ZmNF9w2s7Xk6P8dzmfDdckzLs=", @@ -500,7 +589,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_6": { "locked": { "lastModified": 1677383253, "narHash": "sha256-UfpzWfSxkfXHnb4boXZNaKsAcUrZT9Hw+tao1oZxd08=", @@ -516,7 +605,7 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_7": { "locked": { "lastModified": 1700794826, "narHash": "sha256-RyJTnTNKhO0yqRpDISk03I/4A67/dp96YRxc86YOPgU=", @@ -532,7 +621,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_8": { "locked": { "lastModified": 1700612854, "narHash": "sha256-yrQ8osMD+vDLGFX7pcwsY/Qr5PUd6OmDMYJZzZi0+zc=", @@ -548,7 +637,7 @@ "type": "github" } }, - "nixpkgs_7": { + "nixpkgs_9": { "locked": { "lastModified": 1701336116, "narHash": "sha256-kEmpezCR/FpITc6yMbAh4WrOCiT2zg5pSjnKrq51h5Y=", @@ -592,10 +681,11 @@ "firefox-addons": "firefox-addons", "flatpaks": "flatpaks", "hardware": "hardware", + "heliox-cli": "heliox-cli", "home-manager": "home-manager", "nh": "nh", "nix-colors": "nix-colors", - "nixpkgs": "nixpkgs_3", + "nixpkgs": "nixpkgs_5", "nixpkgs-unstable": "nixpkgs-unstable", "xremap": "xremap" } @@ -661,6 +751,21 @@ } }, "systems_5": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_6": { "locked": { "lastModified": 1689347949, "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", @@ -675,6 +780,24 @@ "type": "github" } }, + "treefmt-nix": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1706462057, + "narHash": "sha256-7dG1D4iqqt0bEbBqUWk6lZiSqqwwAO0Hd1L5opVyhNM=", + "owner": "numtide", + "repo": "treefmt-nix", + "rev": "c6153c2a3ff4c38d231e3ae99af29b87f1df5901", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "treefmt-nix", + "type": "github" + } + }, "utils": { "inputs": { "systems": "systems_3" @@ -748,10 +871,10 @@ "inputs": { "crane": "crane", "devshell": "devshell", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "home-manager": "home-manager_2", "hyprland": "hyprland", - "nixpkgs": "nixpkgs_7", + "nixpkgs": "nixpkgs_9", "xremap": "xremap_2" }, "locked": { diff --git a/flake.nix b/flake.nix index e894ce1..d508517 100644 --- a/flake.nix +++ b/flake.nix @@ -29,6 +29,7 @@ }; xremap.url = "github:xremap/nix-flake"; flatpaks.url = "github:GermanBread/declarative-flatpak/stable"; + heliox-cli.url = "git+https://git.ghoscht.com/heliox/cli/"; }; outputs = { @@ -87,7 +88,7 @@ # Standalone home-manager configuration entrypoint # Available through 'home-manager --flake .#your-username@your-hostname' homeConfigurations = { - "ghoscht@adalbert" = home-manager.lib.homeManagerConfiguration { + "${vars.user}@adalbert" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance extraSpecialArgs = {inherit inputs outputs vars;}; modules = [ @@ -95,12 +96,19 @@ ]; }; }; - "ghoscht@ludwig" = home-manager.lib.homeManagerConfiguration { + "${vars.user}@ludwig" = home-manager.lib.homeManagerConfiguration { pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance extraSpecialArgs = {inherit inputs outputs vars;}; modules = [ ./home/ludwig.nix ]; }; + # "${vars.user}@eustachius" = home-manager.lib.homeManagerConfiguration { + # pkgs = nixpkgs.legacyPackages.aarch64-linux; # Home-manager requires 'pkgs' instance + # extraSpecialArgs = {inherit inputs outputs vars;}; + # modules = [ + # ./home/eustachius.nix + # ]; + # }; }; } diff --git a/home/features/cli/fish.nix b/home/features/cli/fish.nix index a615248..74834e1 100644 --- a/home/features/cli/fish.nix +++ b/home/features/cli/fish.nix @@ -58,7 +58,7 @@ in { lzg = mkIf hasLazygit "lazygit"; lzd = mkIf hasLazydocker "lazydocker"; batt = ''upower -i /org/freedesktop/UPower/devices/battery_BAT0 | grep -e "percentage" -e "state"''; - hx = "~/Documents/heliox-cli/target/debug/heliox-cli --mode"; + hx = "heliox-cli --mode"; slp = "systemctl suspend"; sdn = "shutdown 0"; nrs = "nh os switch ~/.setup"; diff --git a/hosts/adalbert/default.nix b/hosts/adalbert/default.nix index b7371a2..7917920 100644 --- a/hosts/adalbert/default.nix +++ b/hosts/adalbert/default.nix @@ -6,6 +6,7 @@ lib, config, pkgs, + heliox-cli, ... }: { # You can import other NixOS modules here @@ -68,6 +69,9 @@ networking.hostName = "adalbert"; + services.udev.packages = [inputs.heliox-cli.packages.x86_64-linux.default]; + environment.systemPackages = [inputs.heliox-cli.packages.x86_64-linux.default]; + # Force disable Nvidia PRIME, needed by nix-hardware hardware.nvidia.prime.offload.enable = false;