From c25d56f350d6696b17da5c51cfe44d0c15f320fd Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 20 Aug 2024 13:14:24 +0100 Subject: [PATCH] add yazi to home-manager --- home/citadel.nix | 1 + .../optional/desktop/dwm/music_player.nix | 2 +- home/common/optional/yazi.nix | 120 ++++++++++++++++++ home/semita.nix | 1 + hosts/citadel/default.nix | 2 +- .../common/optional/nfs-mounts/homeshare.nix | 9 ++ hosts/common/optional/nfs-mounts/media.nix | 8 ++ hosts/common/optional/nfs-mounts/music.nix | 8 -- hosts/common/optional/nfs-mounts/photos.nix | 9 ++ hosts/semita/default.nix | 3 +- hosts/sparky/default.nix | 1 + 11 files changed, 153 insertions(+), 11 deletions(-) create mode 100644 home/common/optional/yazi.nix create mode 100644 hosts/common/optional/nfs-mounts/homeshare.nix create mode 100644 hosts/common/optional/nfs-mounts/media.nix delete mode 100644 hosts/common/optional/nfs-mounts/music.nix create mode 100644 hosts/common/optional/nfs-mounts/photos.nix diff --git a/home/citadel.nix b/home/citadel.nix index 296cc9f..5c759e1 100644 --- a/home/citadel.nix +++ b/home/citadel.nix @@ -14,6 +14,7 @@ ./common/optional/desktop/dwm ./common/optional/desktop/common/themes/standard-dark.nix ./common/optional/notes.nix + ./common/optional/yazi.nix ]; diff --git a/home/common/optional/desktop/dwm/music_player.nix b/home/common/optional/desktop/dwm/music_player.nix index db5095c..6685b1c 100644 --- a/home/common/optional/desktop/dwm/music_player.nix +++ b/home/common/optional/desktop/dwm/music_player.nix @@ -1,6 +1,6 @@ { pkgs, config, ... }: { - home.file."mus/music_data".source = config.lib.file.mkOutOfStoreSymlink /media/music/music_data; + home.file."mus/music_data".source = config.lib.file.mkOutOfStoreSymlink /media/media/music/music_data; home.packages = [ pkgs.ffmpeg diff --git a/home/common/optional/yazi.nix b/home/common/optional/yazi.nix new file mode 100644 index 0000000..eec2c98 --- /dev/null +++ b/home/common/optional/yazi.nix @@ -0,0 +1,120 @@ +{ pkgs, ... }: +{ + programs.yazi = { + enable = true; + package = pkgs.yazi; + enableBashIntegration = true; + enableZshIntegration = true; + + settings = { + log = { + enabled = true; + }; + manager = { + show_hidden = false; + sort_by = "modified"; + sort_dir_first = true; + sort_reverse = true; + }; + }; + + theme = { + manager = { + marker_copied = { fg = "#98bb6c"; bg = "#98bb6c"; }; + marker_cut = { fg = "#e46876"; bg = "#e46876"; }; + marker_marked = { fg = "#957fb8"; bg = "#957fb8"; }; + marker_selected = { fg = "#ffa066"; bg = "#ffa066"; }; + cwd = { fg = "#e6c384"; }; + hovered = { reversed = true; }; + preview_hovered = { reversed = true; }; + tab_active = { reversed = true; }; + tab_inactive = { }; + tab_width = 1; + count_copied = { fg = "#1f1f28"; bg = "#98bb6c"; }; + count_cut = { fg = "#1f1f28"; bg = "#e46876"; }; + count_selected = { fg = "#1f1f28"; bg = "#e6c384"; }; + border_symbol = "│"; + border_style = { fg = "#dcd7ba"; }; + }; + + status = { + separator_open = ""; + separator_close = ""; + separator_style = { fg = "reset"; bg = "#363646"; }; + mode_normal = { fg = "#1f1f28"; bg = "#85a6ea"; bold = true; }; + mode_select = { fg = "#1f1f28"; bg = "#957fb8"; bold = true; }; + mode_unset = { fg = "#1f1f28"; bg = "#e6c384"; bold = true; }; + progress_label = { fg = "#85a6ea"; bg = "#363646"; bold = true; }; + progress_normal = { fg = "#363646"; bg = "#1f1f28"; }; + progress_error = { fg = "#363646"; bg = "#1f1f28"; }; + permissions_t = { fg = "#98bb6c"; }; + permissions_r = { fg = "#e6c384"; }; + permissions_w = { fg = "#e82424"; }; + permissions_x = { fg = "#7aa89f"; }; + permissions_s = { fg = "#938aa9"; }; + }; + + select = { + border = { fg = "#7fb4ca"; }; + active = { fg = "#938aa9"; bold = true; }; + inactive = { }; + }; + + input = { + border = { fg = "#7fb4ca"; }; + title = { }; + value = { }; + selected = { reversed = true; }; + }; + + completion = { + border = { fg = "#7fb4ca"; }; + active = { reversed = true; }; + inactive = { }; + }; + + tasks = { + border = { fg = "#7fb4ca"; }; + title = { }; + hovered = { fg = "#938aa9"; }; + }; + + which = { + cols = 2; + separator = " - "; + separator_style = { fg = "#727169"; }; + mask = { bg = "#16161d"; }; + rest = { fg = "#727169"; }; + cand = { fg = "#85a6ea"; }; + desc = { fg = "#565666"; }; + }; + + help = { + on = { fg = "#7aa89f"; }; + run = { fg = "#938aa9"; }; + desc = { }; + hovered = { reversed = true; bold = true; }; + footer = { fg = "#090618"; bg = "#dcd7ba"; }; + }; + + notify = { + title_info = { fg = "#98bb6c"; }; + title_warn = { fg = "#e6c384"; }; + title_error = { fg = "#e82424"; }; + }; + + filetype = { + rules = [ + { mime = "image/*"; fg = "#e6c384"; } + { mime = "{audio,video}/*"; fg = "#957fb8"; } + { mime = "application/{,g}zip"; fg = "#e46876"; } + { mime = "application/x-{tar,bzip*,7z-compressed,xz,rar}"; fg = "#e46876"; } + { mime = "application/{pdf,doc,rtf,vnd.*}"; fg = "#6a9589"; } + { name = "*"; is = "orphan"; fg = "#e46876"; } + { name = "*"; is = "exec"; fg = "#957fb8"; } + { name = "*/"; fg = "#85a6ea"; } + ]; + }; + }; + }; +} diff --git a/home/semita.nix b/home/semita.nix index 7e7f655..cd6e2eb 100644 --- a/home/semita.nix +++ b/home/semita.nix @@ -15,6 +15,7 @@ ./common/optional/desktop/dwm ./common/optional/desktop/common/themes/standard-dark.nix ./common/optional/notes.nix + ./common/optional/yazi.nix ]; diff --git a/hosts/citadel/default.nix b/hosts/citadel/default.nix index dbd230b..5289a1d 100644 --- a/hosts/citadel/default.nix +++ b/hosts/citadel/default.nix @@ -30,7 +30,7 @@ in ../common/optional/pipewire.nix ../common/optional/openssh.nix ../common/optional/dwm.nix - ../common/optional/nfs-mounts/music.nix + ../common/optional/nfs-mounts/media.nix ../common/optional/printing.nix ../common/optional/backlight.nix diff --git a/hosts/common/optional/nfs-mounts/homeshare.nix b/hosts/common/optional/nfs-mounts/homeshare.nix new file mode 100644 index 0000000..902fe04 --- /dev/null +++ b/hosts/common/optional/nfs-mounts/homeshare.nix @@ -0,0 +1,9 @@ +{ + fileSystems."/media/homeshare" = { + device = "10.0.10.30:/mnt/homeshare"; + fsType = "nfs"; + options = [ "noatime" "_netdev" ]; + }; +} + + diff --git a/hosts/common/optional/nfs-mounts/media.nix b/hosts/common/optional/nfs-mounts/media.nix new file mode 100644 index 0000000..153d0e4 --- /dev/null +++ b/hosts/common/optional/nfs-mounts/media.nix @@ -0,0 +1,8 @@ +{ + fileSystems."/media/media" = { + device = "10.0.10.30:/mnt/media"; + fsType = "nfs"; + options = [ "noatime" "_netdev" "ro" ]; + }; +} + diff --git a/hosts/common/optional/nfs-mounts/music.nix b/hosts/common/optional/nfs-mounts/music.nix deleted file mode 100644 index 498eeb5..0000000 --- a/hosts/common/optional/nfs-mounts/music.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ - fileSystems."/media/music" = { - device = "10.0.10.30:/mnt/media/music"; - fsType = "nfs"; - options = [ "noatime" "_netdev" ]; - }; -} - diff --git a/hosts/common/optional/nfs-mounts/photos.nix b/hosts/common/optional/nfs-mounts/photos.nix new file mode 100644 index 0000000..fb03bb2 --- /dev/null +++ b/hosts/common/optional/nfs-mounts/photos.nix @@ -0,0 +1,9 @@ +{ + fileSystems."/media/homeshare" = { + device = "10.0.10.30:/mnt/homeshare"; + fsType = "nfs"; + options = [ "noatime" "_netdev" "ro" ]; + }; +} + + diff --git a/hosts/semita/default.nix b/hosts/semita/default.nix index 3d0730c..dde9a6d 100644 --- a/hosts/semita/default.nix +++ b/hosts/semita/default.nix @@ -30,7 +30,8 @@ in ../common/optional/pipewire.nix ../common/optional/openssh.nix ../common/optional/dwm.nix - ../common/optional/nfs-mounts/music.nix + ../common/optional/nfs-mounts/media.nix + ../common/optional/nfs-mounts/homeshare.nix ../common/optional/printing.nix ]; diff --git a/hosts/sparky/default.nix b/hosts/sparky/default.nix index 9cb95cc..8e70b37 100644 --- a/hosts/sparky/default.nix +++ b/hosts/sparky/default.nix @@ -27,6 +27,7 @@ in # Import optional options ../common/optional/openssh.nix ../common/optional/persistence.nix + ../common/optional/nfs-mounts/media.nix ../common/optional/gaming.nix ../common/optional/printing.nix