entirely vibed refactor
This commit is contained in:
parent
cea12431ff
commit
c343c52ab7
78 changed files with 884 additions and 1099 deletions
18
home/modules/programs/chromium.nix
Normal file
18
home/modules/programs/chromium.nix
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.chromium = {
|
||||
enable = true;
|
||||
commandLineArgs = [
|
||||
"--enable-features=TouchpadOverscrollHistoryNavigation,VaapiVideoDecoder"
|
||||
];
|
||||
extensions = [
|
||||
{ id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; }
|
||||
{ id = "nngceckbapebfimnlniiiahkandclblb"; }
|
||||
{ id = "mdjildafknihdffpkfmmpnpoiajfjnjd"; }
|
||||
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; }
|
||||
{ id = "ijcpiojgefnkmcadacmacogglhjdjphj"; }
|
||||
{ id = "kbmfpngjjgdllneeigpgjifpgocmfgmb"; }
|
||||
{ id = "einpaelgookohagofgnnkcfjbkkgepnp"; }
|
||||
];
|
||||
};
|
||||
}
|
||||
8
home/modules/programs/direnv.nix
Normal file
8
home/modules/programs/direnv.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
}
|
||||
4
home/modules/programs/discord.nix
Normal file
4
home/modules/programs/discord.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.discord.enable = true;
|
||||
}
|
||||
10
home/modules/programs/fish.nix
Normal file
10
home/modules/programs/fish.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.fish = {
|
||||
enable = false;
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
preferAbbrs = true;
|
||||
};
|
||||
}
|
||||
15
home/modules/programs/foot.nix
Normal file
15
home/modules/programs/foot.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
app-id = "footclient";
|
||||
workers = 32;
|
||||
};
|
||||
bell.system = "no";
|
||||
scrollback.lines = 100000;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
home/modules/programs/git.nix
Normal file
14
home/modules/programs/git.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "alisceon";
|
||||
email = "alisceon@protonmail.com";
|
||||
};
|
||||
push.autoSetupRemote = true;
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
}
|
||||
11
home/modules/programs/kitty.nix
Normal file
11
home/modules/programs/kitty.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
window_padding_width = 2;
|
||||
};
|
||||
};
|
||||
}
|
||||
7
home/modules/programs/nushell.nix
Normal file
7
home/modules/programs/nushell.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.nushell = {
|
||||
enable = false;
|
||||
configFile.source = ../../conf/config.nu;
|
||||
};
|
||||
}
|
||||
12
home/modules/programs/rofi.nix
Normal file
12
home/modules/programs/rofi.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
commands = import ../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) term;
|
||||
in
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-unwrapped;
|
||||
terminal = term;
|
||||
};
|
||||
}
|
||||
71
home/modules/programs/ssh.nix
Normal file
71
home/modules/programs/ssh.nix
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"*" = {
|
||||
forwardAgent = false;
|
||||
addKeysToAgent = "no";
|
||||
compression = false;
|
||||
serverAliveInterval = 0;
|
||||
serverAliveCountMax = 3;
|
||||
hashKnownHosts = false;
|
||||
userKnownHostsFile = "~/.ssh/known_hosts";
|
||||
controlMaster = "no";
|
||||
controlPath = "~/.ssh/master-%r@%n:%p";
|
||||
controlPersist = "no";
|
||||
};
|
||||
"alisceon-core" = {
|
||||
hostname = "core.alisceon.com";
|
||||
user = "opc";
|
||||
};
|
||||
"blogbox-2" = {
|
||||
hostname = "10.1.0.11";
|
||||
proxyJump = "alisceon-core";
|
||||
user = "opc";
|
||||
};
|
||||
"blogbox-1" = {
|
||||
hostname = "10.1.0.247";
|
||||
proxyJump = "alisceon-core";
|
||||
user = "opc";
|
||||
};
|
||||
"filurbox" = {
|
||||
hostname = "oci.malice.zone";
|
||||
user = "opc";
|
||||
};
|
||||
"dnspi" = {
|
||||
hostname = "10.40.0.2";
|
||||
user = "pi";
|
||||
};
|
||||
"nuc".hostname = "nuc.home.the.malice.zone";
|
||||
"tsla-exporter-bridge" = {
|
||||
hostname = "alma02.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tsla-runner-boi" = {
|
||||
hostname = "alma03.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tsla-nixos".hostname = "tesla-nixos.lab.the.malice.zone";
|
||||
"tsla-backups" = {
|
||||
hostname = "backups.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tsla-books" = {
|
||||
hostname = "books.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tower" = {
|
||||
forwardAgent = true;
|
||||
addKeysToAgent = "yes";
|
||||
hostname = "tower.home.the.malice.zone";
|
||||
};
|
||||
"electra" = {
|
||||
forwardAgent = true;
|
||||
addKeysToAgent = "yes";
|
||||
hostname = "electra.home.the.malice.zone";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
10
home/modules/programs/swaylock.nix
Normal file
10
home/modules/programs/swaylock.nix
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{ ... }:
|
||||
{
|
||||
programs.swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ignore-empty-password = true;
|
||||
indicator-caps-lock = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
44
home/modules/programs/vscode.nix
Normal file
44
home/modules/programs/vscode.nix
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium.fhsWithPackages (
|
||||
ps: with ps; [ git ]
|
||||
);
|
||||
profiles.default = {
|
||||
userSettings = {
|
||||
"python.languageServer" = "None";
|
||||
"python.pyrefly.displayTypeErrors" = "force-on";
|
||||
"explorer.confirmDelete" = false;
|
||||
"explorer.confirmDragAndDrop" = false;
|
||||
"explorer.confirmPasteNative" = false;
|
||||
"git.confirmSync" = false;
|
||||
};
|
||||
extensions = [
|
||||
pkgs.vscode-extensions.ms-python.python
|
||||
pkgs.vscode-extensions.ms-python.debugpy
|
||||
pkgs.vscode-extensions.ms-vscode.cpptools
|
||||
pkgs.vscode-extensions.jnoortheen.nix-ide
|
||||
] ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
|
||||
{
|
||||
name = "xonsh";
|
||||
publisher = "jnoortheen";
|
||||
version = "0.3.3";
|
||||
hash = "sha256-EdAjVzqvbiSm/hL/SeJIlfY1QocpQPyzv4RV84t4bbg=";
|
||||
}
|
||||
{
|
||||
name = "pyrefly";
|
||||
publisher = "meta";
|
||||
version = "0.52.0";
|
||||
hash = "sha256-vheW8D2jy3aTpAR/jsgw8Khj1z08GGmRaeYvL+UOXSI=";
|
||||
}
|
||||
{
|
||||
name = "chatgpt";
|
||||
publisher = "openai";
|
||||
version = "0.5.74";
|
||||
hash = "sha256-yR9oR3w4AkoWaQDPwSaQtrKL6IcXANaMfFiw6K/b5o0=";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
104
home/modules/programs/waybar.nix
Normal file
104
home/modules/programs/waybar.nix
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
commands = import ../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) uwsm term;
|
||||
in
|
||||
{
|
||||
programs.waybar = {
|
||||
enable = true;
|
||||
systemd = {
|
||||
enable = true;
|
||||
target = "graphical-session.target";
|
||||
};
|
||||
settings.mainBar = {
|
||||
layer = "bottom";
|
||||
position = "top";
|
||||
height = 28;
|
||||
spacing = 0;
|
||||
modules-left = [ "sway/workspaces" ];
|
||||
modules-center = [ "sway/window" ];
|
||||
modules-right = [
|
||||
"tray"
|
||||
"idle_inhibitor"
|
||||
"network"
|
||||
"bluetooth"
|
||||
"pulseaudio"
|
||||
"battery"
|
||||
"sway/language"
|
||||
"clock"
|
||||
];
|
||||
"sway/workspaces" = {
|
||||
on-click = "activate";
|
||||
sort-by-number = true;
|
||||
format = "{value}";
|
||||
};
|
||||
"sway/window".max-length = 64;
|
||||
tray = {
|
||||
icon-size = 24;
|
||||
spacing = 8;
|
||||
};
|
||||
idle_inhibitor = {
|
||||
format = "| {icon}";
|
||||
start-activated = true;
|
||||
format-icons = {
|
||||
activated = "🫨";
|
||||
deactivated = "😴";
|
||||
};
|
||||
};
|
||||
"sway/language" = {
|
||||
format = "| {flag}";
|
||||
tooltip-format = "{long}";
|
||||
};
|
||||
clock = {
|
||||
interval = 60;
|
||||
tooltip = true;
|
||||
format = "| {:%H:%M} ";
|
||||
tooltip-format = "{:%Y-%m-%d}";
|
||||
};
|
||||
battery = {
|
||||
interval = 60;
|
||||
format = "| {icon}{capacity}%";
|
||||
format-charging = "| {icon}⚡{capacity}%";
|
||||
format-plugged = "| {icon}🔌{capacity}%";
|
||||
states = {
|
||||
critical = 10;
|
||||
warning = 20;
|
||||
good = 100;
|
||||
full = 100;
|
||||
over = 101;
|
||||
};
|
||||
format-icons = [ "🪫" "🪫" "🔋" "🔋" "🔋" ];
|
||||
};
|
||||
network = {
|
||||
tooltip-format = "{ifname} = {ipaddr}/{cidr}";
|
||||
format-wifi = "| ᯤ";
|
||||
format-ethernet = "| ⇄";
|
||||
format-linked = "| 🔗";
|
||||
format-disconnected = "| ⛓️💥";
|
||||
interval = 15;
|
||||
on-click = "${uwsm} ${term} -e nmtui";
|
||||
};
|
||||
bluetooth = {
|
||||
format-connected = "| ᛒ";
|
||||
format-on = "| ᚧ";
|
||||
format-disabled = "";
|
||||
format-no-controller = "";
|
||||
interval = 15;
|
||||
on-click = "${uwsm} ${term} -e bluetui";
|
||||
};
|
||||
pulseaudio = {
|
||||
format = "| 🔊{volume}%";
|
||||
format-muted = "| 🔈0%";
|
||||
format-bluetooth = "| 🎧{volume}%";
|
||||
on-click = "${uwsm} pavucontrol";
|
||||
};
|
||||
};
|
||||
style = ''
|
||||
button {
|
||||
box-shadow: inset 0 -8px transparent;
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
}
|
||||
'';
|
||||
};
|
||||
}
|
||||
54
home/modules/services/espanso.nix
Normal file
54
home/modules/services/espanso.nix
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
{ pkgs, repoRoot, ... }:
|
||||
{
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
waylandSupport = true;
|
||||
configs.default = {
|
||||
toggle_key = "OFF";
|
||||
preserve_clipboard = true;
|
||||
show_notifications = true;
|
||||
keyboard_layout.layout = "se";
|
||||
};
|
||||
matches = {
|
||||
base.matches = [
|
||||
{
|
||||
trigger = ":ip ";
|
||||
replace = "{{pubip}} ";
|
||||
}
|
||||
{
|
||||
trigger = ":gw2hs ";
|
||||
replace = "Full Homestead ^w^ ";
|
||||
}
|
||||
{
|
||||
regex = ":format (?P<alphabet>\\S+) (?P<text>\\S+) ";
|
||||
replace = "{{format_text}} ";
|
||||
vars = [
|
||||
{
|
||||
name = "format_text";
|
||||
type = "shell";
|
||||
params.cmd = "${pkgs.python3}/bin/python3 ${repoRoot}/util/format_text.py $ESPANSO_ALPHABET $ESPANSO_TEXT";
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
regex = ";;(?P<emname>\\S+) ";
|
||||
replace = "{{emoji}} ";
|
||||
vars = [
|
||||
{
|
||||
name = "emoji";
|
||||
type = "shell";
|
||||
params.cmd = "${pkgs.python3}/bin/python3 ${repoRoot}/util/get_emoji.py $ESPANSO_EMNAME";
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
global_vars.global_vars = [
|
||||
{
|
||||
name = "pubip";
|
||||
type = "shell";
|
||||
params.cmd = "curl -s https://ifconfig.me";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
11
home/modules/services/gnome-keyring.nix
Normal file
11
home/modules/services/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"ssh"
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
];
|
||||
};
|
||||
}
|
||||
19
home/modules/services/mako.nix
Normal file
19
home/modules/services/mako.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
settings = {
|
||||
actions = true;
|
||||
anchor = "top-center";
|
||||
border-radius = 0;
|
||||
default-timeout = 10000;
|
||||
height = 100;
|
||||
width = 600;
|
||||
icons = true;
|
||||
ignore-timeout = false;
|
||||
layer = "overlay";
|
||||
margin = 10;
|
||||
markup = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
47
home/modules/services/swayidle.nix
Normal file
47
home/modules/services/swayidle.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
commands = import ../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) notify lock display;
|
||||
in
|
||||
{
|
||||
services.swayidle = {
|
||||
enable = true;
|
||||
timeouts = [
|
||||
{
|
||||
timeout = 120;
|
||||
command = "${notify} 'Locking in 5 seconds' -t 5000";
|
||||
}
|
||||
{
|
||||
timeout = 125;
|
||||
command = lock;
|
||||
}
|
||||
{
|
||||
timeout = 125;
|
||||
command = display "off";
|
||||
resumeCommand = display "on";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
command = "${pkgs.systemd}/bin/systemctl suspend";
|
||||
}
|
||||
];
|
||||
events = [
|
||||
{
|
||||
event = "before-sleep";
|
||||
command = "display off; systemctl --user stop libinput-gestures; ${lock}";
|
||||
}
|
||||
{
|
||||
event = "after-resume";
|
||||
command = "display on; systemctl --user start libinput-gestures";
|
||||
}
|
||||
{
|
||||
event = "lock";
|
||||
command = (display "off") + "; " + lock;
|
||||
}
|
||||
{
|
||||
event = "unlock";
|
||||
command = display "on";
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
4
home/modules/services/syncthing.nix
Normal file
4
home/modules/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
{ ... }:
|
||||
{
|
||||
services.syncthing.enable = true;
|
||||
}
|
||||
85
home/modules/wm/gnome/dconf.nix
Normal file
85
home/modules/wm/gnome/dconf.nix
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
{ pkgs, ... }:
|
||||
{
|
||||
dconf = {
|
||||
enable = true;
|
||||
settings = {
|
||||
"org/gnome/desktop/background" = {
|
||||
color-shading-type = "solid";
|
||||
picture-options = "zoom";
|
||||
primary-color = "#000000000000";
|
||||
secondary-color = "#000000000000";
|
||||
picture-uri = "file:///home/alisceon/Pictures/system/bg.png";
|
||||
picture-uri-dark = "file:///home/alisceon/Pictures/system/bg.png";
|
||||
};
|
||||
"org/gnome/mutter".auto-maximize = true;
|
||||
"org/gnome/desktop/interface" = {
|
||||
accent-color = "red";
|
||||
color-scheme = "prefer-dark";
|
||||
};
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = [ pkgs.gnomeExtensions.ddterm.extensionUuid ];
|
||||
favorite-apps = [
|
||||
"org.gnome.Nautilus.desktop"
|
||||
"chromium.desktop"
|
||||
"code.desktop"
|
||||
"obsidian.desktop"
|
||||
"discord.desktop"
|
||||
"signal.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = [ "<Shift><Super>s" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/keybindings" = {
|
||||
switch-to-workspace-1 = [ "<Super>1" ];
|
||||
switch-to-workspace-2 = [ "<Super>2" ];
|
||||
switch-to-workspace-3 = [ "<Super>3" ];
|
||||
switch-to-workspace-4 = [ "<Super>4" ];
|
||||
switch-to-workspace-5 = [ "<Super>5" ];
|
||||
switch-to-workspace-6 = [ "<Super>6" ];
|
||||
switch-to-workspace-7 = [ "<Super>7" ];
|
||||
switch-to-workspace-8 = [ "<Super>8" ];
|
||||
switch-to-workspace-9 = [ "<Super>9" ];
|
||||
switch-to-workspace-10 = [ "<Super>0" ];
|
||||
move-to-workspace-1 = [ "<Shift><Super>1" ];
|
||||
move-to-workspace-2 = [ "<Shift><Super>2" ];
|
||||
move-to-workspace-3 = [ "<Shift><Super>3" ];
|
||||
move-to-workspace-4 = [ "<Shift><Super>4" ];
|
||||
move-to-workspace-5 = [ "<Shift><Super>5" ];
|
||||
move-to-workspace-6 = [ "<Shift><Super>6" ];
|
||||
move-to-workspace-7 = [ "<Shift><Super>7" ];
|
||||
move-to-workspace-8 = [ "<Shift><Super>8" ];
|
||||
move-to-workspace-9 = [ "<Shift><Super>9" ];
|
||||
move-to-workspace-10 = [ "<Shift><Super>0" ];
|
||||
close = [ "<Alt>F4" "<Shift><Super>q" ];
|
||||
toggle-fullscreen = [ "<Super>f" ];
|
||||
};
|
||||
"org/gnome/desktop/wm/preferences" = {
|
||||
focus-mode = "mouse";
|
||||
auto-raise = true;
|
||||
auto-raise-delay = 500;
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys" = {
|
||||
custom-keybindings = [
|
||||
"/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/"
|
||||
];
|
||||
};
|
||||
"org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0" = {
|
||||
name = "GNOME Console";
|
||||
command = "kgx";
|
||||
binding = "<Shift><Super>Return";
|
||||
};
|
||||
"com/github/amezin/ddterm" = {
|
||||
ddterm-toggle-hotkey = [ "<Super>Return" ];
|
||||
window-monitor = "focus";
|
||||
hide-when-focus-lost = true;
|
||||
hide-window-on-esc = true;
|
||||
tab-policy = "never";
|
||||
panel-icon-type = "none";
|
||||
use-system-font = false;
|
||||
use-theme-colors = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
6
home/modules/wm/gnome/default.nix
Normal file
6
home/modules/wm/gnome/default.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./dconf.nix
|
||||
];
|
||||
}
|
||||
168
home/modules/wm/sway/default.nix
Normal file
168
home/modules/wm/sway/default.nix
Normal file
|
|
@ -0,0 +1,168 @@
|
|||
{ pkgs, repoRoot, ... }:
|
||||
let
|
||||
commands = import ../../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) uwsm lock term notify nag dmenu espanso;
|
||||
|
||||
key_mod = "Mod4";
|
||||
key_mod_misc = "Alt";
|
||||
key_left = "Left";
|
||||
key_right = "Right";
|
||||
key_up = "Up";
|
||||
key_down = "Down";
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
./gtk.nix
|
||||
./xdg.nix
|
||||
../../programs/foot.nix
|
||||
../../programs/rofi.nix
|
||||
../../programs/swaylock.nix
|
||||
../../programs/waybar.nix
|
||||
../../services/espanso.nix
|
||||
../../services/gnome-keyring.nix
|
||||
../../services/mako.nix
|
||||
../../services/swayidle.nix
|
||||
];
|
||||
|
||||
wayland.windowManager.sway = {
|
||||
enable = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
config = {
|
||||
modifier = key_mod;
|
||||
startup = [
|
||||
{ command = "systemctl --user start libinput-gestures"; }
|
||||
{ command = "${uwsm} swaybg -m fill -i /home/alisceon/Pictures/system/bg.png"; }
|
||||
];
|
||||
bars = [ ];
|
||||
input = {
|
||||
"type:keyboard" = {
|
||||
xkb_options = "fkeys:basic_13-24";
|
||||
};
|
||||
"type:touchpad" = {
|
||||
dwt = "enabled";
|
||||
tap = "enabled";
|
||||
natural_scroll = "disabled";
|
||||
middle_emulation = "enabled";
|
||||
click_method = "clickfinger";
|
||||
clickfinger_button_map = "lrm";
|
||||
scroll_factor = "0.6";
|
||||
};
|
||||
"type:mouse" = {
|
||||
natural_scroll = "disabled";
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.5";
|
||||
};
|
||||
"*" = {
|
||||
xkb_layout = "se,us";
|
||||
xkb_options = "grp:win_space_toggle";
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
"F13" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_mon.xsh)\"";
|
||||
|
||||
"${key_mod}+f" = "fullscreen";
|
||||
"${key_mod}+Shift+f" = "floating toggle";
|
||||
|
||||
"${key_mod}+1" = "workspace number 1";
|
||||
"${key_mod}+2" = "workspace number 2";
|
||||
"${key_mod}+3" = "workspace number 3";
|
||||
"${key_mod}+4" = "workspace number 4";
|
||||
"${key_mod}+5" = "workspace number 5";
|
||||
"${key_mod}+6" = "workspace number 6";
|
||||
"${key_mod}+7" = "workspace number 7";
|
||||
"${key_mod}+8" = "workspace number 8";
|
||||
"${key_mod}+9" = "workspace number 9";
|
||||
"${key_mod}+0" = "scratchpad show";
|
||||
|
||||
"${key_mod}+Shift+1" = "move container to workspace number 1; workspace 1";
|
||||
"${key_mod}+Shift+2" = "move container to workspace number 2; workspace 2";
|
||||
"${key_mod}+Shift+3" = "move container to workspace number 3; workspace 3";
|
||||
"${key_mod}+Shift+4" = "move container to workspace number 4; workspace 4";
|
||||
"${key_mod}+Shift+5" = "move container to workspace number 5; workspace 5";
|
||||
"${key_mod}+Shift+6" = "move container to workspace number 6; workspace 6";
|
||||
"${key_mod}+Shift+7" = "move container to workspace number 7; workspace 7";
|
||||
"${key_mod}+Shift+8" = "move container to workspace number 8; workspace 8";
|
||||
"${key_mod}+Shift+9" = "move container to workspace number 9; workspace 9";
|
||||
"${key_mod}+Shift+0" = "move container to scratchpad; scratchpad show";
|
||||
|
||||
"${key_mod}+Ctrl+1" = "move container to workspace number 1";
|
||||
"${key_mod}+Ctrl+2" = "move container to workspace number 2";
|
||||
"${key_mod}+Ctrl+3" = "move container to workspace number 3";
|
||||
"${key_mod}+Ctrl+4" = "move container to workspace number 4";
|
||||
"${key_mod}+Ctrl+5" = "move container to workspace number 5";
|
||||
"${key_mod}+Ctrl+6" = "move container to workspace number 6";
|
||||
"${key_mod}+Ctrl+7" = "move container to workspace number 7";
|
||||
"${key_mod}+Ctrl+8" = "move container to workspace number 8";
|
||||
"${key_mod}+Ctrl+9" = "move container to workspace number 9";
|
||||
"${key_mod}+Ctrl+0" = "move container to scratchpad";
|
||||
|
||||
"${key_mod}+b" = "splith";
|
||||
"${key_mod}+v" = "splitv";
|
||||
|
||||
"${key_mod}+r" = "layout stacking";
|
||||
"${key_mod}+w" = "layout tabbed";
|
||||
"${key_mod}+e" = "layout toggle split";
|
||||
|
||||
"${key_mod}+Ctrl+${key_left}" = "focus left";
|
||||
"${key_mod}+Ctrl+${key_right}" = "focus right";
|
||||
"${key_mod}+Ctrl+${key_down}" = "focus down";
|
||||
"${key_mod}+Ctrl+${key_up}" = "focus up";
|
||||
|
||||
"${key_mod}+Shift+${key_left}" = "move left";
|
||||
"${key_mod}+Shift+${key_down}" = "move down";
|
||||
"${key_mod}+Shift+${key_up}" = "move up";
|
||||
"${key_mod}+Shift+${key_right}" = "move right";
|
||||
|
||||
"${key_mod}+Tab" = "focus right";
|
||||
"${key_mod}+Shift+Tab" = "focus left";
|
||||
"${key_mod}+Ctrl+Tab" = "move right";
|
||||
"${key_mod}+Ctrl+Shift+Tab" = "move left";
|
||||
"${key_mod}+${key_mod_misc}+Tab" = "workspace next";
|
||||
"${key_mod}+${key_mod_misc}+Shift+Tab" = "workspace prev";
|
||||
|
||||
"Mod4+space" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/get_xkb.xsh)\"";
|
||||
"${key_mod}+Shift+r" = "reload";
|
||||
"${key_mod}+Ctrl+r" = "restart";
|
||||
"${key_mod}+Shift+Backspace" = "exec ${nag} -m 'TuneD profiles:' -Z 'Performance' 'tuned-adm profile accelerator-performance' -Z 'Balanced' 'tuned-adm profile balanced' -Z 'Power Save' 'tuned-adm profile powersave'";
|
||||
"${key_mod}+Shift+q" = "kill";
|
||||
"Alt+F4" = "kill";
|
||||
|
||||
"${key_mod}+L" = "exec ${lock}";
|
||||
"${key_mod}+Escape" = "exec ${nag} -m 'Shutdown options:' -Z 'Power Off' 'systemctl poweroff' -Z 'Reboot' 'systemctl reboot' -Z 'Logout' 'swaymsg exit'";
|
||||
|
||||
"${key_mod}+Return" = "exec ${uwsm} ${term}";
|
||||
"${key_mod}+d" = "exec ${uwsm} ${dmenu} -show drun";
|
||||
"${key_mod}+s" = "exec ${uwsm} ${espanso} search";
|
||||
"${key_mod}+Shift+e" = "exec ${uwsm} ${espanso} toggle";
|
||||
|
||||
"${key_mod}+Shift+s" = "exec grimshot savecopy area";
|
||||
"${key_mod}+Ctrl+s" = "exec grimshot savecopy output";
|
||||
|
||||
"XF86AudioRaiseVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ +3%";
|
||||
"XF86AudioLowerVolume" = "exec pactl set-sink-volume @DEFAULT_SINK@ -3%";
|
||||
"XF86AudioMute" = "exec pactl set-sink-mute @DEFAULT_SINK@ toggle";
|
||||
"XF86AudioPlay" = "exec playerctl play-pause";
|
||||
"${key_mod}+XF86AudioPlay" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/swap_sound_device.xsh)\"";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 9";
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 3";
|
||||
};
|
||||
window = {
|
||||
titlebar = false;
|
||||
commands = [
|
||||
{ criteria = { all = true; }; command = "inhibit_idle fullscreen"; }
|
||||
];
|
||||
};
|
||||
assigns = {
|
||||
"1" = [ { app_id = "chromium"; } ];
|
||||
"2" = [ { class = "steam"; } ];
|
||||
"3" = [ ];
|
||||
"4" = [ { class = "VSCodium"; } ];
|
||||
"5" = [ { app_id = "obsidian"; } ];
|
||||
"6" = [ ];
|
||||
"7" = [ ];
|
||||
"8" = [ { app_id = "discord"; } ];
|
||||
"9" = [ { app_id = "signal"; } ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
home/modules/wm/sway/gtk.nix
Normal file
9
home/modules/wm/sway/gtk.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ ... }:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.enable = true;
|
||||
gtk3.enable = true;
|
||||
gtk4.enable = true;
|
||||
};
|
||||
}
|
||||
56
home/modules/wm/sway/xdg.nix
Normal file
56
home/modules/wm/sway/xdg.nix
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{ pkgs, ... }:
|
||||
let
|
||||
commands = import ../../../../lib/commands.nix { inherit pkgs; };
|
||||
inherit (commands) swaymsg lock;
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
configFile."libinput-gestures.conf".text = ''
|
||||
gesture pinch in 3 sh -c "echo key ctrl+w | ${pkgs.dotool}/bin/dotool"
|
||||
gesture swipe left 3 ${swaymsg} workspace prev
|
||||
gesture swipe right 3 ${swaymsg} workspace next
|
||||
gesture swipe down 3 ${swaymsg} move container to scratchpad
|
||||
gesture swipe up 3 ${swaymsg} fullscreen
|
||||
gesture swipe down 4 ${lock}
|
||||
gesture pinch out 3 ${swaymsg} floating toggle
|
||||
gesture pinch in 4 ${swaymsg} kill
|
||||
'';
|
||||
configFile."electron-flags.conf".text = ''
|
||||
--enable-features=WaylandWindowDecorations,AllowQt
|
||||
--ozone-platform=wayland
|
||||
--gtk-version=4
|
||||
'';
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplicationPackages = [
|
||||
pkgs.gnome-text-editor
|
||||
pkgs.evince
|
||||
pkgs.vlc
|
||||
pkgs.loupe
|
||||
pkgs.nautilus
|
||||
pkgs.chromium
|
||||
];
|
||||
defaultApplications = {
|
||||
"text/*" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
|
||||
"application/xml" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
|
||||
"application/json" = [ "${pkgs.gnome-text-editor}/share/applications/org.gnome.TextEditor.desktop" ];
|
||||
"application/pdf" = [ "${pkgs.evince}/share/applications/org.gnome.Evince.desktop" ];
|
||||
|
||||
"video/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
"audio/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
|
||||
"text/html" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
|
||||
"application/xhtml+xml" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
|
||||
"application/x-web-app-manifest+json" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
|
||||
"application/xml-dtd" = [ "${pkgs.chromium}/share/applications/chromium.desktop" ];
|
||||
|
||||
"image/*" = [ "${pkgs.loupe}/share/applications/org.gnome.Loupe.desktop" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
systemd.user.sessionVariables = {
|
||||
GNOME_DESKTOP_SESSION_ID = "999";
|
||||
SHELL_THICCNESS = "LOW";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue