This commit is contained in:
Harald Hoyer 2024-01-11 10:26:46 +00:00
parent 66c05f9093
commit 45d6f4b0f3
205 changed files with 9040 additions and 342 deletions

View file

@ -0,0 +1,20 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.appimage-run;
in
{
options.plusultra.tools.appimage-run = with types; {
enable = mkBoolOpt false "Whether or not to enable appimage-run.";
};
config = mkIf cfg.enable {
plusultra.home.configFile."wgetrc".text = "";
environment.systemPackages = with pkgs; [
appimage-run
];
};
}

View file

@ -0,0 +1,19 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.at;
in
{
options.plusultra.tools.at = with types; {
enable = mkBoolOpt false "Whether or not to install at.";
pkg = mkOpt package pkgs.plusultra.at "The package to install as at.";
};
config = mkIf cfg.enable {
environment.systemPackages = [
cfg.pkg
];
};
}

View file

@ -0,0 +1,18 @@
{ config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.attic;
in
{
options.plusultra.tools.attic = {
enable = mkEnableOption "Attic";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
attic
];
};
}

View file

@ -0,0 +1,18 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.bottom;
in
{
options.plusultra.tools.bottom = with types; {
enable = mkBoolOpt false "Whether or not to enable Bottom.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
bottom
];
};
}

View file

@ -0,0 +1,29 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.comma;
in
{
options.plusultra.tools.comma = with types; {
enable = mkBoolOpt false "Whether or not to enable comma.";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
comma
plusultra.nix-update-index
];
plusultra.home = {
configFile = {
"wgetrc".text = "";
};
extraOptions = {
programs.nix-index.enable = true;
};
};
};
}

View file

@ -0,0 +1,20 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.direnv;
in
{
options.plusultra.tools.direnv = with types; {
enable = mkBoolOpt false "Whether or not to enable direnv.";
};
config = mkIf cfg.enable {
plusultra.home.extraOptions = {
programs.direnv = {
enable = true;
nix-direnv = enabled;
};
};
};
}

View file

@ -0,0 +1,17 @@
{ lib, pkgs, config, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.fup-repl;
fup-repl = pkgs.writeShellScriptBin "fup-repl" ''
${pkgs.fup-repl}/bin/repl ''${@}
'';
in
{
options.plusultra.tools.fup-repl = with types; {
enable = mkBoolOpt false "Whether to enable fup-repl or not";
};
config = mkIf cfg.enable { environment.systemPackages = [ fup-repl ]; };
}

View file

@ -0,0 +1,43 @@
{ 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 = 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 "9762169A1B35EA68" "The key ID to sign commits with.";
};
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}/work/config";
};
};
};
};
};
}

View file

@ -0,0 +1,21 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.go;
in
{
options.plusultra.tools.go = with types; {
enable = mkBoolOpt false "Whether or not to enable Go support.";
};
config = mkIf cfg.enable {
environment = {
systemPackages = with pkgs; [ go gopls ];
sessionVariables = {
GOPATH = "$HOME/work/go";
};
};
};
}

View file

@ -0,0 +1,14 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.http;
in
{
options.plusultra.tools.http = with types; {
enable = mkBoolOpt false "Whether or not to enable common http utilities.";
};
config =
mkIf cfg.enable { environment.systemPackages = with pkgs; [ wget curl ]; };
}

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
let
cfg = config.plusultra.tools.icehouse;
inherit (lib) mkEnableOption mkIf;
in
{
options.plusultra.tools.icehouse = {
enable = mkEnableOption "Icehouse";
};
config = mkIf cfg.enable {
environment.systemPackages = [ pkgs.snowfallorg.icehouse ];
};
}

View file

@ -0,0 +1,31 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.k8s;
in
{
options.plusultra.tools.k8s = with types; {
enable =
mkBoolOpt false "Whether or not to enable common Kubernetes utilities.";
};
config = mkIf cfg.enable {
programs.zsh.shellAliases = {
k = "kubecolor";
kubectl = "kubecolor";
kc = "kubectx";
kn = "kubens";
ks = "kubeseal";
};
environment.systemPackages = with pkgs; [
kubectl
kubectx
kubeseal
kubecolor
kubernetes-helm
helmfile
];
};
}

View file

@ -0,0 +1,25 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.misc;
in
{
options.plusultra.tools.misc = with types; {
enable = mkBoolOpt false "Whether or not to enable common utilities.";
};
config = mkIf cfg.enable {
plusultra.home.configFile."wgetrc".text = "";
environment.systemPackages = with pkgs; [
fzf
killall
unzip
file
jq
clac
wget
];
};
}

View file

@ -0,0 +1,15 @@
{ options, config, lib, pkgs, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.nix-ld;
in
{
options.plusultra.tools.nix-ld = with types; {
enable = mkBoolOpt false "Whether or not to enable nix-ld.";
};
config = mkIf cfg.enable {
programs.nix-ld.enable = true;
};
}

View file

@ -0,0 +1,42 @@
{ 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);
};
}

View file

@ -0,0 +1,21 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let cfg = config.plusultra.tools.qmk;
in
{
options.plusultra.tools.qmk = with types; {
enable = mkBoolOpt false "Whether or not to enable QMK";
};
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [
qmk
];
services.udev.packages = with pkgs; [
qmk-udev-rules
];
};
}

View file

@ -0,0 +1,25 @@
{ options, config, pkgs, lib, ... }:
with lib;
with lib.plusultra;
let
cfg = config.plusultra.tools.titan;
in
{
options.plusultra.tools.titan = with types; {
enable = mkBoolOpt false "Whether or not to install Titan.";
pkg = mkOpt package pkgs.plusultra.titan "The package to install as Titan.";
};
config = mkIf cfg.enable {
plusultra.tools = {
# Titan depends on Node and Git
node = enabled;
git = enabled;
};
environment.systemPackages = [
cfg.pkg
];
};
}