347 lines
8.9 KiB
Nix
Executable File
347 lines
8.9 KiB
Nix
Executable File
{
|
|
pkgs,
|
|
lib,
|
|
config,
|
|
...
|
|
}: let
|
|
HOME = "/home/mtgmonkey";
|
|
USERNAME = "mtgmonkey";
|
|
HOSTNAME = "nixos";
|
|
in {
|
|
imports = [./home/stylix.nix];
|
|
programs = {
|
|
bash = {
|
|
enable = true;
|
|
shellAliases = {
|
|
# replacements
|
|
neofetch = lib.mkForce "fastfetch";
|
|
ls = lib.mkForce "lsd";
|
|
ll = lib.mkForce "lsd -l";
|
|
l = lib.mkForce "lsd -la";
|
|
cd = lib.mkForce "z";
|
|
|
|
# gen
|
|
gg = lib.mkForce "git log --oneline --abbrev-commit --all --graph --decorate --color";
|
|
md = lib.mkForce "glow";
|
|
|
|
# nixos/hm
|
|
hm = lib.mkForce "home-manager";
|
|
hm-switch = lib.mkForce "home-manager switch --flake ${HOME}/.dotfiles/. -f ${HOME}/.dotfiles/home.nix";
|
|
nix-check = lib.mkForce "nix check flake /etc/nixos/.";
|
|
nix-switch = lib.mkForce "nixos-rebuild switch --flake /etc/nixos/.";
|
|
};
|
|
bashrcExtra = ''
|
|
PS1="\u@\h:\w$ "
|
|
eval "$(zoxide init bash)"
|
|
${lib.getExe pkgs.cowsay} 'jag Woerter'
|
|
'';
|
|
};
|
|
|
|
btop = {
|
|
enable = true;
|
|
settings = {
|
|
theme_background = false;
|
|
vim_keys = true;
|
|
rounded_corners = false;
|
|
graph_symbol = "braille";
|
|
update_ms = 200;
|
|
proc_sorting = "cpu lazy";
|
|
proc_gradient = false;
|
|
proc_left = true;
|
|
cpu_single_graph = true;
|
|
cpu_bottom = true;
|
|
clock_format = "/user@/host:/uptime@%H:%M";
|
|
background_update = false;
|
|
mem_graphs = false;
|
|
mem_below_net = true;
|
|
show_swap = true;
|
|
only_physical = true;
|
|
show_io_stat = true;
|
|
io_mode = false;
|
|
io_graph_combined = false;
|
|
log_level = "ERROR";
|
|
};
|
|
};
|
|
|
|
# alias
|
|
git = {
|
|
enable = true;
|
|
userName = USERNAME;
|
|
userEmail = "${USERNAME}@${HOSTNAME}";
|
|
extraConfig = {
|
|
init.defaultBranch = "master";
|
|
http.postBuffer = 524288000;
|
|
};
|
|
};
|
|
|
|
gh.enable = true;
|
|
|
|
iamb = {
|
|
enable = true;
|
|
settings = {
|
|
default_profile = "personal";
|
|
profiles = {
|
|
personal.user_id = "@mtgmonkey:calitabby.net";
|
|
andromeda.user_id = "@andromeda:tchncs.de";
|
|
};
|
|
settings = {
|
|
image_view.protocol = {
|
|
type = "kitty";
|
|
size = {
|
|
height = 10;
|
|
width = 66;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
|
|
librewolf = {
|
|
enable = true;
|
|
package = pkgs.librewolf.override {cfg.enableTridactylNative = true;};
|
|
profiles."Andromeda" = {
|
|
extensions.packages = with pkgs.nur.repos.rycee.firefox-addons; [
|
|
tridactyl
|
|
];
|
|
};
|
|
};
|
|
|
|
nvf = {
|
|
enable = true;
|
|
settings.vim = {
|
|
autocomplete.nvim-cmp.enable = false;
|
|
formatter.conform-nvim = {
|
|
enable = true;
|
|
setupOpts.format_on_save = {
|
|
lsp_format = "fallback";
|
|
timeout_ms = 5000;
|
|
};
|
|
};
|
|
lsp.otter-nvim.enable = true;
|
|
git.enable = true;
|
|
keymaps = [
|
|
{
|
|
key = "<Down>";
|
|
mode = ["i" "n" "v" "c"];
|
|
action = "<NOP>";
|
|
}
|
|
{
|
|
key = "<Up>";
|
|
mode = ["i" "n" "v" "c"];
|
|
action = "<NOP>";
|
|
}
|
|
{
|
|
key = "<Left>";
|
|
mode = ["i" "n" "v" "c"];
|
|
action = "<NOP>";
|
|
}
|
|
{
|
|
key = "<Right>";
|
|
mode = ["i" "n" "v" "c"];
|
|
action = "<NOP>";
|
|
}
|
|
{
|
|
key = "jj";
|
|
mode = ["i"];
|
|
action = "<Esc>";
|
|
}
|
|
{
|
|
key = "kk";
|
|
mode = ["i"];
|
|
action = "<Esc>";
|
|
}
|
|
{
|
|
key = "jk";
|
|
mode = ["i"];
|
|
action = "<Esc>";
|
|
}
|
|
{
|
|
key = "kj";
|
|
mode = ["i"];
|
|
action = "<Esc>";
|
|
}
|
|
{
|
|
key = "<Esc>";
|
|
mode = ["i"];
|
|
action = "<Nop>";
|
|
}
|
|
];
|
|
languages = {
|
|
nix = {
|
|
enable = true;
|
|
format.enable = true;
|
|
lsp.enable = true;
|
|
};
|
|
haskell = {
|
|
enable = true;
|
|
lsp.enable = true;
|
|
};
|
|
};
|
|
lineNumberMode = "relative";
|
|
options = {
|
|
tabstop = 2;
|
|
shiftwidth = 2;
|
|
expandtab = true;
|
|
smarttab = true;
|
|
foldmethod = "indent";
|
|
number = true;
|
|
colorcolumn = "80";
|
|
};
|
|
statusline.lualine.enable = true;
|
|
syntaxHighlighting = true;
|
|
};
|
|
};
|
|
|
|
tmux = {
|
|
enable = true;
|
|
plugins = [];
|
|
extraConfig = ''
|
|
set -g prefix M-q
|
|
set -g mouse on
|
|
|
|
bind-key h select-pane -L
|
|
bind-key j select-pane -D
|
|
bind-key k select-pane -U
|
|
bind-key l select-pane -R
|
|
'';
|
|
};
|
|
|
|
home-manager.enable = true;
|
|
qutebrowser.enable = true;
|
|
ssh.enable = true;
|
|
|
|
niri.settings = {
|
|
input = {
|
|
touchpad.tap = true;
|
|
focus-follows-mouse = {};
|
|
};
|
|
outputs."eDP-1" = {
|
|
scale = 1;
|
|
};
|
|
layout = {
|
|
gaps = 2;
|
|
center-focused-column = "always";
|
|
focus-ring.width = 1;
|
|
};
|
|
binds = with config.lib.niri.actions; {
|
|
"Print".action = screenshot;
|
|
|
|
"Mod+O" = {
|
|
repeat = false;
|
|
action = toggle-overview;
|
|
};
|
|
|
|
"Mod+R".action = switch-preset-column-width;
|
|
"Mod+F".action = fullscreen-window;
|
|
"Mod+Minus".action = set-column-width "-5%";
|
|
"Mod+Equal".action = set-column-width "+5%";
|
|
|
|
"Mod+1".action = focus-workspace 1;
|
|
"Mod+2".action = focus-workspace 2;
|
|
"Mod+3".action = focus-workspace 3;
|
|
"Mod+4".action = focus-workspace 4;
|
|
"Mod+5".action = focus-workspace 5;
|
|
"Mod+6".action = focus-workspace 6;
|
|
"Mod+7".action = focus-workspace 7;
|
|
"Mod+8".action = focus-workspace 8;
|
|
"Mod+9".action = focus-workspace 9;
|
|
"Mod+0".action = focus-workspace 10;
|
|
|
|
"Mod+H".action = focus-column-left;
|
|
"Mod+L".action = focus-column-right;
|
|
"Mod+J".action = focus-workspace-down;
|
|
"Mod+K".action = focus-workspace-up;
|
|
|
|
"Mod+Shift+H".action = move-column-left;
|
|
"Mod+Shift+L".action = move-column-right;
|
|
"Mod+Shift+J".action = move-column-to-workspace-down;
|
|
"Mod+Shift+K".action = move-column-to-workspace-up;
|
|
|
|
"Mod+Shift+Return".action = spawn "foot" "brush";
|
|
"Mod+Shift+R".action = spawn "rofi" "-show" "run";
|
|
"Mod+Shift+Q".action = spawn "qutebrowser";
|
|
"Mod+Shift+C" = {
|
|
repeat = false;
|
|
action = close-window;
|
|
};
|
|
|
|
"XF86AudioRaiseVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02+";
|
|
"XF86AudioLowerVolume".action = spawn "wpctl" "set-volume" "@DEFAULT_AUDIO_SINK@" "0.02-";
|
|
"XF86AudioMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SINK@" "toggle";
|
|
"XF86AudioMicMute".action = spawn "wpctl" "set-mute" "@DEFAULT_AUDIO_SOURCE@" "toggle";
|
|
"XF86MonBrightnessUp".action = spawn "brightnessctl" "--class=backlight" "set" "2%+";
|
|
"XF86MonBrightnessDown".action = spawn "brightnessctl" "--class=backlight" "set" "2%-";
|
|
|
|
"Mod+Alt+Shift+Q".action = quit;
|
|
"Mod+Alt+Shift+Slash".action = show-hotkey-overlay;
|
|
};
|
|
};
|
|
|
|
alacritty.enable = true;
|
|
|
|
# alias
|
|
# replacements
|
|
fastfetch.enable = true;
|
|
lsd.enable = true;
|
|
};
|
|
|
|
services = {
|
|
udiskie = {
|
|
enable = false;
|
|
settings.program_options.file_manager = "${pkgs.ranger}/bin/ranger";
|
|
};
|
|
};
|
|
|
|
xsession.windowManager.xmonad = {
|
|
enable = true;
|
|
enableContribAndExtras = true;
|
|
config = ./home/xmonad/config.hs;
|
|
};
|
|
|
|
xdg.configFile."sway/config".source = lib.mkForce ./sway_config;
|
|
|
|
wayland.windowManager.sway = {
|
|
enable = true;
|
|
};
|
|
|
|
xdg.configFile."shell".source = lib.getExe pkgs.brush;
|
|
|
|
home = {
|
|
username = USERNAME;
|
|
homeDirectory = HOME;
|
|
stateVersion = "25.05";
|
|
packages = [
|
|
# cli tools
|
|
pkgs.acpi # battery control
|
|
pkgs.brightnessctl # brightness control
|
|
pkgs.dust # disk usage visualizer
|
|
pkgs.fzf # fuzzy finder
|
|
pkgs.jmtpfs # connect to android devices
|
|
pkgs.nix-output-monitor # better nix build: nom
|
|
pkgs.lynx # tui web browser
|
|
pkgs.rip2 # better rm: rip
|
|
pkgs.ripgrep # better grep: rg
|
|
pkgs.tree # show cd as tree
|
|
|
|
pkgs.brush # fast rust shell
|
|
pkgs.dash # fast c shell
|
|
|
|
pkgs.alacritty # terminal emulator
|
|
pkgs.foot # terminal emulator
|
|
pkgs.st # terminal emulator
|
|
|
|
pkgs.grim # screenshot
|
|
pkgs.slurp # screen selection
|
|
|
|
pkgs.anki # anki
|
|
pkgs.element-desktop
|
|
pkgs.lagrange # gemini browser
|
|
pkgs.prismlauncher
|
|
|
|
# alias
|
|
pkgs.glow # see md files
|
|
pkgs.zoxide #better cd: z
|
|
];
|
|
};
|
|
}
|