diff options
-rw-r--r-- | flake/nixosConfigurations/common.nix | 1 | ||||
-rw-r--r-- | modules/by-name/lf/lf/colors | 5 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/archive_compress.sh | 10 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/archive_decompress.sh | 2 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/dragon.sh | 2 | ||||
-rwxr-xr-x | modules/by-name/lf/lf/commands/scripts/dragon_individual.sh | 2 | ||||
-rw-r--r-- | modules/by-name/mp/mpv/module.nix | 315 | ||||
-rwxr-xr-x | modules/by-name/ri/river/init_base.sh | 10 | ||||
-rw-r--r-- | modules/by-name/ri/river/module.nix | 4 | ||||
-rw-r--r-- | modules/home.legacy/conf/default.nix | 1 | ||||
-rw-r--r-- | modules/home.legacy/conf/firefox/config/bookmarks/default.nix | 22 | ||||
-rw-r--r-- | modules/home.legacy/conf/firefox/config/search/engines/default.nix | 6 | ||||
-rw-r--r-- | modules/home.legacy/conf/mail/default.nix | 32 | ||||
-rw-r--r-- | modules/home.legacy/conf/mbsync/default.nix | 17 | ||||
-rw-r--r-- | modules/home.legacy/conf/mpv/default.nix | 10 | ||||
-rw-r--r-- | pkgs/by-name/ri/river-start/package.nix | 14 | ||||
-rwxr-xr-x | pkgs/by-name/ri/river-start/river-start.sh | 10 |
17 files changed, 401 insertions, 62 deletions
diff --git a/flake/nixosConfigurations/common.nix b/flake/nixosConfigurations/common.nix index 46a02b72..232c329d 100644 --- a/flake/nixosConfigurations/common.nix +++ b/flake/nixosConfigurations/common.nix @@ -182,6 +182,7 @@ ]; }; }; + mpv.enable = true; swaylock.enable = true; taskwarrior.enable = true; yambar.enable = true; diff --git a/modules/by-name/lf/lf/colors b/modules/by-name/lf/lf/colors index 1c2853ec..17201e64 100644 --- a/modules/by-name/lf/lf/colors +++ b/modules/by-name/lf/lf/colors @@ -60,11 +60,6 @@ fi 00 # FILE # links to hide ~/.mozilla 01;08;30 ~/.ssh 01;08;30 -~/.zshenv 01;08;30 - -~/.steampid 01;08;30 -~/.steam 01;08;30 -~/.steampath 01;08;30 # archives or compressed (dircolors defaults) *.tar 01;31 diff --git a/modules/by-name/lf/lf/commands/scripts/archive_compress.sh b/modules/by-name/lf/lf/commands/scripts/archive_compress.sh index 0d53af2a..c3776a80 100755 --- a/modules/by-name/lf/lf/commands/scripts/archive_compress.sh +++ b/modules/by-name/lf/lf/commands/scripts/archive_compress.sh @@ -1,11 +1,5 @@ # shellcheck shell=sh -# Option '-f' disables pathname expansion which can be useful when $f, $fs, and -# $fx variables contain names with '*' or '?' characters. However, this option -# is used selectively within individual commands as it can be limiting at -# times. -set -f - # shellcheck disable=SC2269 f="$f" # shellcheck disable=SC2269 @@ -49,7 +43,7 @@ done # fx contains all selected file name separated by a newline while read -r file; do - set -- "$@" "$file" + set -- "$@" "$(realpath --relative-to="$(pwd)" "$file")" done <"$(echo "$fx" | tmp)" case "$archiver" in @@ -63,7 +57,7 @@ case "$archiver" in 7z a "$name" "$@" ;; "zip") - zip --symlinks -9 -r "$name" "$@" + zip --symlinks -9 --recurse-paths "$name" "$@" ;; esac # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh index 142ac4d2..08374176 100755 --- a/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh +++ b/modules/by-name/lf/lf/commands/scripts/archive_decompress.sh @@ -9,8 +9,6 @@ fs="$fs" # shellcheck disable=SC2269 id="$id" -set -f - echo "$fx" | while read -r file; do case "$file" in *.tar.bz | *.tar.bz2 | *.tbz | *.tbz2) tar --extract --bzip2 --verbose --file="$file" ;; diff --git a/modules/by-name/lf/lf/commands/scripts/dragon.sh b/modules/by-name/lf/lf/commands/scripts/dragon.sh index 0e6123e1..299d7bbe 100755 --- a/modules/by-name/lf/lf/commands/scripts/dragon.sh +++ b/modules/by-name/lf/lf/commands/scripts/dragon.sh @@ -11,7 +11,7 @@ id="$id" while read -r file; do set -- "$@" "$file" -done < "$(echo "$fx" | tmp)" +done <"$(echo "$fx" | tmp)" dragon --all --and-exit "$@" # vim: ft=sh diff --git a/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh index 580b0cd0..1cb603d9 100755 --- a/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh +++ b/modules/by-name/lf/lf/commands/scripts/dragon_individual.sh @@ -11,7 +11,7 @@ id="$id" while read -r file; do set -- "$@" "$file" -done < "$(echo "$fx" | tmp)" +done <"$(echo "$fx" | tmp)" dragon "$@" # vim: ft=sh diff --git a/modules/by-name/mp/mpv/module.nix b/modules/by-name/mp/mpv/module.nix new file mode 100644 index 00000000..49a97c3c --- /dev/null +++ b/modules/by-name/mp/mpv/module.nix @@ -0,0 +1,315 @@ +{ + config, + lib, + pkgs, + ... +}: let + cfg = config.soispha.programs.mpv; +in { + options.soispha.programs.mpv = { + enable = lib.mkEnableOption "mpv"; + }; + + config.home-manager.users.soispha = lib.mkIf cfg.enable { + programs.mpv = { + enable = true; + + bindings = { + q = "quit 0"; + "Ctrl+c" = "quit 1"; + "Shift+q" = "quit-watch-later 1"; + }; + config = { + # uosc provides seeking & volume indicators (via flash-timeline and flash-volume commands) + # if you decide to use them, you don't need osd-bar + osd-bar = false; + + # uosc will draw its own window controls and border if you disable window border + border = false; + }; + scriptOpts = { + osc = { + scalewindowed = 0.8; + hidetimeout = 300; + }; + uosc = { + # Display style of current position. available: line, bar + timeline_style = "line"; + + # Line display style config + timeline_line_width = 2; + + # Timeline size when fully expanded, in pixels, 0 to disable + timeline_size = 40; + + # Comma separated states when element should always be fully visible. + # Available: paused, audio, image, video, idle, windowed, fullscreen + timeline_persistency = ""; + + # Top border of background color to help visually separate timeline from video + timeline_border = 1; + + # When scrolling above timeline, wheel will seek by this amount of seconds. + # Default uses fast seeking. Add `!` suffix to enable exact seeks. Example: `5!` + timeline_step = 5; + + # Render cache indicators for streaming content + timeline_cache = true; + + # When to display an always visible progress bar (minimized timeline). Can be: windowed, fullscreen, always, never + # Can also be toggled on demand with `toggle-progress` command. + progress = "windowed"; + progress_size = 2; + progress_line_width = 20; + + # A comma delimited list of controls above the timeline. Set to `never` to disable. + # Parameter spec: enclosed in `{}` means value, enclosed in `[]` means optional + # Full item syntax: `[<[!]{disposition1}[,[!]{dispositionN}]>]{element}[:{paramN}][#{badge}[>{limit}]][?{tooltip}]` + # Common properties: + # `{icon}` - parameter used to specify an icon name (example: `face`) + # - pick here: https://fonts.google.com/icons?icon.platform=web&icon.set=Material+Icons&icon.style=Rounded + # `{element}`s and their parameters: + # `{shorthand}` - preconfigured shorthands: + # `play-pause`, `menu`, `subtitles`, `audio`, `video`, `playlist`, + # `chapters`, `editions`, `stream-quality`, `open-file`, `items`, + # `next`, `prev`, `first`, `last`, `audio-device`, `fullscreen`, + # `loop-playlist`, `loop-file`, `shuffle`, `autoload` + # `speed[:{scale}]` - display speed slider, [{scale}] - factor of controls_size, default: 1.3 + # `command:{icon}:{command}` - button that executes a {command} when pressed + # `toggle:{icon}:{prop}[@{owner}]` - button that toggles mpv property. shorthand for yes/no cycle below + # `cycle:{default_icon}:{prop}[@{owner}]:{value1}[={icon1}][!]/{valueN}[={iconN}][!]` + # - button that cycles mpv property between values, each optionally having different icon and active flag + # - presence of `!` at the end will style the button as active + # - `{owner}` is the name of a script that manages this property if any. Set to `uosc` to tap into uosc options. + # `gap[:{scale}]` - display an empty gap + # {scale} - factor of controls_size, default: 0.3 + # `space` - fills all available space between previous and next item, useful to align items to the right + # - multiple spaces divide the available space among themselves, which can be used for centering + # `button:{name}` - button whose state, look, and click action are managed by external script + # Item visibility control: + # `<[!]{disposition1}[,[!]{dispositionN}]>` - optional prefix to control element's visibility + # - `{disposition}` can be one of: + # - `idle` - true if mpv is in idle mode (no file loaded) + # - `image` - true if current file is a single image + # - `audio` - true for audio only files + # - `video` - true for files with a video track + # - `has_many_video` - true for files with more than one video track + # - `has_image` - true for files with a cover or other image track + # - `has_audio` - true for files with an audio track + # - `has_many_audio` - true for files with more than one audio track + # - `has_sub` - true for files with an subtitle track + # - `has_many_sub` - true for files with more than one subtitle track + # - `has_many_edition` - true for files with more than one edition + # - `has_chapter` - true for files with chapter list + # - `stream` - true if current file is read from a stream + # - `has_playlist` - true if current playlist has 2 or more items in it + # - prefix with `!` to negate the required disposition + # Examples: + # - `<stream>stream-quality` - show stream quality button only for streams + # - `<has_audio,!audio>audio` - show audio tracks button for all files that have + # an audio track, but are not exclusively audio only files + # Place `#{badge}[>{limit}]` after the element params to give it a badge. Available badges: + # `sub`, `audio`, `video` - track type counters + # `{mpv_prop}` - any mpv prop that makes sense to you: https://mpv.io/manual/master/#property-list + # - if prop value is an array it'll display its size + # `>{limit}` will display the badge only if it's numerical value is above this threshold. + # Example: `#audio>1` + # Place `?{tooltip}` after the element config to give it a tooltip. + # Example implementations: + # menu = command:menu:script-binding uosc/menu-blurred?Menu + # subtitles = command:subtitles:script-binding uosc/subtitles#sub?Subtitles + # fullscreen = cycle:crop_free:fullscreen:no/yes=fullscreen_exit!?Fullscreen + # loop-playlist = cycle:repeat:loop-playlist:no/inf!?Loop playlist + # toggle:{icon}:{prop} = cycle:{icon}:{prop}:no/yes! + controls = "menu,gap,subtitles,<has_many_audio>audio,<has_many_video>video,<has_many_edition>editions,<stream>stream-quality,gap,space,speed,space,shuffle,loop-playlist,loop-file,gap,prev,items,next,gap,fullscreen"; + controls_size = 32; + controls_margin = 8; + controls_spacing = 2; + controls_persistency = ""; + + # Where to display volume controls: none, left, right + volume = "right"; + volume_size = 40; + volume_border = 1; + volume_step = 1; + volume_persistency = ""; + + # Playback speed widget: mouse drag or wheel to change, click to reset + speed_step = 0.1; + speed_step_is_factor = false; + speed_persistency = ""; + + # Controls all menus, such as context menu, subtitle loader/selector, etc + menu_item_height = 36; + menu_min_width = 260; + menu_padding = 4; + + # Determines if `/` or `ctrl+f` is required to activate the search, or if typing + # any text is sufficient. + # When enabled, you can no longer toggle a menu off with the same key that opened it, if the key is a unicode character. + menu_type_to_search = true; + + # Top bar with window controls and media title + # Can be: never, no-border, always + top_bar = "never"; + top_bar_size = 40; + # Can be: `no` (hide), left or right + top_bar_controls = false; + # Can be: `no` (hide), `yes` (inherit title from mpv.conf), or a custom template string + top_bar_title = false; + # Template string to enable alternative top bar title. If alt title matches main title, + # it'll be hidden. Tip: use `${media-title}` for main, and `${filename}` for alt title. + top_bar_alt_title = ""; + # Can be: + # `below` => display alt title below the main one + # `toggle` => toggle the top bar title text between main and alt by clicking + # the top bar, or calling `toggle-title` binding + top_bar_alt_title_place = "below"; + # Flash top bar when any of these file types is loaded. Available: audio,video,image,chapter + top_bar_flash_on = "video,audio"; + top_bar_persistency = ""; + + # Window border drawn in no-border mode + window_border_size = 1; + + # If there's no playlist and file ends, load next file in directory + # Uses `load_types` config below to determine what type of file to load next. + # When enabled, usoc will set mpv config `keep-open` to `yes`, and `keep-open-pause` to `no`. + autoload = false; + # Enable uosc's playlist/directory shuffle mode + # This simply makes the next selected playlist or directory item be random, just + # like any other player in the world. It also has an easily togglable control button. + shuffle = false; + + # Scale the interface by this factor + scale = 1; + # Scale in fullscreen + scale_fullscreen = 1.3; + # Adjust the text scaling to fit your font + font_scale = 1; + # Border of text and icons when drawn directly on top of video + text_border = 1.2; + # Border radius of buttons, menus, and all other rectangles + border_radius = 4; + # A comma delimited list of color overrides in RGB HEX format. Defaults: + # foreground=ffffff,foreground_text=000000,background=000000,background_text=ffffff,curtain=111111,success=a5e075,error=ff616e + color = ""; + # A comma delimited list of opacity overrides for various UI element backgrounds and shapes. + # This does not affect any text, which is always rendered fully opaque. Defaults: + # timeline=0.9,position=1,chapters=0.8,slider=0.9,slider_gauge=1,controls=0,speed=0.6,menu=1,submenu=0.4,border=1,title=1,tooltip=1,thumbnail=1,curtain=0.8,idle_indicator=0.8,audio_indicator=0.5,buffering_indicator=0.3,playlist_position=0.8 + opacity = ""; + + # A comma delimited list of features to refine at a cost of some performance impact. + # text_width - Use a more accurate text width measurement that measures each text string individually + # instead of just measuring the width of known letters once and adding them up. + # sorting - Use filename sorting that handles non-english languages better, especially asian ones. + # At the moment, this is only available on windows, and has no effect on other platforms. + refine = ""; + + # Duration of animations in milliseconds + animation_duration = 100; + + # Execute command for background clicks shorter than this number of milliseconds, 0 to disable + # Execution always waits for `input-doubleclick-time` to filter out double-clicks + click_threshold = 0; + click_command = "cycle pause; script-binding uosc/flash-pause-indicator"; + + # Flash duration in milliseconds used by `flash-{element}` commands + flash_duration = 1000; + + # Distances in pixels below which elements are fully faded in/out + proximity_in = 40; + proximity_out = 120; + + # Use only bold font weight throughout the whole UI + font_bold = false; + + # One of `total`, `playtime-remaining` (scaled by the current speed), `time-remaining` (remaining length of file) + destination_time = "playtime-remaining"; + + # Display sub second fraction in timestamps up to this precision + time_precision = 0; + + # Display stream's buffered time in timeline if it's lower than this amount of seconds, 0 to disable + buffered_time_threshold = 60; + + # Hide UI when mpv autohides the cursor. Timing is controlled by `cursor-autohide` in `mpv.conf` (in milliseconds). + autohide = true; + + # Can be: flash, static, manual (controlled by flash-pause-indicator and decide-pause-indicator commands) + pause_indicator = "static"; + + # Sizes to list in stream quality menu + stream_quality_options = "4320,2160,1440,1080,720,480,360,240,144"; + + # Types to identify media files + video_types = "3g2,3gp,asf,avi,f4v,flv,h264,h265,m2ts,m4v,mkv,mov,mp4,mp4v,mpeg,mpg,ogm,ogv,rm,rmvb,ts,vob,webm,wmv,y4m"; + audio_types = "aac,ac3,aiff,ape,au,cue,dsf,dts,flac,m4a,mid,midi,mka,mp3,mp4a,oga,ogg,opus,spx,tak,tta,wav,weba,wma,wv"; + image_types = "apng,avif,bmp,gif,j2k,jp2,jfif,jpeg,jpg,jxl,mj2,png,svg,tga,tif,tiff,webp"; + subtitle_types = "aqt,ass,gsub,idx,jss,lrc,mks,pgs,pjs,psb,rt,sbv,slt,smi,sub,sup,srt,ssa,ssf,ttxt,txt,usf,vt,vtt"; + playlist_types = "m3u,m3u8,pls,url,cue"; + + # Type pools used by file navigation and `autoload` to determine what type of file to load next + # Available: video,audio,image,playlist,same. `same` means the same type pool (not just extension) as currently open file. + load_types = "video,audio,image"; + + # Default open-file menu directory. Use `{drives}` to open drives menu on windows (defaults to `/` on unix). + default_directory = "~/"; + + # List hidden files when reading directories. Due to environment limitations, this currently only hides + # files starting with a dot. Doesn't hide hidden files on windows (we have no way to tell they're hidden). + show_hidden_files = false; + + # Move files to trash (recycle bin) when deleting files. Dependencies: + # - Linux: `sudo apt install trash-cli` + # - MacOS: `brew install trash` + use_trash = false; + + # Adjusted osd margins based on the visibility of UI elements + adjust_osd_margins = true; + + # Adds chapter range indicators to some common chapter types. + # Additionally to displaying the start of the chapter as a diamond icon on top of the timeline, + # the portion of the timeline of that chapter range is also colored based on the config below. + # + # The syntax is a comma-delimited list of `{type}:{color}` pairs, where: + # `{type}` => range type. Currently supported ones are: + # - `openings`, `endings` => anime openings/endings + # - `intros`, `outros` => video intros/outros + # - `ads` => segments created by sponsor-block software like https://github.com/po5/mpv_sponsorblock + # `{color}` => an RGB(A) HEX color code (`rrggbb`, or `rrggbbaa`) + # + # To exclude marking any of the range types, simply remove them from the list. + chapter_ranges = "openings:30abf964,endings:30abf964,ads:c54e4e80"; + + # Add alternative lua patterns to identify beginnings of simple chapter ranges (except for `ads`) + # Syntax: `{type}:{pattern}[,{patternN}][;{type}:{pattern}[,{patternN}]]` + chapter_range_patterns = "openings:オープニング;endings:エンディング"; + + # Localization language priority from highest to lowest. + # Also controls what languages are fetched by `download-subtitles` menu. + # Built in languages can be found in `uosc/intl`. + # `slang` is a keyword to inherit values from `--slang` mpv config. + # Supports paths to custom json files: `languages=~~/custom.json,slang,en` + languages = "slang,en"; + + # A comma separated list of element IDs to disable. Available IDs: + # window_border, top_bar, timeline, controls, volume, + # idle_indicator, audio_indicator, buffering_indicator, pause_indicator + disable_elements = ""; + }; + thumbfast = { + hwdec = true; + network = false; + spawn_first = false; + max_height = 250; + max_width = 250; + }; + }; + scripts = with pkgs.mpvScripts; [ + uosc + thumbfast + ]; + }; + }; +} diff --git a/modules/by-name/ri/river/init_base.sh b/modules/by-name/ri/river/init_base.sh index 5ed1d00a..938b46b1 100755 --- a/modules/by-name/ri/river/init_base.sh +++ b/modules/by-name/ri/river/init_base.sh @@ -1,5 +1,8 @@ #!/usr/bin/env sh +# NOTE: Keep this in sync with the file from `river-start` <2025-02-03> +RIVER_LOG_FILE="$HOME/.local/share/river/log" + err_fail() { if ! "$@"; then output="" @@ -10,11 +13,10 @@ err_fail() { output="$output '$arg'" fi done - printf "%s failed!\n" "$output" >>~/river_log + printf "%s failed!\n" "$output" >>"$RIVER_LOG_FILE" fi } -err_fail rm ~/river_log -exec 1>>"$HOME"/river_log -exec 2>>"$HOME"/river_log +exec 1>>"$RIVER_LOG_FILE" +exec 2>>"$RIVER_LOG_FILE" # Start of the generated stuff. diff --git a/modules/by-name/ri/river/module.nix b/modules/by-name/ri/river/module.nix index 1f1f2cae..c0b38bc5 100644 --- a/modules/by-name/ri/river/module.nix +++ b/modules/by-name/ri/river/module.nix @@ -183,6 +183,10 @@ in { # }}} }; + home.packages = [ + pkgs.river-start + ]; + xdg.configFile."river/init".text = let mkHeading = text: other_stuff: '' # ${text} diff --git a/modules/home.legacy/conf/default.nix b/modules/home.legacy/conf/default.nix index 848bcccf..e1cab572 100644 --- a/modules/home.legacy/conf/default.nix +++ b/modules/home.legacy/conf/default.nix @@ -16,7 +16,6 @@ ./mail ./mako ./mbsync - ./mpv ./mumble ./neomutt ./nix-index diff --git a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix b/modules/home.legacy/conf/firefox/config/bookmarks/default.nix index c612bf4d..41936819 100644 --- a/modules/home.legacy/conf/firefox/config/bookmarks/default.nix +++ b/modules/home.legacy/conf/firefox/config/bookmarks/default.nix @@ -3,27 +3,7 @@ pkgs, ... }: let - bookmarks = [ - { - name = "Feed - Piped"; - url = "https://piped.video/feed"; - } - - { - name = "DeepL Translate"; - url = "https://www.deepl.com/translator"; - } - - { - name = "Nix lib"; - url = "https://teu5us.github.io/nix-lib.html"; - } - - { - name = "Nixpkgs manual"; - url = "https://ryantm.github.io/nixpkgs/"; - } - ]; + bookmarks = []; mkBookmarksFile = (import ./lib.nix) {inherit lib pkgs;}; bookmarks_file = mkBookmarksFile bookmarks; diff --git a/modules/home.legacy/conf/firefox/config/search/engines/default.nix b/modules/home.legacy/conf/firefox/config/search/engines/default.nix index a47c77df..7e7880ca 100644 --- a/modules/home.legacy/conf/firefox/config/search/engines/default.nix +++ b/modules/home.legacy/conf/firefox/config/search/engines/default.nix @@ -13,6 +13,12 @@ definedAliases = ["@np"]; }; + "Nix functions" = { + urls = [{template = "https://noogle.dev/q?term={searchTerms}";}]; + icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; + definedAliases = ["@ng"]; + }; + "NixOS Options" = { urls = [{template = "https://search.nixos.org/options?type=options&query={searchTerms}";}]; icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg"; diff --git a/modules/home.legacy/conf/mail/default.nix b/modules/home.legacy/conf/mail/default.nix index 0ecbe40a..5e35c002 100644 --- a/modules/home.legacy/conf/mail/default.nix +++ b/modules/home.legacy/conf/mail/default.nix @@ -1,15 +1,47 @@ { config, pkgs, + lib, ... }: let benedikt = import ./accounts/benedikt.nix {inherit pkgs;}; soispha = import ./accounts/soispha.nix {inherit pkgs;}; accounts = {inherit soispha benedikt;}; + + mkHelper = { + userName, + passwordCommand, + ... + }: + builtins.toString (pkgs.writeShellScript "git-credential-keepassxc-libsecret" + # bash + '' + [ "$1" = "get" ] || { + exit 1 + } + if cat | grep "username=${userName}" -q; then + ${passwordCommand} + else + # Not our business. + exit 1 + fi + ''); + accountCredentials = + # TODO: This will result in only one of them being defined, as we duplicate the + # attribute key<2025-02-03> + lib.mapAttrs' (_: value: { + name = "credential"; + value = { + "smtp://${value.smtp.host}:${builtins.toString value.smtp.port}" = mkHelper value; + }; + }) + accounts; in { accounts.email = { maildirBasePath = "${config.xdg.dataHome}/maildir"; inherit accounts; }; + + programs.git.extraConfig = accountCredentials; } diff --git a/modules/home.legacy/conf/mbsync/default.nix b/modules/home.legacy/conf/mbsync/default.nix index ac9808c9..8418d92d 100644 --- a/modules/home.legacy/conf/mbsync/default.nix +++ b/modules/home.legacy/conf/mbsync/default.nix @@ -1,17 +1,16 @@ -{ - config, - lib, - ... -}: { - # TODO: I have no clue if both are needed, but it looks neat, right? +{lib, ...}: { + # This configures the program in itself (i.e., sets-up a config file, etc.) programs.mbsync = { enable = true; }; + + # This starts a systemd service to periodically sync mail services.mbsync = { enable = true; - # TODO: enable after isync 1.5 drops - #configFile = "${config.xdg.configHome}/mbsync/mbsync.conf"; }; - # Disable the timer, and only activate it on neomutt start + + # Disable the timer, and only activate the service when neomutt starts + # Otherwise, the password command would prompt me to unlock the keepassxc database every + # time. systemd.user.timers.mbsync = lib.mkForce {}; } diff --git a/modules/home.legacy/conf/mpv/default.nix b/modules/home.legacy/conf/mpv/default.nix deleted file mode 100644 index 6b252a38..00000000 --- a/modules/home.legacy/conf/mpv/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{...}: { - programs.mpv = { - enable = true; - bindings = { - q = "quit 0"; - "Ctrl+c" = "quit 1"; - "Shift+q" = "quit-watch-later 1"; - }; - }; -} diff --git a/pkgs/by-name/ri/river-start/package.nix b/pkgs/by-name/ri/river-start/package.nix new file mode 100644 index 00000000..ab986708 --- /dev/null +++ b/pkgs/by-name/ri/river-start/package.nix @@ -0,0 +1,14 @@ +{ + writeShellApplication, + river, +}: +writeShellApplication { + name = "river-start"; + text = builtins.readFile ./river-start.sh; + runtimeInputs = [ + river + ]; + meta = { + mainProgram = "river-start"; + }; +} diff --git a/pkgs/by-name/ri/river-start/river-start.sh b/pkgs/by-name/ri/river-start/river-start.sh new file mode 100755 index 00000000..4587ff96 --- /dev/null +++ b/pkgs/by-name/ri/river-start/river-start.sh @@ -0,0 +1,10 @@ +#! /usr/bin/env sh + +# NOTE: Keep this in sync with the file from `base_init.sh` <2025-02-03> +RIVER_LOG_FILE="$HOME/.local/share/river/log" + +[ -d "$(dirname "$RIVER_LOG_FILE")" ] || mkdir --parents "$(dirname "$RIVER_LOG_FILE")" + +exec river -log-level info >"$RIVER_LOG_FILE" 2>&1 + +# vim: ft=sh |