restructure user

This commit is contained in:
2025-10-14 00:20:29 -05:00
parent 782ebcf4e3
commit 182cab6bf3
5 changed files with 34 additions and 38 deletions

View File

@@ -6,19 +6,22 @@
...
}: {
# create blake user
users.users = {
blake = {
isNormalUser = true;
extraGroups = ["wheel" "networkmanager" "docker" "media" "podman" "minecraft"]; # Enable sudo for the user.
uid = 1000;
shell = pkgs.zsh;
group = "blake";
hashedPasswordFile = config.sops.secrets."blake_passwd".path;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBK0AGJfZGyqW8/krvQV+PL7axcDW/EnKyHy9M8wryQx klefki"
"ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBPdC9cCX8awvA19Ri65fvbYjZYe8X1Ef+nOZAIv92AS6u4SkJYqOvPYfqRHXORNDpbzjTV6nackyCKvV5EO4niv4MFIgdkEQwuVHcYX32/dOsWdDoeXBT/l2sFFM7JESwQ== blake@zygarde"
];
users = {
users = {
blake = {
isNormalUser = true;
extraGroups = ["wheel" "networkmanager" "docker" "media" "podman" "minecraft"]; # Enable sudo for the user.
uid = 1000;
shell = pkgs.zsh;
group = "blake";
hashedPasswordFile = config.sops.secrets."blake_passwd".path;
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBK0AGJfZGyqW8/krvQV+PL7axcDW/EnKyHy9M8wryQx klefki"
"ecdsa-sha2-nistp384 AAAAE2VjZHNhLXNoYTItbmlzdHAzODQAAAAIbmlzdHAzODQAAABhBPdC9cCX8awvA19Ri65fvbYjZYe8X1Ef+nOZAIv92AS6u4SkJYqOvPYfqRHXORNDpbzjTV6nackyCKvV5EO4niv4MFIgdkEQwuVHcYX32/dOsWdDoeXBT/l2sFFM7JESwQ== blake@zygarde"
];
};
};
groups.blake = { gid = 1000; };
};
# define home-manager user

View File

@@ -64,22 +64,22 @@
};
};
# import sshkeys from keyring
#home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
#home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
home.file.".ssh/id_snowbelle".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle;
home.file.".ssh/id_snowbelle.pub".source = config.lib.file.mkOutOfStoreSymlink /home/blake/.nix/.keyring/ssh/id_snowbelle.pub;
# manage secrets with sops
sops.secrets = {
"id_snowbelle" = {
owner = "blake";
group = "blake";
mode = "0600";
path = "/home/blake/.ssh/id_snowbelle";
};
"id_snowbelle.pub" = {
owner = "blake";
group = "blake";
mode = "644";
path = "/home/blake/.ssh/id_snowbelle.pub";
};
};
# # manage secrets with sops
# sops.secrets = {
# "id_snowbelle" = {
# owner = "blake";
# group = "blake";
# mode = "0600";
# path = "/home/blake/.ssh/id_snowbelle";
# };
# "id_snowbelle.pub" = {
# owner = "blake";
# group = "blake";
# mode = "644";
# path = "/home/blake/.ssh/id_snowbelle.pub";
# };
# };
}

View File

@@ -5,6 +5,5 @@
./blake
];
users.blake.enable = lib.mkDefault true;
}