project-wide: nixfmt -> nixpkgs-fmt, applied

This commit is contained in:
kat witch 2021-05-10 00:25:45 +01:00
parent 7383fc6ba2
commit fc1369f873
No known key found for this signature in database
GPG key ID: 1B477797DCA5EC72
40 changed files with 698 additions and 599 deletions

View file

@ -14,7 +14,7 @@
rsync
wget
ripgrep
nixfmt
nixpkgs-fmt
pv
progress
zstd

View file

@ -6,20 +6,22 @@
controlMaster = "auto";
controlPersist = "10m";
hashKnownHosts = true;
matchBlocks = let
common = {
forwardAgent = true;
extraOptions = {
RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
matchBlocks =
let
common = {
forwardAgent = true;
extraOptions = {
RemoteForward =
"/run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra";
};
port = 62954;
};
port = 62954;
in
{
"athame" = { hostname = "athame.kittywit.ch"; } // common;
"samhain" = { hostname = "192.168.1.135"; } // common;
"yule" = { hostname = "192.168.1.92"; } // common;
"ostara" = { hostname = "192.168.1.245"; } // common;
};
in {
"athame" = { hostname = "athame.kittywit.ch"; } // common;
"samhain" = { hostname = "192.168.1.135"; } // common;
"yule" = { hostname = "192.168.1.92"; } // common;
"ostara" = { hostname = "192.168.1.245"; } // common;
};
};
}

View file

@ -2,54 +2,52 @@
{
programs.zsh.shellAliases = {
tne = "tmux new -s";
tat = "tmux attach -t";
tren = "tmux new -AD -s";
tt = "tmux new -AD -s";
};
programs.tmux = {
enable = true;
extraConfig = ''
# start from 1
set -g base-index 1
setw -g pane-base-index 1
# start from 1
set -g base-index 1
setw -g pane-base-index 1
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
# proper title handling
set -g set-titles on
set -g set-titles-string "#T"
# 256 color
set -g default-terminal "screen-256color"
# 256 color
set -g default-terminal "screen-256color"
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# modes
setw -g clock-mode-colour colour5
setw -g mode-style 'fg=colour1 bg=colour18 bold'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# panes
set -g pane-border-style 'fg=colour19 bg=colour0'
set -g pane-active-border-style 'bg=colour0 fg=colour9'
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left '''
set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z'
set -g status-right-length 50
set -g status-left-length 20
# statusbar
set -g status-position bottom
set -g status-justify left
set -g status-style 'bg=colour18 fg=colour137 dim'
set -g status-left '''
set -g status-right '#[fg=colour233,bg=colour19] %F #[fg=colour233,bg=colour8] %H:%M:%S %Z'
set -g status-right-length 50
set -g status-left-length 20
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-current-style 'fg=colour1 bg=colour19 bold'
setw -g window-status-current-format ' #I#[fg=colour249]:#[fg=colour255]#W#[fg=colour249]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-style 'fg=colour9 bg=colour18'
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
setw -g window-status-bell-style 'fg=colour255 bg=colour1 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# messages
set -g message-style 'fg=colour232 bg=colour16 bold'
# mouse
set -g mouse on
'';
# mouse
set -g mouse on
'';
};
}

View file

@ -7,7 +7,7 @@
enable = true;
enableAutosuggestions = true;
shellAliases = {
nixdirfmt = "fd --color=never .nix | xargs nixfmt";
nixdirfmt = "fd --color=never .nix | xargs nixpkgs-fmt";
exa = "exa --time-style long-iso";
ls = "exa -G";
la = "exa -Ga";

View file

@ -9,7 +9,8 @@ let
"browser.urlbar.placeholderName" = "DuckDuckGo";
"toolkit.legacyUserProfileCustomizations.stylesheets" = true;
};
in {
in
{
programs.zsh.shellAliases = {
ff-pm = "firefox --ProfileManager";
ff-main = "firefox -P main";
@ -48,23 +49,17 @@ in {
main = {
id = 0;
isDefault = true;
settings = commonSettings // {
};
settings = commonSettings // { };
userChrome = import ./userChrome.css.nix { profile = "main"; };
};
work = {
id = 1;
settings = commonSettings // {
};
settings = commonSettings // { };
userChrome = import ./userChrome.css.nix { profile = "work"; };
};
lewd = {
id = 2;
settings = commonSettings // {
};
settings = commonSettings // { };
userChrome = import ./userChrome.css.nix { profile = "lewd"; };
};
};

View file

@ -8,7 +8,8 @@ let
size = "10";
size_css = "14px";
};
in {
in
{
programs.kitty = {
enable = true;
font.name = witch.style.font.name;

View file

@ -36,6 +36,6 @@
always_on "yes"
tags "yes"
}
'';
'';
};
}

View file

@ -4,27 +4,29 @@
programs.mpv = {
enable = true;
scripts = [ pkgs.mpvScripts.sponsorblock ];
bindings = let
unbind = "keyup"; in {
bindings =
let
unbind = "keyup"; in
{
"WHEEL_UP" = "add volume 2";
"WHEEL_DOWN" = "add volume -2";
"ctrl+r" = "loadfile \${path}";
};
config = {
profile = "gpu-hq";
gpu-context = "wayland";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
hwdec = "auto";
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
config = {
profile = "gpu-hq";
gpu-context = "wayland";
vo = "gpu";
volume-max = 200;
keep-open = true;
opengl-waitvsync = true;
hwdec = "auto";
demuxer-max-bytes = "2000MiB";
demuxer-max-back-bytes = "250MiB";
osd-scale-by-window = false;
osd-bar-h = 2.5; # 3.125 default
osd-border-size = 2; # font border pixels, default 3
term-osd-bar = true;
script-opts = lib.concatStringsSep ","
(lib.mapAttrsToList (k: v: "${k}=${toString v}") {
osc-layout = "slimbox";
osc-vidscale = "no";
@ -37,6 +39,6 @@
osc-seekbarkeyframes = "no";
osc-seekrangestyle = "slider";
});
};
};
}
};
}

View file

@ -8,7 +8,8 @@ let
size = "10";
size_css = "14px";
};
in {
in
{
systemd.user.services = {
mako = {
Unit = {

View file

@ -8,7 +8,8 @@ let
size = "10";
size_css = "14px";
};
in {
in
{
home.sessionVariables = {
MOZ_ENABLE_WAYLAND = 1;
XDG_CURRENT_DESKTOP = "sway";
@ -36,25 +37,26 @@ in {
fi
'';
wayland.windowManager.sway = let
cfg = config.wayland.windowManager.sway.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" =
"move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
] ++ [ (bindWorkspace "0" "10:10") ]
wayland.windowManager.sway =
let
cfg = config.wayland.windowManager.sway.config;
bindsym = k: v: "bindsym ${k} ${v}";
bindWorkspace = key: workspace: {
"${cfg.modifier}+${key}" = "workspace number ${workspace}";
"${cfg.modifier}+shift+${key}" =
"move container to workspace number ${workspace}";
};
workspaceBindings = map (v: bindWorkspace v "${v}:${v}") [
"1"
"2"
"3"
"4"
"5"
"6"
"7"
"8"
"9"
] ++ [ (bindWorkspace "0" "10:10") ]
++ lib.imap1 (i: v: bindWorkspace v "${toString (10 + i)}:${v}") [
"F1"
"F2"
@ -69,156 +71,159 @@ in {
"F11"
"F12"
];
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr =
lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in {
enable = true;
config = let
dmenu =
"${pkgs.bemenu}/bin/bemenu --fn '${font.name} ${font.size}' --nb '${base16.base00}' --nf '${base16.base07}' --sb '${base16.base01}' --sf '${base16.base07}' -l 5 -m -1 -i";
in {
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
input = {
"*" = {
xkb_layout = "gb";
# xkb_variant = "nodeadkeys";
# xkb_options = "ctrl:nocaps";
};
};
fonts = [ "${font.name} ${font.size}" ];
terminal = "${pkgs.kitty}/bin/kitty";
# TODO: replace with wofi
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
modifier = "Mod4";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
workspaceBindings' = map (lib.mapAttrsToList bindsym) workspaceBindings;
workspaceBindingsStr =
lib.concatStringsSep "\n" (lib.flatten workspaceBindings');
in
{
enable = true;
config =
let
dmenu =
"${pkgs.bemenu}/bin/bemenu --fn '${font.name} ${font.size}' --nb '${base16.base00}' --nf '${base16.base07}' --sb '${base16.base01}' --sf '${base16.base07}' -l 5 -m -1 -i";
in
{
command = "systemctl --user restart mako";
always = true;
}
{ command = "mkchromecast -t"; }
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
bars = [{ command = "${pkgs.waybar}/bin/waybar"; }];
window = {
border = 1;
titlebar = true;
};
input = {
"*" = {
xkb_layout = "gb";
# xkb_variant = "nodeadkeys";
# xkb_options = "ctrl:nocaps";
};
};
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
fonts = [ "${font.name} ${font.size}" ];
terminal = "${pkgs.kitty}/bin/kitty";
# TODO: replace with wofi
menu =
"${pkgs.j4-dmenu-desktop}/bin/j4-dmenu-desktop --dmenu=\"${dmenu}\" --term='${cfg.terminal}'";
modifier = "Mod4";
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
assigns = { "12:F2" = [{ class = "screenstub"; }]; };
startup = [
{
command = "systemctl --user restart mako";
always = true;
}
{ command = "mkchromecast -t"; }
{
command = "systemctl --user restart konawall.service";
always = true;
}
];
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
window = {
border = 1;
titlebar = true;
};
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
keybindings = {
"${cfg.modifier}+Return" = "exec ${cfg.terminal}";
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" =
"exec ${config.services.i3gopher.focus-last}";
"${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output";
"${cfg.modifier}+Ctrl+Right" = "workspace next_on_output";
"${cfg.modifier}+Left" = "focus left";
"${cfg.modifier}+Down" = "focus down";
"${cfg.modifier}+Up" = "focus up";
"${cfg.modifier}+Right" = "focus right";
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" =
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" =
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
"${cfg.modifier}+Shift+Left" = "move left";
"${cfg.modifier}+Shift+Down" = "move down";
"${cfg.modifier}+Shift+Up" = "move up";
"${cfg.modifier}+Shift+Right" = "move right";
"${cfg.modifier}+d" = "exec ${cfg.menu}";
"${cfg.modifier}+Shift+space" = "floating toggle";
"${cfg.modifier}+space" = "focus mode_toggle";
"${cfg.modifier}+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window";
"${cfg.modifier}+Control+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload output";
"${cfg.modifier}+Tab" = "workspace back_and_forth";
"${cfg.modifier}+Shift+Tab" =
"exec ${config.services.i3gopher.focus-last}";
"${cfg.modifier}+Ctrl+Left" = "workspace prev_on_output";
"${cfg.modifier}+Ctrl+Right" = "workspace next_on_output";
"Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys screen";
"Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys area";
"Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys window";
"Control+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys output";
"XF86AudioRaiseVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') +5%";
"XF86AudioLowerVolume" =
"exec pactl set-sink-volume $(pacmd list-sinks |awk '/* index:/{print $3}') -5%";
"XF86AudioMute" =
"exec pactl set-sink-mute $(pacmd list-sinks |awk '/* index:/{print $3}') toggle";
"XF86AudioMicMute" =
"exec pactl set-source-mute $(pacmd list-sources |awk '/* index:/{print $3}') toggle";
"XF86MonBrightnessDown" = "exec ${pkgs.light}/bin/light -U 5";
"XF86MonBrightnessUp" = "exec ${pkgs.light}/bin/light -A 5";
"${cfg.modifier}+i" = "move workspace to output left";
"${cfg.modifier}+o" = "move workspace to output right";
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+s" = "layout stacking";
"${cfg.modifier}+w" = "layout tabbed";
"${cfg.modifier}+e" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
"${cfg.modifier}+d" = "exec ${cfg.menu}";
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
"${cfg.modifier}+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload screen";
"${cfg.modifier}+Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload area";
"${cfg.modifier}+Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload window";
"${cfg.modifier}+Control+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify upload output";
"${cfg.modifier}+r" = "mode resize";
"${cfg.modifier}+Delete" = ''
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
"Print" = "exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys screen";
"Shift+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys area";
"Mod1+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys window";
"Control+Print" =
"exec ${pkgs.kat-scrot}/bin/kat-scrot --notify copys output";
colors = {
focused = {
border = base16.base08;
background = base16.base0A;
text = base16.base00;
indicator = base16.base0B;
childBorder = base16.base08;
"${cfg.modifier}+i" = "move workspace to output left";
"${cfg.modifier}+o" = "move workspace to output right";
"${cfg.modifier}+b" = "splith";
"${cfg.modifier}+v" = "splitv";
"${cfg.modifier}+s" = "layout stacking";
"${cfg.modifier}+w" = "layout tabbed";
"${cfg.modifier}+e" = "layout toggle split";
"${cfg.modifier}+f" = "fullscreen";
"${cfg.modifier}+Shift+q" = "kill";
"${cfg.modifier}+Shift+c" = "reload";
"${cfg.modifier}+r" = "mode resize";
"${cfg.modifier}+Delete" = ''
mode "System (l) lock, (e) logout, (s) suspend, (h) hibernate, (r) reboot, (Shift+s) shutdown"'';
};
colors = {
focused = {
border = base16.base08;
background = base16.base0A;
text = base16.base00;
indicator = base16.base0B;
childBorder = base16.base08;
};
focusedInactive = {
border = base16.base00;
background = base16.base07;
text = base16.base0A;
indicator = base16.base0B;
childBorder = base16.base03;
};
unfocused = {
border = base16.base00;
background = base16.base01;
text = base16.base04;
indicator = base16.base08;
childBorder = base16.base08;
};
urgent = {
border = base16.base00;
background = base16.base09;
text = base16.base00;
indicator = base16.base01;
childBorder = base16.base08;
};
};
};
focusedInactive = {
border = base16.base00;
background = base16.base07;
text = base16.base0A;
indicator = base16.base0B;
childBorder = base16.base03;
};
unfocused = {
border = base16.base00;
background = base16.base01;
text = base16.base04;
indicator = base16.base08;
childBorder = base16.base08;
};
urgent = {
border = base16.base00;
background = base16.base09;
text = base16.base00;
indicator = base16.base01;
childBorder = base16.base08;
};
};
wrapperFeatures.gtk = true;
extraConfig = ''
seat seat0 xcursor_theme breeze_cursors 20
workspace_auto_back_and_forth yes
${workspaceBindingsStr}
'';
};
wrapperFeatures.gtk = true;
extraConfig = ''
seat seat0 xcursor_theme breeze_cursors 20
workspace_auto_back_and_forth yes
${workspaceBindingsStr}
'';
};
}

View file

@ -8,7 +8,8 @@ let
size = "10";
size_css = "14px";
};
in {
in
{
config = lib.mkIf config.deploy.profile.sway {
programs.waybar = {
enable = true;