Refactor structure
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
45
hosts/elara/users/nikara/configs/console/git/default.nix
Normal file
45
hosts/elara/users/nikara/configs/console/git/default.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
# Personal
|
||||
"git/credentials" = {
|
||||
sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.config/git/credentials";
|
||||
};
|
||||
"git/cookies" = {
|
||||
sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.config/git/cookies";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh.matchBlocks = {
|
||||
# Personal
|
||||
"github.com/karaolidis" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
|
||||
# SAS
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
|
||||
"gitlab.sas.com" = {
|
||||
hostname = "gitlab.sas.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_sas_ed25519_key";
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
29
hosts/elara/users/nikara/configs/console/go/default.nix
Normal file
29
hosts/elara/users/nikara/configs/console/go/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.persistence."/cache"."${home}/.local/share/go" = { };
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs.go = {
|
||||
enable = true;
|
||||
goPath = "${home}/.local/share/go";
|
||||
};
|
||||
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
gopls
|
||||
go-tools
|
||||
golangci-lint
|
||||
golangci-lint-langserver
|
||||
];
|
||||
|
||||
sessionVariables = {
|
||||
GOPROXY = "goproxy.unx.sas.com";
|
||||
GONOSUMDB = "*.sas.com,sassoftware.io";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
27
hosts/elara/users/nikara/configs/console/java/default.nix
Normal file
27
hosts/elara/users/nikara/configs/console/java/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.persistence."/cache"."${home}/.local/share/gradle" = { };
|
||||
|
||||
home-manager.users.${user} = {
|
||||
programs = {
|
||||
java = {
|
||||
enable = true;
|
||||
package = pkgs.jdk17;
|
||||
};
|
||||
|
||||
gradle = {
|
||||
enable = true;
|
||||
home = "${home}/.local/share/gradle";
|
||||
};
|
||||
};
|
||||
|
||||
sops.secrets."artifactory" = {
|
||||
sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
path = "${home}/.local/share/gradle/gradle.properties";
|
||||
};
|
||||
};
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
}
|
22
hosts/elara/users/nikara/configs/console/jsonify/package.nix
Normal file
22
hosts/elara/users/nikara/configs/console/jsonify/package.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "jsonify";
|
||||
version = "0.1.6";
|
||||
|
||||
src = fetchGit {
|
||||
url = "git@github.com:sas-institute-rnd-internal/polaris-jsonify.git";
|
||||
ref = "main";
|
||||
rev = "7b8f8a0f0b3c1bbfb7f814c5a3dae5f696ca38e3";
|
||||
};
|
||||
|
||||
preBuild = ''
|
||||
rm -rf sage
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp "$GOPATH/bin/polaris-jsonify" $out/bin/jsonify
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-sJ3Jc7ZC+1s3m5nH6WtXsGVZfLEW7CZAcNtstUpc9M4=";
|
||||
}
|
@@ -0,0 +1,8 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home-manager.users.${user}.home.packages = [ (pkgs.callPackage ./package.nix { }) ];
|
||||
}
|
13
hosts/elara/users/nikara/configs/console/klog/package.nix
Normal file
13
hosts/elara/users/nikara/configs/console/klog/package.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
pkgs.buildGoModule rec {
|
||||
pname = "klog";
|
||||
version = "0.6.2";
|
||||
|
||||
src = fetchGit {
|
||||
url = "git@gitlab.sas.com:convoy/devops/klog.git";
|
||||
ref = "master";
|
||||
rev = "17629fe278dd23e12bd6f17ee9db0d2fde37bc6c";
|
||||
};
|
||||
|
||||
vendorHash = "";
|
||||
}
|
@@ -0,0 +1,23 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
"kubeconfig/d90270" = {
|
||||
sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
path = "${home}/.kube/d90270";
|
||||
};
|
||||
"kubeconfig/d90271" = {
|
||||
sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
path = "${home}/.kube/d90271";
|
||||
};
|
||||
"kubeconfig/d90272" = {
|
||||
sopsFile = ../../../../../../../secrets/sas/secrets.yaml;
|
||||
path = "${home}/.kube/d90272";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user