From bc8bd08be73e664d9c872dcd8662ade778288312 Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Fri, 4 Jul 2025 18:56:04 +0200 Subject: flake: update --- common/home/default.nix | 1 + common/home/hyprland/default.nix | 1 + common/home/scripts/bluemenu | 24 ++++++++++++++++++++++++ flake.lock | 36 ++++++++++++++++++------------------ hosts/workstation/default.nix | 16 +++++++++++++--- 5 files changed, 57 insertions(+), 21 deletions(-) create mode 100644 common/home/scripts/bluemenu diff --git a/common/home/default.nix b/common/home/default.nix index 9299c44..2143a4b 100644 --- a/common/home/default.nix +++ b/common/home/default.nix @@ -57,6 +57,7 @@ packages = [ pkgs.prismlauncher pkgs.bibletime pkgs.musescore + pkgs.airshipper ]; in { diff --git a/common/home/hyprland/default.nix b/common/home/hyprland/default.nix index 1cb585e..2977a4f 100644 --- a/common/home/hyprland/default.nix +++ b/common/home/hyprland/default.nix @@ -24,6 +24,7 @@ "$mod, Space, exec, wofi --show run" "$mod, O, exec, openproject" "$mod, V, exec, openproject -e nvim" + "$mod, B, exec, bluemenu" "$mod+Alt, S, exec, loadconfig" diff --git a/common/home/scripts/bluemenu b/common/home/scripts/bluemenu new file mode 100644 index 0000000..c27a859 --- /dev/null +++ b/common/home/scripts/bluemenu @@ -0,0 +1,24 @@ +#!/bin/sh + +dev=$(bluetoothctl devices | sed -e 's/Device \(..:..:..:..:..:..\) \(.*\)/\2|\1/g' | column -t -s '|' | while read -r device +do + id=$(echo "$device" | grep -o '..:..:..:..:..:..') + if bluetoothctl info "$id" | grep Connected | grep yes > /dev/null; then + printf " 󰂱 " + else + printf " " + fi + echo " $device" +done | wofi --dmenu | grep -o '..:..:..:..:..:..') + +[ -z "$dev" ] && exit + +name=$(bluetoothctl info "$dev" | grep Name: | sed 's/^\s*Name:\s*//g') + +if bluetoothctl info "$dev" | grep Connected | grep yes > /dev/null; then + bluetoothctl disconnect "$dev" + dunstify "Bluetooth" "Disconnected $name" +else + bluetoothctl connect "$dev" + dunstify "Bluetooth" "Connected $name" +fi diff --git a/flake.lock b/flake.lock index 80a0d95..e9a0586 100644 --- a/flake.lock +++ b/flake.lock @@ -8,11 +8,11 @@ ] }, "locked": { - "lastModified": 1743550720, - "narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=", + "lastModified": 1749398372, + "narHash": "sha256-tYBdgS56eXYaWVW3fsnPQ/nFlgWi/Z2Ymhyu21zVM98=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "c621e8422220273271f52058f618c94e405bb0f5", + "rev": "9305fe4e5c2a6fcf5ba6a3ff155720fbe4076569", "type": "github" }, "original": { @@ -46,11 +46,11 @@ ] }, "locked": { - "lastModified": 1748665073, - "narHash": "sha256-RMhjnPKWtCoIIHiuR9QKD7xfsKb3agxzMfJY8V9MOew=", + "lastModified": 1751468302, + "narHash": "sha256-tWosziZTT039x6PgEZUhzGlV8oLvdDmIgKTE8ESMaEA=", "owner": "nix-community", "repo": "home-manager", - "rev": "282e1e029cb6ab4811114fc85110613d72771dea", + "rev": "501cfec8277f931a9c9af9f23d3105c537faeafe", "type": "github" }, "original": { @@ -90,11 +90,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1748889542, - "narHash": "sha256-Hb4iMhIbjX45GcrgOp3b8xnyli+ysRPqAgZ/LZgyT5k=", + "lastModified": 1751479989, + "narHash": "sha256-M5KgdpVBVcW4HRVq9/OSRbrxlwsQ1ogEKqnvzsClDqU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "10d7f8d34e5eb9c0f9a0485186c1ca691d2c5922", + "rev": "34627c90f062da515ea358360f448da57769236e", "type": "github" }, "original": { @@ -106,11 +106,11 @@ }, "nixpkgs-unstable": { "locked": { - "lastModified": 1748929857, - "narHash": "sha256-lcZQ8RhsmhsK8u7LIFsJhsLh/pzR9yZ8yqpTzyGdj+Q=", + "lastModified": 1751271578, + "narHash": "sha256-P/SQmKDu06x8yv7i0s8bvnnuJYkxVGBWLWHaU+tt4YY=", "owner": "nixos", "repo": "nixpkgs", - "rev": "c2a03962b8e24e669fb37b7df10e7c79531ff1a4", + "rev": "3016b4b15d13f3089db8a41ef937b13a9e33a8df", "type": "github" }, "original": { @@ -130,11 +130,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1748975233, - "narHash": "sha256-eLz/5C3qQN8w7dyLnY8zKdwLuHuS03s8csuLjTis2No=", + "lastModified": 1751479430, + "narHash": "sha256-ub1Pj+oSrt2bE1tzTRYEwzCFewsc9F7X7RIJooM94MU=", "owner": "nix-community", "repo": "nixvim", - "rev": "8917e2e8ecc957037c712145ddcfce08d00c1cad", + "rev": "13cc4d84572c5f5d469a3a3454fa2028f78a3137", "type": "github" }, "original": { @@ -154,11 +154,11 @@ ] }, "locked": { - "lastModified": 1748298102, - "narHash": "sha256-PP11GVwUt7F4ZZi5A5+99isuq39C59CKc5u5yVisU/U=", + "lastModified": 1749730855, + "narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=", "owner": "NuschtOS", "repo": "search", - "rev": "f8a1c221afb8b4c642ed11ac5ee6746b0fe1d32f", + "rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742", "type": "github" }, "original": { diff --git a/hosts/workstation/default.nix b/hosts/workstation/default.nix index bad7fab..b1315e6 100644 --- a/hosts/workstation/default.nix +++ b/hosts/workstation/default.nix @@ -8,7 +8,15 @@ nixpkgs.config.rocmSupport = true; - networking.hostName = "workstation"; + networking = { + hostName = "workstation"; + + bridges.br0.interfaces = []; + interfaces.br0.ipv4.addresses = [{ + address = "10.0.0.1"; + prefixLength = 8; + }]; + }; boot.loader = { efi.canTouchEfiVariables = true; @@ -87,8 +95,10 @@ environment.systemPackages = with pkgs; [ clinfo ]; virtualisation = { - libvirtd.enable = true; - docker.enable = true; + libvirtd = { + enable = true; + allowedBridges = [ "br0" ]; + }; }; system.stateVersion = "24.05"; -- cgit v1.2.3-70-g09d2