Compare commits

..

14 Commits

Author SHA1 Message Date
Alexander Heldt
d8b61a42f3 Pin nh version 2026-03-19 13:05:51 +01:00
Alexander Heldt
6b054a238d pinwheel: Replace light with brightnessctl 2026-03-19 11:09:15 +01:00
Alexander Heldt
6e24a4557f Update flake inputs 2026-03-19 11:03:15 +01:00
Alexander Heldt
10feb73843 pinwheel: Add opencode and claude 2026-03-19 11:02:27 +01:00
Alexander Heldt
f42612e932 pinwheel: Fix cursor escape codes in tmux 2026-03-19 11:02:27 +01:00
Alexander Heldt
1e771c0d8d pinwheel: Ensure opencode has access to interactive bash 2026-03-19 11:02:27 +01:00
Alexander Heldt
e196ce3572 pinwheel: Use GUI key manager for ssh 2026-03-19 11:02:27 +01:00
Alexander Heldt
9e61c6cad3 pinwheel: Assign default workspaces to monitor(s) 2026-03-19 11:02:27 +01:00
Alexander Heldt
dee1aa02e6 pinwheel: Batch workspace monitor assignments atomically
Use hyprctl --batch to send all workspace rules and moves in a
single IPC call, avoiding races that caused workspaces to end up
on the wrong monitor.
2026-03-19 11:02:27 +01:00
Alexander Heldt
edafaf04de pinwheel: Start Hyprland with uwsm 2026-03-19 11:02:26 +01:00
Alexander Heldt
ed401a38d6 pinwheel: Always clean up swayidle after hyprlock exits
Use ; instead of && so pkill swayidle runs regardless of hyprlock's
exit status, preventing leaked swayidle processes from blanking screens.
2026-03-19 11:02:26 +01:00
Alexander Heldt
c628c816d8 pinwheel: Pause all players on screen lock
Use playerctl -a to pause all active media players instead of only
targeting spotify.
2026-03-19 11:02:26 +01:00
Alexander Heldt
7d2cf97ea6 pinwheel: Move workspaces to monitor on hotplug
Workspace rules alone only affect future workspace creation. Add
moveworkspacetomonitor dispatches so existing workspaces are moved
to the correct monitor when an external display is connected.
2026-03-19 11:02:26 +01:00
Alexander Heldt
ac1c5c372f pinwheel: Replace swaylock with hyprlock
Fixes black internal screen after unlocking with external monitor
disconnected, and occasional Hyprland crashes on lock.
2026-03-19 11:02:26 +01:00
16 changed files with 207 additions and 119 deletions

163
flake.lock generated
View File

@@ -43,11 +43,11 @@
]
},
"locked": {
"lastModified": 1770895474,
"narHash": "sha256-JBcrq1Y0uw87VZdYsByVbv+GBuT6ECaCNb9txLX9UuU=",
"lastModified": 1773436376,
"narHash": "sha256-OUPRrprbgN27BXHuWkMAPSCfLLQ/uwpWghEfKYN2iAg=",
"owner": "hyprwm",
"repo": "aquamarine",
"rev": "a494d50d32b5567956b558437ceaa58a380712f7",
"rev": "43f10d24391692bba3d762931ee35e7f17f8e8b8",
"type": "github"
},
"original": {
@@ -85,11 +85,11 @@
]
},
"locked": {
"lastModified": 1769524058,
"narHash": "sha256-zygdD6X1PcVNR2PsyK4ptzrVEiAdbMqLos7utrMDEWE=",
"lastModified": 1773889306,
"narHash": "sha256-PAqwnsBSI9SVC2QugvQ3xeYCB0otOwCacB1ueQj2tgw=",
"owner": "nix-community",
"repo": "disko",
"rev": "71a3fc97d80881e91710fe721f1158d3b96ae14d",
"rev": "5ad85c82cc52264f4beddc934ba57f3789f28347",
"type": "github"
},
"original": {
@@ -106,11 +106,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1771057865,
"narHash": "sha256-Suny75DfQS3Mqd8ihiDZNsRs4CfRC3GiQDMmaFPj2qM=",
"lastModified": 1773912849,
"narHash": "sha256-j8+nTPoUiiyyMAN0bk/8AqqkApusi38laEaQ4m45KIA=",
"owner": "nix-community",
"repo": "emacs-overlay",
"rev": "56690eb79372e49054b0c2b87780fe3f86be7616",
"rev": "4ce92db83efd3393ba51df6bbc06cc34f48c4475",
"type": "github"
},
"original": {
@@ -219,11 +219,11 @@
]
},
"locked": {
"lastModified": 1771037579,
"narHash": "sha256-NX5XuhGcsmk0oEII2PEtMRgvh2KaAv3/WWQsOpxAgR4=",
"lastModified": 1773898372,
"narHash": "sha256-PqeDgmyI/Df3/Mv0B81FP/ZC4KuO88YRQF5ZfeFyA4k=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "05e6dc0f6ed936f918cb6f0f21f1dad1e4c53150",
"rev": "ecf019baf47df009937b5f8c4604cee10f410a76",
"type": "github"
},
"original": {
@@ -248,11 +248,11 @@
]
},
"locked": {
"lastModified": 1753964049,
"narHash": "sha256-lIqabfBY7z/OANxHoPeIrDJrFyYy9jAM4GQLzZ2feCM=",
"lastModified": 1772461003,
"narHash": "sha256-pVICsV7FtcEeVwg5y/LFh3XFUkVJninm/P1j/JHzEbM=",
"owner": "hyprwm",
"repo": "hyprcursor",
"rev": "44e91d467bdad8dcf8bbd2ac7cf49972540980a5",
"rev": "b62396457b9cfe2ebf24fe05404b09d2a40f8ed7",
"type": "github"
},
"original": {
@@ -277,11 +277,11 @@
]
},
"locked": {
"lastModified": 1770511807,
"narHash": "sha256-suKmSbSk34uPOJDTg/GbPrKEJutzK08vj0VoTvAFBCA=",
"lastModified": 1772461523,
"narHash": "sha256-mI6A51do+hEUzeJKk9YSWfVHdI/SEEIBi2tp5Whq5mI=",
"owner": "hyprwm",
"repo": "hyprgraphics",
"rev": "7c75487edd43a71b61adb01cae8326d277aab683",
"rev": "7d63c04b4a2dd5e59ef943b4b143f46e713df804",
"type": "github"
},
"original": {
@@ -309,11 +309,11 @@
"xdph": "xdph"
},
"locked": {
"lastModified": 1771026735,
"narHash": "sha256-vIzZ1Pb1o9xOXwGTdr09vRwGFgD/II6ZnGpnCfl8zz8=",
"lastModified": 1773865169,
"narHash": "sha256-3LpwmNjKfZttXsR/CIKTn+z7GiJPeF5ENJJSS6Yjizk=",
"owner": "hyprwm",
"repo": "Hyprland",
"rev": "e80f705d76d4dbe836e0f57aadea994a624ac63e",
"rev": "d635b499e1b2b9cf54b780ca7aee2b97cadeee89",
"type": "github"
},
"original": {
@@ -329,11 +329,11 @@
]
},
"locked": {
"lastModified": 1770889987,
"narHash": "sha256-JPbwE1Yg5t9zrMcOyDQwl1Pd8e0J1dtZf3kGnC7udwQ=",
"lastModified": 1771502235,
"narHash": "sha256-aH8h5ZOiyEGtHmEyuE/eFxx8TN7a+NGDnl4V+dbzJ6E=",
"owner": "hyprwm",
"repo": "contrib",
"rev": "8fdd69edefed16c9ab395b433a1c3323d5633f30",
"rev": "918f266dddae39fa4184a1b8bf51ec5381cf29f7",
"type": "github"
},
"original": {
@@ -375,11 +375,11 @@
]
},
"locked": {
"lastModified": 1767023960,
"narHash": "sha256-R2HgtVS1G3KSIKAQ77aOZ+Q0HituOmPgXW9nBNkpp3Q=",
"lastModified": 1772467975,
"narHash": "sha256-kipyuDBxrZq+beYpZqWzGvFWm4QbayW9agAvi94vDXY=",
"owner": "hyprwm",
"repo": "hyprland-guiutils",
"rev": "c2e906261142f5dd1ee0bfc44abba23e2754c660",
"rev": "5e1c6b9025aaf4d578f3eff7c0eb1f0c197a9507",
"type": "github"
},
"original": {
@@ -400,11 +400,11 @@
]
},
"locked": {
"lastModified": 1765214753,
"narHash": "sha256-P9zdGXOzToJJgu5sVjv7oeOGPIIwrd9hAUAP3PsmBBs=",
"lastModified": 1772460177,
"narHash": "sha256-/6G/MsPvtn7bc4Y32pserBT/Z4SUUdBd4XYJpOEKVR4=",
"owner": "hyprwm",
"repo": "hyprland-protocols",
"rev": "3f3860b869014c00e8b9e0528c7b4ddc335c21ab",
"rev": "1cb6db5fd6bb8aee419f4457402fa18293ace917",
"type": "github"
},
"original": {
@@ -429,11 +429,11 @@
]
},
"locked": {
"lastModified": 1767983607,
"narHash": "sha256-8C2co8NYfR4oMOUEsPROOJ9JHrv9/ktbJJ6X1WsTbXc=",
"lastModified": 1772459629,
"narHash": "sha256-/iwvNUYShmmnwmz/czEUh6+0eF5vCMv0xtDW0STPIuM=",
"owner": "hyprwm",
"repo": "hyprlang",
"rev": "d4037379e6057246b408bbcf796cf3e9838af5b2",
"rev": "7615ee388de18239a4ab1400946f3d0e498a8186",
"type": "github"
},
"original": {
@@ -481,11 +481,11 @@
]
},
"locked": {
"lastModified": 1764592794,
"narHash": "sha256-7CcO+wbTJ1L1NBQHierHzheQGPWwkIQug/w+fhTAVuU=",
"lastModified": 1772462885,
"narHash": "sha256-5pHXrQK9zasMnIo6yME6EOXmWGFMSnCITcfKshhKJ9I=",
"owner": "hyprwm",
"repo": "hyprtoolkit",
"rev": "5cfe0743f0e608e1462972303778d8a0859ee63e",
"rev": "9af245a69fa6b286b88ddfc340afd288e00a6998",
"type": "github"
},
"original": {
@@ -506,11 +506,11 @@
]
},
"locked": {
"lastModified": 1770139857,
"narHash": "sha256-bCqxcXjavgz5KBJ/1CBLqnagMMf9JvU1m9HmYVASKoc=",
"lastModified": 1773436263,
"narHash": "sha256-n+2xFJngUkBqUJD5FsbVnYEHBTyDFSqtBIwQIGPXWWo=",
"owner": "hyprwm",
"repo": "hyprutils",
"rev": "9038eec033843c289b06b83557a381a2648d8fa5",
"rev": "5e228db6821380a5875d5643176c5c46a47b8134",
"type": "github"
},
"original": {
@@ -531,11 +531,11 @@
]
},
"locked": {
"lastModified": 1770501770,
"narHash": "sha256-NWRM6+YxTRv+bT9yvlhhJ2iLae1B1pNH3mAL5wi2rlQ=",
"lastModified": 1772459835,
"narHash": "sha256-978jRz/y/9TKmZb/qD4lEYHCQGHpEXGqy+8X2lFZsak=",
"owner": "hyprwm",
"repo": "hyprwayland-scanner",
"rev": "0bd8b6cde9ec27d48aad9e5b4deefb3746909d40",
"rev": "0a692d4a645165eebd65f109146b8861e3a925e7",
"type": "github"
},
"original": {
@@ -560,11 +560,11 @@
]
},
"locked": {
"lastModified": 1770203293,
"narHash": "sha256-PR/KER+yiHabFC/h1Wjb+9fR2Uy0lWM3Qld7jPVaWkk=",
"lastModified": 1773074819,
"narHash": "sha256-qRqYnXiKoJLRTcfaRukn7EifmST2IVBUMZOeZMAc5UA=",
"owner": "hyprwm",
"repo": "hyprwire",
"rev": "37bc90eed02b0c8b5a77a0b00867baf3005cfb98",
"rev": "f68afd0e73687598cc2774804fedad76693046f0",
"type": "github"
},
"original": {
@@ -580,11 +580,11 @@
]
},
"locked": {
"lastModified": 1772572455,
"narHash": "sha256-B4KOdV2GQogU1XL9903qFkOFf/6H7UGa+dprNGctgMY=",
"lastModified": 1772988002,
"narHash": "sha256-42Arpp+ShJorA9uR1nNlKuMoDx3y+cHg2BxQUW1fo7U=",
"ref": "main",
"rev": "002732d4ebc5b80c2b8522896427c9f6bee9e1d1",
"revCount": 6,
"rev": "bd5ae71978bb60eda28a010956825983dd931e2a",
"revCount": 18,
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/komga-bookmanager.git"
},
@@ -601,11 +601,11 @@
]
},
"locked": {
"lastModified": 1772884418,
"narHash": "sha256-2V/JnGsIhvQoAiH7iIQkOPX5OTZVwGTOEv+nFetd4I8=",
"lastModified": 1773858923,
"narHash": "sha256-JOm+qe+loPxpjpTn2fN5QuqeGLDqYc1QevNeZZuEkdE=",
"ref": "main",
"rev": "0b91385e8906ca40cc89381bf8394ed24a116c6b",
"revCount": 49,
"rev": "2ab63ae85af1e2009e4bce10940e8db56827d942",
"revCount": 67,
"type": "git",
"url": "ssh://gitea@git.ppp.pm:1122/alex/komga-comictracker.git"
},
@@ -623,11 +623,11 @@
]
},
"locked": {
"lastModified": 1770485744,
"narHash": "sha256-ZJGHKtEWhpXyONjy6/popJz0uL2MXmknGr9Vr1B6BAk=",
"lastModified": 1773476909,
"narHash": "sha256-hSg/7xFO+3G3wWFq1480OecREqTY+fu06L06rM2UBmQ=",
"owner": "detoxify92",
"repo": "naviterm",
"rev": "b311af7ae0ab095657264b5fe4a43b9118207584",
"rev": "f89dbde00222fb1e4f611419d05583d8edee4c25",
"type": "gitlab"
},
"original": {
@@ -641,16 +641,17 @@
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1770930949,
"narHash": "sha256-ulX/6yOI9fmiiDqNjn59oLsVkABRo0M2Wkr2w8Ric64=",
"lastModified": 1773920367,
"narHash": "sha256-ADGQjlsFzT9POglBkBJZcFqg3go4d+J3E4GS4WlxENY=",
"owner": "viperML",
"repo": "nh",
"rev": "b37b9a6ca31741282873dd8e335f66aad54f6326",
"rev": "b00a24b39944efd4ec7944f02e0bd9113d991767",
"type": "github"
},
"original": {
"owner": "viperML",
"repo": "nh",
"rev": "b00a24b39944efd4ec7944f02e0bd9113d991767",
"type": "github"
}
},
@@ -678,11 +679,11 @@
"systems": "systems_4"
},
"locked": {
"lastModified": 1771059595,
"narHash": "sha256-avvMQpGX/erjzPI10bN5uHDD08er5QC+pBypQisUNHs=",
"lastModified": 1773491467,
"narHash": "sha256-PuCDdZyWQRP1F0fQ7urr+mJ5szDyHBcfqBv4jBuKit0=",
"owner": "nix-community",
"repo": "nix-jetbrains-plugins",
"rev": "fb4b27d169c7fbfc92c9dfec971e9c87506cb8f0",
"rev": "6f77b7d7a109a8a11fa3e7a24a6051d812aa2a77",
"type": "github"
},
"original": {
@@ -693,11 +694,11 @@
},
"nixos-hardware": {
"locked": {
"lastModified": 1770882871,
"narHash": "sha256-nw5g+xl3veea+maxJ2/81tMEA/rPq9aF1H5XF35X+OE=",
"lastModified": 1773533765,
"narHash": "sha256-qonGfS2lzCgCl59Zl63jF6dIRRpvW3AJooBGMaXjHiY=",
"owner": "nixos",
"repo": "nixos-hardware",
"rev": "af04cb78aa85b2a4d1c15fc7270347e0d0eda97b",
"rev": "f8e82243fd601afb9f59ad230958bd073795cbfe",
"type": "github"
},
"original": {
@@ -709,11 +710,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1770770419,
"narHash": "sha256-iKZMkr6Cm9JzWlRYW/VPoL0A9jVKtZYiU4zSrVeetIs=",
"lastModified": 1772822230,
"narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "6c5e707c6b5339359a9a9e215c5e66d6d802fd7a",
"rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
"type": "github"
},
"original": {
@@ -725,27 +726,27 @@
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1767313136,
"narHash": "sha256-16KkgfdYqjaeRGBaYsNrhPRRENs0qzkQVUooNHtoy2w=",
"lastModified": 1773814637,
"narHash": "sha256-GNU+ooRmrHLfjlMsKdn0prEKVa0faVanm0jrgu1J/gY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ac62194c3917d5f474c1a844b6fd6da2db95077d",
"rev": "fea3b367d61c1a6592bc47c72f40a9f3e6a53e96",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.05",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1771008912,
"narHash": "sha256-gf2AmWVTs8lEq7z/3ZAsgnZDhWIckkb+ZnAo5RzSxJg=",
"lastModified": 1773821835,
"narHash": "sha256-TJ3lSQtW0E2JrznGVm8hOQGVpXjJyXY2guAxku2O9A4=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "a82ccc39b39b621151d6732718e3e250109076fa",
"rev": "b40629efe5d6ec48dd1efba650c797ddbd39ace0",
"type": "github"
},
"original": {
@@ -786,11 +787,11 @@
]
},
"locked": {
"lastModified": 1770726378,
"narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=",
"lastModified": 1772893680,
"narHash": "sha256-JDqZMgxUTCq85ObSaFw0HhE+lvdOre1lx9iI6vYyOEs=",
"owner": "cachix",
"repo": "git-hooks.nix",
"rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae",
"rev": "8baab586afc9c9b57645a734c820e4ac0a604af9",
"type": "github"
},
"original": {
@@ -950,11 +951,11 @@
]
},
"locked": {
"lastModified": 1761431178,
"narHash": "sha256-xzjC1CV3+wpUQKNF+GnadnkeGUCJX+vgaWIZsnz9tzI=",
"lastModified": 1772669058,
"narHash": "sha256-XhnY0aRuDo5LT8pmJVPofPOgO2hAR7T+XRoaQxtNPzQ=",
"owner": "hyprwm",
"repo": "xdg-desktop-portal-hyprland",
"rev": "4b8801228ff958d028f588f0c2b911dbf32297f9",
"rev": "906d0ac159803a7df2dc1f948df9327670380f69",
"type": "github"
},
"original": {

View File

@@ -12,7 +12,7 @@
};
nh = {
url = "github:viperML/nh";
url = "github:viperML/nh/b00a24b39944efd4ec7944f02e0bd9113d991767";
};
nix-gc-env.url = "github:Julow/nix-gc-env";

View File

@@ -27,6 +27,8 @@
pkgs.onlyoffice-desktopeditors
pkgs.wdisplays
pkgs.vlc
pkgs.claude-code
pkgs.opencode
];
home.stateVersion = "23.05";

View File

@@ -14,7 +14,7 @@ in
nix-index.enable = false;
greetd.enable = true;
hyprland.enable = true;
swaylock.enable = true;
hyprlock.enable = true;
physlock.enable = false;
power.enable = true;

View File

@@ -23,8 +23,16 @@ in
{ path = ./gitconfig; }
];
signing = {
key = config.age.secrets."alex.pinwheel-github.com-signing.pub".path;
signByDefault = true;
};
settings = {
rerere.enable = true;
# Tells Git to use SSH instead of the default GPG
gpg.format = "ssh";
};
};
@@ -35,5 +43,20 @@ in
set main-view-line-number-interval = 1
'';
};
age.secrets = {
"alex.pinwheel-github.com-signing" = {
file = ../../../../secrets/pinwheel/alex.pinwheel-github.com-signing.age;
path = "/home/alex/.ssh/alex.pinwheel-github.com-signing";
owner = "alex";
group = "users";
};
"alex.pinwheel-github.com-signing.pub" = {
file = ../../../../secrets/pinwheel/alex.pinwheel-github.com-signing.pub.age;
path = "/home/alex/.ssh/alex.pinwheel-github.com-signing.pub";
owner = "alex";
group = "users";
};
};
};
}

View File

@@ -22,7 +22,7 @@ in
let
session = {
user = "alex";
command = "${pkgs.hyprland}/bin/Hyprland";
command = "uwsm start hyprland-uwsm.desktop";
};
in
{

View File

@@ -26,28 +26,30 @@ let
}
bind_workspaces() {
local external
local external batch=""
if external=$(get_active_external); then
# External monitor connected: 1-5 on external, 6-10 on internal
# External monitor connected: move workspaces 1-5 to external, 6-10 to internal
for ws in 1 2 3 4 5; do
$HYPRCTL keyword workspace "$ws, monitor:$external, default:true"
batch="$batch dispatch moveworkspacetomonitor $ws $external;"
done
for ws in 6 7 8 9 10; do
$HYPRCTL keyword workspace "$ws, monitor:$INTERNAL, default:true"
batch="$batch dispatch moveworkspacetomonitor $ws $INTERNAL;"
done
else
# No external monitor: all workspaces on internal
# No external monitor: move all workspaces to internal
for ws in 1 2 3 4 5 6 7 8 9 10; do
$HYPRCTL keyword workspace "$ws, monitor:$INTERNAL, default:true"
batch="$batch dispatch moveworkspacetomonitor $ws $INTERNAL;"
done
fi
$HYPRCTL --batch "$batch"
}
handle_event() {
case $1 in
monitoradded*|monitorremoved*)
sleep 0.5 # Give monitor time to initialize
sleep 0.5
bind_workspaces
;;
esac
@@ -71,6 +73,7 @@ in
config = lib.mkIf enabled {
programs.hyprland = {
enable = true;
withUWSM = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
@@ -83,10 +86,11 @@ in
home-manager.users.alex = {
wayland.windowManager.hyprland = {
enable = true;
systemd.enable = false;
extraConfig = ''
exec-once=waybar
exec-once=hyprctl setcursor Adwaita 24
exec-once = uwsm app -- waybar
exec-once = uwsm app -- hyprctl setcursor Adwaita 24
env = GDK_DPI_SCALE,1.5
env = HYPRCURSOR_THEME,Adwaita
@@ -96,6 +100,25 @@ in
monitor=HDMI-A-1, 2560x1440@100, auto-center-up, 1
monitor=DP-3, 2560x1440@60, auto-center-up, 1
# Workspaces 1-5 on external monitors (HDMI-A-1 or DP-3)
workspace = 1, monitor:HDMI-A-1, default:true
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 = 1, monitor:DP-3, default:true
workspace = 2, monitor:DP-3
workspace = 3, monitor:DP-3
workspace = 4, monitor:DP-3
workspace = 5, monitor:DP-3
# Workspaces 6-10 on internal monitor
workspace = 6, monitor:eDP-1, default:true
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 = f[1], gapsout:0, gapsin:0
windowrule = border_size 0, match:float 0, match:workspace w[tv1]
@@ -106,7 +129,6 @@ in
# 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
'';
settings = {

View File

@@ -5,13 +5,13 @@
...
}:
let
enabled = config.mod.swaylock.enable;
enabled = config.mod.hyprlock.enable;
hyprlandEnabled = config.mod.hyprland.enable;
in
{
options = {
mod.swaylock = {
enable = lib.mkEnableOption "enable swaylock module";
mod.hyprlock = {
enable = lib.mkEnableOption "enable hyprlock module";
dpmsTimeout = lib.mkOption {
description = "timeout in seconds before DPMS is turned on";
@@ -23,13 +23,32 @@ in
config = lib.mkIf enabled {
home-manager.users.alex = {
programs.swaylock = {
programs.hyprlock = {
enable = true;
settings = {
color = "000000";
indicator-idle-visible = false;
show-failed-attempts = true;
general = {
hide_cursor = true;
};
background = [
{
color = "rgb(000000)";
}
];
input-field = [
{
size = "250, 50";
position = "0, 0";
halign = "center";
valign = "center";
outline_thickness = 2;
dots_center = true;
fade_on_empty = true;
placeholder_text = "";
}
];
};
};
@@ -37,20 +56,20 @@ in
settings = {
bind =
let
pause-music = "${pkgs.playerctl}/bin/playerctl -p spotify pause";
pause-music = "${pkgs.playerctl}/bin/playerctl -a pause";
dpmsTimeout = config.mod.swaylock.dpmsTimeout;
dpmsTimeout = config.mod.hyprlock.dpmsTimeout;
dpms-lock = pkgs.writeShellScript "dpms-lock" ''
${pkgs.swayidle}/bin/swayidle \
timeout ${dpmsTimeout} "${pkgs.hyprland}/bin/hyprctl dispatch dpms off" \
resume "${pkgs.hyprland}/bin/hyprctl dispatch dpms on" &
${pkgs.swaylock}/bin/swaylock && ${pkgs.procps}/bin/pkill swayidle
${pkgs.hyprlock}/bin/hyprlock; ${pkgs.procps}/bin/pkill swayidle
'';
in
[
"$mod, x, exec, ${pause-music}; ${dpms-lock}"
"$mod SHIFT, x, exec, ${pause-music}; ${pkgs.swaylock}/bin/swaylock -f; systemctl suspend"
"$mod SHIFT, x, exec, ${pause-music}; ${pkgs.hyprlock}/bin/hyprlock & sleep 0.5; systemctl suspend"
];
};
};
@@ -59,11 +78,7 @@ in
security = {
polkit.enable = true;
pam.services.swaylock.text = ''
# PAM configuration file for the swaylock screen locker. By default, it includes
# the 'login' configuration file (see /etc/pam.d/login)
auth include login
'';
pam.services.hyprlock = {};
};
};
}

View File

@@ -9,14 +9,13 @@ let
in
{
users.users.alex.extraGroups = [ "video" ];
programs.light.enable = true;
home-manager.users.alex = {
wayland.windowManager.hyprland = lib.mkIf hyprlandEnabled {
settings = {
bind = [
", XF86MonBrightnessUp, exec, ${pkgs.light}/bin/light -A 5"
", XF86MonBrightnessDown, exec, ${pkgs.light}/bin/light -U 5"
", XF86MonBrightnessUp, exec, ${pkgs.brightnessctl}/bin/brightnessctl set +5%"
", XF86MonBrightnessDown, exec, ${pkgs.brightnessctl}/bin/brightnessctl set 5%-"
];
};
};

View File

@@ -80,12 +80,12 @@ in
path = [
pkgs.coreutils # For `cat`
pkgs.libnotify
pkgs.swaylock
pkgs.hyprlock
];
script =
let
pause-music = "${pkgs.playerctl}/bin/playerctl -p spotify pause";
pause-music = "${pkgs.playerctl}/bin/playerctl -a pause";
in
''
BATTERY_CAPACITY=$(cat /sys/class/power_supply/${lowbat.battery}/capacity)
@@ -103,7 +103,7 @@ in
BATTERY_STATUS=$(cat /sys/class/power_supply/${lowbat.battery}/status)
if [[ $BATTERY_STATUS = "Discharging" ]]; then
${pause-music}; ${pkgs.swaylock}/bin/swaylock -f; systemctl suspend
${pause-music}; ${pkgs.hyprlock}/bin/hyprlock & sleep 0.5; systemctl suspend
fi
fi
'';

View File

@@ -1,6 +1,14 @@
{ pkgs, ... }:
{
# Enable gnome-keyring at system level for PAM integration
services.gnome.gnome-keyring.enable = true;
home-manager.users.alex = {
services.gnome-keyring = {
enable = true;
components = [ "secrets" "ssh" ];
};
programs.ssh = {
enable = true;
enableDefaultConfig = false;
@@ -39,7 +47,7 @@
"*" = {
forwardAgent = false;
addKeysToAgent = "no";
addKeysToAgent = "yes";
compression = false;
serverAliveInterval = 0;
serverAliveCountMax = 3;
@@ -52,7 +60,10 @@
};
};
home.packages = [ pkgs.sshfs ];
home.packages = [
pkgs.sshfs
pkgs.seahorse # GUI for managing gnome-keyring
];
};
age.secrets = {

View File

@@ -18,7 +18,7 @@
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides "*:Ss=\E[%p1%d q:Se=\E[ q"
set -ga terminal-overrides ',*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
set-option -g allow-rename off

View File

@@ -12,6 +12,18 @@ let
in
{
home-manager.users.alex = {
# Ensure bashInteractive is first in PATH inside nix devshells.
# stdenv provides a non-interactive bash that breaks Copilot shell commands.
# Adding bashInteractive to home.packages alone isn't enough because devshell
# packages are prepended to PATH. This precmd hook runs after direnv's hook
# and re-prepends bashInteractive so it takes priority.
programs.zsh.initContent = ''
_ensure_bash_interactive() {
[[ "$PATH" == "${pkgs.bashInteractive}/bin:"* ]] || export PATH="${pkgs.bashInteractive}/bin:$PATH"
}
precmd_functions+=(_ensure_bash_interactive)
'';
home.sessionVariables = {
GITHUB_ACTOR = "Alexander Heldt";
GITHUB_TOKEN = "$(${pkgs.coreutils}/bin/cat ${config.age.secrets.work-github-token.path})";
@@ -25,6 +37,7 @@ in
"IdeaVIM"
"com.github.copilot"
])
pkgs.bashInteractive
(pkgs.google-cloud-sdk.withExtraComponents [
pkgs.google-cloud-sdk.components.gke-gcloud-auth-plugin

Binary file not shown.

View File

@@ -17,6 +17,8 @@ in {
"pinwheel/alex.pinwheel-tadpole.pub.age".publicKeys = [ pinwheel tadpole alex ];
"pinwheel/alex.pinwheel-github.com.age".publicKeys = [ pinwheel alex ];
"pinwheel/alex.pinwheel-github.com.pub.age".publicKeys = [ pinwheel alex ];
"pinwheel/alex.pinwheel-github.com-signing.age".publicKeys = [ pinwheel alex ];
"pinwheel/alex.pinwheel-github.com-signing.pub.age".publicKeys = [ pinwheel alex ];
"pinwheel/alex.pinwheel-git.ppp.pm.age".publicKeys = [ pinwheel alex ];
"pinwheel/alex.pinwheel-git.ppp.pm.pub.age".publicKeys = [ pinwheel alex ];