diff options
author | tdback <tyler@tdback.net> | 2025-01-16 19:57:13 -0500 |
---|---|---|
committer | tdback <tyler@tdback.net> | 2025-01-16 19:57:13 -0500 |
commit | 88017f5a874478dd82f306a5df88c38a8d06fcb6 (patch) | |
tree | 8806c58c4f21bb6a56d8530df8a93b256d44b4f3 /users/tdback | |
parent | 01d012473d4311d4f4e5a0831d912bc4b8c61639 (diff) |
fix: format flake with `nixfmt-rfc-style`
Diffstat (limited to 'users/tdback')
-rw-r--r-- | users/tdback/default.nix | 8 | ||||
-rw-r--r-- | users/tdback/desktop.nix | 44 | ||||
-rw-r--r-- | users/tdback/modules/email/default.nix | 1 | ||||
-rw-r--r-- | users/tdback/modules/firefox/default.nix | 18 | ||||
-rw-r--r-- | users/tdback/modules/mpd/default.nix | 3 | ||||
-rw-r--r-- | users/tdback/modules/ncmpcpp/default.nix | 139 | ||||
-rw-r--r-- | users/tdback/modules/neomutt/default.nix | 40 | ||||
-rw-r--r-- | users/tdback/modules/shell/default.nix | 5 | ||||
-rw-r--r-- | users/tdback/retired/alacritty/default.nix | 28 | ||||
-rw-r--r-- | users/tdback/retired/rofi/default.nix | 7 | ||||
-rw-r--r-- | users/tdback/retired/x11/default.nix | 115 |
11 files changed, 278 insertions, 130 deletions
diff --git a/users/tdback/default.nix b/users/tdback/default.nix index 8457428..b6dd00c 100644 --- a/users/tdback/default.nix +++ b/users/tdback/default.nix @@ -1,4 +1,10 @@ -{ config, lib, pkgs, headless ? true, ... }: +{ + config, + lib, + pkgs, + headless ? true, + ... +}: { # Hacky way to import our desktop modules if we aren't a headless system. imports = (lib.optional (!headless) ./desktop.nix) ++ [ diff --git a/users/tdback/desktop.nix b/users/tdback/desktop.nix index 081487a..1d57042 100644 --- a/users/tdback/desktop.nix +++ b/users/tdback/desktop.nix @@ -1,20 +1,30 @@ { config, pkgs, ... }: let - mkDirs = defined: + mkDirs = + defined: let home = config.home.homeDirectory; - dirs = [ "desktop" "documents" "download" "music" "pictures" "publicShare" "templates" "videos" ]; + dirs = [ + "desktop" + "documents" + "download" + "music" + "pictures" + "publicShare" + "templates" + "videos" + ]; in - builtins.listToAttrs ( - builtins.map (dir: { - name = dir; - value = - if builtins.hasAttr dir defined then - "${home}/${defined.${dir}}" - else - null; - }) dirs - ); + { + enable = true; + createDirectories = true; + } + // (builtins.listToAttrs ( + builtins.map (dir: { + name = dir; + value = if builtins.hasAttr dir defined then "${home}/${defined.${dir}}" else null; + }) dirs + )); in { imports = [ @@ -29,11 +39,11 @@ in home.packages = with pkgs.unstable; [ clang + element-desktop gimp gitu mpv pciutils - signal-desktop tidal-dl yt-dlp zathura @@ -41,10 +51,10 @@ in xdg = { enable = true; - userDirs = { - enable = true; - createDirectories = true; - } // (mkDirs { documents = "documents"; download = "downloads"; }); + userDirs = mkDirs { + documents = "documents"; + download = "downloads"; + }; }; qt = { diff --git a/users/tdback/modules/email/default.nix b/users/tdback/modules/email/default.nix index e5dd56d..34eef65 100644 --- a/users/tdback/modules/email/default.nix +++ b/users/tdback/modules/email/default.nix @@ -2,7 +2,6 @@ { accounts.email = { maildirBasePath = "mail"; - accounts.fastmail = { primary = true; address = "tyler@tdback.net"; diff --git a/users/tdback/modules/firefox/default.nix b/users/tdback/modules/firefox/default.nix index ab4c34e..a4e78e8 100644 --- a/users/tdback/modules/firefox/default.nix +++ b/users/tdback/modules/firefox/default.nix @@ -1,4 +1,9 @@ -{ config, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let lock-false = { Value = false; @@ -26,7 +31,7 @@ in SearchBar = "unified"; OfferToSaveLogins = false; EnableTrackingProtection = { - Value= true; + Value = true; Locked = true; Cryptomining = true; Fingerprinting = true; @@ -34,7 +39,10 @@ in # about:config Preferences = { - "browser.contentblocking.category" = { Value = "strict"; Status = "locked"; }; + "browser.contentblocking.category" = { + Value = "strict"; + Status = "locked"; + }; "extensions.pocket.enabled" = lock-false; "extensions.screenshots.disabled" = lock-true; "browser.topsites.contile.enabled" = lock-false; @@ -89,9 +97,9 @@ in "Google".metaData.hidden = true; "Wikipedia (en)".metaData.alias = "@w"; "searx" = { - urls = [{ + urls = lib.singleton { template = "http://10.44.4.100:8888/?q={searchTerms}"; - }]; + }; updateInterval = 24 * 60 * 60 * 1000; definedAliases = [ "@sx" ]; }; diff --git a/users/tdback/modules/mpd/default.nix b/users/tdback/modules/mpd/default.nix index 7c6381d..374add8 100644 --- a/users/tdback/modules/mpd/default.nix +++ b/users/tdback/modules/mpd/default.nix @@ -11,15 +11,12 @@ extraConfig = '' log_file "syslog" max_output_buffer_size "16384" - restore_paused "yes" auto_update "yes" - audio_output { type "pulse" name "pulseaudio" } - audio_output { type "fifo" name "Visualizer feed" diff --git a/users/tdback/modules/ncmpcpp/default.nix b/users/tdback/modules/ncmpcpp/default.nix index 970dba3..839ce34 100644 --- a/users/tdback/modules/ncmpcpp/default.nix +++ b/users/tdback/modules/ncmpcpp/default.nix @@ -35,31 +35,120 @@ }; bindings = [ - { key = "j"; command = "scroll_down"; } - { key = "k"; command = "scroll_up"; } - { key = "h"; command = [ "previous_column" "jump_to_parent_directory" ]; } - { key = "l"; command = [ "next_column" "enter_directory" "run_action" "play_item" ]; } - { key = "u"; command = "page_up"; } - { key = "d"; command = "page_down"; } - { key = "ctrl-u"; command = "page_up"; } - { key = "ctrl-d"; command = "page_down"; } - { key = "g"; command = "move_home"; } - { key = "G"; command = "move_end"; } - { key = "n"; command = "next_found_item"; } - { key = "N"; command = "previous_found_item"; } - { key = "J"; command = "move_sort_order_down"; } - { key = "K"; command = "move_sort_order_up"; } - { key = "f"; command = [ "show_browser" "change_browse_mode" ]; } - { key = "s"; command = [ "reset_search_engine" "show_search_engine" ]; } - { key = "m"; command = "toggle_media_library_columns_mode"; } - { key = "x"; command = "delete_playlist_items"; } - { key = "U"; command = "update_database"; } - { key = "P"; command = "show_playlist"; } - { key = "t"; command = "show_tag_editor"; } - { key = "v"; command = "show_visualizer"; } - { key = "."; command = "show_lyrics"; } - { key = "+"; command = "show_clock"; } - { key = "="; command = "volume_up"; } + { + key = "j"; + command = "scroll_down"; + } + { + key = "k"; + command = "scroll_up"; + } + { + key = "h"; + command = [ + "previous_column" + "jump_to_parent_directory" + ]; + } + { + key = "l"; + command = [ + "next_column" + "enter_directory" + "run_action" + "play_item" + ]; + } + { + key = "u"; + command = "page_up"; + } + { + key = "d"; + command = "page_down"; + } + { + key = "ctrl-u"; + command = "page_up"; + } + { + key = "ctrl-d"; + command = "page_down"; + } + { + key = "g"; + command = "move_home"; + } + { + key = "G"; + command = "move_end"; + } + { + key = "n"; + command = "next_found_item"; + } + { + key = "N"; + command = "previous_found_item"; + } + { + key = "J"; + command = "move_sort_order_down"; + } + { + key = "K"; + command = "move_sort_order_up"; + } + { + key = "f"; + command = [ + "show_browser" + "change_browse_mode" + ]; + } + { + key = "s"; + command = [ + "reset_search_engine" + "show_search_engine" + ]; + } + { + key = "m"; + command = "toggle_media_library_columns_mode"; + } + { + key = "x"; + command = "delete_playlist_items"; + } + { + key = "U"; + command = "update_database"; + } + { + key = "P"; + command = "show_playlist"; + } + { + key = "t"; + command = "show_tag_editor"; + } + { + key = "v"; + command = "show_visualizer"; + } + { + key = "."; + command = "show_lyrics"; + } + { + key = "+"; + command = "show_clock"; + } + { + key = "="; + command = "volume_up"; + } ]; }; } diff --git a/users/tdback/modules/neomutt/default.nix b/users/tdback/modules/neomutt/default.nix index bc066d9..413172a 100644 --- a/users/tdback/modules/neomutt/default.nix +++ b/users/tdback/modules/neomutt/default.nix @@ -17,17 +17,26 @@ binds = [ { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "\\Cp"; action = "sidebar-prev"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "\\Cn"; action = "sidebar-next"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "\\Cy"; action = "sidebar-open"; } @@ -35,27 +44,42 @@ macros = [ { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "gi"; action = "<change-folder>=Inbox<enter>"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "gs"; action = "<change-folder>=Sent<enter>"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "gd"; action = "<change-folder>=Drafts<enter>"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "gt"; action = "<change-folder>=Trash<enter>"; } { - map = [ "index" "pager" ]; + map = [ + "index" + "pager" + ]; key = "ga"; action = "<change-folder>=Archive<enter>"; } diff --git a/users/tdback/modules/shell/default.nix b/users/tdback/modules/shell/default.nix index 1150cf3..3237cda 100644 --- a/users/tdback/modules/shell/default.nix +++ b/users/tdback/modules/shell/default.nix @@ -10,7 +10,10 @@ bash = { enable = true; historyFile = "~/.bash_history"; - historyControl = [ "ignoredups" "ignorespace" ]; + historyControl = [ + "ignoredups" + "ignorespace" + ]; shellOptions = [ "histappend" ]; initExtra = '' PS1=" diff --git a/users/tdback/retired/alacritty/default.nix b/users/tdback/retired/alacritty/default.nix index 6614030..a18239a 100644 --- a/users/tdback/retired/alacritty/default.nix +++ b/users/tdback/retired/alacritty/default.nix @@ -41,24 +41,24 @@ foreground = "#eaeaea"; }; normal = { - black = "#000000"; - red = "#d54e53"; - green = "#b9ca4a"; - yellow = "#e6c547"; - blue = "#7aa6da"; + black = "#000000"; + red = "#d54e53"; + green = "#b9ca4a"; + yellow = "#e6c547"; + blue = "#7aa6da"; magenta = "#c397d8"; - cyan = "#70c0ba"; - white = "#424242"; + cyan = "#70c0ba"; + white = "#424242"; }; bright = { - black = "#666666"; - red = "#ff3334"; - green = "#9ec400"; - yellow = "#e7c547"; - blue = "#7aa6da"; + black = "#666666"; + red = "#ff3334"; + green = "#9ec400"; + yellow = "#e7c547"; + blue = "#7aa6da"; magenta = "#b77ee0"; - cyan = "#54ced6"; - white = "#2a2a2a"; + cyan = "#54ced6"; + white = "#2a2a2a"; }; }; }; diff --git a/users/tdback/retired/rofi/default.nix b/users/tdback/retired/rofi/default.nix index 8a439c4..4399265 100644 --- a/users/tdback/retired/rofi/default.nix +++ b/users/tdback/retired/rofi/default.nix @@ -22,7 +22,7 @@ bg = mkLiteral "#050505"; bg-alt = mkLiteral "#191919"; fg = mkLiteral "#FFFFFF"; - fg-alt = mkLiteral"#787c99"; + fg-alt = mkLiteral "#787c99"; background-color = mkLiteral "@bg"; border = 0; margin = 0; @@ -61,7 +61,10 @@ }; "inputbar" = { - children = map mkLiteral [ "prompt" "entry" ]; + children = map mkLiteral [ + "prompt" + "entry" + ]; }; "listview" = { diff --git a/users/tdback/retired/x11/default.nix b/users/tdback/retired/x11/default.nix index 06c1e2c..13fe1fc 100644 --- a/users/tdback/retired/x11/default.nix +++ b/users/tdback/retired/x11/default.nix @@ -3,23 +3,27 @@ xsession.windowManager.bspwm = { enable = true; package = pkgs.unstable.bspwm; - settings = let color = "#3B4252"; in { - window_gap = 0; - top_padding = 0; - bottom_padding = 0; - right_padding = 0; - left_padding = 0; - top_monocle_padding = 0; - bottom_monocle_padding = 0; - right_monocle_padding = 0; - left_monocle_padding = 0; - split_ratio = 0.5; - borderless_monocle = true; - gapless_monocle = true; - normal_border_color = color; - active_border_color = color; - focused_border_color = color; - }; + settings = + let + color = "#3B4252"; + in + { + window_gap = 0; + top_padding = 0; + bottom_padding = 0; + right_padding = 0; + left_padding = 0; + top_monocle_padding = 0; + bottom_monocle_padding = 0; + right_monocle_padding = 0; + left_monocle_padding = 0; + split_ratio = 0.5; + borderless_monocle = true; + gapless_monocle = true; + normal_border_color = color; + active_border_color = color; + focused_border_color = color; + }; rules = { "Zathura".state = "tiled"; @@ -37,45 +41,50 @@ ''; }; - services.sxhkd = let bspc = lib.getExe' pkgs.unstable.bspwm "bspc"; in { - enable = true; - package = pkgs.unstable.sxhkd; - keybindings = { - # Program hotkeys. - "alt + Tab" = "${lib.getExe pkgs.unstable.rofi} -show window"; - "super + r" = "${lib.getExe pkgs.unstable.rofi} -show drun"; - "super + x" = "${lib.getExe pkgs.unstable.alacritty}"; - "super + b" = "$BROWSER"; - "super + p" = "${lib.getExe pkgs.unstable.flameshot} full -p $HOME/.local/screenshots"; - "super + shift + p" = "${lib.getExe pkgs.unstable.flameshot} gui -p $HOME/.local/screenshots"; - "super + Escape" = "systemctl --user restart polybar"; - "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; + services.sxhkd = + let + bspc = lib.getExe' pkgs.unstable.bspwm "bspc"; + in + { + enable = true; + package = pkgs.unstable.sxhkd; + keybindings = { + # Program hotkeys. + "alt + Tab" = "${lib.getExe pkgs.unstable.rofi} -show window"; + "super + r" = "${lib.getExe pkgs.unstable.rofi} -show drun"; + "super + x" = "${lib.getExe pkgs.unstable.alacritty}"; + "super + b" = "$BROWSER"; + "super + p" = "${lib.getExe pkgs.unstable.flameshot} full -p $HOME/.local/screenshots"; + "super + shift + p" = "${lib.getExe pkgs.unstable.flameshot} gui -p $HOME/.local/screenshots"; + "super + Escape" = "systemctl --user restart polybar"; + "super + alt + {q,r}" = "${bspc} {quit,wm -r}"; - # Function hotkeys. - "XF86AudioPrev" = "${lib.getExe pkgs.unstable.mpc} prev"; - "XF86AudioNext" = "${lib.getExe pkgs.unstable.mpc} next"; - "XF86AudioPlay" = "${lib.getExe pkgs.unstable.mpc} toggle"; - "XF86AudioLowerVolume" = "${lib.getExe pkgs.unstable.pamixer} -d 5"; - "XF86AudioRaiseVolume" = "${lib.getExe pkgs.unstable.pamixer} -i 5"; - "XF86AudioMute" = "${lib.getExe pkgs.pamixer} -t"; + # Function hotkeys. + "XF86AudioPrev" = "${lib.getExe pkgs.unstable.mpc} prev"; + "XF86AudioNext" = "${lib.getExe pkgs.unstable.mpc} next"; + "XF86AudioPlay" = "${lib.getExe pkgs.unstable.mpc} toggle"; + "XF86AudioLowerVolume" = "${lib.getExe pkgs.unstable.pamixer} -d 5"; + "XF86AudioRaiseVolume" = "${lib.getExe pkgs.unstable.pamixer} -i 5"; + "XF86AudioMute" = "${lib.getExe pkgs.pamixer} -t"; - # Manipulate window manager. - "super + q" = "${bspc} node -{c,k}"; - "super + f" = "${bspc} node focused.tiled -t fullscreen"; - "super + t" = "${bspc} node focused.fullscreen -t tiled"; - "super + shift + f" = "${bspc} node focused.tiled -t floating"; - "super + shift + t" = "${bspc} node focused.floating -t tiled"; - "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; - "super + {_,shift}c" = "${bspc} node -f {next,prev}.local.!hidden.window"; - "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; - "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; - "super + {o,i}" = "${bspc} wm -h off; ${bspc} node {older,newer} -f; ${bspc} wm -h on"; - "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f, node -d} '^{1-9,10}'"; - "super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}"; - "super + alt + shift {h,j,k,l}" = "${bspc} node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}"; - "super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}"; + # Manipulate window manager. + "super + q" = "${bspc} node -{c,k}"; + "super + f" = "${bspc} node focused.tiled -t fullscreen"; + "super + t" = "${bspc} node focused.fullscreen -t tiled"; + "super + shift + f" = "${bspc} node focused.tiled -t floating"; + "super + shift + t" = "${bspc} node focused.floating -t tiled"; + "super + {_,shift + }{h,j,k,l}" = "${bspc} node -{f,s} {west,south,north,east}"; + "super + {_,shift}c" = "${bspc} node -f {next,prev}.local.!hidden.window"; + "super + bracket{left,right}" = "${bspc} desktop -f {prev,next}.local"; + "super + {grave,Tab}" = "${bspc} {node,desktop} -f last"; + "super + {o,i}" = "${bspc} wm -h off; ${bspc} node {older,newer} -f; ${bspc} wm -h on"; + "super + {_,shift + }{1-9,0}" = "${bspc} {desktop -f, node -d} '^{1-9,10}'"; + "super + alt + {h,j,k,l}" = "${bspc} node -z {left -20 0, bottom 0 20, top 0 -20, right 20 0}"; + "super + alt + shift {h,j,k,l}" = + "${bspc} node -z {right -20 0, top 0 20, bottom 0 -20, left 20 0}"; + "super + {Left,Down,Up,Right}" = "${bspc} node -v {-20 0,0 20,0 -20,20 0}"; + }; }; - }; # Generate X11 init scripts. home.file = { |