all: initial bits for moving users passwords to the pw store
This commit is contained in:
parent
f2f80defc8
commit
1e81d1b296
17
default.nix
17
default.nix
@ -60,17 +60,20 @@ in
|
||||
};
|
||||
|
||||
config = {
|
||||
sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
|
||||
sops.secrets = {
|
||||
xin_secrets_deploy_key = {
|
||||
sopsFile = config.xin-secrets.deploy;
|
||||
owner = "root";
|
||||
group = "wheel";
|
||||
mode = "400";
|
||||
secrets = {
|
||||
xin_secrets_deploy_key = {
|
||||
sopsFile = config.xin-secrets.deploy;
|
||||
owner = "root";
|
||||
group = "wheel";
|
||||
mode = "400";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
security.pki.certificates = [
|
||||
''
|
||||
-----BEGIN CERTIFICATE-----
|
||||
|
@ -14,6 +14,7 @@ let
|
||||
|
||||
userBase = {
|
||||
openssh.authorizedKeys.keys = pubKeys ++ config.myconf.managementPubKeys;
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
peerixUser =
|
||||
if builtins.hasAttr "peerix" config.users.users
|
||||
@ -152,17 +153,26 @@ in
|
||||
owner = "root";
|
||||
mode = "400";
|
||||
};
|
||||
abieber_hash = {
|
||||
sopsFile = config.xin-secrets.user_passwords;
|
||||
owner = "root";
|
||||
mode = "400";
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
|
||||
users.users.root = userBase;
|
||||
users.users.abieber =
|
||||
{
|
||||
isNormalUser = true;
|
||||
description = "Aaron Bieber";
|
||||
shell = pkgs.zsh;
|
||||
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
|
||||
}
|
||||
// userBase;
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
root = userBase;
|
||||
abieber = userBase // {
|
||||
isNormalUser = true;
|
||||
description = "Aaron Bieber";
|
||||
extraGroups = [ "networkmanager" "wheel" "libvirtd" ];
|
||||
hashedPasswordFile = config.sops.secrets.abieber_hash.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
|
@ -25,15 +25,38 @@ in
|
||||
};
|
||||
|
||||
config = mkIf config.defaultUsers.enable {
|
||||
users.users.root = userBase;
|
||||
users.users.qbit =
|
||||
userBase
|
||||
// {
|
||||
isNormalUser = true;
|
||||
description = "Aaron Bieber";
|
||||
home = "/home/qbit";
|
||||
extraGroups = [ "wheel" ];
|
||||
sops = {
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
secrets = {
|
||||
"${config.networking.hostName}_hash" = {
|
||||
sopsFile = config.xin-secrets.root_passwords;
|
||||
owner = "root";
|
||||
mode = "400";
|
||||
neededForUsers = true;
|
||||
};
|
||||
qbit_hash = {
|
||||
sopsFile = config.xin-secrets.user_passwords;
|
||||
owner = "root";
|
||||
mode = "400";
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
users = {
|
||||
mutableUsers = false;
|
||||
users = {
|
||||
root = userBase // {
|
||||
hashedPasswordFile = config.sops.secrets."${config.networking.hostName}_hash".path;
|
||||
};
|
||||
qbit = userBase // {
|
||||
isNormalUser = true;
|
||||
description = "Aaron Bieber";
|
||||
home = "/home/qbit";
|
||||
extraGroups = [ "wheel" ];
|
||||
hashedPasswordFile = config.sops.secrets.qbit_hash.path;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages =
|
||||
if isUnstable
|
||||
|
Loading…
Reference in New Issue
Block a user