From 4c8e9f809a2819910c3018ad6e6adf12c600eadf Mon Sep 17 00:00:00 2001 From: Hare Date: Tue, 21 Jul 2026 20:07:19 +0900 Subject: [PATCH] hyprland lua dispatch --- flake.lock | 107 +++++++++++++++++++++++----- flake.nix | 1 + hosts/arcadia/default.nix | 5 +- hosts/arcadia/hare/home-manager.nix | 10 ++- hosts/arcadia/nixos.nix | 1 + system/core/greeter.nix | 10 +-- system/core/sound.nix | 1 + 7 files changed, 109 insertions(+), 26 deletions(-) diff --git a/flake.lock b/flake.lock index 5ea7bcd..7896107 100644 --- a/flake.lock +++ b/flake.lock @@ -36,6 +36,24 @@ "type": "github" } }, + "flake-utils_3": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -43,11 +61,11 @@ ] }, "locked": { - "lastModified": 1780408569, - "narHash": "sha256-s7Tv6FUQThRAvW8En8XVC6HMb0uiikzVccCcCo9u/Bg=", + "lastModified": 1784489491, + "narHash": "sha256-j9maqjx1T8+ljAVntAdSI5hSGCm77QNZz64JF1rJNu0=", "owner": "nix-community", "repo": "home-manager", - "rev": "f384af1bec6423a0d4ba1855917ab948f64e5808", + "rev": "3139deb8cafbe73b39b24451255b2fdd3426077e", "type": "github" }, "original": { @@ -63,11 +81,11 @@ ] }, "locked": { - "lastModified": 1780210899, - "narHash": "sha256-4axz3OBPTKa6LIkXV8n0lc63MQU+et2CB5DGobEAi6k=", + "lastModified": 1784440659, + "narHash": "sha256-Q5kNLlWngt7TaIIZoxDKWMHjiSaNRVqr70FqWCRRfr4=", "owner": "Mic92", "repo": "nix-index-database", - "rev": "97df9dc0b7c924344b793a15c1e8e4522ebb854e", + "rev": "4f8d52a3598b0dc7db7a5e7b419e3edd9d1ecfdb", "type": "github" }, "original": { @@ -81,11 +99,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1780310866, - "narHash": "sha256-fPBRVf6A5xlACYcOI59shGrjURuvwu0lRsDoSCEXt/I=", + "lastModified": 1784310968, + "narHash": "sha256-rkSPTePrKqs4dg+i7ZFCq93+HrClac6oSwXX927SVjA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "4ed851c979641e28597a05086332d75cdc9e395f", + "rev": "779c32a00155994c86cde8213a8dd4df139d4355", "type": "github" }, "original": { @@ -109,11 +127,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1780243769, - "narHash": "sha256-x5UQuRsH3MqI0U9afaXSNqzTPSeZlRLvFAav2Ux1pNw=", + "lastModified": 1784356753, + "narHash": "sha256-12KrbMiWLcf8m7pCvAtZh1ZrgF85ZXDXvfR/fWTKy84=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "331800de5053fcebacf6813adb5db9c9dca22a0c", + "rev": "61b7c44c4073f0b827768aff0049561b5110ea5a", "type": "github" }, "original": { @@ -124,6 +142,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1781577229, + "narHash": "sha256-lrp67w8AulE9Ks53n27I45ADSzbOCn4H+CNW1Ck8B+8=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "567a49d1913ce81ac6e9582e3553dd90a955875f", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1779560665, "narHash": "sha256-tpyBcxPpcQb8ukyNF7DoCwfSY3VPsxHoYwj00Cayv5o=", @@ -139,7 +173,7 @@ "type": "github" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1727348695, "narHash": "sha256-J+PeFKSDV+pHL7ukkfpVzCOO7mBSrrpJ3svwBFABbhI=", @@ -162,6 +196,7 @@ "nix-index-database": "nix-index-database", "nixos-hardware": "nixos-hardware", "nixpkgs": "nixpkgs_2", + "tourbox-linux": "tourbox-linux", "yoi": "yoi", "zen-browser": "zen-browser" } @@ -196,17 +231,51 @@ "type": "github" } }, - "yoi": { + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "tourbox-linux": { "inputs": { "flake-utils": "flake-utils_2", "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1780446170, - "narHash": "sha256-Jfmsj1boCZ1xIZw+7rUN/cib61KKX37lZ0I4T+Ds6SA=", + "lastModified": 1782109395, + "narHash": "sha256-5b11NT4jgnTrZj8O94MbqiWjslgeKoiqnlfmZ4eJu3s=", + "owner": "HareK02", + "repo": "TourBox-Linux", + "rev": "d5d5055514576701c05d177186bba2ed2f65cc91", + "type": "github" + }, + "original": { + "owner": "HareK02", + "repo": "TourBox-Linux", + "type": "github" + } + }, + "yoi": { + "inputs": { + "flake-utils": "flake-utils_3", + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1784328575, + "narHash": "sha256-4LdSQBnOPZ82otj2go33qAtDUcVtWFRmMvfgKdQO9Ys=", "ref": "develop", - "rev": "cc98c0eb28376adef8722ec96b8e2ffba05e4f8f", - "revCount": 950, + "rev": "37c44a7942776ce43d21f0aa55e55006de1aa6a4", + "revCount": 3343, "type": "git", "url": "ssh://git@gitea.hareworks.net/Hare/yoi.git" }, @@ -218,7 +287,7 @@ }, "zen-browser": { "inputs": { - "nixpkgs": "nixpkgs_4" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1761859251, diff --git a/flake.nix b/flake.nix index a241e92..9b1fb68 100644 --- a/flake.nix +++ b/flake.nix @@ -11,6 +11,7 @@ nixos-hardware.url = "github:NixOS/nixos-hardware"; zen-browser.url = "github:xaragon/zen-browser-flake"; yoi.url = "git+ssh://git@gitea.hareworks.net/Hare/yoi.git?ref=develop"; + tourbox-linux.url = "github:HareK02/TourBox-Linux"; nix-index-database.url = "github:Mic92/nix-index-database"; nix-index-database.inputs.nixpkgs.follows = "nixpkgs"; diff --git a/hosts/arcadia/default.nix b/hosts/arcadia/default.nix index f97c99b..3adb82b 100644 --- a/hosts/arcadia/default.nix +++ b/hosts/arcadia/default.nix @@ -12,5 +12,8 @@ mkHost { nixos = ./hare/nixos.nix; } ]; - systemModules = [ ./nixos.nix ]; + systemModules = [ + inputs.tourbox-linux.nixosModules.default + ./nixos.nix + ]; } diff --git a/hosts/arcadia/hare/home-manager.nix b/hosts/arcadia/hare/home-manager.nix index ec7c994..e8a5fcc 100644 --- a/hosts/arcadia/hare/home-manager.nix +++ b/hosts/arcadia/hare/home-manager.nix @@ -36,6 +36,14 @@ scale = 1; transform = 0; } + # { + # output = "DP-3"; + # mode = "1920x1080@60"; + # position = "0x0"; + # scale = 0.75; + # transform = 0; + # mirror = "DP-1"; + # } { output = "DP-3"; mode = "1920x1080@144"; @@ -78,7 +86,7 @@ orca-slicer davinci-resolve inputs.zen-browser.packages."${stdenv.hostPlatform.system}".default - inputs.yoi.packages.${stdenv.hostPlatform.system}.default + # inputs.yoi.packages.${stdenv.hostPlatform.system}.default ]; services.easyeffects = { enable = true; diff --git a/hosts/arcadia/nixos.nix b/hosts/arcadia/nixos.nix index eec48a0..4e83ed8 100644 --- a/hosts/arcadia/nixos.nix +++ b/hosts/arcadia/nixos.nix @@ -90,6 +90,7 @@ in ATTRS{idVendor}=="414", ATTRS{idProduct}=="211a", MODE="0777" KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="input" ''; + services.tourbox-linux.enable = true; hardware.bluetooth = { enable = true; diff --git a/system/core/greeter.nix b/system/core/greeter.nix index e9ca6dc..ab89203 100644 --- a/system/core/greeter.nix +++ b/system/core/greeter.nix @@ -15,6 +15,8 @@ let hl.env("HYPRCURSOR_THEME", "rose-pine-hyprcursor") hl.env("HYPRCURSOR_SIZE", "24") hl.env("XCURSOR_SIZE", "24") + hl.env("GTK_USE_PORTAL", "0") + hl.env("GDK_DEBUG", "no-portals") hl.env("XDG_CURRENT_DESKTOP", "Hyprland") hl.env("XDG_SESSION_TYPE", "wayland") @@ -31,13 +33,14 @@ let force_default_wallpaper = false, disable_hyprland_logo = true, disable_splash_rendering = true, + disable_hyprland_guiutils_check = true, }, }) hl.on("hyprland.start", function() hl.exec_cmd("${ config.programs.regreet.package or pkgs.regreet - }/bin/regreet; hyprctl dispatch exit") + }/bin/regreet; ${pkgs.hyprland}/bin/hyprctl dispatch 'hl.dsp.exit()'") end) ''; in @@ -51,7 +54,7 @@ in config = { services.greetd.enable = true; services.greetd.settings.default_session = { - command = "${pkgs.hyprland}/bin/start-hyprland -- -c ${hyprGreetConf}"; + command = "${pkgs.dbus}/bin/dbus-run-session ${pkgs.hyprland}/bin/start-hyprland -- -c ${hyprGreetConf}"; user = "greeter"; }; @@ -80,9 +83,6 @@ in GTK = { application_prefer_dark_theme = true; }; - background = { - path = "/usr/share/wallpaper/arknights-image-01.png"; - }; }; }; }; diff --git a/system/core/sound.nix b/system/core/sound.nix index ea8c2e6..ed37031 100644 --- a/system/core/sound.nix +++ b/system/core/sound.nix @@ -5,6 +5,7 @@ alsa.enable = true; alsa.support32Bit = true; pulse.enable = true; + jack.enable = true; extraConfig.pipewire."92-low-latency" = { context.properties = { default.clock.rate = 48000;