diff options
Diffstat (limited to 'hm')
| -rw-r--r-- | hm/conf/conf.nix | 1 | ||||
| -rw-r--r-- | hm/conf/xdg-dirs.nix | 40 | ||||
| -rw-r--r-- | hm/conf/xdg-mime.nix | 49 | ||||
| -rw-r--r-- | hm/editors/nixvim.nix | 4 | ||||
| -rw-r--r-- | hm/shell/cli.nix | 41 | ||||
| -rw-r--r-- | hm/shell/fish.nix | 16 | ||||
| -rw-r--r-- | hm/soft/easyeffects.nix | 12 | ||||
| -rw-r--r-- | hm/soft/media.nix | 50 | ||||
| -rw-r--r-- | hm/soft/obs.nix | 9 | ||||
| -rw-r--r-- | hm/soft/soft.nix | 1 |
10 files changed, 169 insertions, 54 deletions
diff --git a/hm/conf/conf.nix b/hm/conf/conf.nix index 6c54d8a..57f9ba1 100644 --- a/hm/conf/conf.nix +++ b/hm/conf/conf.nix @@ -4,5 +4,6 @@ ./clip.nix ./git.nix ./xdg-dirs.nix + ./xdg-mime.nix ]; } diff --git a/hm/conf/xdg-dirs.nix b/hm/conf/xdg-dirs.nix index d779dba..ee34bd0 100644 --- a/hm/conf/xdg-dirs.nix +++ b/hm/conf/xdg-dirs.nix @@ -19,9 +19,9 @@ in download = "${config.home.homeDirectory}/dl"; documents = "${config.home.homeDirectory}/docs"; - + pictures = "${toString cfg.mediaPath}/pics"; - videos = "${toString cfg.mediaPath}/vids"; + videos = "${toString cfg.mediaPath}/vids"; desktop = null; music = null; @@ -29,25 +29,25 @@ in templates = null; extraConfig = { - XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj"; - XDG_GAMES_DIR = "${config.home.homeDirectory}/games"; - XDG_MEDIA_DIR = "${toString cfg.mediaPath}"; - XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss"; - XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips"; - XDG_MOVIES_DIR = "${toString cfg.mediaPath}/movies"; - XDG_ANIME_DIR = "${toString cfg.mediaPath}/anime"; - XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive"; + PROJECTS = "${config.home.homeDirectory}/proj"; + GAMES = "${config.home.homeDirectory}/games"; + MEDIA = "${toString cfg.mediaPath}"; + SS = "${toString cfg.mediaPath}/pics/ss"; + CLIPS = "${toString cfg.mediaPath}/vids/clips"; + MOVIES = "${toString cfg.mediaPath}/movies"; + ANIME = "${toString cfg.mediaPath}/anime"; + ARCHIVE = "${toString cfg.mediaPath}/archive"; }; }; - home.sessionVariables = { - XDG_PROJECTS_DIR = "${config.home.homeDirectory}/proj"; - XDG_GAMES_DIR = "${config.home.homeDirectory}/games"; - XDG_MEDIA_DIR = "${toString cfg.mediaPath}"; - XDG_SS_DIR = "${toString cfg.mediaPath}/pics/ss"; - XDG_CLIPS_DIR = "${toString cfg.mediaPath}/vids/clips"; - XDG_MOVIES_DIR = "${toString cfg.mediaPath}/movies"; - XDG_ANIME_DIR = "${toString cfg.mediaPath}/anime"; - XDG_ARCHIVE_DIR = "${toString cfg.mediaPath}/archive"; - }; + home.sessionVariables = { + PROJECTS = "${config.home.homeDirectory}/proj"; + GAMES = "${config.home.homeDirectory}/games"; + MEDIA = "${toString cfg.mediaPath}"; + SS = "${toString cfg.mediaPath}/pics/ss"; + CLIPS = "${toString cfg.mediaPath}/vids/clips"; + MOVIES = "${toString cfg.mediaPath}/movies"; + ANIME = "${toString cfg.mediaPath}/anime"; + ARCHIVE = "${toString cfg.mediaPath}/archive"; + }; }; } diff --git a/hm/conf/xdg-mime.nix b/hm/conf/xdg-mime.nix new file mode 100644 index 0000000..0f55c5d --- /dev/null +++ b/hm/conf/xdg-mime.nix @@ -0,0 +1,49 @@ +{ config, lib, ... }: +let + cfg = config.hm.conf.xdg-mime; +in +{ + options.hm.conf.xdg-mime = { + enable = lib.mkEnableOption "sets the default applications"; + }; + config = lib.mkIf cfg.enable { + xdg.mimeApps = { + enable = true; + defaultApplications = { + "application/pdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-bzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/x-gzpdf" = [ "org.pwmt.zathura.desktop" ]; + "application/epub+zip" = [ "org.pwmt.zathura.desktop" ]; + + "image/png" = [ "nsxiv.desktop" ]; + "image/jpeg" = [ "nsxiv.desktop" ]; + "image/gif" = [ "nsxiv.desktop" ]; + "image/webp" = [ "nsxiv.desktop" ]; + "image/bmp" = [ "nsxiv.desktop" ]; + + "video/mp4" = [ "mpv.desktop" ]; + "video/x-matroska" = [ "mpv.desktop" ]; + "video/webm" = [ "mpv.desktop" ]; + "video/quicktime" = [ "mpv.desktop" ]; + + "audio/mpeg" = [ "mpv.desktop" ]; + "audio/flac" = [ "mpv.desktop" ]; + "audio/wav" = [ "mpv.desktop" ]; + "audio/ogg" = [ "mpv.desktop" ]; + + "text/html" = [ "firefox.desktop" ]; + "x-scheme-handler/http" = [ "firefox.desktop" ]; + "x-scheme-handler/https" = [ "firefox.desktop" ]; + "inode/directory" = [ "thunar.desktop" ]; + }; + }; + home.sessionVariables = { + EDITOR = "nvim"; + VISUAL = "nvim"; + BROWSER = "librewolf"; + TERMINAL = "foot"; + GPG_TTY = "$(tty)"; + COLORTERM = "truecolor"; + }; + }; +} diff --git a/hm/editors/nixvim.nix b/hm/editors/nixvim.nix index e46f6e2..9db6bff 100644 --- a/hm/editors/nixvim.nix +++ b/hm/editors/nixvim.nix @@ -33,6 +33,9 @@ in }; opts = { + smartindent = true; + autoindent = true; + breakindent = true; number = true; relativenumber = true; termguicolors = true; @@ -188,6 +191,7 @@ in treesitter-context = { enable = true; settings = { + indent.enable = true; max_lines = 2; trim_scope = "outer"; }; diff --git a/hm/shell/cli.nix b/hm/shell/cli.nix index 142fda5..2716e00 100644 --- a/hm/shell/cli.nix +++ b/hm/shell/cli.nix @@ -3,21 +3,22 @@ lib, pkgs, ... -}: let +}: +let cfg = config.hm.shell.cli; -in { +in +{ options.hm.shell.cli.enable = lib.mkEnableOption "modern cli tools"; config = lib.mkIf cfg.enable { programs.zoxide = { enable = true; - options = ["--cmd cd"]; + options = [ "--cmd cd" ]; }; programs.bat = { enable = true; config.theme = "gruvbox-dark"; }; - programs.eza.enable = true; programs.fzf.enable = true; programs.fd.enable = true; programs.ripgrep.enable = true; @@ -60,24 +61,44 @@ in { ]; }; }; - programs.direnv.enable = true; - programs.jq.enable = true; + # programs.direnv = { + # enable = true; + # nix-direnv.enable = true; + # }; programs.nix-your-shell = { enable = true; enableFishIntegration = true; nix-output-monitor.enable = true; }; + programs.bottom = { + enable = true; + }; + programs.tealdeer = { + enable = true; + }; + # programs.lazygit = { + # enable = true; + # enableFishIntegration = true; + # }; + programs.riff.enable = true; + programs.pls.enable = true; + programs.nix-index.enable = true; home.packages = with pkgs; [ + sd + choose + doggo + gping + comma + dust nix-search-cli srm file - mediainfo - chafa hexyl procs - yq-go - tldr + + chafa + ffmpeg ]; }; } diff --git a/hm/shell/fish.nix b/hm/shell/fish.nix index 88a4493..6338cb1 100644 --- a/hm/shell/fish.nix +++ b/hm/shell/fish.nix @@ -1,4 +1,9 @@ -{ config, lib, pkgs, ... }: +{ + config, + lib, + pkgs, + ... +}: let cfg = config.hm.shell.fish; in @@ -14,22 +19,19 @@ in ''; shellAliases = { - update = "git add . && git commit -m \"$1\" && nh os switch ."; + update = "git add . && git commit -m \"$1\" && nix flake update && nh os switch ."; nos = "nh os switch ."; nob = "nh os boot ."; nfu = "nix flake update"; - - ll = "ls -lah"; - la = "ls -A"; + md = "mkdir -p"; rmf = "rm -rf"; untar = "tar -xzvf"; tarc = "tar -czvf"; - + ff = "fastfetch"; cat = "bat"; - ls = "eza"; yt = "yt-dlp"; }; diff --git a/hm/soft/easyeffects.nix b/hm/soft/easyeffects.nix deleted file mode 100644 index ab16736..0000000 --- a/hm/soft/easyeffects.nix +++ /dev/null @@ -1,12 +0,0 @@ -{ config, lib, ... }: -let - cfg = config.hm.soft.easyeffects; -in -{ - options.hm.soft.easyeffects.enable = lib.mkEnableOption "EasyEffects audio equalizer"; - config = lib.mkIf cfg.enable { - services.easyeffects = { - enable = true; - }; - }; -} diff --git a/hm/soft/media.nix b/hm/soft/media.nix index 8dcd6de..b307904 100644 --- a/hm/soft/media.nix +++ b/hm/soft/media.nix @@ -3,15 +3,61 @@ lib, pkgs, ... -}: let +}: +let cfg = config.hm.soft.media; -in { +in +{ options.hm.soft.media.enable = lib.mkEnableOption "media cli tools"; config = lib.mkIf cfg.enable { + programs.zathura = { + enable = true; + package = pkgs.zathura.override { + plugins = with pkgs.zathuraPkgs; [ + zathura_pdf_mupdf + zathura_cb + ]; + }; + options = { + selection-clipboard = "clipboard"; + + incremental-search = true; + highlight-active-color = "#fabd2f"; + highlight-color = "#fe8019"; + + recolor = true; + recolor-keephue = true; + + default-bg = "#282828"; + default-fg = "#ebdbb2"; + recolor-lightcolor = "#282828"; + recolor-darkcolor = "#ebdbb2"; + + render-loading = false; + scroll-step = 50; + statusbar-h-padding = 10; + statusbar-v-padding = 10; + }; + + mappings = { + "u" = "scroll half-up"; + "d" = "scroll half-down"; + "D" = "toggle_page_mode"; + "r" = "reload"; + "R" = "rotate"; + "K" = "zoom in"; + "J" = "zoom out"; + "i" = "recolor"; + }; + }; home.packages = with pkgs; [ + nsxiv pinta ffmpeg imagemagick + exiftool + mediainfo + sox syncplay-nogui ]; }; diff --git a/hm/soft/obs.nix b/hm/soft/obs.nix index 29c82a4..8d968e4 100644 --- a/hm/soft/obs.nix +++ b/hm/soft/obs.nix @@ -2,10 +2,13 @@ config, lib, pkgs, + osConfig, ... }: let cfg = config.hm.soft.obs; + + obsPass = osConfig.sops.placeholdder."obs/websocket_password" or null; in { options.hm.soft.obs.enable = lib.mkEnableOption "enables obs video recording and clipping"; @@ -16,9 +19,11 @@ in obs-pipewire-audio-capture ]; }; + home.packages = [ pkgs.obs-cmd ]; - home.sessionVariables = { - OBS_WEBSOCKET_URL = "obsws://localhost:4455/3uE66N4j0bTv2W1M"; + + home.sessionVariables = lib.mkIf (obsPass != null) { + OBS_WEBSOCKET_URL = obsPass; }; }; } diff --git a/hm/soft/soft.nix b/hm/soft/soft.nix index 4372d3f..0d74669 100644 --- a/hm/soft/soft.nix +++ b/hm/soft/soft.nix @@ -2,7 +2,6 @@ { imports = [ ./browser.nix - ./easyeffects.nix ./email.nix ./kdenlive.nix ./mangohud.nix |
