cleanup and git theme
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
		
							parent
							
								
									05e5d3bc39
								
							
						
					
					
						commit
						41b5142e74
					
				
					 12 changed files with 4 additions and 210 deletions
				
			
		| 
						 | 
				
			
			@ -25,6 +25,7 @@
 | 
			
		|||
      direnv.enable = true;
 | 
			
		||||
      alacritty.enable = true;
 | 
			
		||||
      ssh.enable = true;
 | 
			
		||||
      git.enable = true;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,15 +16,6 @@ in
 | 
			
		|||
    plusultra = {
 | 
			
		||||
      nix = enabled;
 | 
			
		||||
 | 
			
		||||
      #cli-apps = {
 | 
			
		||||
      #  neovim = enabled;
 | 
			
		||||
      #};
 | 
			
		||||
 | 
			
		||||
      tools = {
 | 
			
		||||
        git = enabled;
 | 
			
		||||
        #flake = enabled;
 | 
			
		||||
      };
 | 
			
		||||
 | 
			
		||||
      system = {
 | 
			
		||||
        fonts = enabled;
 | 
			
		||||
        #input = enabled;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -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; };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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";
 | 
			
		||||
        };
 | 
			
		||||
      };
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
    ];
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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);
 | 
			
		||||
  };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
          ])
 | 
			
		||||
        )
 | 
			
		||||
      ];
 | 
			
		||||
    };
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -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
 | 
			
		||||
    ];
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -49,7 +49,7 @@ in
 | 
			
		|||
        core.pager = "${pkgs.delta}/bin/delta";
 | 
			
		||||
        delta = {
 | 
			
		||||
          features = "decorations";
 | 
			
		||||
          syntax-theme = "Dracula";
 | 
			
		||||
          syntax-theme = "DarkNeon";
 | 
			
		||||
          light = "false";
 | 
			
		||||
          navigate = "true";
 | 
			
		||||
        };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -47,7 +47,7 @@ in
 | 
			
		|||
          core.pager = "${pkgs.delta}/bin/delta";
 | 
			
		||||
          delta = {
 | 
			
		||||
            features = "decorations";
 | 
			
		||||
            syntax-theme = "Dracula";
 | 
			
		||||
            syntax-theme = "DarkNeon";
 | 
			
		||||
            light = "false";
 | 
			
		||||
            navigate = "true";
 | 
			
		||||
          };
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -5,7 +5,6 @@ with lib.plusultra;
 | 
			
		|||
  plusultra = {
 | 
			
		||||
    suites = {
 | 
			
		||||
      common = enabled;
 | 
			
		||||
      development = enabled;
 | 
			
		||||
    };
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue