move sway to module
This commit is contained in:
@ -10,6 +10,8 @@
|
||||
imports = [
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
# sway as window manager
|
||||
../../modules/nixos/sway.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
|
||||
|
@ -4,6 +4,11 @@
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
# sway as windowmanager
|
||||
../../modules/home-manager/sway.nix
|
||||
];
|
||||
|
||||
# Home Manager needs a bit of information about you and the paths it should
|
||||
# manage.
|
||||
home.username = "max";
|
||||
@ -26,14 +31,12 @@
|
||||
zsh
|
||||
starship
|
||||
zoxide
|
||||
nerdfonts
|
||||
lazygit
|
||||
btop
|
||||
bat
|
||||
eza
|
||||
unzip
|
||||
rustup
|
||||
keepassxc
|
||||
nextcloud-client
|
||||
firefox
|
||||
thunderbird
|
||||
@ -52,31 +55,8 @@
|
||||
betaflight-configurator
|
||||
loudgain
|
||||
youtube-dl
|
||||
foot
|
||||
grimblast
|
||||
dconf
|
||||
distrobox
|
||||
# TODO: move into luhsoccer baguette dev environment
|
||||
cmake
|
||||
ninja
|
||||
zip
|
||||
unzip
|
||||
curl
|
||||
pkg-config
|
||||
python3
|
||||
wayland-protocols
|
||||
libxkbcommon
|
||||
xorg.libX11
|
||||
xorg.libXrandr
|
||||
xorg.libXinerama
|
||||
xorg.libXcursor
|
||||
xorg.libXi
|
||||
xorg.libXext
|
||||
xorg.xorgproto
|
||||
libGL
|
||||
libGLU
|
||||
extra-cmake-modules
|
||||
glfw
|
||||
];
|
||||
|
||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||
@ -113,151 +93,6 @@
|
||||
EDITOR = "nvim";
|
||||
};
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
xdgAutostart = true;
|
||||
};
|
||||
wrapperFeatures = {
|
||||
gtk = true;
|
||||
};
|
||||
config = {
|
||||
output = {
|
||||
"HDMI-A-1" = {
|
||||
mode = "3840x2160@60Hz";
|
||||
};
|
||||
};
|
||||
input = {
|
||||
"*" = {
|
||||
xkb_layout = "de";
|
||||
xkb_options = "caps:ctrl_modifier";
|
||||
xkb_numlock = "enable";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
tap = "enable";
|
||||
natural_scroll = "enable";
|
||||
};
|
||||
};
|
||||
modifier = "Mod4";
|
||||
keybindings = let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
in
|
||||
lib.mkOptionDefault {
|
||||
"${modifier}+F12" = "mode pause-break";
|
||||
};
|
||||
# use foot as default terminal
|
||||
terminal = "foot";
|
||||
assigns = {
|
||||
"1" = [{app_id = "firefox";}];
|
||||
"2" = [{app_id = "foot";}];
|
||||
};
|
||||
bars = [];
|
||||
menu = "${pkgs.tofi}/bin/tofi-drun | ${pkgs.findutils}/bin/xargs swaymsg exec --";
|
||||
fonts = {
|
||||
names = ["FiraCode Nerd Font"];
|
||||
size = 11.0;
|
||||
};
|
||||
modes = {
|
||||
pause-break = {
|
||||
e = "exec --no-startup-id swaymsg exit, mode default";
|
||||
s = "exec --no-startup-id ${pkgs.dash}/bin/dash -c '${pkgs.swaylock}/bin/swaylock & systemctl suspend-then-hibernate', mode default";
|
||||
r = "exec --no-startup-id systemctl reboot";
|
||||
End = "exec --no-startup-id systemctl poweroff";
|
||||
Return = "mode default";
|
||||
Escape = "mode default";
|
||||
};
|
||||
};
|
||||
startup = [
|
||||
{command = "${pkgs.keepassxc}/bin/keepassxc";}
|
||||
{command = "${pkgs.waybar}/bin/waybar";}
|
||||
{command = "${pkgs.foot}/bin/foot";}
|
||||
{command = "${pkgs.firefox}/bin/firefox";}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar = {
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 26;
|
||||
modules-left = ["sway/workspaces" "sway/mode"];
|
||||
modules-right = ["sway/language" "clock" "battery"];
|
||||
|
||||
"sway/language" = {
|
||||
format = "{shortDescription}";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"clock" = {
|
||||
interval = 60;
|
||||
format = "{:%a %d.%m %I:%M}";
|
||||
};
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
* {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: #292828;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
margin-right: 10px;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button:hover, #workspaces button:active {
|
||||
background-color: #292828;
|
||||
color: #ffffff;
|
||||
}
|
||||
#workspaces button.focused {
|
||||
background-color: #383737;
|
||||
}
|
||||
|
||||
#language {
|
||||
margin-right: 7px;
|
||||
}
|
||||
|
||||
#battery {
|
||||
margin-left: 7px;
|
||||
margin-right: 3px;
|
||||
}
|
||||
'';
|
||||
};
|
||||
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
profiles = {
|
||||
docker_luhbots = {
|
||||
outputs = [
|
||||
{
|
||||
criteria = "eDP-1";
|
||||
position = "0,1080";
|
||||
}
|
||||
{
|
||||
criteria = "Dell Inc. DELL U2422HE GRCPH83";
|
||||
position = "0,0";
|
||||
}
|
||||
{
|
||||
criteria = "NEC Corporation E243WMi 7X313185NB";
|
||||
transform = "90";
|
||||
position = "1920,0";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh = {
|
||||
enable = true;
|
||||
enableAutosuggestions = true;
|
||||
@ -319,46 +154,6 @@
|
||||
options = ["--cmd cd"];
|
||||
};
|
||||
|
||||
# Theming
|
||||
gtk = {
|
||||
enable = true;
|
||||
cursorTheme = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
};
|
||||
iconTheme = {
|
||||
package = pkgs.whitesur-icon-theme;
|
||||
name = "WhiteSur-dark";
|
||||
};
|
||||
theme = {
|
||||
package = pkgs.whitesur-gtk-theme;
|
||||
name = "WhiteSur-Dark";
|
||||
};
|
||||
gtk3.extraConfig = {
|
||||
gtk-dialogs-use-header = false;
|
||||
gtk-cursor-theme-size = 0;
|
||||
gtk-toolbar-style = "GTK_TOOLBAR_BOTH_HORIZ";
|
||||
gtk-toolbar-icon-style = "GTK_ICON_SIZE_LARGE_TOOLBAR";
|
||||
gtk-button-images = 0;
|
||||
gtk-menu-images = 0;
|
||||
gtk-enable-event-sounds = 0;
|
||||
gtk-enable-input-feedback-sounds = 1;
|
||||
gtk-xft-antialias = 1;
|
||||
gtk-xft-hinting = 1;
|
||||
gtk-xft-hintstyle = "hintslight";
|
||||
gtk-xft-rgba = "none";
|
||||
};
|
||||
};
|
||||
home.pointerCursor = {
|
||||
package = pkgs.capitaine-cursors;
|
||||
name = "capitaine-cursors-white";
|
||||
size = 24;
|
||||
x11.enable = true;
|
||||
x11.defaultCursor = "capitaine-cursors-white";
|
||||
};
|
||||
xsession.enable = true;
|
||||
|
||||
services.nextcloud-client.enable = true;
|
||||
|
||||
services.mpd = {
|
||||
|
Reference in New Issue
Block a user