users: fmt, stan: add root and fix default user name

This commit is contained in:
Aaron Bieber 2024-03-22 07:47:22 -06:00
parent 93108cf3b0
commit 178b2ebeb6
No known key found for this signature in database
2 changed files with 17 additions and 9 deletions

View File

@ -159,12 +159,20 @@ in
mode = "400";
neededForUsers = true;
};
root_hash = {
sopsFile = config.xin-secrets.stan.user_passwords.root;
owner = "root";
mode = "400";
neededForUsers = true;
};
};
users = {
mutableUsers = false;
users = {
root = userBase;
root = userBase // {
hashedPasswordFile = config.sops.secrets.root_hash.path;
};
abieber = userBase // {
isNormalUser = true;
description = "Aaron Bieber";

View File

@ -35,15 +35,16 @@ in
{
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
secrets = mkMerge [
({
{
root_hash =
{
name = "hash";
sopsFile = config.xin-secrets.${config.networking.hostName}.user_passwords.root;
owner = "root";
mode = "400";
neededForUsers = true;
};
})
}
(mkIf hasQbit {
qbit_hash = {
sopsFile = config.xin-secrets.${config.networking.hostName}.user_passwords.qbit;
@ -57,12 +58,11 @@ in
users = {
mutableUsers = false;
users = mkMerge [
(
{
root = userBase // {
hashedPasswordFile = config.sops.secrets.root_hash.path;
};
})
{
root = userBase // {
hashedPasswordFile = config.sops.secrets.root_hash.path;
};
}
(mkIf hasQbit {
qbit = userBase // {
isNormalUser = true;