Refactor structure
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
@@ -2,11 +2,13 @@
|
||||
{
|
||||
imports = [
|
||||
../../lib
|
||||
|
||||
inputs.disko.nixosModules.disko
|
||||
(import ./format.nix {
|
||||
device = "/dev/disk/by-id/usb-SanDisk_Ultra_Trek_050133f0afb69de86a475ee8d2ad97e4916cce11764cffba9ab262d42a7d0d2f66460000000000000000000039b7a3b8ff990a109f5581078ea6e86a-0:0";
|
||||
})
|
||||
./hardware.nix
|
||||
./hardware
|
||||
|
||||
../common/configs/system/boot
|
||||
../common/configs/system/btop
|
||||
../common/configs/system/btrfs
|
||||
@@ -34,6 +36,7 @@
|
||||
../common/configs/system/users
|
||||
../common/configs/system/wget
|
||||
../common/configs/system/zsh
|
||||
|
||||
./users/nick
|
||||
];
|
||||
|
||||
|
28
hosts/installer/users/nick/configs/console/git/default.nix
Normal file
28
hosts/installer/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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
@@ -8,6 +8,7 @@ in
|
||||
{
|
||||
imports = [
|
||||
../../../common/configs/user/options.nix
|
||||
|
||||
(import ../../../common/configs/user/console/bashmount { inherit user home; })
|
||||
(import ../../../common/configs/user/console/btop { inherit user home; })
|
||||
(import ../../../common/configs/user/console/fastfetch { inherit user home; })
|
||||
@@ -27,6 +28,8 @@ in
|
||||
(import ../../../common/configs/user/console/wget { inherit user home; })
|
||||
(import ../../../common/configs/user/console/xdg { inherit user home; })
|
||||
(import ../../../common/configs/user/console/zsh { inherit user home; })
|
||||
|
||||
(import ./configs/console/git { inherit user home; })
|
||||
];
|
||||
|
||||
# echo "password" | mkpasswd -s
|
||||
@@ -57,32 +60,14 @@ 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user