48
hosts/himalia/users/nick/configs/console/git/default.nix
Normal file
48
hosts/himalia/users/nick/configs/console/git/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
system,
|
||||
...
|
||||
}:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
selfPkgs = inputs.self.packages.${system};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops = {
|
||||
secrets = {
|
||||
"git/credentials/git.karaolidis.com/admin/username".sopsFile =
|
||||
../../../../../../../secrets/personal/secrets.yaml;
|
||||
"git/credentials/git.karaolidis.com/admin/password".sopsFile =
|
||||
../../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
templates."git/credentials" = {
|
||||
content = ''
|
||||
https://${hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/username"}:${
|
||||
hmConfig.sops.placeholder."git/credentials/git.karaolidis.com/admin/password"
|
||||
}@git.karaolidis.com
|
||||
'';
|
||||
path = "${home}/.config/git/credentials";
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
};
|
||||
|
||||
userKnownHostsFiles = with selfPkgs; [ ssh-known-hosts-github ];
|
||||
};
|
||||
};
|
||||
}
|
18
hosts/himalia/users/nick/configs/console/gpg/default.nix
Normal file
18
hosts/himalia/users/nick/configs/console/gpg/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
"gpg/key".sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
"gpg/pass".sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
programs.clipbook.bookmarks."GPG Passphrase".source = hmConfig.sops.secrets."gpg/pass".path;
|
||||
};
|
||||
}
|
32
hosts/himalia/users/nick/configs/console/podman/default.nix
Normal file
32
hosts/himalia/users/nick/configs/console/podman/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, pkgs, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user}.sops = {
|
||||
secrets = {
|
||||
"registry/docker.io".sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
"registry/registry.karaolidis.com".sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
templates."containers-auth.json" = {
|
||||
content = builtins.readFile (
|
||||
(pkgs.formats.json { }).generate "auth.json" {
|
||||
auths = {
|
||||
"docker.io" = {
|
||||
auth = hmConfig.sops.placeholder."registry/docker.io";
|
||||
};
|
||||
"registry.karaolidis.com" = {
|
||||
auth = hmConfig.sops.placeholder."registry/registry.karaolidis.com";
|
||||
};
|
||||
};
|
||||
}
|
||||
);
|
||||
path = "${home}/.config/containers/auth.json";
|
||||
};
|
||||
};
|
||||
}
|
22
hosts/himalia/users/nick/configs/console/ssh/default.nix
Normal file
22
hosts/himalia/users/nick/configs/console/ssh/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ config, ... }:
|
||||
let
|
||||
hmConfig = config.home-manager.users.${user};
|
||||
in
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
"ssh/key" = {
|
||||
sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
|
||||
"ssh/pass".sopsFile = ../../../../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
programs.clipbook.bookmarks."SSH Key Passphrase".source = hmConfig.sops.secrets."ssh/pass".path;
|
||||
};
|
||||
}
|
@@ -0,0 +1,17 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user}.services.syncthing.settings.folders = {
|
||||
official = {
|
||||
label = "Official";
|
||||
path = "${home}/Documents/Official";
|
||||
devices = [
|
||||
"amalthea"
|
||||
"ganymede"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user