From 4969b5aa8f891a880bec80b1de8dd47dec1e5995 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:43:24 +0200 Subject: [PATCH] Init hyprswitch --- docs/TODO.md | 2 + flake.lock | 74 ++++++++++++++++++++++++++++-- flake.nix | 1 + home/system/hyprswitch/default.nix | 8 ++++ hosts/laptop/home.nix | 1 + 5 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 home/system/hyprswitch/default.nix diff --git a/docs/TODO.md b/docs/TODO.md index b85182e..a505b6f 100644 --- a/docs/TODO.md +++ b/docs/TODO.md @@ -7,6 +7,8 @@ feel free to contribute <3 ([CONTRIBUTING.md](CONTRIBUTING.md)) - [ ] Hyprland - [ ] Fix screenshots (screenshot region's border shows up in the screenshot, hyprshot jq error?) and add in the scripts doc +- [ ] Hyprswitch + - [ ] OS Hardening with nix-mineral - [ ] Nixvim diff --git a/flake.lock b/flake.lock index 5905a3e..38ce254 100644 --- a/flake.lock +++ b/flake.lock @@ -226,6 +226,24 @@ } }, "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-parts_2": { "inputs": { "nixpkgs-lib": [ "nixvim", @@ -603,6 +621,26 @@ "type": "github" } }, + "hyprswitch": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs_5" + }, + "locked": { + "lastModified": 1725107917, + "narHash": "sha256-6on3nwb3gB4t+P/2IExgGhVLVgAkF6ZiE5x+qcQHEXU=", + "owner": "h3rmt", + "repo": "hyprswitch", + "rev": "f478c394ad6db5ba268f80052f1eb2366366b21e", + "type": "github" + }, + "original": { + "owner": "h3rmt", + "ref": "release", + "repo": "hyprswitch", + "type": "github" + } + }, "hyprutils": { "inputs": { "nixpkgs": [ @@ -706,6 +744,18 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" + } + }, "nixpkgs-stable": { "locked": { "lastModified": 1720386169, @@ -787,6 +837,21 @@ } }, "nixpkgs_5": { + "locked": { + "lastModified": 1711588226, + "narHash": "sha256-nd7goEu+nH/WZ/uCxvbWzSYqzZZn25kWTeKfANOhCjU=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "7232f19f7fb710e3554cafaa9d8e93cff8273b59", + "type": "github" + }, + "original": { + "owner": "nixos", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { "locked": { "lastModified": 1728241625, "narHash": "sha256-yumd4fBc/hi8a9QgA9IT8vlQuLZ2oqhkJXHPKxH/tRw=", @@ -802,7 +867,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1725194671, "narHash": "sha256-tLGCFEFTB5TaOKkpfw3iYT9dnk4awTP/q4w+ROpMfuw=", @@ -822,7 +887,7 @@ "inputs": { "devshell": "devshell", "flake-compat": "flake-compat_2", - "flake-parts": "flake-parts", + "flake-parts": "flake-parts_2", "git-hooks": "git-hooks", "home-manager": "home-manager_2", "nix-darwin": "nix-darwin", @@ -942,8 +1007,9 @@ "home-manager": "home-manager", "hyprland": "hyprland", "hyprpanel": "hyprpanel", + "hyprswitch": "hyprswitch", "nixos-hardware": "nixos-hardware", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "nixvim": "nixvim", "nixy-wallpapers": "nixy-wallpapers", "plugin-markdown": "plugin-markdown", @@ -1052,7 +1118,7 @@ "flake-utils": "flake-utils_3", "gnome-shell": "gnome-shell", "home-manager": "home-manager_3", - "nixpkgs": "nixpkgs_6", + "nixpkgs": "nixpkgs_7", "systems": "systems_5", "tinted-foot": "tinted-foot", "tinted-kitty": "tinted-kitty", diff --git a/flake.nix b/flake.nix index 9aed8a4..380e311 100644 --- a/flake.nix +++ b/flake.nix @@ -37,6 +37,7 @@ # FIXME: Solve build error until this is fixed stylix.url = "github:danth/stylix/32dba263f63f830d2f11fb079f8796cdec73d3ce"; apple-fonts.url = "github:Lyndeno/apple-fonts.nix"; + hyprswitch.url = "github:h3rmt/hyprswitch/release"; }; outputs = inputs@{ nixpkgs, ... }: { diff --git a/home/system/hyprswitch/default.nix b/home/system/hyprswitch/default.nix new file mode 100644 index 0000000..85b91cc --- /dev/null +++ b/home/system/hyprswitch/default.nix @@ -0,0 +1,8 @@ +{ inputs, pkgs, ... }: { + home.packages = [ inputs.hyprswitch.packages."${pkgs.system}".default ]; + + wayland.windowManager.hyprland.settings.exec-once = [ + "${inputs.hyprswitch.packages."${pkgs.system}".default}/bin/hyprswitch init" + ]; + +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index f6568da..1fe8882 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -25,6 +25,7 @@ ../../home/system/hyprlock ../../home/system/hyprpanel ../../home/system/hyprpaper + # ../../home/system/hyprswitch ../../home/system/gtk ../../home/system/wofi ../../home/system/batsignal