Extremely minimal sway setup.

This commit is contained in:
Tom Alexander 2024-12-19 17:33:21 -05:00
parent 74499fb6a0
commit fbcb0826d2
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
3 changed files with 61 additions and 6 deletions

View File

@ -4,17 +4,27 @@
imports = []; imports = [];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
grim # screenshot functionality alacritty
slurp # screenshot functionality firefox
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
mako # notification system developed by swaywm maintainer
]; ];
# enable Sway window manager environment.sessionVariables = {
WLR_RENDERER_ALLOW_SOFTWARE = "1";
};
programs.sway = { programs.sway = {
enable = true; enable = true;
wrapperFeatures.gtk = true; wrapperFeatures.gtk = true;
extraOptions = [
"--debug"
"--config"
"${./files/config}"
"--unsupported-gpu"
];
}; };
# foo programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
} }

View File

@ -0,0 +1,32 @@
# Default config for sway
#
# Copy this to ~/.config/sway/config and edit it to your liking.
#
# Read `man 5 sway` for a complete reference.
### Variables
#
# Logo key. Use Mod1 for Alt.
set $mod Mod4
# set $mod Mod1
# Home row direction keys, like vim
set $left h
set $down j
set $up k
set $right l
# Your preferred terminal emulator
set $term alacritty
# Your preferred application launcher
# Note: it's recommended that you pass the final command to sway
# set $menu dmenu_path | dmenu | xargs swaymsg exec
set $menu wofi --show drun --gtk-dark
# Do not show a title bar on windows
default_border pixel 2
bindsym $mod+grave exec $term
exec alacritty
include ~/.config/sway/config.d/*.conf
include /etc/sway/config.d/*

View File

@ -41,6 +41,10 @@ function main {
vm_iso_ssh "${@}" vm_iso_ssh "${@}"
elif [ "$cmd" = "iso_sync" ]; then elif [ "$cmd" = "iso_sync" ]; then
vm_iso_sync "${@}" vm_iso_sync "${@}"
elif [ "$cmd" = "ssh" ]; then
vm_ssh "${@}"
elif [ "$cmd" = "sync" ]; then
vm_sync "${@}"
else else
die 1 "Unknown command: $cmd" die 1 "Unknown command: $cmd"
fi fi
@ -97,4 +101,13 @@ function vm_iso_sync {
gpg_auth ssh -t -p 60022 nixos@127.0.0.1 sudo nixos-install --flake ./configuration#odovm gpg_auth ssh -t -p 60022 nixos@127.0.0.1 sudo nixos-install --flake ./configuration#odovm
} }
function vm_ssh {
exec gpg_auth ssh -p 60022 127.0.0.1
}
function vm_sync {
gpg_auth rsync -av --delete --progress -e 'ssh -p 60022' "$DIR/../configuration" 127.0.0.1:~/
gpg_auth ssh -t -p 60022 127.0.0.1 doas nixos-rebuild boot --flake ./configuration#odovm
}
main "${@}" main "${@}"