From 41b5142e7479ffe231e2933acf1d4344cb509913 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Tue, 12 Mar 2024 01:18:14 +0100 Subject: [PATCH] cleanup and git theme Signed-off-by: Harald Hoyer --- homes/x86_64-darwin/harald@mpro/default.nix | 1 + modules/darwin/suites/common/default.nix | 9 --- modules/darwin/suites/development/default.nix | 35 ----------- modules/darwin/tools/flake/default.nix | 18 ------ modules/darwin/tools/git/default.nix | 62 ------------------- modules/darwin/tools/java/default.nix | 17 ----- modules/darwin/tools/node/default.nix | 42 ------------- modules/darwin/tools/python/default.nix | 22 ------- .../home/cli-apps/home-manager/default.nix | 3 +- modules/home/tools/git/default.nix | 2 +- modules/nixos/tools/git/default.nix | 2 +- systems/x86_64-darwin/mpro/default.nix | 1 - 12 files changed, 4 insertions(+), 210 deletions(-) delete mode 100644 modules/darwin/suites/development/default.nix delete mode 100644 modules/darwin/tools/flake/default.nix delete mode 100644 modules/darwin/tools/git/default.nix delete mode 100644 modules/darwin/tools/java/default.nix delete mode 100644 modules/darwin/tools/node/default.nix delete mode 100644 modules/darwin/tools/python/default.nix diff --git a/homes/x86_64-darwin/harald@mpro/default.nix b/homes/x86_64-darwin/harald@mpro/default.nix index 9ed2669..3315022 100644 --- a/homes/x86_64-darwin/harald@mpro/default.nix +++ b/homes/x86_64-darwin/harald@mpro/default.nix @@ -25,6 +25,7 @@ direnv.enable = true; alacritty.enable = true; ssh.enable = true; + git.enable = true; }; }; } diff --git a/modules/darwin/suites/common/default.nix b/modules/darwin/suites/common/default.nix index 29230c0..ec00f79 100644 --- a/modules/darwin/suites/common/default.nix +++ b/modules/darwin/suites/common/default.nix @@ -16,15 +16,6 @@ in plusultra = { nix = enabled; - #cli-apps = { - # neovim = enabled; - #}; - - tools = { - git = enabled; - #flake = enabled; - }; - system = { fonts = enabled; #input = enabled; diff --git a/modules/darwin/suites/development/default.nix b/modules/darwin/suites/development/default.nix deleted file mode 100644 index 17b8779..0000000 --- a/modules/darwin/suites/development/default.nix +++ /dev/null @@ -1,35 +0,0 @@ -{ options, config, lib, pkgs, ... }: - -with lib; -with lib.plusultra; -let - cfg = config.plusultra.suites.development; -in -{ - options.plusultra.suites.development = with types; { - enable = mkBoolOpt false - "Whether or not to enable common development configuration."; - }; - - config = mkIf cfg.enable { - plusultra = { - #apps = { - # vscode = enabled; - #}; - - tools = { - # at = enabled; - # direnv = enabled; - # go = enabled; - # http = enabled; - # k8s = enabled; - # node = enabled; - # titan = enabled; - # python = enabled; - # java = enabled; - }; - - # virtualisation = { podman = enabled; }; - }; - }; -} diff --git a/modules/darwin/tools/flake/default.nix b/modules/darwin/tools/flake/default.nix deleted file mode 100644 index 9f50aee..0000000 --- a/modules/darwin/tools/flake/default.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ lib, config, pkgs, ... }: - -with lib; -with lib.plusultra; -let - cfg = config.plusultra.tools.flake; -in -{ - options.plusultra.tools.flake = { - enable = mkEnableOption "Flake"; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - snowfallorg.flake - ]; - }; -} diff --git a/modules/darwin/tools/git/default.nix b/modules/darwin/tools/git/default.nix deleted file mode 100644 index 8a2d8f1..0000000 --- a/modules/darwin/tools/git/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ options, config, pkgs, lib, ... }: - -with lib; -with lib.plusultra; -let - cfg = config.plusultra.tools.git; - gpg = config.plusultra.security.gpg; - user = config.plusultra.user; -in -{ - options.plusultra.tools.git = with types; { - enable = mkEnableOption "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 "7F3D64824AC0B6B8009E50504BC0896FB5693595" "The key ID to sign commits with."; - signByDefault = mkOpt types.bool false "Whether to sign commits by default."; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ git ]; - plusultra.home.extraOptions = { - programs.git = { - enable = true; - inherit (cfg) userName userEmail; - lfs = enabled; - signing = { - key = cfg.signingKey; - signByDefault = mkIf gpg.enable true; - }; - - extraConfig = { - init = { defaultBranch = "main"; }; - pull = { rebase = true; }; - push = { autoSetupRemote = true; }; - core = { whitespace = "trailing-space,space-before-tab"; }; - safe = { - directory = "${config.users.users.${user.name}.home}/git"; - }; - "credential \"https://github.com\"" = { - helper = "!gh auth git-credential"; - }; - alias = { - co = "checkout"; - ci = "commit --signoff"; - }; - pull.ff = "only"; - core.pager = "${pkgs.delta}/bin/delta"; - delta = { - features = "decorations"; - syntax-theme = "Dracula"; - light = "false"; - navigate = "true"; - }; - interactive.diffFilter = "${pkgs.delta}/bin/delta --color-only"; - merge.conflictStyle = "diff3"; - diff.colorMoved = "default"; - }; - }; - }; - }; -} diff --git a/modules/darwin/tools/java/default.nix b/modules/darwin/tools/java/default.nix deleted file mode 100644 index aa51095..0000000 --- a/modules/darwin/tools/java/default.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ options, config, lib, pkgs, ... }: - -with lib; -with lib.plusultra; -let cfg = config.plusultra.tools.java; -in -{ - options.plusultra.tools.java = with types; { - enable = mkBoolOpt false "Whether or not to enable Java."; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - jdk - ]; - }; -} diff --git a/modules/darwin/tools/node/default.nix b/modules/darwin/tools/node/default.nix deleted file mode 100644 index 9a70afd..0000000 --- a/modules/darwin/tools/node/default.nix +++ /dev/null @@ -1,42 +0,0 @@ -{ options -, config -, pkgs -, lib -, ... -}: -with lib; -with lib.plusultra; let - cfg = config.plusultra.tools.node; -in -{ - options.plusultra.tools.node = with types; { - enable = mkBoolOpt false "Whether or not to install and configure git"; - pkg = mkOpt package pkgs.nodejs "The NodeJS package to use"; - prettier = { - enable = mkBoolOpt true "Whether or not to install Prettier"; - pkg = - mkOpt package pkgs.nodePackages.prettier "The NodeJS package to use"; - }; - yarn = { - enable = mkBoolOpt true "Whether or not to install Yarn"; - pkg = mkOpt package pkgs.nodePackages.yarn "The NodeJS package to use"; - }; - pnpm = { - enable = mkBoolOpt true "Whether or not to install Pnpm"; - pkg = mkOpt package pkgs.nodePackages.pnpm "The NodeJS package to use"; - }; - flyctl = { - enable = mkBoolOpt true "Whether or not to install flyctl"; - pkg = mkOpt package pkgs.flyctl "The flyctl package to use"; - }; - }; - - config = mkIf cfg.enable { - environment.systemPackages = with pkgs; - [ cfg.pkg ] - ++ (lib.optional cfg.prettier.enable cfg.prettier.pkg) - ++ (lib.optional cfg.yarn.enable cfg.yarn.pkg) - ++ (lib.optional cfg.pnpm.enable cfg.pnpm.pkg) - ++ (lib.optional cfg.flyctl.enable cfg.flyctl.pkg); - }; -} diff --git a/modules/darwin/tools/python/default.nix b/modules/darwin/tools/python/default.nix deleted file mode 100644 index 34de5a8..0000000 --- a/modules/darwin/tools/python/default.nix +++ /dev/null @@ -1,22 +0,0 @@ -{ options, config, lib, pkgs, ... }: - -with lib; -with lib.plusultra; -let cfg = config.plusultra.tools.python; -in -{ - options.plusultra.tools.python = with types; { - enable = mkBoolOpt false "Whether or not to enable Python."; - }; - - config = - mkIf cfg.enable { - environment.systemPackages = with pkgs; [ - (python311.withPackages (ps: - with ps; [ - numpy - ]) - ) - ]; - }; -} diff --git a/modules/home/cli-apps/home-manager/default.nix b/modules/home/cli-apps/home-manager/default.nix index 27783ce..ab7ae34 100644 --- a/modules/home/cli-apps/home-manager/default.nix +++ b/modules/home/cli-apps/home-manager/default.nix @@ -18,13 +18,12 @@ in BATDIFF_USE_DELTA = "true"; }; -/* home.shellAliases = { cat = "${pkgs.bat}/bin/bat --decorations never"; less = ''${pkgs.bat}/bin/bat --decorations never --paging=always --pager "${pkgs.less}/bin/less -RF"''; man = "${pkgs.bat-extras.batman}/bin/batman"; }; -*/ + home.packages = with pkgs; [ vim ]; diff --git a/modules/home/tools/git/default.nix b/modules/home/tools/git/default.nix index 693487e..d275ab1 100644 --- a/modules/home/tools/git/default.nix +++ b/modules/home/tools/git/default.nix @@ -49,7 +49,7 @@ in core.pager = "${pkgs.delta}/bin/delta"; delta = { features = "decorations"; - syntax-theme = "Dracula"; + syntax-theme = "DarkNeon"; light = "false"; navigate = "true"; }; diff --git a/modules/nixos/tools/git/default.nix b/modules/nixos/tools/git/default.nix index a963f0d..7e01008 100644 --- a/modules/nixos/tools/git/default.nix +++ b/modules/nixos/tools/git/default.nix @@ -47,7 +47,7 @@ in core.pager = "${pkgs.delta}/bin/delta"; delta = { features = "decorations"; - syntax-theme = "Dracula"; + syntax-theme = "DarkNeon"; light = "false"; navigate = "true"; }; diff --git a/systems/x86_64-darwin/mpro/default.nix b/systems/x86_64-darwin/mpro/default.nix index 054a38e..f2a9844 100644 --- a/systems/x86_64-darwin/mpro/default.nix +++ b/systems/x86_64-darwin/mpro/default.nix @@ -5,7 +5,6 @@ with lib.plusultra; plusultra = { suites = { common = enabled; - development = enabled; }; };