meow
vi did:web:vt3e.cat
Sun, 03 May 2026 15:55:03 +0100
12 files changed,
366 insertions(+),
35 deletions(-)
M
home/apr@dahlia.nix
→
home/apr-dahlia.nix
@@ -1,10 +1,30 @@
{ pkgs, ... }: +let + zed-editor = (pkgs.callPackage ../pkgs/zed.nix { }); + bun = (pkgs.callPackage ../pkgs/bun.nix { }); +in { imports = [ ./common - ./common/sway.nix + ./common/sway ]; + gtk = { + enable = true; + theme = { + name = "Adwaita-dark"; + package = pkgs.gnome-themes-extra; + }; + gtk4.iconTheme = { + package = pkgs.adwaita-icon-theme; + name = "Adwaita"; + }; + gtk3.iconTheme = { + package = pkgs.adwaita-icon-theme; + name = "Adwaita"; + }; + }; + home = { username = "willow"; homeDirectory = "/home/willow";@@ -24,26 +44,12 @@
packages = with pkgs; [ kitty alacritty - ghostty-bin + ghostty firefox dmenu - ]; - gtk = { - enable = true; - theme = { - name = "Adwaita-dark"; - package = pkgs.gnome-themes-extra; - }; - gtk4.iconTheme = { - package = pkgs.adwaita-icon-theme; - name = "Adwaita"; - }; - gtk3.iconTheme = { - package = pkgs.adwaita-icon-theme; - name = "Adwaita"; - }; - }; - + zed-editor + bun + ]; }; -} +}
M
home/common/git.nix
→
home/common/git.nix
@@ -14,12 +14,12 @@ user = {
email = "did:web:vt3e.cat"; name = "vi"; }; - - ignores = [ - "result" - ".wspace" - ]; }; + + ignores = [ + "result" + ".wspace" + ]; signing = { key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGDXt8vkpi9jOp9dCjoS8u0dC4fDdgb73w8z7VNI42FB did:web:vt3e.cat";
A
home/common/sway/binds.nix
@@ -0,0 +1,118 @@
+{ lib, pkgs, ... }: +let + programs = { + term = "ghostty"; + menu = "dmenu_run"; + }; + + workspaces = lib.genAttrs (map toString (lib.range 1 9)) ( + i: + if + lib.elem (lib.toInt i) [ + 1 + 3 + 5 + 7 + 9 + ] + then + "DP-1" + else + "HDMI-A-1" + ); + + wsBinds = lib.mapAttrs' (ws: output: { + name = "${super}+${ws}"; + value = "workspace ${ws}"; + }) workspaces; + + wsMoveBinds = lib.mapAttrs' (ws: output: { + name = "${super}+Shift+${ws}"; + value = "move container to workspace ${ws}"; + }) workspaces; + + super = "Mod4"; + dirKeys = { + left = "q"; + right = "w"; + up = "a"; + down = "s"; + }; + + dirBinds = lib.mapAttrs' (dir: key: { + name = "${super}+${key}"; + value = "focus ${dir}"; + }) dirKeys; + + dirMoveBinds = lib.mapAttrs' (dir: key: { + name = "${super}+Shift+${key}"; + value = "move ${dir}"; + }) dirKeys; +in +{ + wayland.windowManager.sway = { + extraConfig = lib.mkAfter '' + # workspaces + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (key: cmd: "bindsym ${key} ${cmd}") ( + wsBinds // wsMoveBinds // dirBinds // dirMoveBinds + ) + )} + + ${lib.concatStringsSep "\n" ( + lib.mapAttrsToList (ws: output: "workspace ${ws} output ${output}") workspaces + )} + + input type:keyboard { + xkb_layout gb + xkb_options caps:ctrl_modifier, + } + + # meow + bindsym ${super}+Shift+e kill + bindsym ${super}+Shift+c reload; + bindsym ${super}+Escape exec swaynag -t warning -m 'exit' -B 'yes' 'swaymsg exit' + floating_modifier ${super} normal + + bindsym ${super}+f fullscreen + bindsym ${super}+Shift+space floating toggle + bindsym ${super}+space focus mode_toggle + + # focus & moving + # bindsym ${super}+${dirKeys.left} focus left + # bindsym ${super}+${dirKeys.right} focus right + # bindsym ${super}+${dirKeys.up} focus up + # bindsym ${super}+${dirKeys.down} focus down + + # bindsym ${super}+${dirKeys.left}+Shift move left + # bindsym ${super}+${dirKeys.right}+Shift move right + # bindsym ${super}+${dirKeys.up}+Shift move up + # bindsym ${super}+${dirKeys.down}+Shift move down + + bindsym ${super}+Shift+Tab move scratchpad + bindsym ${super}+Tab scratchpad show + + # layout + bindsym ${super}+z splith + bindsym ${super}+x splitv + bindsym ${super}+e layout stacking + bindsym ${super}+r layout tabbed + bindsym ${super}+c layout toggle split + + # launch things + bindsym ${super}+t exec ${programs.term} + bindsym ${super}+d exec ${programs.menu} + + # media + bindsym --locked XF86AudioPlay exec playerctl play-pause --ignore-player firefox + bindsym --locked XF86AudioNext exec playerctl next --ignore-player firefox + bindsym --locked XF86AudioPrev exec playerctl previous --ignore-player firefox + bindsym --locked XF86AudioStop exec playerctl stop --ignore-player firefox + + bindsym --locked XF86AudioRaiseVolume exec pactl set-sink-volume @DEFAULT_SINK@ +5% + bindsym --locked XF86AudioLowerVolume exec pactl set-sink-volume @DEFAULT_SINK@ -5% + bindsym --locked XF86AudioMicMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + bindsym --locked XF86AudioMute exec pactl set-sink-mute @DEFAULT_SINK@ toggle + ''; + }; +}
A
home/common/sway/default.nix
@@ -0,0 +1,40 @@
+{ lib, ... }: +let + workspaces = lib.genAttrs (map toString (lib.range 1 10)) ( + i: + if + lib.elem (lib.toInt i) [ + 1 + 3 + 5 + 7 + 9 + ] + then + "DP-1" + else + "HDMI-A-1" + ); +in +{ + imports = [ + ./binds.nix + ./rules.nix + ./theme.nix + ]; + + wayland.windowManager.sway = { + enable = true; + systemd.enable = true; + wrapperFeatures.gtk = true; + checkConfig = false; + + config = { + bars = [ ]; + keybindings = { }; + }; + extraConfig = lib.concatStringsSep "\n" ( + lib.mapAttrsToList (ws: output: "workspace ${ws} output ${output}") workspaces + ); + }; +}
A
home/common/sway/rules.nix
@@ -0,0 +1,29 @@
+{ lib, ... }: +{ + wayland.windowManager.sway = { + extraConfig = lib.mkAfter '' + for_window [class="Civ6"] floating enable, fullscreen enable + for_window [window_role = "pop-up"] floating enable + for_window [window_role = "bubble"] floating enable + for_window [window_role = "dialog"] floating enable + for_window [window_type = "dialog"] floating enable + for_window [window_role = "task_dialog"] floating enable + for_window [window_type = "menu"] floating enable + for_window [app_id = "floating"] floating enable + for_window [app_id = "floating_update"] floating enable, resize set width 1000px height 600px + for_window [class = "(?i)pinentry"] floating enable + for_window [title = "Administrator privileges required"] floating enable + for_window [title = "Open files"] floating enable, resize set width 768px height 768px + for_window [title = "About Mozilla Firefox"] floating enable + for_window [window_role = "About"] floating enable + for_window [app_id="firefox" title="Library"] floating enable + for_window [app_id="librewolf" title="Library"] floating enable + for_window [title = "Firefox - Sharing Indicator"] kill + for_window [title = "Firefox — Sharing Indicator"] kill + for_window [title = "librewolf - Sharing Indicator"] kill + for_window [title = "librewolf — Sharing Indicator"] kill + + for_window [app_id = "foot"] floating enable, resize set width 800px height 600px + ''; + }; +}
A
home/common/sway/theme.nix
@@ -0,0 +1,21 @@
+{ + lib, + config, + pkgs, + ... +}: +{ + wayland.windowManager.sway.extraConfig = lib.mkAfter '' + gaps inner 4 + gaps outer 2 + smart_gaps off + + default_border none + default_floating_border none + + corner_radius 8 + default_dim_inactive 0.075 + + default_border pixel 1 + ''; +}
D
hosts/common/sway.nix
@@ -1,7 +0,0 @@
-{ - wayland.windowManager.sway = { - enable = true; - systemd.enable = true; - wrapperFeatures.gtk = true; - }; -}
M
hosts/common/users.nix
→
hosts/common/users.nix
@@ -6,7 +6,7 @@
users = { willow = { initialPassword = "pass"; - uid = 1000; + uid = 1001; isNormalUser = true; extraGroups = [ "wheel"
M
hosts/dahlia/default.nix
→
hosts/dahlia/default.nix
@@ -1,9 +1,12 @@
-{ pkgs, ... }: +{ inputs, pkgs, ... }: { imports = [ ./hardware.nix ./programs.nix ./services.nix + ../common/default.nix + + inputs.home-manager.nixosModules.home-manager ]; mods.desktop.enable = true;@@ -49,6 +52,14 @@ # builders-use-substitutes = true;
# ''; }; + home-manager = { + extraSpecialArgs = { inherit inputs; }; + users = { + willow = import ../../home/apr-dahlia.nix; + }; + useGlobalPkgs = true; + useUserPackages = true; + }; networking = {
A
pkgs/bun.nix
@@ -0,0 +1,25 @@
+{ stdenv, fetchzip, ... }: + +stdenv.mkDerivation rec { + pname = "bun-baseline"; + version = "1.3.13"; + + src = fetchzip { + url = "https://github.com/oven-sh/bun/releases/download/bun-v${version}/bun-linux-x64-baseline.zip"; + sha256 = "sha256-MVuzDiwKGjJ9mLFH9WqeoK9Hhbh4T47S/zLZ1YivvxY="; + stripRoot = false; + }; + + installPhase = '' + mkdir -p $out/bin + cp bun-linux-x64-baseline/bun $out/bin/bun + ln -s $out/bin/bun $out/bin/bunx + chmod +x $out/bin/bun + ''; + + meta = { + description = "Bun baseline binary for older CPUs"; + homepage = "https://bun.sh"; + platforms = [ "x86_64-linux" ]; + }; +}
A
pkgs/zed.nix
@@ -0,0 +1,88 @@
+{ + stdenv, + fetchurl, + lib, + makeWrapper, + patchelf, + alsa-lib, + wayland, + libxkbcommon, + vulkan-loader, + mesa, + xkeyboard-config, + xorg, + ... +}: + +stdenv.mkDerivation rec { + pname = "zeditor"; + version = "0.234.5-pre"; + + src = fetchurl { + url = "https://github.com/zed-industries/zed/releases/download/v${version}/zed-linux-x86_64.tar.gz"; + sha256 = "sha256-6zeKuSQax2jHMgoYqwAsGRMTUIVBo/5Acf6Qr4TrYno="; + }; + + nativeBuildInputs = [ + makeWrapper + patchelf + ]; + + sourceRoot = "."; + + dontBuild = true; + dontConfigure = true; + + installPhase = '' + runHook preInstall + mkdir -p $out/bin $out/libexec $out/lib $out/share + + APP_NAME=zed-preview + TARGET_DIR=$APP_NAME.app + + cp -r $TARGET_DIR/bin/* $out/bin/ + cp -r $TARGET_DIR/libexec/* $out/libexec/ + cp -r $TARGET_DIR/lib/* $out/lib/ + cp -r $TARGET_DIR/share/* $out/share/ + cp $TARGET_DIR/licenses.md $out/share/ + + chmod +x $out/bin/zed + chmod +x $out/libexec/zed-editor + + + wrapProgram $out/bin/zed \ + --prefix LD_LIBRARY_PATH : ${alsa-lib}/lib:${wayland}/lib:${libxkbcommon}/lib:${vulkan-loader}/lib:${mesa}/lib:${xorg.libXau}/lib:${xorg.libxcb}/lib:${xorg.libX11}/lib:${xorg.libXdmcp}/lib \ + --set XKB_CONFIG_ROOT ${xkeyboard-config}/share/X11/xkb + + wrapProgram $out/libexec/zed-editor \ + --prefix LD_LIBRARY_PATH : ${alsa-lib}/lib:${wayland}/lib:${libxkbcommon}/lib:${vulkan-loader}/lib:${mesa}/lib \ + --set XKB_CONFIG_ROOT ${xkeyboard-config}/share/X11/xkb + + for lib in $out/lib/*.so*; do + if patchelf --print-rpath "$lib" &>/dev/null; then + patchelf --set-rpath '$ORIGIN' "$lib" || true + fi + done + patchelf --set-rpath '$ORIGIN/../lib' $out/libexec/.zed-editor-wrapped + + patchelf --set-rpath '$ORIGIN/../lib' $out/libexec/.zed-editor-wrapped + + + runHook postInstall + ''; + + postInstall = '' + substituteInPlace $out/share/applications/dev.zed.Zed-Preview.desktop \ + --replace "TryExec=zed" "TryExec=$out/bin/zed" \ + --replace "Exec=zed %U" "Exec=$out/bin/zed %U" \ + --replace "Exec=zed --new %U" "Exec=$out/bin/zed --new %U" + ''; + + meta = with lib; { + description = "A high-performance, multiplayer code editor"; + homepage = "https://zed.dev"; + platforms = [ "x86_64-linux" ]; + license = licenses.mit; + maintainers = with maintainers; [ willow ]; + }; +}