Compare commits

..

5 Commits

Author SHA1 Message Date
Tom Alexander
1b34841921
Comment out specific version of gpg. 2025-01-01 18:43:29 -05:00
Tom Alexander
611904761e
Add kubernetes client. 2025-01-01 18:43:29 -05:00
Tom Alexander
f843b7924f
Add docker. 2025-01-01 18:29:27 -05:00
Tom Alexander
7bb7b89b82
Try a specific version of gpg. 2025-01-01 13:35:29 -05:00
Tom Alexander
c1103775b6
Keep 30 days of /nix. 2025-01-01 13:31:45 -05:00
4 changed files with 97 additions and 1 deletions

View File

@ -39,6 +39,8 @@
./roles/bsnes ./roles/bsnes
./roles/ssh ./roles/ssh
./roles/python ./roles/python
./roles/docker
./roles/kubernetes
]; ];
nix.settings.experimental-features = [ nix.settings.experimental-features = [
@ -92,7 +94,7 @@
# Runs nix-collect-garbage --delete-older-than 5d # Runs nix-collect-garbage --delete-older-than 5d
automatic = true; automatic = true;
randomizedDelaySec = "14m"; randomizedDelaySec = "14m";
options = "--delete-older-than 5d"; options = "--delete-older-than 30d";
}; };
# Use doas instead of sudo # Use doas instead of sudo

View File

@ -0,0 +1,39 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [ ];
virtualisation.docker.enable = true;
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
environment.persistence."/state" = lib.mkIf (!config.me.buildingIso) {
hideMounts = true;
directories = [
{
directory = "/var/lib/docker";
user = "root";
group = "root";
mode = "0740";
}
];
users.talexander = {
directories = [
{
directory = ".local/share/docker";
user = "talexander";
group = "talexander";
mode = "0740";
}
];
};
};
}

View File

@ -96,4 +96,16 @@
# }) # })
# ]; # ];
# nixpkgs.overlays = [
# (final: prev: {
# gnupg = prev.gnupg.overrideAttrs (old: rec {
# version = "2.4.7";
# src = prev.fetchurl {
# url = "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-${version}.tar.bz2";
# hash = "sha256-eyRwbk2n4OOwbKBoIxAnQB8jgQLEHJCWMTSdzDuF60Y=";
# };
# });
# })
# ];
} }

View File

@ -0,0 +1,43 @@
{
config,
lib,
pkgs,
...
}:
let
alias_kx = pkgs.writeShellScriptBin "kx" ''
exec ${pkgs.kubeswitch}/bin/switcher "''${@}"
'';
alias_ks = pkgs.writeShellScriptBin "ks" ''
exec ${pkgs.kubeswitch}/bin/switcher namespace "''${@}"
'';
alias_k = pkgs.writeShellScriptBin "k" ''
exec ${pkgs.kubectl}/bin/kubectl "''${@}"
'';
alias_ka = pkgs.writeShellScriptBin "ka" ''
exec ${pkgs.kubectl}/bin/kubectl "''${@}" --all-namespaces
'';
alias_kdel = pkgs.writeShellScriptBin "kdel" ''
exec ${pkgs.kubectl}/bin/kubectl delete --all "''${@}"
'';
alias_kd = pkgs.writeShellScriptBin "kd" ''
export KUBECTL_EXTERNAL_DIFF="${pkgs.colordiff}/bin/colordiff -N -u"
exec ${pkgs.kubectl}/bin/kubectl diff "''${@}"
'';
in
{
imports = [ ];
environment.systemPackages = with pkgs; [
kubectl
kubeswitch
stern
alias_kx
alias_ks
alias_k
alias_ka
alias_kdel
alias_kd
];
}