set the initial user password
This commit is contained in:
parent
5ddfbb3a7b
commit
0291524082
4 changed files with 14 additions and 5 deletions
|
@ -1,7 +1,7 @@
|
|||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
{ pkgs, hostname, ... }:
|
||||
{ pkgs, config, hostname, ... }:
|
||||
{
|
||||
nix = {
|
||||
settings = {
|
||||
|
@ -95,6 +95,7 @@
|
|||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.cswimr = {
|
||||
isNormalUser = true;
|
||||
hashedPasswordFile = config.sops.secrets."users/cswimr/password".path;
|
||||
description = "Seaswimmer";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
|
|
|
@ -1,13 +1,18 @@
|
|||
{ user, ... }:
|
||||
{
|
||||
sops = {
|
||||
defaultSopsFile = ../secrets/secrets.yaml;
|
||||
defaultSopsFile = ../.sops-secrets.yaml;
|
||||
age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];
|
||||
secrets = {
|
||||
"zipline" = {
|
||||
owner = user;
|
||||
path = "/home/${user}/.secrets/zipline";
|
||||
};
|
||||
"users/cswimr/password" = {
|
||||
neededForUsers = true;
|
||||
owner = user;
|
||||
path = "/home/${user}/.secrets/password";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue