Extremely minimal sway setup.
This commit is contained in:
parent
74499fb6a0
commit
fbcb0826d2
@ -4,17 +4,27 @@
|
||||
imports = [];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
grim # screenshot functionality
|
||||
slurp # screenshot functionality
|
||||
wl-clipboard # wl-copy and wl-paste for copy/paste from stdin / stdout
|
||||
mako # notification system developed by swaywm maintainer
|
||||
alacritty
|
||||
firefox
|
||||
];
|
||||
|
||||
# enable Sway window manager
|
||||
environment.sessionVariables = {
|
||||
WLR_RENDERER_ALLOW_SOFTWARE = "1";
|
||||
};
|
||||
|
||||
programs.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
extraOptions = [
|
||||
"--debug"
|
||||
"--config"
|
||||
"${./files/config}"
|
||||
"--unsupported-gpu"
|
||||
];
|
||||
};
|
||||
|
||||
# foo
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
}
|
||||
|
32
nix/configuration/roles/sway/files/config
Normal file
32
nix/configuration/roles/sway/files/config
Normal 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/*
|
@ -41,6 +41,10 @@ function main {
|
||||
vm_iso_ssh "${@}"
|
||||
elif [ "$cmd" = "iso_sync" ]; then
|
||||
vm_iso_sync "${@}"
|
||||
elif [ "$cmd" = "ssh" ]; then
|
||||
vm_ssh "${@}"
|
||||
elif [ "$cmd" = "sync" ]; then
|
||||
vm_sync "${@}"
|
||||
else
|
||||
die 1 "Unknown command: $cmd"
|
||||
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
|
||||
}
|
||||
|
||||
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 "${@}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user