Refactor structure
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
28
hosts/eirene/users/nick/configs/console/git/default.nix
Normal file
28
hosts/eirene/users/nick/configs/console/git/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
sops.secrets = {
|
||||
"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 = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -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"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
22
hosts/eirene/users/nick/configs/gui/obsidian/default.nix
Normal file
22
hosts/eirene/users/nick/configs/gui/obsidian/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
user ? throw "user argument is required",
|
||||
home ? throw "home argument is required",
|
||||
}:
|
||||
{ ... }:
|
||||
{
|
||||
home-manager.users.${user} = {
|
||||
programs.obsidian.vaults."Documents/Obsidian/master".enable = true;
|
||||
|
||||
services.syncthing.settings.folders.obsidian = {
|
||||
label = "Obsidian";
|
||||
path = "${home}/Documents/Obsidian";
|
||||
devices = [
|
||||
"amalthea"
|
||||
"ganymede"
|
||||
];
|
||||
};
|
||||
|
||||
home.file."Documents/Obsidian/.stignore".source =
|
||||
../../../../../../common/configs/user/gui/obsidian/config/.stignore;
|
||||
};
|
||||
}
|
@@ -8,6 +8,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../../../common/configs/user/options.nix
|
||||
|
||||
(import ../../../common/configs/user/console/android { inherit user home; })
|
||||
(import ../../../common/configs/user/console/bashmount { inherit user home; })
|
||||
(import ../../../common/configs/user/console/bluetooth { inherit user home; })
|
||||
@@ -40,6 +41,7 @@ in
|
||||
(import ../../../common/configs/user/console/xdg { inherit user home; })
|
||||
(import ../../../common/configs/user/console/yt-dlp { inherit user home; })
|
||||
(import ../../../common/configs/user/console/zsh { inherit user home; })
|
||||
|
||||
(import ../../../common/configs/user/gui/astal { inherit user home; })
|
||||
(import ../../../common/configs/user/gui/bluetooth { inherit user home; })
|
||||
(import ../../../common/configs/user/gui/brightnessctl { inherit user home; })
|
||||
@@ -71,6 +73,11 @@ in
|
||||
(import ../../../common/configs/user/gui/wev { inherit user home; })
|
||||
(import ../../../common/configs/user/gui/x11 { inherit user home; })
|
||||
(import ../../../common/configs/user/gui/xdg { inherit user home; })
|
||||
|
||||
(import ./configs/console/git { inherit user home; })
|
||||
(import ./configs/console/syncthing { inherit user home; })
|
||||
|
||||
(import ./configs/gui/obsidian { inherit user home; })
|
||||
];
|
||||
|
||||
# echo "password" | mkpasswd -s
|
||||
@@ -101,60 +108,16 @@ in
|
||||
};
|
||||
|
||||
sops.secrets = {
|
||||
"git/credentials" = {
|
||||
"ssh/personal/key" = {
|
||||
sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.config/git/credentials";
|
||||
path = "${home}/.ssh/ssh_personal_ed25519_key";
|
||||
};
|
||||
"git/cookies" = {
|
||||
sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.config/git/cookies";
|
||||
};
|
||||
|
||||
"ssh/personal/git/key" = {
|
||||
sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
path = "${home}/.ssh/ssh_git_personal_ed25519_key";
|
||||
};
|
||||
"ssh/personal/git/pass".sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
"ssh/personal/pass".sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
|
||||
"gpg/personal/key".sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
"gpg/personal/pass".sopsFile = ../../../../secrets/personal/secrets.yaml;
|
||||
};
|
||||
|
||||
programs = {
|
||||
ssh.matchBlocks = {
|
||||
"github.com" = {
|
||||
hostname = "github.com";
|
||||
user = "git";
|
||||
identityFile = "${home}/.ssh/ssh_git_personal_ed25519_key";
|
||||
extraOptions.StrictHostKeyChecking = "no";
|
||||
};
|
||||
};
|
||||
|
||||
obsidian.vaults."Documents/Obsidian/master".enable = true;
|
||||
};
|
||||
|
||||
theme.wallpaper = ../../../../static/wallpapers/clouds.png;
|
||||
|
||||
services.syncthing.settings.folders = {
|
||||
obsidian = {
|
||||
label = "Obsidian";
|
||||
path = "${home}/Documents/Obsidian";
|
||||
devices = [
|
||||
"amalthea"
|
||||
"ganymede"
|
||||
];
|
||||
};
|
||||
official = {
|
||||
label = "Official";
|
||||
path = "${home}/Documents/Official";
|
||||
devices = [
|
||||
"amalthea"
|
||||
"ganymede"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
home.file."Documents/Obsidian/.stignore".source =
|
||||
../../../common/configs/user/gui/obsidian/config/.stignore;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user