refactor
Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
This commit is contained in:
parent
45d6f4b0f3
commit
1281c57892
191 changed files with 755 additions and 7893 deletions
|
@ -1,20 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
{ 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 ]; };
|
||||
}
|
|
@ -1,43 +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 = 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ 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 ]; };
|
||||
}
|
|
@ -1,16 +0,0 @@
|
|||
{ 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 ];
|
||||
};
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,15 +0,0 @@
|
|||
{ 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;
|
||||
};
|
||||
}
|
|
@ -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,21 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,25 +0,0 @@
|
|||
{ 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
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue