entirely vibed refactor

This commit is contained in:
alisceon 2026-03-10 21:50:51 +01:00
parent cea12431ff
commit c343c52ab7
78 changed files with 884 additions and 1099 deletions

View file

@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./default.nix
];
} # end file

View file

@ -1,21 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
imports = [
./modules/programs/direnv.nix
./modules/programs/git.nix
./modules/programs/ssh.nix
];
home.username = "alisceon";
home.homeDirectory = "/home/alisceon";
home.stateVersion = "24.05";
manual.manpages.enable = true;
# nixpkgs config
xdg.configFile."nixpkgs/config.nix".source = ../conf/config.nix;
# xonsh extras
xdg.configFile."xonsh/theo.py".source = ../conf/xonsh/theo.py;
xdg.configFile."xonsh/kittycatsay.py".source = ../conf/xonsh/kittycatsay.py;
# Ensure fish exists for the completer backend
home.packages = [ pkgs.fish ];
} # end file

View file

@ -1,17 +0,0 @@
{ pkgs }:
let
swaymsg = "${pkgs.sway}/bin/swaymsg";
in
{
uwsm = "${pkgs.uwsm}/bin/uwsm-app --";
inherit swaymsg;
lock = "${pkgs.swaylock}/bin/swaylock --daemonize";
term = "${pkgs.foot}/bin/footclient";
notify = "${pkgs.libnotify}/bin/notify-send";
nag = "${pkgs.sway}/bin/swaynag --edge bottom";
dmenu = "${pkgs.rofi-unwrapped}/bin/rofi";
espanso = "${pkgs.espanso-wayland}/bin/espanso cmd";
display = status: "${swaymsg} 'output * power ${status}'";
} # end file

View file

@ -1,17 +0,0 @@
{ pkgs, config, hostName, lib, ... }: {
programs.chromium = {
enable = true;
commandLineArgs = [
"--enable-features=TouchpadOverscrollHistoryNavigation,VaapiVideoDecoder"
];
extensions = [
{ id = "ddkjiahejlhfcafbddmgiahcphecmpfh"; } # ublock origin lite
{ id = "nngceckbapebfimnlniiiahkandclblb"; } # bitwarden
{ id = "mdjildafknihdffpkfmmpnpoiajfjnjd"; } # consent-o-matic
{ id = "mnjggcdmjocbbbhaepdhchncahnbgone"; } # sponsorblock
{ id = "ijcpiojgefnkmcadacmacogglhjdjphj"; } # shinigami eyes
{ id = "kbmfpngjjgdllneeigpgjifpgocmfgmb"; } # reddit enhancement suite
{ id = "einpaelgookohagofgnnkcfjbkkgepnp"; } # Random User-Agent
];
}; # end programs.chromium
} # end file

View file

@ -1,8 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
programs.direnv = {
enable = true;
silent = true;
nix-direnv.enable = true;
}; # end programs.direnv
} # end file

View file

@ -1,6 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
programs.discord = {
enable = true;
}; # end programs.discord
} # end file

View file

@ -1,21 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
programs = {
foot = {
enable = true;
server.enable = true;
settings = {
main = {
app-id = "footclient";
workers = 32;
};
bell = {
system = "no";
};
scrollback = {
lines = 100000;
};
};
}; # end foot
}; # end programs
} # end file

View file

@ -1,7 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
programs.nushell = {
enable = false;
configFile.source = ../conf/config.nu;
}; # end programs.nushell
} # end file

View file

@ -1,12 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
let
commands = import ../../lib/commands.nix { inherit pkgs; };
inherit (commands) term;
in
{
programs.rofi = {
enable = true;
package = pkgs.rofi-unwrapped;
terminal = term;
}; # end programs.rofi
} # end file

View file

@ -1,48 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
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=";
}
]; # end extensions
}; # end default
}; # end profiles
}; # end programs.vscode
} # end file

View file

@ -1,112 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
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";
};
}; # end mainbar
}; # end settings
style = ''
button {
box-shadow: inset 0 -8px transparent;
border: none;
border-radius: 0;
}
''; # end style
}; # end programs.waybar
} # end file

View file

@ -1,66 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
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 /home/alisceon/.nixos_config/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 /home/alisceon/.nixos_config/util/get_emoji.py $ESPANSO_EMNAME";
};
}
];
}
];
};
global_vars = {
global_vars = [
{
name = "pubip";
type = "shell";
params = {
cmd = "curl -s https://ifconfig.me";
};
}
];
};
}; # end matches
}; # end services.espanso
} # end file

View file

@ -1,6 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
services.syncthing = {
enable = true;
};
} # end file

View file

@ -1,5 +0,0 @@
{ pkgs, config, hostName, lib, ... }: {
imports = [
"./dconf.nix"
]
} # end file

View file

@ -1,3 +0,0 @@
{ ... }:
{
} # end file

View file

@ -1,9 +1,5 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
imports = [
../modules/services/swayidle.nix
];
wayland.windowManager.sway.config = {
output = {
eDP-1 = {
@ -16,7 +12,7 @@
};
};
workspaceOutputAssign = [];
workspaceOutputAssign = [ ];
input."*" = {
xkb_layout = "se,us";
@ -25,4 +21,4 @@
};
services.espanso.configs.default.keyboard_layout.layout = "se";
} # end file
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
wayland.windowManager.sway.config = {
output = {
@ -36,4 +36,4 @@
};
services.espanso.configs.default.keyboard_layout.layout = "us";
} # end file
}

View 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"; }
];
};
}

View file

@ -0,0 +1,8 @@
{ ... }:
{
programs.direnv = {
enable = true;
silent = true;
nix-direnv.enable = true;
};
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
programs.discord.enable = true;
}

View file

@ -1,11 +1,10 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
programs.fish = {
enable = false;
# Disable greeting
interactiveShellInit = ''
set fish_greeting
'';
preferAbbrs = true;
}; # end programs.fish
} # end file
};
}

View 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;
};
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
programs.git = {
enable = true;
@ -7,8 +7,8 @@
name = "alisceon";
email = "alisceon@protonmail.com";
};
push = { autoSetupRemote = true; };
push.autoSetupRemote = true;
init.defaultBranch = "main";
};
}; # end programs.git
} # end file
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
programs.kitty = {
enable = true;
@ -7,5 +7,5 @@
enable_audio_bell = false;
window_padding_width = 2;
};
}; # end programs.kitty
} # end file
};
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
programs.nushell = {
enable = false;
configFile.source = ../../conf/config.nu;
};
}

View 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;
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
programs.ssh = {
enable = true;
@ -38,9 +38,7 @@
hostname = "10.40.0.2";
user = "pi";
};
"nuc" = {
hostname = "nuc.home.the.malice.zone";
};
"nuc".hostname = "nuc.home.the.malice.zone";
"tsla-exporter-bridge" = {
hostname = "alma02.lab.the.malice.zone";
user = "root";
@ -49,9 +47,7 @@
hostname = "alma03.lab.the.malice.zone";
user = "root";
};
"tsla-nixos" = {
hostname = "tesla-nixos.lab.the.malice.zone";
};
"tsla-nixos".hostname = "tesla-nixos.lab.the.malice.zone";
"tsla-backups" = {
hostname = "backups.lab.the.malice.zone";
user = "root";
@ -70,6 +66,6 @@
addKeysToAgent = "yes";
hostname = "electra.home.the.malice.zone";
};
}; # end matchBlocks
}; # end programs.ssh
} # end file
};
};
}

View file

@ -1,10 +1,10 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
programs.swaylock = {
enable = true;
settings = {
ignore-empty-password = true;
indicator-caps-lock = true;
}; # end settings
}; # end programs.swaylock
} # end file
};
};
}

View 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=";
}
];
};
};
}

View 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;
}
'';
};
}

View 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";
}
];
};
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
services.gnome-keyring = {
enable = true;
@ -8,4 +8,4 @@
"secrets"
];
};
} # end file
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
services.mako = {
enable = true;
@ -14,6 +14,6 @@
layer = "overlay";
margin = 10;
markup = true;
}; #end settings
}; # end services.mako
} # end file
};
};
}

View file

@ -1,6 +1,6 @@
{ pkgs, config, hostName, lib, ... }:
{ pkgs, ... }:
let
commands = import ../../lib/commands.nix { inherit pkgs; };
commands = import ../../../lib/commands.nix { inherit pkgs; };
inherit (commands) notify lock display;
in
{
@ -24,7 +24,7 @@ in
timeout = 600;
command = "${pkgs.systemd}/bin/systemctl suspend";
}
]; # end timeouts
];
events = [
{
event = "before-sleep";
@ -42,6 +42,6 @@ in
event = "unlock";
command = display "on";
}
]; # end events
}; # end services.swayidle
} # end file
];
};
}

View file

@ -0,0 +1,4 @@
{ ... }:
{
services.syncthing.enable = true;
}

View file

@ -1,4 +1,5 @@
{ pkgs, config, hostName, lib, ... }: {
{ pkgs, ... }:
{
dconf = {
enable = true;
settings = {
@ -10,9 +11,7 @@
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/mutter".auto-maximize = true;
"org/gnome/desktop/interface" = {
accent-color = "red";
color-scheme = "prefer-dark";
@ -31,7 +30,6 @@
};
"org/gnome/shell/keybindings" = {
show-screenshot-ui = [ "<Shift><Super>s" ];
};
"org/gnome/desktop/wm/keybindings" = {
switch-to-workspace-1 = [ "<Super>1" ];
@ -82,6 +80,6 @@
use-system-font = false;
use-theme-colors = true;
};
}; # end settings
}; # end dconf
} # end file
};
};
}

View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
./dconf.nix
];
}

View file

@ -1,44 +1,42 @@
{ pkgs, config, hostName, lib, ... }:
let
# shared command aliases
commands = import ../../../lib/commands.nix { inherit pkgs; };
inherit (commands) uwsm lock term notify nag dmenu espanso;
{ pkgs, repoRoot, ... }:
let
commands = import ../../../../lib/commands.nix { inherit pkgs; };
inherit (commands) uwsm lock term notify nag dmenu espanso;
# keybinds
key_mod = "Mod4";
key_mod_misc = "Alt";
key_left = "Left";
key_right = "Right";
key_up = "Up";
key_down = "Down";
in
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"
"../../modules/programs/foot.nix"
"../../modules/programs/rofi.nix"
"../../modules/programs/swaylock.nix"
"../../modules/programs/waybar.nix"
"../../modules/services/espanso.nix"
"../../modules/services/gnome-keyring.nix"
"../../modules/services/mako.nix"
"../../modules/services/swayidle.nix"
./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}";
modifier = key_mod;
startup = [
{ command = "systemctl --user start libinput-gestures"; }
{ command = ''${uwsm} swaybg -m fill -i /home/alisceon/Pictures/system/bg.png'';}
{ command = "${uwsm} swaybg -m fill -i /home/alisceon/Pictures/system/bg.png"; }
];
bars = [ ];
input = {
"type:keyboard" = {
xkb_options = "fkeys:basic_13-24";
xkb_options = "fkeys:basic_13-24";
};
"type:touchpad" = {
dwt = "enabled";
@ -58,12 +56,10 @@
xkb_layout = "se,us";
xkb_options = "grp:win_space_toggle";
};
}; # end input
};
keybindings = {
# Outputs
"F13" = ''exec ${notify} -t 2000 "$(xonsh ~/.nixos_config/util/toggle_mon.xsh)"'';
"F13" = "exec ${notify} -t 2000 \"$(${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/toggle_mon.xsh)\"";
# Workspaces
"${key_mod}+f" = "fullscreen";
"${key_mod}+Shift+f" = "floating toggle";
@ -100,7 +96,6 @@
"${key_mod}+Ctrl+9" = "move container to workspace number 9";
"${key_mod}+Ctrl+0" = "move container to scratchpad";
# Layout
"${key_mod}+b" = "splith";
"${key_mod}+v" = "splitv";
@ -108,19 +103,16 @@
"${key_mod}+w" = "layout tabbed";
"${key_mod}+e" = "layout toggle split";
# Focus
"${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";
# Move
"${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";
# Sparkly alt-tab
"${key_mod}+Tab" = "focus right";
"${key_mod}+Shift+Tab" = "focus left";
"${key_mod}+Ctrl+Tab" = "move right";
@ -128,55 +120,49 @@
"${key_mod}+${key_mod_misc}+Tab" = "workspace next";
"${key_mod}+${key_mod_misc}+Shift+Tab" = "workspace prev";
# System
"Mod4+space" = ''exec ${notify} -t 2000 "$(xonsh ~/.nixos_config/util/get_xkb.xsh)"'';
"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";
# Locking and idle
"${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'";
# Apps
"${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}+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";
# Screenshot region
"${key_mod}+Shift+s" = "exec grimshot savecopy area";
"${key_mod}+Ctrl+s" = "exec grimshot savecopy output";
# media keys
"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 "$(xonsh ~/.nixos_config/util/swap_sound_device.xsh)"'';
"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";
}; # end keybindings
};
window = {
titlebar = false;
commands = [
{ criteria = { all = true; }; command = "inhibit_idle fullscreen"; }
];
}; # end window
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";}];
};
}; # end config
}; # end wayland.windowManager.sway
} # end file
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"; } ];
};
};
};
}

View file

@ -1,4 +1,4 @@
{ pkgs, config, hostName, lib, ... }:
{ ... }:
{
gtk = {
enable = true;
@ -6,4 +6,4 @@
gtk3.enable = true;
gtk4.enable = true;
};
} # end file
}

View file

@ -1,6 +1,6 @@
{ pkgs, config, hostName, lib, ... }:
{ pkgs, ... }:
let
commands = import ../../../lib/commands.nix { inherit pkgs; };
commands = import ../../../../lib/commands.nix { inherit pkgs; };
inherit (commands) swaymsg lock;
in
{
@ -44,7 +44,7 @@ in
"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.desktop" ];
"image/*" = [ "${pkgs.loupe}/share/applications/org.gnome.Loupe.desktop" ];
};
};
};
@ -53,4 +53,4 @@ in
GNOME_DESKTOP_SESSION_ID = "999";
SHELL_THICCNESS = "LOW";
};
} # end file
}

6
home/profiles/base.nix Normal file
View file

@ -0,0 +1,6 @@
{ ... }:
{
imports = [
../users/alisceon/default.nix
];
}

3
home/profiles/server.nix Normal file
View file

@ -0,0 +1,3 @@
{ ... }:
{
}

View file

@ -1,19 +1,16 @@
{ pkgs, config, hostName, lib, ... }: {
{ pkgs, lib, repoRoot, ... }:
{
imports = [
./modules/programs/chromium.nix
./modules/programs/discord.nix
./modules/programs/vscode.nix
./modules/services/syncthing.nix
../modules/programs/chromium.nix
../modules/programs/discord.nix
../modules/programs/vscode.nix
../modules/services/syncthing.nix
];
stylix.enableReleaseChecks = false;
# obsidian special case
# programs.obsidian.enable = true;
# overide broken config
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ../conf/obsidian.json;
# nixpkgs config
xdg.configFile."nixpkgs/config.nix".source = ../conf/config.nix;
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ../conf/obsidian.json;
xdg.configFile."nixpkgs/config.nix".source = ../conf/config.nix;
xdg = {
enable = true;
@ -33,9 +30,9 @@
chromium-dailies = {
name = "Chromium Dailies";
genericName = "Web Browser (with dailies)";
exec = "xonsh /home/alisceon/.nixos_config/util/open_dailies.xsh";
exec = "${pkgs.xonsh}/bin/xonsh ${repoRoot}/util/open_dailies.xsh";
terminal = false;
};
};
};
} # end file
}

View file

@ -1,6 +0,0 @@
{ ... }:
{
imports = [
./default.nix
];
} # end file

View file

@ -1,12 +0,0 @@
{ pkgs, config, hostName, lib, ... }:
{
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "24.05";
programs = {
git = {
enable = true;
extraConfig.safe.directory = "/home/alisceon/.nixos_config";
}; # end git
}; # end programs
} # end file

View file

@ -0,0 +1,20 @@
{ pkgs, ... }:
{
imports = [
../../modules/programs/direnv.nix
../../modules/programs/git.nix
../../modules/programs/ssh.nix
];
home.username = "alisceon";
home.homeDirectory = "/home/alisceon";
home.stateVersion = "24.05";
manual.manpages.enable = true;
xdg.configFile."nixpkgs/config.nix".source = ../../conf/config.nix;
xdg.configFile."xonsh/theo.py".source = ../../conf/xonsh/theo.py;
xdg.configFile."xonsh/kittycatsay.py".source = ../../conf/xonsh/kittycatsay.py;
# Ensure fish exists for the completer backend.
home.packages = [ pkgs.fish ];
}

View file

@ -0,0 +1,11 @@
{ repoLocalPath, ... }:
{
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "24.05";
programs.git = {
enable = true;
extraConfig.safe.directory = repoLocalPath;
};
}

View file

@ -1,18 +0,0 @@
{ ... }:
{
imports = [
../alisceon/modules/wm/sway/default.nix
../alisceon/modules/wm/sway/gtk.nix
../alisceon/modules/wm/sway/xdg.nix
../alisceon/modules/programs/foot.nix
../alisceon/modules/programs/kitty.nix
../alisceon/modules/programs/rofi.nix
../alisceon/modules/programs/swaylock.nix
../alisceon/modules/programs/waybar.nix
../alisceon/modules/services/espanso.nix
../alisceon/modules/services/gnome-keyring.nix
../alisceon/modules/services/mako.nix
];
} # end file