From 88b010d34a98f22ff03520ffed8d9c5dea0dfce9 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Sat, 3 Oct 2026 17:14:05 +0200 Subject: [PATCH 1/5] Add claude desktop client --- flake.lock | 55 ++++++++++++++++++++++++++++++++++++++++++++---------- flake.nix | 8 ++++++++ 2 files changed, 53 insertions(+), 10 deletions(-) diff --git a/flake.lock b/flake.lock index 86336da..af8823e 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,23 @@ { "nodes": { + "claude-desktop-nix": { + "inputs": { + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1790636166, + "narHash": "sha256-hTOSqaTx/8PIWRxQ/lPE0+hIIXvebSZW1BuR8eTg6cw=", + "owner": "tomsch", + "repo": "claude-desktop-nix", + "rev": "e4642c646667424962b05ee2b9da7e29a2c33a1c", + "type": "github" + }, + "original": { + "owner": "tomsch", + "repo": "claude-desktop-nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -7,11 +25,11 @@ ] }, "locked": { - "lastModified": 1788642154, - "narHash": "sha256-sPpQFVaFTDqO/4vvCAhuAhqTgqN/ygu+9eJcs5eB0js=", + "lastModified": 1790996401, + "narHash": "sha256-f+kOxEmOUnQazVAmGg0i8hzwgd1kX/geY+k/Dpheye8=", "owner": "nix-community", "repo": "home-manager", - "rev": "fd0956c99c41ae3c13a73a638f1f7e963aebc4ab", + "rev": "db7d5e2332710f5abb088f6b5de927d7f9511b35", "type": "github" }, "original": { @@ -28,11 +46,11 @@ ] }, "locked": { - "lastModified": 1788680125, - "narHash": "sha256-amGSoDobwmp4CFvCn841ws2iuitus+HUJdD/gKgsrJA=", + "lastModified": 1790499302, + "narHash": "sha256-Gbf/U9ptJhQh0qnDnJ/+a8MAcq1HXunbArUTHR2wNYk=", "owner": "nix-community", "repo": "nix-index-database", - "rev": "116ad1c2adb642405ef8916f6a94c8626f971344", + "rev": "161d7c91accd93034bb3c295224d9d895a778573", "type": "github" }, "original": { @@ -43,11 +61,27 @@ }, "nixpkgs": { "locked": { - "lastModified": 1788690626, - "narHash": "sha256-+v4I4LawmRD/mVxO7QIAerRrCkElp3YImzWkkUnvOTg=", + "lastModified": 1784120854, + "narHash": "sha256-KesHgItiZPgGX740axSiQLcIQ8D24MDqNpkKYWIek8k=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c25784012c9982bca5b3e0de87e90bbdac8927d3", + "rev": "753cc8a3a87467296ddd1fa93f0cc3e81120ee46", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1790920529, + "narHash": "sha256-nQyFkMR78WP6PiXKkDW2SjqzLf/spQqjRuxRGSbcV8k=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "774debe7a0d1b496e35677ad955a1011c6ff74f3", "type": "github" }, "original": { @@ -59,9 +93,10 @@ }, "root": { "inputs": { + "claude-desktop-nix": "claude-desktop-nix", "home-manager": "home-manager", "nix-index-database": "nix-index-database", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_2" } } }, diff --git a/flake.nix b/flake.nix index 8c3ca8f..2b414df 100644 --- a/flake.nix +++ b/flake.nix @@ -13,6 +13,8 @@ url = "github:nix-community/nix-index-database"; inputs.nixpkgs.follows = "nixpkgs"; }; + + claude-desktop-nix.url = "github:tomsch/claude-desktop-nix"; }; outputs = @@ -21,6 +23,7 @@ nixpkgs, home-manager, nix-index-database, + claude-desktop-nix, ... }@inputs: { @@ -31,6 +34,11 @@ hosts/fw/configuration.nix home-manager.nixosModules.home-manager nix-index-database.nixosModules.default + ({ pkgs, ...}: { + environment.systemPackages = [ + claude-desktop-nix.packages.${pkgs.stdenv.hostPlatform.system}.default + ]; + }) ]; }; }; From 39578b5beba590c584229eebd893c9e90e615bae Mon Sep 17 00:00:00 2001 From: cubernetes Date: Sat, 3 Oct 2026 17:14:26 +0200 Subject: [PATCH 2/5] Add new ydotool virtual input device --- hosts/fw/configuration.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index ad5f867..ca70cb3 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -37,12 +37,14 @@ with lib; services.blueman.enable = true; hardware.enableAllFirmware = true; + hardware.uinput.enable = true; + # boot.kernelPackages = pkgs.linuxPackages_latest; boot = { extraModulePackages = [ config.boot.kernelPackages.v4l2loopback ]; extraModprobeConfig = '' - options v4l2loopback devices=1 video_nr=10 card_label="custom_cam" exclusive_caps=1 + options v4l2loopback devices=2 video_nr=10,20 card_label="custom_cam","android_cam" exclusive_caps=1,1 ''; kernelModules = [ From 59d2cedafc500408c5673fad716f8ae89bb1beaa Mon Sep 17 00:00:00 2001 From: cubernetes Date: Sat, 3 Oct 2026 17:15:08 +0200 Subject: [PATCH 3/5] Add ydotool shortcuts and lots of useful tools and oepnssh --- hosts/fw/configuration.nix | 107 ++++++++++++++++++++++++++++++++++++- 1 file changed, 106 insertions(+), 1 deletion(-) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index ca70cb3..7b36b46 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -77,7 +77,8 @@ with lib; networking.extraHosts = '' # 204.168.170.249 talk.timo.social # 204.168.170.249 turn.talk.timo.social - # 127.0.0.1 m.youtube.com www.youtube.com youtube.com + # 127.0.0.1 yt.be m.youtube.com youtube.com + # 127.0.0.1 www.youtube.com ''; # Configure network proxy if necessary @@ -163,6 +164,7 @@ with lib; "libvirtd" "docker" "video" + "ydotool" ]; packages = with pkgs; [ ]; }; @@ -182,6 +184,92 @@ with lib; programs.fuse.userAllowOther = true; services.pcscd.enable = true; + systemd.services.keyd.environment = { + YDOTOOL_SOCKET = "/run/ydotoold/socket"; + }; + + services.keyd = + let + mouseMove = pkgs.writeShellScript "mouse-move" '' + ${pkgs.ydotool}/bin/ydotool mousemove -- "$1" "$2" + ''; + mouseScroll = pkgs.writeShellScript "mouse-scroll" '' + ${pkgs.ydotool}/bin/ydotool mousemove -w -- "$1" "$2" + ''; + mouseClick = pkgs.writeShellScript "mouse-click" '' + ${pkgs.ydotool}/bin/ydotool click "$1" + ''; + in + { + enable = true; + + keyboards.default = { + ids = [ "*" ]; + extraConfig = '' + [main] + leftcontrol = layer(lctrl) + leftalt = layer(lalt) + leftshift = layer(lshift) + leftmeta = layer(lsuper) + altgr = layer(rightalt) + + [lctrl:C] + + [lalt:A] + + [lshift:S] + + [lsuper:M] + + [altgr:G] + + [lalt+lctrl] + h = left + j = down + k = up + l = right + + [altgr] + h = command(${mouseScroll} -1 0) + j = command(${mouseScroll} 0 -1) + k = command(${mouseScroll} 0 1) + l = command(${mouseScroll} 1 0) + + [lctrl+lsuper] + h = C-left + j = C-down + k = C-up + l = C-right + + [lalt+lctrl+lsuper] + h = command(${mouseMove} -200 0) + j = command(${mouseMove} 0 200) + k = command(${mouseMove} 0 -200) + l = command(${mouseMove} 200 0) + enter = rightmouse + + [lctrl+lshift+lsuper] + h = C-S-left + j = C-S-down + k = C-S-up + l = C-S-right + + [lalt+lctrl+lshift] + h = S-left + j = S-down + k = S-up + l = S-right + + [lalt+lctrl+lshift+lsuper] + h = command(${mouseMove} -20 0) + j = command(${mouseMove} 0 20) + k = command(${mouseMove} 0 -20) + l = command(${mouseMove} 20 0) + enter = leftmouse + ''; + }; + }; + services.netbird.enable = true; #services.netbird.clients.wt0 = { # login = { @@ -348,10 +436,27 @@ with lib; ntfsprogs-plus sshfs yash + ksh dash glow tt + obs-studio + ydotool + tree + fastfetch + yq + jless + ijq + lynx + virtualenv + openssh + scli + signal-cli + neomutt + patchelf + yt-dlp ]; + programs.ydotool.enable = true; documentation.dev.enable = true; From 81068577fa7f08e7cc88aa9413245896bb494914 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Sat, 3 Oct 2026 17:15:15 +0200 Subject: [PATCH 4/5] Add openssh config --- hosts/fw/configuration.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hosts/fw/configuration.nix b/hosts/fw/configuration.nix index 7b36b46..45d7590 100644 --- a/hosts/fw/configuration.nix +++ b/hosts/fw/configuration.nix @@ -460,6 +460,18 @@ with lib; documentation.dev.enable = true; + services.openssh = { + enable = true; + openFirewall = true; + settings = { + PasswordAuthentication = true; + KbdInteractiveAuthentication = false; + PermitRootLogin = "no"; + AllowUsers = [ "tsi" ]; + MaxAuthTries = 30; + }; + }; + services.power-profiles-daemon.enable = true; environment.localBinInPath = true; From e7e6ba9cd9b4dfcb24d5b3a4c7c548d61d355682 Mon Sep 17 00:00:00 2001 From: cubernetes Date: Sat, 3 Oct 2026 17:15:28 +0200 Subject: [PATCH 5/5] Add bashrc fixes --- modules/home-manager/bash.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/home-manager/bash.nix b/modules/home-manager/bash.nix index 989237d..157c231 100644 --- a/modules/home-manager/bash.nix +++ b/modules/home-manager/bash.nix @@ -4,7 +4,9 @@ programs.bash = { enable = true; initExtra = '' - xset r rate 200 60 + [ "''${BASH_COMPLETION_VERSINFO-}" ] || unset -v BASH_COMPLETION_VERSINFO + + [ "$DISPLAY" ] && xset r rate 200 60 ##################### user specific aliases and functions ###################### if [ -d ~/.bashrc.d ]; then