gigalint everything

This commit is contained in:
iofq 2024-01-28 17:41:08 -06:00
parent 2ce46f1cf5
commit d4c31f8fd1
39 changed files with 499 additions and 398 deletions

View file

@ -1,12 +1,16 @@
{ inputs, pkgs, attrs, ...}:
{
inputs,
pkgs,
attrs,
...
}: {
"e" = inputs.home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {
inherit inputs attrs;
host = {
hostName = "t14";
username = attrs.username;
inherit (attrs) username;
};
};
modules = [
@ -20,7 +24,7 @@
inherit inputs attrs;
host = {
hostName = "e";
username = attrs.username;
inherit (attrs) username;
};
};
modules = [
@ -28,4 +32,3 @@
];
};
}

View file

@ -1,5 +1,4 @@
{ inputs, ... }:
{
{inputs, ...}: {
programs.home-manager.enable = true;
nix = {
registry.nixpkgs.flake = inputs.nixpkgs;
@ -12,6 +11,6 @@
};
};
};
imports = [ ./shared/programs/min.nix ];
imports = [./shared/programs/min.nix];
xdg.enable = true;
}

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
twofa
];

View file

@ -1,5 +1,4 @@
{ home-manager, config, lib, pkgs, ... }:
{
{...}: {
imports = [
./dev
./nvim

View file

@ -1,5 +1,4 @@
{ pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
ripgrep
k9s

View file

@ -1,5 +1,4 @@
{ home-manager, config, lib, pkgs, ... }:
{
{...}: {
imports = [
./shell
];

View file

@ -1,5 +1,4 @@
{ pkgs, ...}:
{
{pkgs, ...}: {
home.packages = with pkgs; [
full
];

View file

@ -1,5 +1,4 @@
{ host, ... }:
{
{host, ...}: {
imports = [
./tmux.nix
./git.nix
@ -8,7 +7,7 @@
programs.bash = {
enable = true;
enableCompletion = true;
historyControl = [ "ignorespace" ];
historyControl = ["ignorespace"];
historyIgnore = [
":q"
"exit"
@ -36,36 +35,36 @@
"histappend"
];
bashrcExtra = ''
export PROMPT_COMMAND="prompt_command;history -a"
export PATH="/usr/local/go/bin:~/go/bin:~/.bin:~/.local/bin:$PATH"
export GPG_2FA="mail@10110110.xyz"
export MANPAGER="nvim +Man!"
export EDITOR="nvim"
export _JAVA_AWT_WM_NONREPARENTING=1
export NIX_FLAKE="/home/e/dev/nix"
[[ $- != *i* ]] && return
function exists {
type $1 >/dev/null 2>&1
}
export PROMPT_COMMAND="prompt_command;history -a"
export PATH="/usr/local/go/bin:~/go/bin:~/.bin:~/.local/bin:$PATH"
export GPG_2FA="mail@10110110.xyz"
export MANPAGER="nvim +Man!"
export EDITOR="nvim"
export _JAVA_AWT_WM_NONREPARENTING=1
export NIX_FLAKE="/home/e/dev/nix"
[[ $- != *i* ]] && return
function exists {
type $1 >/dev/null 2>&1
}
function prompt_command {
GIT_BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null | cut -c 1-10)
[[ $GIT_BRANCH != "" ]] && \
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]($GIT_BRANCH)\[\033[38;5;7m\]\$\[$(tput sgr0)\] " || \
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]\[\033[38;5;7m\]\$\[$(tput sgr0)\] "
}
bind "set completion-ignore-case on"
bind "set completion-map-case on"
bind "set show-all-if-ambiguous on"
bind "set menu-complete-display-prefix on"
bind '"\t":menu-complete'
bind '"\C-k": previous-history'
bind '"\C-j": next-history'
function cd {
cmd="ls --color=auto"
builtin cd "$@" && $cmd
}
exists "kubectl" && source <(kubectl completion bash)
function prompt_command {
GIT_BRANCH=$(git symbolic-ref --short HEAD 2>/dev/null | cut -c 1-10)
[[ $GIT_BRANCH != "" ]] && \
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]($GIT_BRANCH)\[\033[38;5;7m\]\$\[$(tput sgr0)\] " || \
PS1="\[\033[38;5;1m\][\u@\h\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;5;7m\]\W\[$(tput sgr0)\]\[\033[38;5;1m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]\[\033[38;5;3m\]\[\033[38;5;7m\]\$\[$(tput sgr0)\] "
}
bind "set completion-ignore-case on"
bind "set completion-map-case on"
bind "set show-all-if-ambiguous on"
bind "set menu-complete-display-prefix on"
bind '"\t":menu-complete'
bind '"\C-k": previous-history'
bind '"\C-j": next-history'
function cd {
cmd="ls --color=auto"
builtin cd "$@" && $cmd
}
exists "kubectl" && source <(kubectl completion bash)
'';
};
programs.fzf = {

View file

@ -1,5 +1,4 @@
{ ... }:
{
_: {
programs.direnv = {
enable = true;
enableBashIntegration = true;

View file

@ -1,6 +1,5 @@
{ ... }:
{
programs.git= {
_: {
programs.git = {
enable = true;
userEmail = "cjriddz@protonmail.com";
userName = "iofq";

View file

@ -1,5 +1,4 @@
{ ... }:
{
_: {
programs.tmux = {
enable = true;
keyMode = "vi";
@ -11,12 +10,11 @@
# vi mode navigation
customPaneNavigationAndResize = true;
extraConfig = ''
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
set -g status-right ""
setw -g status-style 'bg=colour0 fg=colour7'
setw -g window-status-current-format '[#P:#W*] '
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel 'xclip -sel clip -i'
set -g status-right ""
setw -g status-style 'bg=colour0 fg=colour7'
setw -g window-status-current-format '[#P:#W*] '
'';
};
}

View file

@ -1,5 +1,8 @@
{ pkgs, config, ... }:
{
pkgs,
config,
...
}: {
programs.taskwarrior = {
enable = true;
colorTheme = "solarized-dark-256";

View file

@ -1,5 +1,4 @@
{ ... }:
{
_: {
programs.alacritty = {
enable = true;
settings = {
@ -78,7 +77,6 @@
action = "ScrollPageDown";
}
];
};
};
}

View file

@ -1,5 +1,4 @@
{pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
pulseaudio
pulsemixer

View file

@ -1,5 +1,4 @@
{ home-manager, config, lib, pkgs, ... }:
{
{...}: {
imports = [
./librewolf
./alacritty

View file

@ -1,4 +1,3 @@
{ pkgs, ... }:
{
_: {
programs.librewolf.enable = true;
}

View file

@ -1,5 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}: {
home.packages = with pkgs; [
wl-clipboard
autotiling-rs
@ -10,12 +14,12 @@
home.sessionVariables = {
# needed for Sway and Firefox to play nice
XDG_CURRENT_DESKTOP = "sway";
MOZ_DBUS_REMOTE=1;
MOZ_DBUS_REMOTE = 1;
};
systemd.user.services.autotiling = {
Install = {
WantedBy = [ "sway-session.target" ];
PartOf = [ "graphical-session.target" ];
WantedBy = ["sway-session.target"];
PartOf = ["graphical-session.target"];
};
Service = {
ExecStart = "${pkgs.autotiling-rs}/bin/autotiling-rs";
@ -65,26 +69,27 @@
};
modifier = "Mod4";
keybindings = let
modifier = config.wayland.windowManager.sway.config.modifier;
in lib.mkOptionDefault {
Prior = "nop";
Next = "nop";
"${modifier}+x" = "kill";
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
"${modifier}+bracketleft" = "exec --no-startup-id grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png";
"${modifier}+bracketright" = "exec --no-startup-id grimshot --notify copy area";
"${modifier}+Shift+Ctrl+l" = "exec loginctl lock-session";
"XF86MonBrightnessDown" = "exec light -U 10";
"XF86MonBrightnessUp" = "exec light -A 10";
"XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'";
"XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'";
"XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'";
"XF86Display" = "exec 'swaymsg \"output eDP-1 toggle\"'";
};
inherit (config.wayland.windowManager.sway.config) modifier;
in
lib.mkOptionDefault {
Prior = "nop";
Next = "nop";
"${modifier}+x" = "kill";
"${modifier}+space" = "exec ${pkgs.dmenu}/bin/dmenu_path | ${pkgs.dmenu}/bin/dmenu | ${pkgs.findutils}/bin/xargs swaymsg exec --";
"${modifier}+bracketleft" = "exec --no-startup-id grimshot --notify save area /tmp/scrot-$(date \"+%Y-%m-%d\"T\"%H:%M:%S\").png";
"${modifier}+bracketright" = "exec --no-startup-id grimshot --notify copy area";
"${modifier}+Shift+Ctrl+l" = "exec loginctl lock-session";
"XF86MonBrightnessDown" = "exec light -U 10";
"XF86MonBrightnessUp" = "exec light -A 10";
"XF86AudioRaiseVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ +1%'";
"XF86AudioLowerVolume" = "exec 'pactl set-sink-volume @DEFAULT_SINK@ -1%'";
"XF86AudioMute" = "exec 'pactl set-sink-mute @DEFAULT_SINK@ toggle'";
"XF86Display" = "exec 'swaymsg \"output eDP-1 toggle\"'";
};
assigns = {
"9" = [
{ class = "discord";}
{ class = "Signal";}
{class = "discord";}
{class = "Signal";}
];
};
bars = [
@ -140,8 +145,8 @@
};
};
extraConfig = ''
bindswitch --reload --locked lid:on exec "[ $(swaymsg -t get_outputs | jq '. | length') -gt 1 ] && swaymsg output eDP-1 disable"
bindswitch --reload --locked lid:off output eDP-1 enable
bindswitch --reload --locked lid:on exec "[ $(swaymsg -t get_outputs | jq '. | length') -gt 1 ] && swaymsg output eDP-1 disable"
bindswitch --reload --locked lid:off output eDP-1 enable
'';
};
programs.i3status = {
@ -169,14 +174,14 @@
format_up = "%signal";
};
};
"memory" = {
"memory" = {
settings = {
format = "%used";
format_degraded = "%used";
threshold_degraded = "1G";
};
};
"battery all" = {
"battery all" = {
settings = {
format = "%percentage%status %remaining";
status_chr = "+";

View file

@ -1,5 +1,4 @@
{pkgs, ... }:
{
{pkgs, ...}: {
home.packages = with pkgs; [
xdg-utils
];

View file

@ -1,11 +1,14 @@
{ pkgs, attrs, ... }:
{
pkgs,
attrs,
...
}: {
imports = [
../shared/programs/default.nix
../shared/wayland/default.nix
];
home = {
username = attrs.username;
inherit (attrs) username;
homeDirectory = "/home/" + attrs.username;
packages = with pkgs; [
# gaming
@ -26,7 +29,6 @@
# sysutils
appimage-run
wireguard-tools
];
};
programs.ssh = {