set the initial user password

This commit is contained in:
cswimr 2024-12-02 22:13:35 -05:00
parent 5ddfbb3a7b
commit 0291524082
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
4 changed files with 14 additions and 5 deletions

View file

@ -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"

View file

@ -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";
};
};
};
}