diff --git a/nix/homes/x86_64-linux/sab@nz/default.nix b/nix/homes/x86_64-linux/sab@nz/default.nix index 4c1683a..26288a0 100644 --- a/nix/homes/x86_64-linux/sab@nz/default.nix +++ b/nix/homes/x86_64-linux/sab@nz/default.nix @@ -30,7 +30,14 @@ with lib.custom; { }; cli-apps = { + atuin = enabled; + yazi = enabled; home-manager = enabled; }; + tools = { + gh = enabled; + git = enabled; + direnv = disabled; + }; }; } diff --git a/nix/modules/nixos/cli-apps/atuin/default.nix b/nix/modules/nixos/cli-apps/atuin/default.nix deleted file mode 100644 index fbff256..0000000 --- a/nix/modules/nixos/cli-apps/atuin/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - lib, - config, - pkgs, - ... -}: -with lib; -with lib.custom; let - cfg = config.custom.cli-apps.atuin; -in { - options.custom.cli-apps.atuin = { - enable = mkEnableOption "atuin"; - }; - - config = mkIf cfg.enable { - home.programs.atuin = { - enable = true; - # Does not work right now, injecting via fish - enableBashIntegration = true; - enableFishIntegration = true; - enableZshIntegration = true; - }; - }; -} diff --git a/nix/modules/nixos/cli-apps/yazi/configs/keymap.toml b/nix/modules/nixos/cli-apps/yazi/configs/keymap.toml deleted file mode 100644 index fac24e9..0000000 --- a/nix/modules/nixos/cli-apps/yazi/configs/keymap.toml +++ /dev/null @@ -1,238 +0,0 @@ -[manager] - -keymap = [ - { on = [ "" ], exec = "escape", desc = "Exit visual mode, clear selected, or cancel search" }, - { on = [ "" ], exec = "quit", desc = "Exit the process" }, - { on = [ "q" ], exec = "quit", desc = "Exit the process" }, - { on = [ "Q" ], exec = "quit --no-cwd-file", desc = "Exit the process without writing cwd-file" }, - { on = [ "" ], exec = "close", desc = "Close the current tab, or quit if it is last tab" }, - { on = [ "" ], exec = "suspend", desc = "Suspend the process" }, - - # Navigation - { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, - { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, - { on = [ "" ], exec = "arrow -50%", desc = "Move cursor up half page" }, - { on = [ "" ], exec = "arrow 50%", desc = "Move cursor down half page" }, - { on = [ "" ], exec = "arrow -100%", desc = "Move cursor up one page" }, - { on = [ "" ], exec = "arrow 100%", desc = "Move cursor down one page" }, - - { on = [ "" ], exec = "arrow -50%", desc = "Move cursor up half page" }, - { on = [ "" ], exec = "arrow 50%", desc = "Move cursor down half page" }, - { on = [ "" ], exec = "arrow -100%", desc = "Move cursor up one page" }, - { on = [ "" ], exec = "arrow 100%", desc = "Move cursor down one page" }, - - { on = [ "h" ], exec = "leave", desc = "Go back to the parent directory" }, - { on = [ "l" ], exec = "enter", desc = "Enter the child directory" }, - - { on = [ "H" ], exec = "back", desc = "Go back to the previous directory" }, - { on = [ "L" ], exec = "forward", desc = "Go forward to the next directory" }, - - { on = [ "" ], exec = "peek -5", desc = "Peek up 5 units in the preview" }, - { on = [ "" ], exec = "peek 5", desc = "Peek down 5 units in the preview" }, - - { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, - { on = [ "" ], exec = "leave", desc = "Go back to the parent directory" }, - { on = [ "" ], exec = "enter", desc = "Enter the child directory" }, - - { on = [ "g", "g" ], exec = "arrow -99999999", desc = "Move cursor to the top" }, - { on = [ "G" ], exec = "arrow 99999999", desc = "Move cursor to the bottom" }, - - # Selection - { on = [ "" ], exec = [ "select --state=none", "arrow 1" ], desc = "Toggle the current selection state" }, - { on = [ "v" ], exec = "visual_mode", desc = "Enter visual mode (selection mode)" }, - { on = [ "V" ], exec = "visual_mode --unset", desc = "Enter visual mode (unset mode)" }, - { on = [ "" ], exec = "select_all --state=true", desc = "Select all files" }, - { on = [ "" ], exec = "select_all --state=none", desc = "Inverse selection of all files" }, - - # Operation - { on = [ "o" ], exec = "open", desc = "Open the selected files" }, - { on = [ "O" ], exec = "open --interactive", desc = "Open the selected files interactively" }, - { on = [ "" ], exec = "open", desc = "Open the selected files" }, - { on = [ "" ], exec = "open --interactive", desc = "Open the selected files interactively" }, # It's cool if you're using a terminal that supports CSI u - { on = [ "y" ], exec = "yank", desc = "Copy the selected files" }, - { on = [ "x" ], exec = "yank --cut", desc = "Cut the selected files" }, - { on = [ "p" ], exec = "paste", desc = "Paste the files" }, - { on = [ "P" ], exec = "paste --force", desc = "Paste the files (overwrite if the destination exists)" }, - { on = [ "-" ], exec = "link", desc = "Symlink the absolute path of files" }, - { on = [ "_" ], exec = "link --relative", desc = "Symlink the relative path of files" }, - { on = [ "d" ], exec = "remove", desc = "Move the files to the trash" }, - { on = [ "D" ], exec = "remove --permanently", desc = "Permanently delete the files" }, - { on = [ "a" ], exec = "create", desc = "Create a file or directory (ends with / for directories)" }, - { on = [ "r" ], exec = "rename", desc = "Rename a file or directory" }, - { on = [ "," ], exec = "shell", desc = "Run a shell command" }, - { on = [ ":" ], exec = "shell --block", desc = "Run a shell command (block the UI until the command finishes)" }, - { on = [ "." ], exec = "hidden toggle", desc = "Toggle the visibility of hidden files" }, - { on = [ "s" ], exec = "search fd", desc = "Search files by name using fd" }, - { on = [ "S" ], exec = "search rg", desc = "Search files by content using ripgrep" }, - { on = [ "" ], exec = "search none", desc = "Cancel the ongoing search" }, - { on = [ "z" ], exec = "jump zoxide", desc = "Jump to a directory using zoxide" }, - { on = [ "Z" ], exec = "jump fzf", desc = "Jump to a directory, or reveal a file using fzf" }, - - # Copy - { on = [ "c", "c" ], exec = "copy path", desc = "Copy the absolute path" }, - { on = [ "c", "d" ], exec = "copy dirname", desc = "Copy the path of the parent directory" }, - { on = [ "c", "f" ], exec = "copy filename", desc = "Copy the name of the file" }, - { on = [ "c", "n" ], exec = "copy name_without_ext", desc = "Copy the name of the file without the extension" }, - - # Find - { on = [ "/" ], exec = "find --smart" }, - { on = [ "?" ], exec = "find --previous --smart" }, - { on = [ "n" ], exec = "find_arrow" }, - { on = [ "N" ], exec = "find_arrow --previous" }, - - # Sorting - { on = [ ",", "a" ], exec = "sort alphabetical --dir_first", desc = "Sort alphabetically" }, - { on = [ ",", "A" ], exec = "sort alphabetical --reverse --dir_first", desc = "Sort alphabetically (reverse)" }, - { on = [ ",", "c" ], exec = "sort created --dir_first", desc = "Sort by creation time" }, - { on = [ ",", "C" ], exec = "sort created --reverse --dir_first", desc = "Sort by creation time (reverse)" }, - { on = [ ",", "m" ], exec = "sort modified --dir_first", desc = "Sort by modified time" }, - { on = [ ",", "M" ], exec = "sort modified --reverse --dir_first", desc = "Sort by modified time (reverse)" }, - { on = [ ",", "n" ], exec = "sort natural --dir_first", desc = "Sort naturally" }, - { on = [ ",", "N" ], exec = "sort natural --reverse --dir_first", desc = "Sort naturally (reverse)" }, - { on = [ ",", "s" ], exec = "sort size --dir_first", desc = "Sort by size" }, - { on = [ ",", "S" ], exec = "sort size --reverse --dir_first", desc = "Sort by size (reverse)" }, - - # Tabs - { on = [ "t" ], exec = "tab_create --current", desc = "Create a new tab using the current path" }, - - { on = [ "1" ], exec = "tab_switch 0", desc = "Switch to the first tab" }, - { on = [ "2" ], exec = "tab_switch 1", desc = "Switch to the second tab" }, - { on = [ "3" ], exec = "tab_switch 2", desc = "Switch to the third tab" }, - { on = [ "4" ], exec = "tab_switch 3", desc = "Switch to the fourth tab" }, - { on = [ "5" ], exec = "tab_switch 4", desc = "Switch to the fifth tab" }, - { on = [ "6" ], exec = "tab_switch 5", desc = "Switch to the sixth tab" }, - { on = [ "7" ], exec = "tab_switch 6", desc = "Switch to the seventh tab" }, - { on = [ "8" ], exec = "tab_switch 7", desc = "Switch to the eighth tab" }, - { on = [ "9" ], exec = "tab_switch 8", desc = "Switch to the ninth tab" }, - - { on = [ "[" ], exec = "tab_switch -1 --relative", desc = "Switch to the previous tab" }, - { on = [ "]" ], exec = "tab_switch 1 --relative", desc = "Switch to the next tab" }, - - { on = [ "{" ], exec = "tab_swap -1", desc = "Swap the current tab with the previous tab" }, - { on = [ "}" ], exec = "tab_swap 1", desc = "Swap the current tab with the next tab" }, - - # Tasks - { on = [ "w" ], exec = "tasks_show", desc = "Show the tasks manager" }, - - # Goto - { on = [ "g", "h" ], exec = "cd ~", desc = "Go to the home directory" }, - { on = [ "g","d" ], exec = "cd ~/dotfiles", desc = "Go to the dotfiles directory" }, - { on = [ "g","n" ], exec = "cd ~/dotfiles/nix", desc = "Go to the nix directory" }, - { on = [ "g","c" ], exec = "cd ~/.config/", desc = "Go to the .config directory" }, - - # Help - { on = [ "~" ], exec = "help", desc = "Open help" }, -] - -[tasks] - -keymap = [ - { on = [ "" ], exec = "close", desc = "Hide the task manager" }, - { on = [ "" ], exec = "close", desc = "Hide the task manager" }, - { on = [ "w" ], exec = "close", desc = "Hide the task manager" }, - - { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "" ], exec = "inspect", desc = "Inspect the task" }, - { on = [ "x" ], exec = "cancel", desc = "Cancel the task" }, - - { on = [ "~" ], exec = "help", desc = "Open help" } -] - -[select] - -keymap = [ - { on = [ "" ], exec = "close", desc = "Cancel selection" }, - { on = [ "" ], exec = "close", desc = "Cancel selection" }, - { on = [ "" ], exec = "close --submit", desc = "Submit the selection" }, - - { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, - { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, - - { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "~" ], exec = "help", desc = "Open help" } -] - -[input] - -keymap = [ - { on = [ "" ], exec = "close", desc = "Cancel input" }, - { on = [ "" ], exec = "close --submit", desc = "Submit the input" }, - { on = [ "" ], exec = "escape", desc = "Go back the normal mode, or cancel input" }, - { on = [ "" ], exec = "backspace" }, - - # Mode - { on = [ "i" ], exec = "insert", desc = "Enter insert mode" }, - { on = [ "a" ], exec = "insert --append", desc = "Enter append mode" }, - { on = [ "v" ], exec = "visual", desc = "Enter visual mode" }, - { on = [ "V" ], exec = [ "move -999", "visual", "move 999" ], desc = "Enter visual mode and select all" }, - - # Navigation - { on = [ "h" ], exec = "move -1", desc = "Move cursor left" }, - { on = [ "l" ], exec = "move 1", desc = "Move cursor right" }, - - { on = [ "0" ], exec = "move -999", desc = "Move to the BOL" }, - { on = [ "$" ], exec = "move 999", desc = "Move to the EOL" }, - { on = [ "I" ], exec = [ "move -999", "insert" ], desc = "Move to the BOL, and enter insert mode" }, - { on = [ "A" ], exec = [ "move 999", "insert --append" ], desc = "Move to the EOL, and enter append mode" }, - - { on = [ "" ], exec = "move -1", desc = "Move cursor left" }, - { on = [ "" ], exec = "move 1", desc = "Move cursor right" }, - - { on = [ "b" ], exec = "backward", desc = "Move to the beginning of the previous word" }, - { on = [ "w" ], exec = "forward", desc = "Move to the beginning of the next word" }, - { on = [ "e" ], exec = "forward --end-of-word", desc = "Move to the end of the next word" }, - - # Deletion - { on = [ "d" ], exec = "delete --cut", desc = "Cut the selected characters" }, - { on = [ "D" ], exec = [ "delete --cut", "move 999" ], desc = "Cut until the EOL" }, - { on = [ "c" ], exec = "delete --cut --insert", desc = "Cut the selected characters, and enter insert mode" }, - { on = [ "C" ], exec = [ "delete --cut --insert", "move 999" ], desc = "Cut until the EOL, and enter insert mode" }, - { on = [ "x" ], exec = [ "delete --cut", "move 1 --in-operating" ], desc = "Cut the current character" }, - - # Yank/Paste - { on = [ "y" ], exec = "yank", desc = "Copy the selected characters" }, - { on = [ "p" ], exec = "paste", desc = "Paste the copied characters after the cursor" }, - { on = [ "P" ], exec = "paste --before", desc = "Paste the copied characters before the cursor" }, - - # Undo/Redo - { on = [ "u" ], exec = "undo", desc = "Undo the last operation" }, - { on = [ "" ], exec = "redo", desc = "Redo the last operation" }, - - # Help - { on = [ "~" ], exec = "help", desc = "Open help" } -] - -[help] - -keymap = [ - { on = [ "" ], exec = "escape", desc = "Clear the filter, or hide the help" }, - { on = [ "q" ], exec = "close", desc = "Exit the process" }, - { on = [ "" ], exec = "close", desc = "Hide the help" }, - - # Navigation - { on = [ "k" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "j" ], exec = "arrow 1", desc = "Move cursor down" }, - - { on = [ "K" ], exec = "arrow -5", desc = "Move cursor up 5 lines" }, - { on = [ "J" ], exec = "arrow 5", desc = "Move cursor down 5 lines" }, - - { on = [ "" ], exec = "arrow -1", desc = "Move cursor up" }, - { on = [ "" ], exec = "arrow 1", desc = "Move cursor down" }, - - # Filtering - { on = [ "/" ], exec = "filter", desc = "Apply a filter for the help items" }, -] diff --git a/nix/modules/nixos/cli-apps/yazi/configs/theme.toml b/nix/modules/nixos/cli-apps/yazi/configs/theme.toml deleted file mode 100644 index 22e0f8f..0000000 --- a/nix/modules/nixos/cli-apps/yazi/configs/theme.toml +++ /dev/null @@ -1,105 +0,0 @@ -[manager] -cwd = { fg = "#cad3f5" } - -# Hovered -hovered = { fg = "#24273a", bg = "#8aadf4" } -preview_hovered = { underline = true } - -# Find -find_keyword = { fg = "#eed49f", italic = true } -find_position = { fg = "#f5bde6", bg = "reset", italic = true } - -# Marker -marker_selected = { fg = "#a6da95", bg = "#a6da95" } -marker_copied = { fg = "#eed49f", bg = "#eed49f" } -marker_cut = { fg = "#ed8796", bg = "#ed8796" } - -# Tab -tab_active = { fg = "#24273a", bg = "#8aadf4" } -tab_inactive = { fg = "#cad3f5", bg = "#494d64" } -tab_width = 1 - -# Border -border_symbol = "│" -border_style = { fg = "#8aadf4" } - -# Highlighting -syntect_theme = "~/.config/bat/themes/catppuccin-macchiato.tmTheme" - -[status] -separator_open = "" -separator_close = "" -separator_style = { fg = "#494d64", bg = "#494d64" } - -# Mode -mode_normal = { fg = "#24273a", bg = "#8aadf4", bold = true } -mode_select = { fg = "#24273a", bg = "#a6da95", bold = true } -mode_unset = { fg = "#24273a", bg = "#f0c6c6", bold = true } - -# Progress -progress_label = { fg = "#ffffff", bold = true } -progress_normal = { fg = "#8aadf4", bg = "#494d64" } -progress_error = { fg = "#ed8796", bg = "#494d64" } - -# Permissions -permissions_t = { fg = "#8aadf4" } -permissions_r = { fg = "#eed49f" } -permissions_w = { fg = "#ed8796" } -permissions_x = { fg = "#a6da95" } -permissions_s = { fg = "#8087a2" } - - -[input] -border = { fg = "#8aadf4" } -title = {} -value = {} -selected = { reversed = true } - -[select] -border = { fg = "#8aadf4" } -active = { fg = "#f5bde6" } -inactive = {} - -[tasks] -border = { fg = "#8aadf4" } -title = {} -hovered = { underline = true } - -[which] -mask = { bg = "#363a4f" } -cand = { fg = "#8bd5ca" } -rest = { fg = "#939ab7" } -desc = { fg = "#f5bde6" } -separator = "  " -separator_style = { fg = "#5b6078" } - -[help] -on = { fg = "#f5bde6" } -exec = { fg = "#8bd5ca" } -desc = { fg = "#939ab7" } -hovered = { bg = "#5b6078", bold = true } -footer = { fg = "#494d64", bg = "#cad3f5" } - -[filetype] - -rules = [ - # Images - { mime = "image/*", fg = "#8bd5ca" }, - - # Videos - { mime = "video/*", fg = "#eed49f" }, - { mime = "audio/*", fg = "#eed49f" }, - - # Archives - { mime = "application/zip", fg = "#f5bde6" }, - { mime = "application/gzip", fg = "#f5bde6" }, - { mime = "application/x-tar", fg = "#f5bde6" }, - { mime = "application/x-bzip", fg = "#f5bde6" }, - { mime = "application/x-bzip2", fg = "#f5bde6" }, - { mime = "application/x-7z-compressed", fg = "#f5bde6" }, - { mime = "application/x-rar", fg = "#f5bde6" }, - - # Fallback - { name = "*", fg = "#cad3f5" }, - { name = "*/", fg = "#8aadf4" }, -] diff --git a/nix/modules/nixos/cli-apps/yazi/default.nix b/nix/modules/nixos/cli-apps/yazi/default.nix deleted file mode 100644 index db91a90..0000000 --- a/nix/modules/nixos/cli-apps/yazi/default.nix +++ /dev/null @@ -1,50 +0,0 @@ -{ - config, - lib, - options, - pkgs, - ... -}: -with lib; -with lib.custom; let - cfg = config.custom.cli-apps.yazi; -in { - options.custom.cli-apps.yazi = { - enable = mkEnableOption "Yazi Terminal File manager"; - }; - - config = mkIf cfg.enable { - home.programs.yazi = { - enable = true; - package = pkgs.yazi; - - enableBashIntegration = true; - enableFishIntegration = true; - enableNushellIntegration = true; - enableZshIntegration = true; - - settings = { - manager = { - layout = [1 3 4]; - linemode = "size"; - show_hidden = false; - show_symlink = true; - sort_by = "alphabetical"; - sort_dir_first = true; - sort_reverse = false; - sort_sensitive = false; - }; - }; - }; - - home.configFile = { - "yazi" = { - source = lib.cleanSourceWith { - src = lib.cleanSource ./configs/.; - }; - - recursive = true; - }; - }; - }; -} diff --git a/nix/modules/nixos/suites/common/default.nix b/nix/modules/nixos/suites/common/default.nix index f6963b8..0721d36 100644 --- a/nix/modules/nixos/suites/common/default.nix +++ b/nix/modules/nixos/suites/common/default.nix @@ -37,18 +37,14 @@ in { environment.systemPackages = [pkgs.custom.sys]; custom.tools = { - git.enable = true; - gh.enable = true; http.enable = true; misc.enable = true; net.enable = true; }; custom.cli-apps = { - atuin.enable = lib.mkDefault true; neovim.enable = lib.mkDefault true; lf.enable = lib.mkDefault false; tmux.enable = lib.mkDefault true; - yazi.enable = lib.mkDefault false; }; }; } diff --git a/nix/modules/nixos/system/nix/default.nix b/nix/modules/nixos/system/nix/default.nix index 5dcd2ed..33ae4fe 100644 --- a/nix/modules/nixos/system/nix/default.nix +++ b/nix/modules/nixos/system/nix/default.nix @@ -33,31 +33,26 @@ in { in { inherit (cfg) package; - settings = - { - experimental-features = "nix-command flakes"; - http-connections = 50; - warn-dirty = false; - log-lines = 50; - sandbox = "relaxed"; - auto-optimise-store = true; - trusted-users = users; - allowed-users = users; - } - // (lib.optionalAttrs config.custom.tools.direnv.enable { - keep-outputs = true; - keep-derivations = true; - substituters = [ - "https://cache.nixos.org" - "https://nix-community.cachix.org" - "https://hyprland.cachix.org" - ]; - trusted-public-keys = [ - "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" - "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" - "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" - ]; - }); + settings = { + experimental-features = "nix-command flakes"; + http-connections = 50; + warn-dirty = false; + log-lines = 50; + sandbox = "relaxed"; + auto-optimise-store = true; + trusted-users = users; + allowed-users = users; + substituters = [ + "https://cache.nixos.org" + "https://nix-community.cachix.org" + "https://hyprland.cachix.org" + ]; + trusted-public-keys = [ + "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" + "nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=" + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + ]; + }; gc = { automatic = true; diff --git a/nix/modules/nixos/tools/direnv/default.nix b/nix/modules/nixos/tools/direnv/default.nix deleted file mode 100644 index fda7a6f..0000000 --- a/nix/modules/nixos/tools/direnv/default.nix +++ /dev/null @@ -1,24 +0,0 @@ -{ - options, - config, - lib, - pkgs, - ... -}: -with lib; -with lib.custom; let - cfg = config.custom.tools.direnv; -in { - options.custom.tools.direnv = with types; { - enable = mkBoolOpt false "Whether or not to enable direnv."; - }; - - config = mkIf cfg.enable { - home.extraOptions = { - programs.direnv = { - enable = true; - nix-direnv = enabled; - }; - }; - }; -} diff --git a/nix/modules/nixos/tools/gh/default.nix b/nix/modules/nixos/tools/gh/default.nix deleted file mode 100644 index 92cf94e..0000000 --- a/nix/modules/nixos/tools/gh/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - options, - config, - pkgs, - lib, - ... -}: -with lib; -with lib.custom; let - cfg = config.custom.tools.gh; -in { - options.custom.tools.gh = with types; { - enable = mkBoolOpt false "Whether or not to install and configure gh."; - }; - - config = mkIf cfg.enable { - home.extraOptions = { - programs.gh = { - enable = true; - }; - }; - }; -} diff --git a/nix/modules/nixos/tools/git/default.nix b/nix/modules/nixos/tools/git/default.nix deleted file mode 100644 index b2c3bfb..0000000 --- a/nix/modules/nixos/tools/git/default.nix +++ /dev/null @@ -1,73 +0,0 @@ -{ - options, - config, - pkgs, - lib, - ... -}: -with lib; -with lib.custom; let - cfg = config.custom.tools.git; - gpg = config.system.security.gpg; - user = config.custom.user; -in { - options.custom.tools.git = with types; { - enable = mkBoolOpt false "Whether or not to install and configure git."; - userName = mkOpt types.str user.fullName "The name to configure git with."; - userEmail = mkOpt types.str user.email "The email to configure git with."; - signingKey = - mkOpt types.str "7C43420F61CEC7FB" "The key ID to sign commits with."; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [git]; - - home.extraOptions = { - programs.git = { - enable = true; - inherit (cfg) userName userEmail; - lfs = enabled; - signing = { - key = cfg.signingKey; - signByDefault = mkIf gpg.enable true; - }; - extraConfig = { - init = { - defaultBranch = "master"; - templatedir = "~/.git_template"; - whitespace = "trailing-space,space-before-tab"; - }; - core = { - pager = "bat"; - }; - pull = {rebase = true;}; - push = {autoSetupRemote = true;}; - safe = { - directory = "${config.users.users.${user.name}.home}/work/config"; - }; - merge = { - tool = "nvimdiff"; - conflictstyle = "diff3"; - }; - diff = { - tool = "nvimdiff"; - }; - difftool = { - prompt = false; - }; - mergetool = { - prompt = false; - }; - alias = { - st = "status -sb"; - lga = "log --oneline --all --decorate --graph --color"; - lg = "log --pretty=lg"; - glg = "log --graph --pretty=lg"; - slg = "stash list --pretty=reflg"; - hist = "log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short"; - }; - }; - }; - }; - }; -} diff --git a/nix/systems/x86_64-linux/nz/default.nix b/nix/systems/x86_64-linux/nz/default.nix index f5b9c11..24ab81c 100644 --- a/nix/systems/x86_64-linux/nz/default.nix +++ b/nix/systems/x86_64-linux/nz/default.nix @@ -11,14 +11,11 @@ # # Any particular packages only for this host # ]; + # Suites managed by nix, see suites by home-manager in homes suites.common.enable = true; # Enables the basics, like audio, networking, ssh, etc. suites.desktop.enable = true; suites.develop.enable = true; - custom.cli-apps = { - yazi.enable = true; - }; - custom.virtualisation = { virt-manager.enable = true; kvm.enable = false;