feat(sops): Setup sops
This commit is contained in:
parent
f1ba0a98e8
commit
12015f8589
4 changed files with 45 additions and 5 deletions
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
let
|
||||
cfg = config.homelab.users.admin;
|
||||
|
||||
owner = config.users.users.admin.name;
|
||||
in {
|
||||
options.homelab.users.admin.enable = lib.mkEnableOption "user System Administrator";
|
||||
|
||||
|
|
@ -10,6 +12,12 @@ in {
|
|||
config.users.users.admin.name
|
||||
];
|
||||
|
||||
sops.secrets."users/admin/authorized_keys" = {
|
||||
format = "yaml";
|
||||
sopsFile = ../../secrets/secrets.yaml;
|
||||
inherit owner;
|
||||
};
|
||||
|
||||
users.users.admin = {
|
||||
description = "System Administrator";
|
||||
isNormalUser = true;
|
||||
|
|
@ -17,9 +25,8 @@ in {
|
|||
config.users.groups.wheel.name # Enable 'sudo' for the user.
|
||||
];
|
||||
initialPassword = "ChangeMe";
|
||||
openssh.authorizedKeys.keys = [
|
||||
# TODO ChangeMe
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPrG+ldRBdCeHEXrsy/qHXIJYg8xQXVuiUR0DxhFjYNg"
|
||||
openssh.authorizedKeys.keyFiles = [
|
||||
/run/secrets/users/admin/authorized_keys
|
||||
];
|
||||
packages = with pkgs; [
|
||||
curl
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue