feat: finally some modularity !

This commit is contained in:
Laureηt 2023-04-08 15:53:58 +02:00
parent 4bd776706e
commit ef7e79f3d9
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI
11 changed files with 541 additions and 536 deletions

View file

@ -0,0 +1,21 @@
{ pkgs, ... }:
let
catppuccin-alacritty = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "alacritty";
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
sha256 = "07gvkxz9axvjjplpmwf6k0nk6n84gm20s0k5qkqsqkmv8ysdbmf3";
};
in {
programs.alacritty = {
enable = true;
settings = {
import = [ "${catppuccin-alacritty}/catppuccin-mocha.yml" ];
window.opacity = 0.825;
font = {
normal.family = "FiraCode Nerd Font Mono";
size = 9.5;
};
};
};
}

15
home/default.nix Normal file
View file

@ -0,0 +1,15 @@
{ inputs, pkgs, config, lib, self, ... }: {
config.home.stateVersion = "22.11";
imports = [
./packages.nix
./alacritty
./discord
./firefox
./gtk
./shell
./vscode
./wayland
];
}

16
home/discord/default.nix Normal file
View file

@ -0,0 +1,16 @@
{ pkgs, ... }:
let
catppuccin-discord = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "7182b20c7b4fb88b576226009c9d6ac36998aa46";
sha256 = "03w1qx4gmjdzmzw3jpv51ikaqc2r196szjhb3gn95n90228gbwjf";
};
in {
programs.webcord = {
enable = true;
themes = {
CatpuccinMocha = "${catppuccin-discord}/themes/mocha.theme.css";
};
};
}

14
home/firefox/default.nix Normal file
View file

@ -0,0 +1,14 @@
{ ... }: {
programs.librewolf = {
enable = true;
settings = {
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.downloads" = false;
"privacy.donottrackheader.enabled" = true;
"browser.ctrlTab.sortByRecentlyUsed" = true; # change Ctrl+Tab behaviour
"general.autoScroll" = true;
"pdfjs.viewerCssTheme" = 2; # dark theme for pdf viewer
"browser.startup.page" = 3; # always restore tabs
};
};
}

31
home/gtk/default.nix Normal file
View file

@ -0,0 +1,31 @@
{ pkgs, ... }: {
gtk = {
enable = true;
font = {
name = "Inter";
package = pkgs.inter;
size = 10;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Mocha-Compact-Blue-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "blue" ];
size = "compact";
tweaks = [ "rimless" "normal" ];
variant = "mocha";
};
};
};
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark-Cursors";
package = pkgs.catppuccin-cursors.mochaDark;
size = 20;
gtk.enable = true;
x11.enable = true;
};
}

42
home/packages.nix Normal file
View file

@ -0,0 +1,42 @@
{ inputs, pkgs, config, ... }: {
nixpkgs.config.allowUnfree = false;
services.mpris-proxy.enable = true;
home.packages = with pkgs; [
duf
tmux
htop
rsync
pwgen
neovim
dconf
xdg-utils
baobab
pavucontrol
grim
mako
slurp
waybar
pamixer
swayidle
swaylock
wl-clipboard
nixfmt
borgbackup
gnome.nautilus
jmtpfs
mpv
feh
keepassxc
x2goclient
thunderbird
element-desktop
libreoffice-fresh
];
}

104
home/shell/default.nix Normal file
View file

@ -0,0 +1,104 @@
{ pkgs, lib, ... }:
let
catppuccin-bat = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "1g2r6j33f4zys853i1c5gnwcdbwb6xv5w6pazfdslxf69904lrg9";
};
in {
programs.bat = {
enable = true;
themes = {
catppuccin =
builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme";
};
config.theme = "catppuccin";
extraPackages = with pkgs.bat-extras; [ batman ];
};
programs.zsh.shellAliases = {
cat = "bat";
man = "batman";
};
programs.exa = { enable = true; };
programs.zsh.shellAliases = {
l =
"exa -lahg --icons --git --time-style=long-iso --group-directories-first --color=always";
ll = "l --grid";
};
programs.git = {
enable = true;
userName = "Laureηt";
userEmail = "laurent@fainsin.bzh";
signing = {
signByDefault = true;
key =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium";
};
};
programs.direnv = {
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
programs.atuin = {
enable = true;
enableZshIntegration = true;
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
enableCompletion = true;
sessionVariables = {
MANPAGER = "nvim +Man!";
VISUAL = "nvim";
EDITOR = "nvim";
WORDCHARS = "*?_-.[]~=&;!#$%^(){}<>";
};
history = {
size = 1000000000;
path = "$HOME/.zsh_history";
extended = true;
};
loginExtra = ''
if [[ "$(tty)" == "/dev/tty1" ]]; then
exec sway
fi
'';
initExtra = ''
bindkey -e
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
bindkey '^H' backward-kill-word
bindkey '5~' kill-word
# eval "$(atuin init zsh)"
'';
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = lib.cleanSource ./.;
file = ".p10k.zsh";
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
sha256 = "1x6941n43j3fh1zd82v9gzr83d70gasf1s7rh6fzlby4ha20qf06";
};
}
];
};
}

40
home/vscode/default.nix Normal file
View file

@ -0,0 +1,40 @@
{ pkgs, ... }: {
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
brettm12345.nixfmt-vscode
ms-vsliveshare.vsliveshare
ms-python.vscode-pylance
eamodio.gitlens
yzhang.markdown-all-in-one
editorconfig.editorconfig
catppuccin.catppuccin-vsc
file-icons.file-icons
];
userSettings = {
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Noto Color Emoji'";
"editor.fontLigatures" = true;
"editor.formatOnSave" = true;
"git.autofetch" = true;
"git.confirmSync" = false;
"git.enableSmartCommit" = true;
"terminal.integrated.fontFamily" =
"'FiraCode Nerd Font Mono', 'Noto Color Emoji'";
"window.menuBarVisibility" = "toggle";
"window.zoomLevel" = -0.25;
"workbench.colorTheme" = "Catppuccin Mocha";
"workbench.editor.untitled.hint" = "hidden";
"workbench.iconTheme" = "file-icons";
"gitlens.telemetry.enabled" = false;
"telemetry.telemetryLevel" = "off";
"editor.inlineSuggest.enabled" = true;
"liveshare.presence" = true;
"github.copilot.enable" = { "*" = true; };
};
};
}

256
home/wayland/default.nix Normal file
View file

@ -0,0 +1,256 @@
{ pkgs, ... }: {
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "alacritty";
input = {
"type:touchpad" = {
dwt = "disable";
tap = "enabled";
natural_scroll = "disabled";
middle_emulation = "enabled";
};
"type:keyboard" = {
xkb_numlock = "enabled";
xkb_layout = "fr";
};
};
output = {
"*" = {
bg = "~/Pictures/wallpapers/kai-oberhauser-unsplash.jpg fill";
};
eDP-1 = {
mode = "1920x1080";
adaptive_sync = "on";
};
eDP-2 = {
mode = "1920x1080";
adaptive_sync = "on";
};
DP-1 = { disable = ""; };
};
fonts = {
names = [ "FiraCode" ];
size = 10.0;
};
bars = [{ command = "env GTK_THEME=adwaita ${pkgs.waybar}/bin/waybar"; }];
gaps = {
smartGaps = true;
inner = 5;
};
window = { border = 0; };
floating = { border = 0; };
focus = { followMouse = "no"; };
startup = [
{ command = "element-desktop"; }
{ command = "thunderbird"; }
{ command = "webcord"; }
{
command = ''
swayidle -w \
timeout 100 'swaylock -f --grace 3' \
timeout 130 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout 300 'systemctl suspend' \
before-sleep 'swaylock -f'
'';
}
];
assigns = {
"8" = [{ class = "^WebCord$"; }];
"9" = [{ class = "^Element$"; }];
"10" = [{ app_id = "thunderbird"; }];
};
keybindings = {
# Start a terminal
"${modifier}+Return" = "exec ${terminal}";
# Kill focused window
"${modifier}+q" = "kill";
# Reload the configuration file
"${modifier}+twosuperior" = "reload";
# Exit sway (logs you out of your Wayland session)
"${modifier}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# Lock
"${modifier}+Delete" = "exec swaylock -f";
# Screenshot whole screen
"Print" = "exec grim `date +'%Y-%m-%dT%H:%M:%S'`.png";
# Screenshot whole screen to clipboard
"Shift+Print" = "exec grim - | wl-copy -t 'image/png'";
# Screenshot area
"${modifier}+Print" =
"exec slurp -d | grim -g - `date +'%Y-%m-%dT%H:%M:%S'`.png";
# Screenshot area to clipboard
"${modifier}+Shift+Print" =
"exec slurp -d | grim -g - - | wl-copy -t 'image/png'";
# backlight
"XF86MonBrightnessUp" = "exec light -A 5";
"XF86MonBrightnessDown" = "exec light -U 5";
# audio
"XF86AudioMute" = "exec pamixer --sink 0 -t";
"XF86AudioRaiseVolume" = "exec pamixer -i 5";
"XF86AudioLowerVolume" = "exec pamixer -d 5";
"XF86AudioMicMute" = "exec pamixer --source 0 -t";
# split horizontally or vertically
"${modifier}+b" = "splith";
"${modifier}+v" = "splitv";
# Make the current focus fullscreen
"${modifier}+f" = "fullscreen";
# Toggle the current focus between tiling and floating mode
"${modifier}+s" = "floating toggle";
# Move your focus around
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
# Move the focused window around
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
# Switch to workspace
"${modifier}+ampersand" = "workspace 1";
"${modifier}+eacute" = "workspace 2";
"${modifier}+quotedbl" = "workspace 3";
"${modifier}+apostrophe" = "workspace 4";
"${modifier}+parenleft" = "workspace 5";
"${modifier}+minus" = "workspace 6";
"${modifier}+egrave" = "workspace 7";
"${modifier}+underscore" = "workspace 8";
"${modifier}+ccedilla" = "workspace 9";
"${modifier}+agrave" = "workspace 10";
"${modifier}+KP_1" = "workspace 11";
"${modifier}+KP_2" = "workspace 12";
"${modifier}+KP_3" = "workspace 13";
"${modifier}+KP_4" = "workspace 14";
"${modifier}+KP_5" = "workspace 15";
"${modifier}+KP_6" = "workspace 16";
"${modifier}+KP_7" = "workspace 17";
"${modifier}+KP_8" = "workspace 18";
"${modifier}+KP_9" = "workspace 19";
"${modifier}+KP_0" = "workspace 20";
"${modifier}+KP_End" = "workspace 11";
"${modifier}+KP_Down" = "workspace 12";
"${modifier}+KP_Next" = "workspace 13";
"${modifier}+KP_Left" = "workspace 14";
"${modifier}+KP_Begin" = "workspace 15";
"${modifier}+KP_Right" = "workspace 16";
"${modifier}+KP_Home" = "workspace 17";
"${modifier}+KP_Up" = "workspace 18";
"${modifier}+KP_Prior" = "workspace 19";
"${modifier}+KP_Insert" = "workspace 20";
# Move focused container to workspace
"${modifier}+Shift+ampersand" = "move container to workspace number 1";
"${modifier}+Shift+eacute" = "move container to workspace number 2";
"${modifier}+Shift+quotedbl" = "move container to workspace number 3";
"${modifier}+Shift+apostrophe" = "move container to workspace number 4";
"${modifier}+Shift+parenleft" = "move container to workspace number 5";
"${modifier}+Shift+minus" = "move container to workspace number 6";
"${modifier}+Shift+egrave" = "move container to workspace number 7";
"${modifier}+Shift+underscore" = "move container to workspace number 8";
"${modifier}+Shift+ccedilla" = "move container to workspace number 9";
"${modifier}+Shift+agrave" = "move container to workspace number 10";
"${modifier}+Shift+KP_End" = "move container to workspace number 11";
"${modifier}+Shift+KP_Down" = "move container to workspace number 12";
"${modifier}+Shift+KP_Next" = "move container to workspace number 13";
"${modifier}+Shift+KP_Left" = "move container to workspace number 14";
"${modifier}+Shift+KP_Begin" = "move container to workspace number 15";
"${modifier}+Shift+KP_Right" = "move container to workspace number 16";
"${modifier}+Shift+KP_Home" = "move container to workspace number 17";
"${modifier}+Shift+KP_Up" = "move container to workspace number 18";
"${modifier}+Shift+KP_Prior" = "move container to workspace number 19";
"${modifier}+Shift+KP_Insert" = "move container to workspace number 20";
};
workspaceOutputAssign = [
{
workspace = "1";
output = "eDP-1 eDP-2";
}
{
workspace = "2";
output = "eDP-1 eDP-2";
}
{
workspace = "3";
output = "eDP-1 eDP-2";
}
{
workspace = "4";
output = "eDP-1 eDP-2";
}
{
workspace = "5";
output = "eDP-1 eDP-2";
}
{
workspace = "6";
output = "eDP-1 eDP-2";
}
{
workspace = "7";
output = "eDP-1 eDP-2";
}
{
workspace = "8";
output = "eDP-1 eDP-2";
}
{
workspace = "9";
output = "eDP-1 eDP-2";
}
{
workspace = "10";
output = "eDP-1 eDP-2";
}
{
workspace = "11";
output = "DP-1";
}
{
workspace = "12";
output = "DP-1";
}
{
workspace = "13";
output = "DP-1";
}
{
workspace = "14";
output = "DP-1";
}
{
workspace = "15";
output = "DP-1";
}
{
workspace = "16";
output = "DP-1";
}
{
workspace = "17";
output = "DP-1";
}
{
workspace = "18";
output = "DP-1";
}
{
workspace = "19";
output = "DP-1";
}
{
workspace = "20";
output = "DP-1";
}
];
};
};
}

View file

@ -1,29 +1,4 @@
{ config, pkgs, lib, ... }: { config, pkgs, lib, ... }: {
let
catppuccin-alacritty = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "alacritty";
rev = "3c808cbb4f9c87be43ba5241bc57373c793d2f17";
sha256 = "07gvkxz9axvjjplpmwf6k0nk6n84gm20s0k5qkqsqkmv8ysdbmf3";
};
catppuccin-discord = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "discord";
rev = "7182b20c7b4fb88b576226009c9d6ac36998aa46";
sha256 = "03w1qx4gmjdzmzw3jpv51ikaqc2r196szjhb3gn95n90228gbwjf";
};
catppuccin-bat = pkgs.fetchFromGitHub {
owner = "catppuccin";
repo = "bat";
rev = "ba4d16880d63e656acced2b7d4e034e4a93f74b1";
sha256 = "1g2r6j33f4zys853i1c5gnwcdbwb6xv5w6pazfdslxf69904lrg9";
};
in {
imports = [ ./hardware-configuration.nix ]; imports = [ ./hardware-configuration.nix ];
# networking # networking
@ -131,517 +106,8 @@ in {
shell = pkgs.zsh; shell = pkgs.zsh;
}; };
programs.zsh.enable = true; programs.zsh.enable = true;
home-manager.users.laurent = {
home.stateVersion = "22.11";
home.packages = with pkgs; [
duf
tmux
htop
rsync
pwgen
neovim
dconf home-manager = { users.laurent = ../../home; };
xdg-utils
baobab
pavucontrol
grim
mako
slurp
waybar
pamixer
swayidle
swaylock
wl-clipboard
nixfmt
borgbackup
gnome.nautilus
jmtpfs
mpv
feh
keepassxc
x2goclient
thunderbird
element-desktop
libreoffice-fresh
];
services.mpris-proxy.enable = true;
home.pointerCursor = {
name = "Catppuccin-Mocha-Dark-Cursors";
package = pkgs.catppuccin-cursors.mochaDark;
size = 20;
gtk.enable = true;
x11.enable = true;
};
gtk = {
enable = true;
font = {
name = "Inter";
package = pkgs.inter;
size = 10;
};
iconTheme = {
name = "Papirus-Dark";
package = pkgs.papirus-icon-theme;
};
theme = {
name = "Catppuccin-Mocha-Compact-Blue-Dark";
package = pkgs.catppuccin-gtk.override {
accents = [ "blue" ];
size = "compact";
tweaks = [ "rimless" "normal" ];
variant = "mocha";
};
};
};
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableSyntaxHighlighting = true;
enableCompletion = true;
sessionVariables = {
MANPAGER = "nvim +Man!";
VISUAL = "nvim";
EDITOR = "nvim";
WORDCHARS = "*?_-.[]~=&;!#$%^(){}<>";
};
# shellAliases = {
# cat = "bat";
# df = "duf";
# };
history = {
size = 1000000000;
path = "$HOME/.zsh_history";
extended = true;
};
loginExtra = ''
if [[ "$(tty)" == "/dev/tty1" ]]; then
exec sway
fi
'';
initExtra = ''
bindkey -e
bindkey "^[[1;5C" forward-word
bindkey "^[[1;5D" backward-word
bindkey "^[[1;3C" forward-word
bindkey "^[[1;3D" backward-word
bindkey '^H' backward-kill-word
bindkey '5~' kill-word
# eval "$(atuin init zsh)"
'';
plugins = [
{
name = "powerlevel10k";
src = pkgs.zsh-powerlevel10k;
file = "share/zsh-powerlevel10k/powerlevel10k.zsh-theme";
}
{
name = "powerlevel10k-config";
src = lib.cleanSource ./.;
file = ".p10k.zsh";
}
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "af6f8a266ea1875b9a3e86e14796cadbe1cfbf08";
sha256 = "1x6941n43j3fh1zd82v9gzr83d70gasf1s7rh6fzlby4ha20qf06";
};
}
];
};
programs.atuin = {
enable = true;
enableZshIntegration = true;
};
programs.direnv = { # TODO: use github:numtide/devshell ?
enable = true;
enableZshIntegration = true;
nix-direnv.enable = true;
};
programs.webcord = {
enable = true;
themes = {
CatpuccinMocha = "${catppuccin-discord}/themes/mocha.theme.css";
};
};
programs.git = {
enable = true;
userName = "Laureηt";
userEmail = "laurent@fainsin.bzh";
signing = {
signByDefault = true;
key =
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINTvwXCT99s1EwOCeGQ28jyCAH/RBoLZza9k5I7wWdEu laurent@neodymium";
};
};
programs.bat = {
enable = true;
themes = {
catppuccin =
builtins.readFile "${catppuccin-bat}/Catppuccin-mocha.tmTheme";
};
config.theme = "catppuccin";
extraPackages = with pkgs.bat-extras; [ batman ];
};
programs.zsh.shellAliases = {
cat = "bat";
man = "batman";
};
programs.exa = { enable = true; };
programs.zsh.shellAliases = {
l =
"exa -lahg --icons --git --time-style=long-iso --group-directories-first --color=always";
ll = "l --grid";
};
programs.alacritty = {
enable = true;
settings = {
import = [ "${catppuccin-alacritty}/catppuccin-mocha.yml" ];
window.opacity = 0.825;
font = {
normal.family = "FiraCode Nerd Font Mono";
size = 9.5;
};
};
};
programs.librewolf = {
enable = true;
settings = {
"privacy.clearOnShutdown.history" = false;
"privacy.clearOnShutdown.downloads" = false;
"privacy.donottrackheader.enabled" = true;
"browser.ctrlTab.sortByRecentlyUsed" = true; # change Ctrl+Tab behaviour
"general.autoScroll" = true;
"pdfjs.viewerCssTheme" = 2; # dark theme for pdf viewer
"browser.startup.page" = 3; # always restore tabs
};
};
programs.vscode = {
enable = true;
package = pkgs.vscode;
extensions = with pkgs.vscode-extensions; [
bbenoist.nix
brettm12345.nixfmt-vscode
arrterian.nix-env-selector
ms-vsliveshare.vsliveshare
ms-python.vscode-pylance
eamodio.gitlens
yzhang.markdown-all-in-one
editorconfig.editorconfig
catppuccin.catppuccin-vsc
file-icons.file-icons
];
userSettings = {
"editor.fontFamily" = "'FiraCode Nerd Font Mono', 'Noto Color Emoji'";
"editor.fontLigatures" = true;
"editor.formatOnSave" = true;
"git.autofetch" = true;
"git.confirmSync" = false;
"git.enableSmartCommit" = true;
"terminal.integrated.fontFamily" =
"'FiraCode Nerd Font Mono', 'Noto Color Emoji'";
"window.menuBarVisibility" = "toggle";
"window.zoomLevel" = -0.25;
"workbench.colorTheme" = "Catppuccin Mocha";
"workbench.editor.untitled.hint" = "hidden";
"workbench.iconTheme" = "file-icons";
"gitlens.telemetry.enabled" = false;
"telemetry.telemetryLevel" = "off";
"editor.inlineSuggest.enabled" = true;
"liveshare.presence" = true;
"github.copilot.enable" = { "*" = true; };
};
};
wayland.windowManager.sway = {
enable = true;
config = rec {
modifier = "Mod4";
terminal = "alacritty";
input = {
"type:touchpad" = {
dwt = "disable";
tap = "enabled";
natural_scroll = "disabled";
middle_emulation = "enabled";
};
"type:keyboard" = {
xkb_numlock = "enabled";
xkb_layout = "fr";
};
};
output = {
"*" = {
bg = "~/Pictures/wallpapers/kai-oberhauser-unsplash.jpg fill";
};
eDP-1 = {
mode = "1920x1080";
adaptive_sync = "on";
};
eDP-2 = {
mode = "1920x1080";
adaptive_sync = "on";
};
DP-1 = { disable = ""; };
};
fonts = {
names = [ "FiraCode" ];
size = 10.0;
};
bars =
[{ command = "env GTK_THEME=adwaita ${pkgs.waybar}/bin/waybar"; }];
gaps = {
smartGaps = true;
inner = 5;
};
window = { border = 0; };
floating = { border = 0; };
focus = { followMouse = "no"; };
startup = [
{ command = "element-desktop"; }
{ command = "thunderbird"; }
{ command = "webcord"; }
{
command = ''
swayidle -w \
timeout 100 'swaylock -f --grace 3' \
timeout 130 'swaymsg "output * dpms off"' \
resume 'swaymsg "output * dpms on"' \
timeout 300 'systemctl suspend' \
before-sleep 'swaylock -f'
'';
}
];
assigns = {
"8" = [{ class = "^WebCord$"; }];
"9" = [{ class = "^Element$"; }];
"10" = [{ app_id = "thunderbird"; }];
};
keybindings = {
# Start a terminal
"${modifier}+Return" = "exec ${terminal}";
# Kill focused window
"${modifier}+q" = "kill";
# Reload the configuration file
"${modifier}+twosuperior" = "reload";
# Exit sway (logs you out of your Wayland session)
"${modifier}+Shift+e" =
"exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'";
# Lock
"${modifier}+Delete" = "exec swaylock -f";
# Screenshot whole screen
"Print" = "exec grim `date +'%Y-%m-%dT%H:%M:%S'`.png";
# Screenshot whole screen to clipboard
"Shift+Print" = "exec grim - | wl-copy -t 'image/png'";
# Screenshot area
"${modifier}+Print" =
"exec slurp -d | grim -g - `date +'%Y-%m-%dT%H:%M:%S'`.png";
# Screenshot area to clipboard
"${modifier}+Shift+Print" =
"exec slurp -d | grim -g - - | wl-copy -t 'image/png'";
# backlight
"XF86MonBrightnessUp" = "exec light -A 5";
"XF86MonBrightnessDown" = "exec light -U 5";
# audio
"XF86AudioMute" = "exec pamixer --sink 0 -t";
"XF86AudioRaiseVolume" = "exec pamixer -i 5";
"XF86AudioLowerVolume" = "exec pamixer -d 5";
"XF86AudioMicMute" = "exec pamixer --source 0 -t";
# split horizontally or vertically
"${modifier}+b" = "splith";
"${modifier}+v" = "splitv";
# Make the current focus fullscreen
"${modifier}+f" = "fullscreen";
# Toggle the current focus between tiling and floating mode
"${modifier}+s" = "floating toggle";
# Move your focus around
"${modifier}+Left" = "focus left";
"${modifier}+Down" = "focus down";
"${modifier}+Up" = "focus up";
"${modifier}+Right" = "focus right";
# Move the focused window around
"${modifier}+Shift+Left" = "move left";
"${modifier}+Shift+Down" = "move down";
"${modifier}+Shift+Up" = "move up";
"${modifier}+Shift+Right" = "move right";
# Switch to workspace
"${modifier}+ampersand" = "workspace 1";
"${modifier}+eacute" = "workspace 2";
"${modifier}+quotedbl" = "workspace 3";
"${modifier}+apostrophe" = "workspace 4";
"${modifier}+parenleft" = "workspace 5";
"${modifier}+minus" = "workspace 6";
"${modifier}+egrave" = "workspace 7";
"${modifier}+underscore" = "workspace 8";
"${modifier}+ccedilla" = "workspace 9";
"${modifier}+agrave" = "workspace 10";
"${modifier}+KP_1" = "workspace 11";
"${modifier}+KP_2" = "workspace 12";
"${modifier}+KP_3" = "workspace 13";
"${modifier}+KP_4" = "workspace 14";
"${modifier}+KP_5" = "workspace 15";
"${modifier}+KP_6" = "workspace 16";
"${modifier}+KP_7" = "workspace 17";
"${modifier}+KP_8" = "workspace 18";
"${modifier}+KP_9" = "workspace 19";
"${modifier}+KP_0" = "workspace 20";
"${modifier}+KP_End" = "workspace 11";
"${modifier}+KP_Down" = "workspace 12";
"${modifier}+KP_Next" = "workspace 13";
"${modifier}+KP_Left" = "workspace 14";
"${modifier}+KP_Begin" = "workspace 15";
"${modifier}+KP_Right" = "workspace 16";
"${modifier}+KP_Home" = "workspace 17";
"${modifier}+KP_Up" = "workspace 18";
"${modifier}+KP_Prior" = "workspace 19";
"${modifier}+KP_Insert" = "workspace 20";
# Move focused container to workspace
"${modifier}+Shift+ampersand" =
"move container to workspace number 1";
"${modifier}+Shift+eacute" = "move container to workspace number 2";
"${modifier}+Shift+quotedbl" = "move container to workspace number 3";
"${modifier}+Shift+apostrophe" =
"move container to workspace number 4";
"${modifier}+Shift+parenleft" =
"move container to workspace number 5";
"${modifier}+Shift+minus" = "move container to workspace number 6";
"${modifier}+Shift+egrave" = "move container to workspace number 7";
"${modifier}+Shift+underscore" =
"move container to workspace number 8";
"${modifier}+Shift+ccedilla" = "move container to workspace number 9";
"${modifier}+Shift+agrave" = "move container to workspace number 10";
"${modifier}+Shift+KP_End" = "move container to workspace number 11";
"${modifier}+Shift+KP_Down" = "move container to workspace number 12";
"${modifier}+Shift+KP_Next" = "move container to workspace number 13";
"${modifier}+Shift+KP_Left" = "move container to workspace number 14";
"${modifier}+Shift+KP_Begin" =
"move container to workspace number 15";
"${modifier}+Shift+KP_Right" =
"move container to workspace number 16";
"${modifier}+Shift+KP_Home" = "move container to workspace number 17";
"${modifier}+Shift+KP_Up" = "move container to workspace number 18";
"${modifier}+Shift+KP_Prior" =
"move container to workspace number 19";
"${modifier}+Shift+KP_Insert" =
"move container to workspace number 20";
};
workspaceOutputAssign = [
{
workspace = "1";
output = "eDP-1 eDP-2";
}
{
workspace = "2";
output = "eDP-1 eDP-2";
}
{
workspace = "3";
output = "eDP-1 eDP-2";
}
{
workspace = "4";
output = "eDP-1 eDP-2";
}
{
workspace = "5";
output = "eDP-1 eDP-2";
}
{
workspace = "6";
output = "eDP-1 eDP-2";
}
{
workspace = "7";
output = "eDP-1 eDP-2";
}
{
workspace = "8";
output = "eDP-1 eDP-2";
}
{
workspace = "9";
output = "eDP-1 eDP-2";
}
{
workspace = "10";
output = "eDP-1 eDP-2";
}
{
workspace = "11";
output = "DP-1";
}
{
workspace = "12";
output = "DP-1";
}
{
workspace = "13";
output = "DP-1";
}
{
workspace = "14";
output = "DP-1";
}
{
workspace = "15";
output = "DP-1";
}
{
workspace = "16";
output = "DP-1";
}
{
workspace = "17";
output = "DP-1";
}
{
workspace = "18";
output = "DP-1";
}
{
workspace = "19";
output = "DP-1";
}
{
workspace = "20";
output = "DP-1";
}
];
};
};
};
# enable docker # enable docker
virtualisation.docker = { virtualisation.docker = {