modularize home
This commit is contained in:
parent
a04bb78c35
commit
9434b24685
29 changed files with 779 additions and 616 deletions
|
|
@ -1,158 +0,0 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
let
|
||||
# Universal shell abbreviations
|
||||
baseAbbrs = {
|
||||
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}";
|
||||
nixost = "sudo nixos-rebuild test --flake .#${hostName}";
|
||||
nixosdb = "sudo nixos-rebuild dry-build --flake .#${hostName}";
|
||||
|
||||
# Development commands
|
||||
devt = "devenv test";
|
||||
|
||||
devtas = "devenv tasks list";
|
||||
devtar = "devenv tasks run";
|
||||
devs = "devenv shell";
|
||||
devu = "devenv up -d";
|
||||
devi-python = "nix flake init -t templates#python";
|
||||
}; # end globalShellAbbrs
|
||||
# Tower specific abbreviations
|
||||
hostnameAbbrs =
|
||||
if hostName == "tower" then {
|
||||
weboot = "bash -c 'nix shell nixpkgs#efibootmgr -c sudo efibootmgr -n 0000 && reboot'";
|
||||
}
|
||||
else if hostName == "tesla-nixos" then {
|
||||
isponsorblocktv-setup = "podman run --rm -it -v ~/isponsorblocktv/:/app/data ghcr.io/dmunozv04/isponsorblocktv --setup";
|
||||
}
|
||||
else
|
||||
{};
|
||||
globalShellAbbrs = baseAbbrs // hostnameAbbrs;
|
||||
in
|
||||
{
|
||||
home.username = "alisceon";
|
||||
home.homeDirectory = "/home/alisceon";
|
||||
home.stateVersion = "24.05";
|
||||
manual.manpages.enable = true;
|
||||
programs = {
|
||||
fish = {
|
||||
enable = false;
|
||||
# Disable greeting
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
preferAbbrs = true;
|
||||
shellAbbrs = globalShellAbbrs // {
|
||||
ls = "exa";
|
||||
ll = "exa -lah";
|
||||
grep = "rg";
|
||||
|
||||
pypod = "podman run --rm -it --network host -v '.:/run' -w '/run' python /run/";
|
||||
devi = "nix flake init -t templates#";
|
||||
};
|
||||
}; # end fish
|
||||
nushell = {
|
||||
enable = false;
|
||||
configFile.source = ../conf/config.nu;
|
||||
shellAliases = globalShellAbbrs // {
|
||||
};
|
||||
};
|
||||
git = {
|
||||
enable = true;
|
||||
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";
|
||||
};
|
||||
"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";
|
||||
};
|
||||
}; # end matchBlocks
|
||||
}; # end ssh
|
||||
direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
nix-direnv.enable = true;
|
||||
}; # end direnv
|
||||
}; # end programs
|
||||
# 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
|
||||
15
home/alisceon/default.nix
Normal file
15
home/alisceon/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
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
|
||||
17
home/alisceon/modules/programs/chromium.nix
Normal file
17
home/alisceon/modules/programs/chromium.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{ 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
|
||||
8
home/alisceon/modules/programs/direnv.nix
Normal file
8
home/alisceon/modules/programs/direnv.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
nix-direnv.enable = true;
|
||||
}; # end programs.direnv
|
||||
} # end file
|
||||
6
home/alisceon/modules/programs/discord.nix
Normal file
6
home/alisceon/modules/programs/discord.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.discord = {
|
||||
enable = true;
|
||||
}; # end programs.discord
|
||||
} # end file
|
||||
11
home/alisceon/modules/programs/fish.nix
Normal file
11
home/alisceon/modules/programs/fish.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.fish = {
|
||||
enable = false;
|
||||
# Disable greeting
|
||||
interactiveShellInit = ''
|
||||
set fish_greeting
|
||||
'';
|
||||
preferAbbrs = true;
|
||||
}; # end programs.fish
|
||||
} # end file
|
||||
21
home/alisceon/modules/programs/foot.nix
Normal file
21
home/alisceon/modules/programs/foot.nix
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
{ 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
|
||||
14
home/alisceon/modules/programs/git.nix
Normal file
14
home/alisceon/modules/programs/git.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.git = {
|
||||
enable = true;
|
||||
settings = {
|
||||
user = {
|
||||
name = "alisceon";
|
||||
email = "alisceon@protonmail.com";
|
||||
};
|
||||
push = { autoSetupRemote = true; };
|
||||
init.defaultBranch = "main";
|
||||
};
|
||||
}; # end programs.git
|
||||
} # end file
|
||||
11
home/alisceon/modules/programs/kitty.nix
Normal file
11
home/alisceon/modules/programs/kitty.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
window_padding_width = 2;
|
||||
};
|
||||
}; # end programs.kitty
|
||||
} # end file
|
||||
7
home/alisceon/modules/programs/nushell.nix
Normal file
7
home/alisceon/modules/programs/nushell.nix
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.nushell = {
|
||||
enable = false;
|
||||
configFile.source = ../conf/config.nu;
|
||||
}; # end programs.nushell
|
||||
} # end file
|
||||
8
home/alisceon/modules/programs/rofi.nix
Normal file
8
home/alisceon/modules/programs/rofi.nix
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-unwrapped;
|
||||
terminal = term;
|
||||
}; # end programs.rofi
|
||||
} # end file
|
||||
75
home/alisceon/modules/programs/ssh.nix
Normal file
75
home/alisceon/modules/programs/ssh.nix
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
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";
|
||||
};
|
||||
}; # end matchBlocks
|
||||
}; # end programs.ssh
|
||||
} # end file
|
||||
10
home/alisceon/modules/programs/swaylock.nix
Normal file
10
home/alisceon/modules/programs/swaylock.nix
Normal file
|
|
@ -0,0 +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
|
||||
48
home/alisceon/modules/programs/vscode.nix
Normal file
48
home/alisceon/modules/programs/vscode.nix
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
{ 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
|
||||
108
home/alisceon/modules/programs/waybar.nix
Normal file
108
home/alisceon/modules/programs/waybar.nix
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
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
|
||||
66
home/alisceon/modules/services/espanso.nix
Normal file
66
home/alisceon/modules/services/espanso.nix
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
services.espanso = {
|
||||
enable = true;
|
||||
waylandSupport = true;
|
||||
configs = {
|
||||
default = {
|
||||
toggle_key = "OFF";
|
||||
preserve_clipboard = true;
|
||||
show_notifications = true;
|
||||
keyboard_layout = { layout="${hostnameInput1}"; };
|
||||
};
|
||||
};
|
||||
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
|
||||
13
home/alisceon/modules/services/gnome-keyring.nix
Normal file
13
home/alisceon/modules/services/gnome-keyring.nix
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
services = {
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"ssh"
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
];
|
||||
};
|
||||
} // hostnameServices; # end services
|
||||
} # end file
|
||||
19
home/alisceon/modules/services/mako.nix
Normal file
19
home/alisceon/modules/services/mako.nix
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
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;
|
||||
}; #end settings
|
||||
}; # end services.mako
|
||||
} # end file
|
||||
43
home/alisceon/modules/services/swayidle.nix
Normal file
43
home/alisceon/modules/services/swayidle.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
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";
|
||||
}
|
||||
]; # end timeouts
|
||||
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";
|
||||
}
|
||||
]; # end events
|
||||
}; # end services.swayidle
|
||||
} # end file
|
||||
6
home/alisceon/modules/services/syncthing.nix
Normal file
6
home/alisceon/modules/services/syncthing.nix
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
} # end file
|
||||
87
home/alisceon/modules/wm/gnome/dconf.nix
Normal file
87
home/alisceon/modules/wm/gnome/dconf.nix
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
{ pkgs, config, hostName, lib, ... }: {
|
||||
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;
|
||||
};
|
||||
}; # end settings
|
||||
}; # end dconf
|
||||
} # end file
|
||||
|
|
@ -1,4 +1,2 @@
|
|||
{ pkgs, config, hostName, lib, ... }: {
|
||||
programs = {
|
||||
}; # end programs
|
||||
} # end file
|
||||
|
|
@ -271,298 +271,6 @@
|
|||
};
|
||||
output = {} // hostnameOutput;
|
||||
workspaceOutputAssign = hostnameWorkspaceAssign;
|
||||
};
|
||||
};
|
||||
services = {
|
||||
espanso = {
|
||||
enable = true;
|
||||
waylandSupport = true;
|
||||
configs = {
|
||||
default = {
|
||||
toggle_key = "OFF";
|
||||
preserve_clipboard = true;
|
||||
show_notifications = true;
|
||||
keyboard_layout = { layout="${hostnameInput1}"; };
|
||||
};
|
||||
};
|
||||
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";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
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;
|
||||
}; #end settings
|
||||
}; # end mako
|
||||
gnome-keyring = {
|
||||
enable = true;
|
||||
components = [
|
||||
"ssh"
|
||||
"pkcs11"
|
||||
"secrets"
|
||||
];
|
||||
};
|
||||
} // hostnameServices; # end services
|
||||
programs = {
|
||||
rofi = {
|
||||
enable = true;
|
||||
package = pkgs.rofi-unwrapped;
|
||||
terminal = term;
|
||||
}; # end rofi
|
||||
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 waybar
|
||||
swaylock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
ignore-empty-password = true;
|
||||
indicator-caps-lock = true;
|
||||
}; # end settings
|
||||
}; # end swaylock
|
||||
kitty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
enable_audio_bell = false;
|
||||
window_padding_width = 2;
|
||||
};
|
||||
}; # end kitty
|
||||
foot = {
|
||||
enable = true;
|
||||
server.enable = true;
|
||||
settings = {
|
||||
main = {
|
||||
app-id="footclient";
|
||||
workers = 32;
|
||||
};
|
||||
bell = {
|
||||
system = "no";
|
||||
};
|
||||
scrollback = {
|
||||
lines = 100000;
|
||||
};
|
||||
};
|
||||
}; # end foot
|
||||
}; # end programs
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.enable = true;
|
||||
gtk3.enable = true;
|
||||
gtk4.enable = true;
|
||||
};
|
||||
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 = { # mostly redundant but the additional granularity is good for reducing friction
|
||||
# Text
|
||||
"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" ];
|
||||
# Media
|
||||
"video/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
"audio/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
|
||||
# Browser
|
||||
"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" ];
|
||||
|
||||
# Images
|
||||
"image/*" = [ "${pkgs.loupe}/share/applications/org.gnome.Loupe.desktop.desktop" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.user.sessionVariables = {
|
||||
# this right here offends me https://source.chromium.org/chromium/chromium/src/+/main:base/nix/xdg_util.cc;l=179-180
|
||||
# setting GNOME_DESKTOP_SESSION_ID will fool some legacy systems into thinking we're running gnome
|
||||
# this is an issue for xdg-open which can be circumvented by adding glib to the system which lets xdg-open fallback to gio-open
|
||||
GNOME_DESKTOP_SESSION_ID = "999";
|
||||
SHELL_THICCNESS = "LOW"; # instructs xonsh to default to a slim environment
|
||||
};
|
||||
}; # end config
|
||||
}; # end wayland.windowManager.sway
|
||||
} # end file
|
||||
9
home/alisceon/modules/wm/sway/gtk.nix
Normal file
9
home/alisceon/modules/wm/sway/gtk.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
{
|
||||
gtk = {
|
||||
enable = true;
|
||||
gtk2.enable = true;
|
||||
gtk3.enable = true;
|
||||
gtk4.enable = true;
|
||||
};
|
||||
} # end file
|
||||
175
home/alisceon/modules/wm/sway/xdg.nix
Normal file
175
home/alisceon/modules/wm/sway/xdg.nix
Normal file
|
|
@ -0,0 +1,175 @@
|
|||
{ pkgs, config, hostName, lib, ... }:
|
||||
let
|
||||
# execs
|
||||
uwsm = "${pkgs.uwsm}/bin/uwsm-app --";
|
||||
swaymsg = "${pkgs.sway}/bin/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";
|
||||
|
||||
# keybinds
|
||||
key_mod = "Mod4";
|
||||
key_mod_misc = "Alt";
|
||||
key_left = "Left";
|
||||
key_right = "Right";
|
||||
key_up = "Up";
|
||||
key_down = "Down";
|
||||
|
||||
# other
|
||||
display = status: "${swaymsg} 'output * power ${status}'";
|
||||
hostnameOutput =
|
||||
if hostName == "tower" then {
|
||||
# Left monitor
|
||||
DP-1 = {
|
||||
mode = "1920x1080@143.981Hz";
|
||||
transform = "90";
|
||||
position = "0 0";
|
||||
};
|
||||
# Main monitor
|
||||
DP-2 = {
|
||||
mode = "3440x1440@99.982Hz";
|
||||
position = "1080 250";
|
||||
};
|
||||
# Right monitor
|
||||
DP-3 = {
|
||||
mode = "1920x1080@143.981Hz";
|
||||
position = "4520 250";
|
||||
};
|
||||
}
|
||||
else if hostName == "electra" then {
|
||||
eDP-1 = {
|
||||
mode = "1920x1200@59.950Hz";
|
||||
position = "0 0";
|
||||
};
|
||||
DP-2 = {
|
||||
mode = "1280x720@60.000Hz";
|
||||
position = "0 1200";
|
||||
};
|
||||
|
||||
}
|
||||
else {};
|
||||
hostnameWorkspaceAssign =
|
||||
if hostName == "tower" then [
|
||||
{ output = "DP-2"; workspace = "1"; }
|
||||
{ output = "DP-2"; workspace = "2"; }
|
||||
{ output = "DP-2"; workspace = "3"; }
|
||||
{ output = "DP-3"; workspace = "4"; }
|
||||
{ output = "DP-3"; workspace = "5"; }
|
||||
{ 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 []
|
||||
else [];
|
||||
hostnameServices =
|
||||
if hostName == "tower" then {}
|
||||
else if hostName == "electra" then {
|
||||
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";
|
||||
}
|
||||
]; # end timeouts
|
||||
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";
|
||||
}
|
||||
]; # end events
|
||||
}; # end swayidle
|
||||
}
|
||||
else {};
|
||||
hostnameInput1 =
|
||||
if hostName == "tower" then "us"
|
||||
else "se";
|
||||
hostnameInput2 =
|
||||
if hostName == "tower" then "se"
|
||||
else "us";
|
||||
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 = { # mostly redundant but the additional granularity is good for reducing friction
|
||||
# Text
|
||||
"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" ];
|
||||
# Media
|
||||
"video/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
"audio/*" = [ "${pkgs.vlc}/share/applications/vlc.desktop" ];
|
||||
|
||||
# Browser
|
||||
"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" ];
|
||||
|
||||
# Images
|
||||
"image/*" = [ "${pkgs.loupe}/share/applications/org.gnome.Loupe.desktop.desktop" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
systemd.user.sessionVariables = {
|
||||
# this right here offends me https://source.chromium.org/chromium/chromium/src/+/main:base/nix/xdg_util.cc;l=179-180
|
||||
# setting GNOME_DESKTOP_SESSION_ID will fool some legacy systems into thinking we're running gnome
|
||||
# this is an issue for xdg-open which can be circumvented by adding glib to the system which lets xdg-open fallback to gio-open
|
||||
GNOME_DESKTOP_SESSION_ID = "999";
|
||||
SHELL_THICCNESS = "LOW"; # instructs xonsh to default to a slim environment
|
||||
};
|
||||
} # end file
|
||||
|
|
@ -1,75 +1,5 @@
|
|||
{ pkgs, config, hostName, lib, ... }: {
|
||||
stylix.enableReleaseChecks = false;
|
||||
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=";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
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 chromium
|
||||
direnv = {
|
||||
enable = true;
|
||||
silent = true;
|
||||
}; # end direnv
|
||||
discord = {
|
||||
enable = true;
|
||||
}; # end discord
|
||||
}; # end programs
|
||||
|
||||
# obsidian special case
|
||||
# programs.obsidian.enable = true;
|
||||
# overide broken config
|
||||
|
|
@ -101,8 +31,4 @@
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.syncthing = {
|
||||
enable = true;
|
||||
};
|
||||
} # end file
|
||||
|
|
|
|||
|
|
@ -1,88 +0,0 @@
|
|||
{ pkgs, config, hostName, lib, ... }: {
|
||||
programs = {
|
||||
}; # end programs
|
||||
|
||||
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"
|
||||
"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;
|
||||
};
|
||||
}; # end dconf.settings
|
||||
} # end file
|
||||
Loading…
Add table
Add a link
Reference in a new issue