Compare commits

..

9 Commits

Author SHA1 Message Date
Alexander Heldt
78f0afe517 pinwheel: Fix window focus in hyprland 2026-02-14 10:38:48 +01:00
Alexander Heldt
c19b59f88e Use pkgs.nixfmt instead of pkgs.nixfmt-rfc-style 2026-02-14 10:38:48 +01:00
Alexander Heldt
53fad59691 pinwheel: Install copilot in intellij 2026-02-14 10:38:48 +01:00
Alexander Heldt
3ba141ce36 pinwheel: Remove trackpad from battery monitor 2026-02-14 10:12:15 +01:00
Alexander Heldt
29094de29e pinwheel: Use flat mouse acceleration profile 2026-02-14 10:12:15 +01:00
Alexander Heldt
44a7bb72ef pinwheel: Add dynamic hyprland monitor hotplug handler 2026-02-14 10:12:13 +01:00
Alexander Heldt
2537692f24 pinwheel: Simplify whib development 2026-02-14 10:10:34 +01:00
Alexander Heldt
f8c060a0cc pinwheel: Fix openvpn config 2026-02-14 10:10:10 +01:00
Alexander Heldt
cc6069e854 Update flake inputs 2026-02-14 10:06:39 +01:00
8 changed files with 142 additions and 78 deletions

84
flake.lock generated
View File

@@ -43,11 +43,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769428758, "lastModified": 1770895474,
"narHash": "sha256-0G/GzF7lkWs/yl82bXuisSqPn6sf8YGTnbEdFOXvOfU=", "narHash": "sha256-JBcrq1Y0uw87VZdYsByVbv+GBuT6ECaCNb9txLX9UuU=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "aquamarine", "repo": "aquamarine",
"rev": "def5e74c97370f15949a67c62e61f1459fcb0e15", "rev": "a494d50d32b5567956b558437ceaa58a380712f7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -106,11 +106,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1770572136, "lastModified": 1771057865,
"narHash": "sha256-Wd3UOebU9KWMCbynRSG1Igf94eQ+RlFpKYFMNCpOuVw=", "narHash": "sha256-Suny75DfQS3Mqd8ihiDZNsRs4CfRC3GiQDMmaFPj2qM=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "67691b5ce5e15a32cf3733c42b44ce067a0a8c72", "rev": "56690eb79372e49054b0c2b87780fe3f86be7616",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -219,11 +219,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770491427, "lastModified": 1771037579,
"narHash": "sha256-8b+0vixdqGnIIcgsPhjdX7EGPdzcVQqYxF+ujjex654=", "narHash": "sha256-NX5XuhGcsmk0oEII2PEtMRgvh2KaAv3/WWQsOpxAgR4=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "cbd8a72e5fe6af19d40e2741dc440d9227836860", "rev": "05e6dc0f6ed936f918cb6f0f21f1dad1e4c53150",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -277,11 +277,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769284023, "lastModified": 1770511807,
"narHash": "sha256-xG34vwYJ79rA2wVC8KFuM8r36urJTG6/csXx7LiiSYU=", "narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprgraphics", "repo": "hyprgraphics",
"rev": "13c536659d46893596412d180449353a900a1d31", "rev": "7c75487edd43a71b61adb01cae8326d277aab683",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -309,11 +309,11 @@
"xdph": "xdph" "xdph": "xdph"
}, },
"locked": { "locked": {
"lastModified": 1770470830, "lastModified": 1771026735,
"narHash": "sha256-6Nh0HrMoM7wdCpByaBDMo2fvndlrCZke2VNp69gX0G0=", "narHash": "sha256-vIzZ1Pb1o9xOXwGTdr09vRwGFgD/II6ZnGpnCfl8zz8=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "Hyprland", "repo": "Hyprland",
"rev": "f68ac7ef7589e1536d438f7fbfb3ad987538fe0f", "rev": "e80f705d76d4dbe836e0f57aadea994a624ac63e",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -329,11 +329,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1768426687, "lastModified": 1770889987,
"narHash": "sha256-CopNx3j//gZ2mE0ggEK9dZ474UcbDhpTw+KMor8mSxI=", "narHash": "sha256-JPbwE1Yg5t9zrMcOyDQwl1Pd8e0J1dtZf3kGnC7udwQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "contrib", "repo": "contrib",
"rev": "541628cebe42792ddf5063c4abd6402c2f1bd68f", "rev": "8fdd69edefed16c9ab395b433a1c3323d5633f30",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -506,11 +506,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1766253372, "lastModified": 1770139857,
"narHash": "sha256-1+p4Kw8HdtMoFSmJtfdwjxM4bPxDK9yg27SlvUMpzWA=", "narHash": "sha256-bCqxcXjavgz5KBJ/1CBLqnagMMf9JvU1m9HmYVASKoc=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprutils", "repo": "hyprutils",
"rev": "51a4f93ce8572e7b12b7284eb9e6e8ebf16b4be9", "rev": "9038eec033843c289b06b83557a381a2648d8fa5",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -531,11 +531,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1763640274, "lastModified": 1770501770,
"narHash": "sha256-Uan1Nl9i4TF/kyFoHnTq1bd/rsWh4GAK/9/jDqLbY5A=", "narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwayland-scanner", "repo": "hyprwayland-scanner",
"rev": "f6cf414ca0e16a4d30198fd670ec86df3c89f671", "rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -560,11 +560,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769202094, "lastModified": 1770203293,
"narHash": "sha256-gdJr/vWWLRW85ucatSjoBULPB2dqBJd/53CZmQ9t91Q=", "narHash": "sha256-PR/KER+yiHabFC/h1Wjb+9fR2Uy0lWM3Qld7jPVaWkk=",
"owner": "hyprwm", "owner": "hyprwm",
"repo": "hyprwire", "repo": "hyprwire",
"rev": "a45ca05050d22629b3c7969a926d37870d7dd75c", "rev": "37bc90eed02b0c8b5a77a0b00867baf3005cfb98",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -601,11 +601,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1770459068, "lastModified": 1770930949,
"narHash": "sha256-sLRCTKKt7FsxR/rKrJp5BN++3p8tfuShzIKLMNTh7DA=", "narHash": "sha256-ulX/6yOI9fmiiDqNjn59oLsVkABRo0M2Wkr2w8Ric64=",
"owner": "viperML", "owner": "viperML",
"repo": "nh", "repo": "nh",
"rev": "347c71b43705a2efcc6e4ebb94e14894bb5d3147", "rev": "b37b9a6ca31741282873dd8e335f66aad54f6326",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -638,11 +638,11 @@
"systems": "systems_4" "systems": "systems_4"
}, },
"locked": { "locked": {
"lastModified": 1769853456, "lastModified": 1771059595,
"narHash": "sha256-8h3p12GjiDOP7YDVS5Gx/bqjPQL4tFdDr90Ki7Qtglw=", "narHash": "sha256-avvMQpGX/erjzPI10bN5uHDD08er5QC+pBypQisUNHs=",
"owner": "nix-community", "owner": "nix-community",
"repo": "nix-jetbrains-plugins", "repo": "nix-jetbrains-plugins",
"rev": "1d496fa90ada916bd926228131f8ad04d7a854aa", "rev": "fb4b27d169c7fbfc92c9dfec971e9c87506cb8f0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -653,11 +653,11 @@
}, },
"nixos-hardware": { "nixos-hardware": {
"locked": { "locked": {
"lastModified": 1769302137, "lastModified": 1770882871,
"narHash": "sha256-QEDtctEkOsbx8nlFh4yqPEOtr4tif6KTqWwJ37IM2ds=", "narHash": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=",
"owner": "nixos", "owner": "nixos",
"repo": "nixos-hardware", "repo": "nixos-hardware",
"rev": "a351494b0e35fd7c0b7a1aae82f0afddf4907aa8", "rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -669,11 +669,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1770197578, "lastModified": 1771008912,
"narHash": "sha256-AYqlWrX09+HvGs8zM6ebZ1pwUqjkfpnv8mewYwAo+iM=", "narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "00c21e4c93d963c50d4c0c89bfa84ed6e0694df2", "rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -730,11 +730,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1769069492, "lastModified": 1770726378,
"narHash": "sha256-Efs3VUPelRduf3PpfPP2ovEB4CXT7vHf8W+xc49RL/U=", "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=",
"owner": "cachix", "owner": "cachix",
"repo": "git-hooks.nix", "repo": "git-hooks.nix",
"rev": "a1ef738813b15cf8ec759bdff5761b027e3e1d23", "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -60,11 +60,13 @@
whib-backend = { whib-backend = {
url = "git+ssh://gitea@git.ppp.pm:1122/alex/whib.git?ref=master"; url = "git+ssh://gitea@git.ppp.pm:1122/alex/whib.git?ref=master";
# url = "path:/home/alex/code/own/whib";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
whib-frontend = { whib-frontend = {
url = "git+ssh://gitea@git.ppp.pm:1122/alex/whib-react.git?ref=master"; url = "git+ssh://gitea@git.ppp.pm:1122/alex/whib-react.git?ref=master";
# url = "path:/home/alex/code/own/whib-react";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
}; };
@@ -148,7 +150,7 @@
in in
{ {
${system}.default = pkgs.mkShell { ${system}.default = pkgs.mkShell {
packages = [ pkgs.nixfmt-rfc-style ]; packages = [ pkgs.nixfmt ];
}; };
}; };
}; };

View File

@@ -30,12 +30,6 @@ in
# Low battery notification for bluetooth devices # Low battery notification for bluetooth devices
systemd.user = systemd.user =
let let
trackpad = {
id = "battery_hid_a8o91o3doe5ofeo38_battery";
name = "trackpad";
threshold = "20";
};
headphones = { headphones = {
id = "headset_dev_38_18_4C_18_A4_6E"; id = "headset_dev_38_18_4C_18_A4_6E";
name = "headphones"; name = "headphones";
@@ -65,7 +59,6 @@ in
in in
builtins.listToAttrs ( builtins.listToAttrs (
builtins.map mkTimer [ builtins.map mkTimer [
trackpad
headphones headphones
] ]
); );
@@ -119,7 +112,6 @@ in
in in
builtins.listToAttrs ( builtins.listToAttrs (
builtins.map mkService [ builtins.map mkService [
trackpad
headphones headphones
] ]
); );

View File

@@ -7,6 +7,59 @@
}: }:
let let
enabled = config.mod.hyprland.enable; enabled = config.mod.hyprland.enable;
monitorScript = pkgs.writeShellScript "hyprland-monitor-handler" ''
INTERNAL="eDP-1"
EXTERNAL_MONITORS="HDMI-A-1 DP-3"
HYPRCTL="${pkgs.hyprland}/bin/hyprctl"
JQ="${pkgs.jq}/bin/jq"
get_active_external() {
# Return the first connected external monitor
for mon in $EXTERNAL_MONITORS; do
if $HYPRCTL monitors -j | $JQ -e ".[] | select(.name == \"$mon\")" > /dev/null 2>&1; then
echo "$mon"
return 0
fi
done
return 1
}
bind_workspaces() {
local external
if external=$(get_active_external); then
# External monitor connected: 1-5 on external, 6-10 on internal
for ws in 1 2 3 4 5; do
$HYPRCTL keyword workspace "$ws, monitor:$external, default:true"
done
for ws in 6 7 8 9 10; do
$HYPRCTL keyword workspace "$ws, monitor:$INTERNAL, default:true"
done
else
# No external monitor: all workspaces on internal
for ws in 1 2 3 4 5 6 7 8 9 10; do
$HYPRCTL keyword workspace "$ws, monitor:$INTERNAL, default:true"
done
fi
}
handle_event() {
case $1 in
monitoradded*|monitorremoved*)
sleep 0.5 # Give monitor time to initialize
bind_workspaces
;;
esac
}
# Bind workspaces on startup
bind_workspaces
${pkgs.socat}/bin/socat -U - UNIX-CONNECT:"$XDG_RUNTIME_DIR/hypr/$HYPRLAND_INSTANCE_SIGNATURE/.socket2.sock" | while read -r line; do
handle_event "$line"
done
'';
in in
{ {
options = { options = {
@@ -41,17 +94,7 @@ in
monitor=eDP-1, 1920x1200, auto-center-down, 1 monitor=eDP-1, 1920x1200, auto-center-down, 1
monitor=HDMI-A-1, 2560x1440@100, auto-center-up, 1 monitor=HDMI-A-1, 2560x1440@100, auto-center-up, 1
monitor=DP-3, 2560x1440@60, auto-center-up, 1
workspace = 1, monitor:HDMI-A-1
workspace = 2, monitor:HDMI-A-1
workspace = 3, monitor:HDMI-A-1
workspace = 4, monitor:HDMI-A-1
workspace = 5, monitor:HDMI-A-1
workspace = 6, monitor:eDP-1
workspace = 7, monitor:eDP-1
workspace = 8, monitor:eDP-1
workspace = 9, monitor:eDP-1
workspace = 10, monitor:eDP-1
workspace = w[tv1], gapsout:0, gapsin:0 workspace = w[tv1], gapsout:0, gapsin:0
workspace = f[1], gapsout:0, gapsin:0 workspace = f[1], gapsout:0, gapsin:0
@@ -60,6 +103,9 @@ in
windowrule = border_size 0, match:float 0, match:workspace f[1] windowrule = border_size 0, match:float 0, match:workspace f[1]
windowrule = rounding 0, match:float 0, match:workspace f[1] windowrule = rounding 0, match:float 0, match:workspace f[1]
# https://wiki.archlinux.org/title/Hyprland#Jetbrains_apps_focus_issues
windowrule = match:xwayland true, no_initial_focus on
exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP exec-once=dbus-update-activation-environment --systemd WAYLAND_DISPLAY XDG_CURRENT_DESKTOP
''; '';
@@ -79,6 +125,7 @@ in
follow_mouse = 2; follow_mouse = 2;
sensitivity = 0.3; sensitivity = 0.3;
accel_profile = "flat";
touchpad = { touchpad = {
natural_scroll = false; natural_scroll = false;
tap-and-drag = false; tap-and-drag = false;
@@ -171,6 +218,23 @@ in
pkgs.wdisplays pkgs.wdisplays
pkgs.bc pkgs.bc
]; ];
systemd.user.services.hyprland-monitors = {
Unit = {
Description = "Hyprland monitor hotplug handler";
PartOf = [ "graphical-session.target" ];
After = [ "graphical-session.target" ];
};
Service = {
Type = "simple";
ExecStart = "${monitorScript}";
Restart = "on-failure";
RestartSec = 5;
};
Install = {
WantedBy = [ "graphical-session.target" ];
};
};
}; };
# To start electron apps like `chromium` with wayland support # To start electron apps like `chromium` with wayland support

View File

@@ -2,7 +2,7 @@
{ {
home-manager.users.alex = { home-manager.users.alex = {
home.packages = [ home.packages = [
pkgs.nixfmt-rfc-style pkgs.nixfmt
pkgs.nix-tree pkgs.nix-tree
]; ];
}; };

View File

@@ -23,15 +23,14 @@ in
services.resolved = { services.resolved = {
enable = true; enable = true;
dnssec = "false"; settings = {
domains = [ "~." ]; Resolve = {
fallbackDns = [ Domains = [ "~." ];
"1.1.1.1#one.one.one.one" DNSSEC = false;
"1.0.0.1#one.one.one.one" DNSOverTLS = true;
]; };
extraConfig = '' };
DNSOverTLS=yes
'';
}; };
}; };
} }

View File

@@ -21,11 +21,10 @@ in
# (pkgs.callPackage ./pants.nix { inherit (pkgs) stdenv.hostPlatform.system; }) # (pkgs.callPackage ./pants.nix { inherit (pkgs) stdenv.hostPlatform.system; })
# (pkgs.callPackage ./syb-cli.nix { }) # (pkgs.callPackage ./syb-cli.nix { })
(inputs.nix-jetbrains-plugins.lib."${pkgs.stdenv.hostPlatform.system}".buildIdeWithPlugins (inputs.nix-jetbrains-plugins.lib.buildIdeWithPlugins pkgs "idea" [
pkgs.jetbrains "IdeaVIM"
"idea" "com.github.copilot"
[ "IdeaVIM" ] ])
)
(pkgs.google-cloud-sdk.withExtraComponents [ (pkgs.google-cloud-sdk.withExtraComponents [
pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin
@@ -68,6 +67,13 @@ in
}; };
}; };
# Needed for `copilot`
programs.nix-ld.enable = true;
programs.nix-ld.libraries = [
pkgs.stdenv.cc.cc.lib
pkgs.zlib
];
services.openvpn.servers = lib.mkIf openvpnEnabled { services.openvpn.servers = lib.mkIf openvpnEnabled {
work-staging = { work-staging = {
config = "config ${config.age.secrets.work-staging-ovpn.path}"; config = "config ${config.age.secrets.work-staging-ovpn.path}";

View File

@@ -15,7 +15,8 @@ in
domain = "whib-frontend.local"; domain = "whib-frontend.local";
port = "8081"; port = "8081";
backendHost = "https://api.whib.ppp.pm/"; # "whib-backend.local"; # backendHost = "https://api.whib.ppp.pm/";
backendHost = "http://localhost:8080";
}; };
virtualisation.vmVariant = { virtualisation.vmVariant = {