Add more sas tooling
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -31,6 +31,7 @@ in
|
||||
feature.manyFiles = true;
|
||||
fetch.writeCommitGraph = true;
|
||||
http.cookiefile = "${home}/.config/git/cookies";
|
||||
advice.detachedHead = false;
|
||||
};
|
||||
|
||||
hooks = {
|
||||
|
@@ -9,5 +9,12 @@ pkgs.buildGoModule rec {
|
||||
rev = "17629fe278dd23e12bd6f17ee9db0d2fde37bc6c";
|
||||
};
|
||||
|
||||
vendorHash = "";
|
||||
patches = [ ./remove-version-flag.patch ];
|
||||
|
||||
preBuild = ''
|
||||
export GOPROXY="goproxy.unx.sas.com"
|
||||
export GONOSUMDB="*.sas.com,sassoftware.io"
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-nYlJhGe1Jd3/ct0XpTdMqbgnnoYM0dqVVVfr9nVsu4o=";
|
||||
}
|
||||
|
@@ -0,0 +1,33 @@
|
||||
diff --git a/main.go b/main.go
|
||||
index 6fee5d3..a8d45dd 100644
|
||||
--- a/main.go
|
||||
+++ b/main.go
|
||||
@@ -5,7 +5,6 @@ import (
|
||||
"flag"
|
||||
"fmt"
|
||||
"os"
|
||||
- "runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -27,20 +26,8 @@ func main() {
|
||||
flag.StringVar(&f, "format", "term", "Log output format (one of json|pretty|yaml|line|file|term|logfmt|plain|message|template)")
|
||||
flag.StringVar(&ml, "l", "trace", "Minimum log level to output (in order, one of trace|debug|info|warn|error|fatal|panic|none|disabled)")
|
||||
flag.StringVar(&tz, "t", defaultTimeZone, "Timezone to use for formatting log timestamps - One of UTC, Local, or from https://en.wikipedia.org/wiki/List_of_tz_database_time_zones")
|
||||
- var ver bool
|
||||
- flag.BoolVar(&ver, "version", false, "Show version information")
|
||||
flag.Parse()
|
||||
|
||||
- if ver {
|
||||
- fmt.Printf("Copyright © 2021, SAS Institute Inc., Cary, NC, USA. All Rights Reserved.\n"+
|
||||
- "Command - %s\n"+
|
||||
- "Version - %s+%s\n"+
|
||||
- "Build Date - %s\n"+
|
||||
- "Compiler - %s %s/%s\n",
|
||||
- "klog", BuildVersion, BuildCommit, BuildDate, runtime.Version(), runtime.GOOS, runtime.GOARCH)
|
||||
- os.Exit(0)
|
||||
- }
|
||||
-
|
||||
lf, ok := log.Formatters[f]
|
||||
if !ok {
|
||||
fmt.Fprintf(os.Stderr, "invalid value for format: [%s] - must be one of json|pretty|yaml|line|file|term|logfmt|plain|message|template", f)
|
@@ -2,9 +2,26 @@
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [
|
||||
(final: prev: {
|
||||
telepresence = prev.telepresence.overrideAttrs (oldAttrs: {
|
||||
patches = oldAttrs.patches or [ ] ++ [
|
||||
./fix-versioneer.patch
|
||||
./extend-timeout.patch
|
||||
];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
home-manager.users.${user} = {
|
||||
home.packages = with pkgs; [
|
||||
telepresence
|
||||
kubeval
|
||||
kustomize
|
||||
];
|
||||
|
||||
sops.secrets = {
|
||||
"kubeconfig/d90270" = {
|
||||
sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
|
@@ -0,0 +1,13 @@
|
||||
diff --git a/telepresence/proxy/remote.py b/telepresence/proxy/remote.py
|
||||
index 835d42054..d910bd03f 100644
|
||||
--- a/telepresence/proxy/remote.py
|
||||
+++ b/telepresence/proxy/remote.py
|
||||
@@ -112,7 +112,7 @@ def wait_for_pod(runner: Runner, remote_info: RemoteInfo) -> None:
|
||||
runner.kubectl(
|
||||
"wait",
|
||||
"--for=condition=ready",
|
||||
- "--timeout=60s",
|
||||
+ "--timeout=240s",
|
||||
"pod/" + remote_info.pod_name,
|
||||
)
|
||||
)
|
@@ -0,0 +1,16 @@
|
||||
diff --git a/versioneer.py b/versioneer.py
|
||||
index 7e5bb402e..60d65ef76 100644
|
||||
--- a/versioneer.py
|
||||
+++ b/versioneer.py
|
||||
@@ -339,9 +339,9 @@ def get_config_from_root(root):
|
||||
# configparser.NoOptionError (if it lacks "VCS="). See the docstring at
|
||||
# the top of versioneer.py for instructions on writing your setup.cfg .
|
||||
setup_cfg = os.path.join(root, "setup.cfg")
|
||||
- parser = configparser.SafeConfigParser()
|
||||
+ parser = configparser.ConfigParser()
|
||||
with open(setup_cfg, "r") as f:
|
||||
- parser.readfp(f)
|
||||
+ parser.read_file(f)
|
||||
VCS = parser.get("versioneer", "VCS") # mandatory
|
||||
|
||||
def get(parser, name):
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ lib, pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = with pkgs; [ snyk ];
|
||||
}
|
@@ -71,13 +71,15 @@ in
|
||||
(import ./configs/console/go { inherit user home; })
|
||||
(import ./configs/console/java { inherit user home; })
|
||||
(import ./configs/console/kubernetes { inherit user home; })
|
||||
(import ./configs/console/snyk { inherit user home; })
|
||||
|
||||
(import ./configs/gui/obsidian { inherit user home; })
|
||||
|
||||
# Warning: the following imports use private SAS repositories.
|
||||
# You must build the system once with these imports commented out,
|
||||
# then uncomment them and rebuild the system once keys are provisioned.
|
||||
# You must build the system once with these imports commented out.
|
||||
# Then, connect to the SAS VPN, uncomment them, and rebuild the system.
|
||||
(import ./configs/console/jsonify { inherit user home; })
|
||||
(import ./configs/console/klog { inherit user home; })
|
||||
];
|
||||
|
||||
# echo "password" | mkpasswd -s
|
||||
|
Reference in New Issue
Block a user