spring cleaning
This commit is contained in:
parent
190901ae30
commit
0a11161655
8 changed files with 130 additions and 283 deletions
|
|
@ -1,171 +0,0 @@
|
|||
{ pkgs, config, hostName, lib, ... }: {
|
||||
home.username = "alisceon";
|
||||
home.homeDirectory = "/home/alisceon";
|
||||
home.stateVersion = "24.05";
|
||||
manual.manpages.enable = true;
|
||||
|
||||
programs = {
|
||||
fish = {
|
||||
enable = true;
|
||||
# Disable greeting
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
preferAbbrs = true;
|
||||
shellAbbrs = {
|
||||
ls = "exa";
|
||||
ll = "exa -lah";
|
||||
grep = "rg";
|
||||
cat = "bat";
|
||||
tsla-fan = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0";
|
||||
|
||||
# NixOS commands
|
||||
nixoss = "sudo nixos-rebuild switch --flake .#${hostName}";
|
||||
nixos-main = "git checkout main && git pull && sudo nixos-rebuild switch --flake .#${hostName}";
|
||||
nixossr = "sudo nixos-rebuild switch --flake .#${hostName} && reboot";
|
||||
nixost = "sudo nixos-rebuild build-vm --flake .#${hostName}";
|
||||
|
||||
# Development commands
|
||||
devt = "devenv test";
|
||||
devs = "devenv shell";
|
||||
devu = "devenv up";
|
||||
devi = "nix flake init -t path:/home/alisceon/Templates/devenv#python";
|
||||
|
||||
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
||||
|
||||
# Tower commands
|
||||
weboot = "nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot";
|
||||
};
|
||||
}; # end fish
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "alisceon";
|
||||
userEmail = "alisceon@protonmail.com";
|
||||
extraConfig = {
|
||||
push = { autoSetupRemote = true; };
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
}; # end git
|
||||
vscode.enable = true;
|
||||
firefox = {
|
||||
enable = true;
|
||||
nativeMessagingHosts = [
|
||||
pkgs.gnome-browser-connector
|
||||
];
|
||||
}; # end firefox
|
||||
bat.enable = true;
|
||||
ssh = {
|
||||
enable = true;
|
||||
matchBlocks = {
|
||||
"alisceon.com" = {
|
||||
hostname = "alisceon.com";
|
||||
user = "opc";
|
||||
};
|
||||
"miscbox" = {
|
||||
hostname = "10.1.0.11";
|
||||
proxyJump = "alisceon.com";
|
||||
user = "opc";
|
||||
};
|
||||
"blogbox" = {
|
||||
hostname = "10.1.0.10";
|
||||
proxyJump = "alisceon.com";
|
||||
user = "ubuntu";
|
||||
};
|
||||
"filurbox" = {
|
||||
hostname = "oci.malice.zone";
|
||||
user = "opc";
|
||||
};
|
||||
"dnspi" = {
|
||||
hostname = "10.40.0.2";
|
||||
user = "pi";
|
||||
};
|
||||
"tsla-exporter-bridge" = {
|
||||
hostname = "alma02.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
"tsla-runner-boi" = {
|
||||
hostname = "alma03.lab.the.malice.zone";
|
||||
user = "root";
|
||||
};
|
||||
};
|
||||
}; # end ssh
|
||||
direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
}; # end direnv
|
||||
}; # end programs
|
||||
|
||||
# obsidian special case
|
||||
programs.obsidian.enable = true;
|
||||
# overide broken config
|
||||
xdg.configFile."obsidian/obsidian.json".source = lib.mkForce ./conf/obsidian.json;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
signal-desktop
|
||||
discord
|
||||
eza
|
||||
fd
|
||||
ripgrep
|
||||
];
|
||||
|
||||
xdg = {
|
||||
enable = true;
|
||||
userDirs.enable = true;
|
||||
mime.enable = true;
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
dconf.enable = true;
|
||||
dconf.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"
|
||||
"firefox.desktop"
|
||||
"code.desktop"
|
||||
"obsidian.desktop"
|
||||
"discord.desktop"
|
||||
"signal.desktop"
|
||||
];
|
||||
};
|
||||
"org/gnome/shell/keybindings" = {
|
||||
show-screenshot-ui = [ "<Shift><Super>s" ];
|
||||
};
|
||||
"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";
|
||||
};
|
||||
}; # end dconf.settings
|
||||
} # end file
|
||||
|
|
@ -60,16 +60,31 @@
|
|||
};
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "alisceon";
|
||||
userEmail = "alisceon@protonmail.com";
|
||||
extraConfig = {
|
||||
settings = {
|
||||
user = {
|
||||
name = "alisceon";
|
||||
email = "alisceon@protonmail.com";
|
||||
};
|
||||
push = { autoSetupRemote = true; };
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
}; # end git
|
||||
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";
|
||||
|
|
|
|||
|
|
@ -1,5 +1,21 @@
|
|||
## ALIASES ##
|
||||
aliases["tsla-fan"] = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0"
|
||||
aliases["nixoss"] = "sudo nixos-rebuild switch --flake @('.#' + $(hostname))"
|
||||
aliases["nixost"] = "sudo nixos-rebuild test --flake @('.#' + $(hostname))"
|
||||
aliases["nixosb"] = "sudo nixos-rebuild build --flake @('.#' + $(hostname))"
|
||||
aliases["nixos-dry"] = "sudo nixos-rebuild dry-build --flake @('.#' + $(hostname))"
|
||||
aliases["init-python"] = "nix flake update --flake templates && nix flake init -t 'templates#python' && direnv allow"
|
||||
aliases["weboot"] = "bash -c 'nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot'"
|
||||
aliases["ls"] = "exa"
|
||||
aliases["ll"] = "exa -lah"
|
||||
aliases["grep"] = "rg"
|
||||
aliases["theo"] = "python ~/.config/xonsh/theo.py"
|
||||
aliases["kittycatsay"] = "python ~/.config/xonsh/kittycatsay.py"
|
||||
|
||||
## INTERACTIVE CONFIGURATION ##
|
||||
if $XONSH_INTERACTIVE:
|
||||
from datetime import datetime
|
||||
import importlib.util
|
||||
t0 = datetime.now()
|
||||
## ENV ##
|
||||
$XONSH_COLOR_STYLE = 'native'
|
||||
|
|
@ -14,53 +30,26 @@ if $XONSH_INTERACTIVE:
|
|||
$LESS_TERMCAP_us = "\033[00;36m"
|
||||
$LESS_TERMCAP_ue = "\033[0m"
|
||||
|
||||
## XONTRIB ##
|
||||
xontrib load coreutils
|
||||
xontrib load fish_completer
|
||||
xontrib load direnv
|
||||
xontrib load clp
|
||||
xontrib load bashisms
|
||||
#xontrib load abbrevs #relies on xonsh.ptk_shell which was deprecated in 0.13
|
||||
## XONTRIB ##
|
||||
if importlib.util.find_spec("xontrib.coreutils") is not None:
|
||||
xontrib load coreutils
|
||||
if importlib.util.find_spec("xontrib.fish_completer") is not None:
|
||||
xontrib load fish_completer
|
||||
if importlib.util.find_spec("xontrib.direnv") is not None:
|
||||
xontrib load direnv
|
||||
if importlib.util.find_spec("xontrib.clp") is not None:
|
||||
xontrib load clp
|
||||
if importlib.util.find_spec("xontrib.bashisms") is not None:
|
||||
xontrib load bashisms
|
||||
if importlib.util.find_spec("xontrib.fzf_completions") is not None:
|
||||
xontrib load fzf-completions
|
||||
from xonsh.built_ins import XSH
|
||||
XSH.env['fzf_history_binding'] = "c-r" # Ctrl+R
|
||||
XSH.env['fzf_ssh_binding'] = "c-s" # Ctrl+S
|
||||
XSH.env['fzf_file_binding'] = "c-t" # Ctrl+T
|
||||
XSH.env['fzf_dir_binding'] = "c-g" # Ctrl+G
|
||||
|
||||
xontrib load fzf-completions
|
||||
from xonsh.built_ins import XSH
|
||||
XSH.env['fzf_history_binding'] = "c-r" # Ctrl+R
|
||||
XSH.env['fzf_ssh_binding'] = "c-s" # Ctrl+S
|
||||
XSH.env['fzf_file_binding'] = "c-t" # Ctrl+T
|
||||
XSH.env['fzf_dir_binding'] = "c-g" # Ctrl+G
|
||||
|
||||
## ALIASES ##
|
||||
aliases["tsla-fan"] = "ipmitool -H 10.30.0.3 -U ADMIN -P ADMIN raw 0x30 0x70 0x66 0x01 0x0"
|
||||
aliases["nixoss"] = "sudo nixos-rebuild switch --flake .#${config.networking.hostName}"
|
||||
aliases["nixost"] = "sudo nixos-rebuild test --flake .#${config.networking.hostName}"
|
||||
aliases["nixosb"] = "sudo nixos-rebuild build --flake .#${config.networking.hostName}"
|
||||
aliases["nixosdb"] = "sudo nixos-rebuild dry-build --flake .#${config.networking.hostName}"
|
||||
aliases["devt"] = "devenv test"
|
||||
aliases["devtas"] = "devenv tasks list"
|
||||
aliases["devtar"] = "devenv tasks run"
|
||||
aliases["devs"] = "devenv shell"
|
||||
aliases["devi-python"] = "nix flake init -t templates#python"
|
||||
aliases["weboot"] = "bash -c 'nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot'"
|
||||
aliases["ls"] = "exa"
|
||||
aliases["ll"] = "exa -lah"
|
||||
aliases["grep"] = "rg"
|
||||
aliases["theo"] = "python ~/.config/xonsh/theo.py"
|
||||
aliases["kittycatsay"] = "python ~/.config/xonsh/kittycatsay.py"
|
||||
|
||||
if $XONSH_INTERACTIVE:
|
||||
hour = t0.hour
|
||||
theo | kittycatsay
|
||||
"""
|
||||
if 5 <= hour < 10:
|
||||
theo | cowsay -d
|
||||
elif 10 <= hour < 16:
|
||||
theo | cowsay -w
|
||||
elif 16 <= hour < 18:
|
||||
theo | cowsay
|
||||
elif 18 <= hour < 22:
|
||||
theo | cowsay -t
|
||||
else:
|
||||
theo | cowsay -s
|
||||
"""
|
||||
dt = round((datetime.now() - t0).microseconds/1000000, 2)
|
||||
print("Load time:", dt, "seconds")
|
||||
|
|
@ -98,13 +98,13 @@
|
|||
hostnameWorkspaceAssign =
|
||||
if hostName == "tower" then [
|
||||
{ output = "DP-2"; workspace = "1"; }
|
||||
{ output = "DP-3"; workspace = "2"; }
|
||||
{ output = "DP-1"; workspace = "3"; }
|
||||
{ output = "DP-2"; workspace = "4"; }
|
||||
{ output = "DP-2"; workspace = "2"; }
|
||||
{ output = "DP-2"; workspace = "3"; }
|
||||
{ output = "DP-3"; workspace = "4"; }
|
||||
{ output = "DP-3"; workspace = "5"; }
|
||||
{ output = "DP-1"; workspace = "6"; }
|
||||
{ output = "DP-2"; workspace = "7"; }
|
||||
{ output = "DP-3"; workspace = "8"; }
|
||||
{ output = "DP-3"; workspace = "6"; }
|
||||
{ output = "DP-1"; workspace = "7"; }
|
||||
{ output = "DP-1"; workspace = "8"; }
|
||||
{ output = "DP-1"; workspace = "9"; }
|
||||
]
|
||||
else if hostName == "electra" then []
|
||||
|
|
@ -194,6 +194,7 @@
|
|||
"${key_mod}+Return" = "exec ${term}";
|
||||
"${key_mod}+d" = "exec ${dmenu}";
|
||||
"${key_mod}+Shift+q" = "kill";
|
||||
"${key_mod}+F4" = "kill";
|
||||
"${key_mod}+L" = "exec ${lock}";
|
||||
# Workspaces
|
||||
"${key_mod}+f" = "fullscreen";
|
||||
|
|
@ -234,20 +235,25 @@
|
|||
|
||||
# Focus
|
||||
"${key_mod}+${key_left}" = "focus left";
|
||||
"${key_mod}+${key_right}" = "focus right";
|
||||
"${key_mod}+${key_down}" = "focus down";
|
||||
"${key_mod}+${key_up}" = "focus up";
|
||||
"${key_mod}+${key_right}" = "focus right";
|
||||
|
||||
"${key_mod}+Ctrl+${key_left}" = "move workspace to output left";
|
||||
"${key_mod}+Ctrl+${key_down}" = "move workspace to output down";
|
||||
"${key_mod}+Ctrl+${key_up}" = "move workspace to output up";
|
||||
"${key_mod}+Ctrl+${key_right}" = "move workspace to output right";
|
||||
|
||||
# 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";
|
||||
"${key_mod}+Ctrl+Shift+Tab" = "move left";
|
||||
"${key_mod}+Mod4+Tab" = "workspace next";
|
||||
"${key_mod}+Mod4+Shift+Tab" = "workspace prev";
|
||||
|
||||
|
||||
# System
|
||||
"Mod4+space" = ''exec ${notify} -t 2000 "$(xonsh ~/.nixos_config/util/get_xkb.xonsh)"'';
|
||||
#Screenshot region
|
||||
|
|
@ -260,6 +266,22 @@
|
|||
"XF86AudioPlay" = "exec 'playerctl play-pause'";
|
||||
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 10";
|
||||
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 10";
|
||||
|
||||
# Function layer 4 esc-pgdn
|
||||
"KP_End" = "exec";
|
||||
"KP_Down" = "exec";
|
||||
"KP_Next" = "exec";
|
||||
"KP_Left" = "exec";
|
||||
"KP_Begin" = "exec";
|
||||
"KP_Right" = "exec";
|
||||
"KP_Home" = "exec";
|
||||
"KP_Up" = "exec";
|
||||
"KP_Prior" = "exec";
|
||||
"KP_Insert" = "exec";
|
||||
"KP_Divide" = "exec";
|
||||
"KP_Multiply" = "exec";
|
||||
"KP_Subtract" = "exec";
|
||||
"KP_Add" = "exec";
|
||||
}; # end keybindings
|
||||
window = {
|
||||
titlebar = false;
|
||||
|
|
@ -304,10 +326,14 @@
|
|||
}; # end colors
|
||||
assigns = {
|
||||
"1" = [{app_id = "firefox";}];
|
||||
"2" = [{class = "Code";}];
|
||||
"3" = [{class = "discord";}];
|
||||
"2" = [{class = "steam";}];
|
||||
"3" = [];
|
||||
"4" = [{class = "Code";}];
|
||||
"5" = [{app_id = "obsidian";}];
|
||||
"6" = [{app_id = "signal";}];
|
||||
"6" = [];
|
||||
"7" = [];
|
||||
"8" = [{app_id = "discord";}];
|
||||
"9" = [{app_id = "signal";}];
|
||||
};
|
||||
output = {} // hostnameOutput;
|
||||
workspaceOutputAssign = hostnameWorkspaceAssign;
|
||||
|
|
@ -680,6 +706,17 @@
|
|||
gesture pinch in 4 ${swaymsg} kill
|
||||
gesture swipe up 4 ${lock}
|
||||
'';
|
||||
xdg.configFile."electron-flags.conf".text = ''
|
||||
--enable-features=WaylandWindowDecorations,AllowQt
|
||||
--ozone-platform=wayland
|
||||
--gtk-version=4
|
||||
'';
|
||||
xdg.configFile."chromium-flags.conf".text = ''
|
||||
--enable-features=WaylandWindowDecorations,AllowQt
|
||||
--ozone-platform=wayland
|
||||
--gtk-version=4
|
||||
'';
|
||||
|
||||
# this right here offends me https://source.chromium.org/chromium/chromium/src/+/main:base/nix/xdg_util.cc;l=179-180
|
||||
systemd.user.sessionVariables = {
|
||||
GNOME_DESKTOP_SESSION_ID = "999";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue