fix: NixOS | remove sops from user password and use hashed password
This commit is contained in:
@@ -8,9 +8,9 @@
|
|||||||
pkgs,
|
pkgs,
|
||||||
hostname,
|
hostname,
|
||||||
...
|
...
|
||||||
}: let
|
}:
|
||||||
secretspath = builtins.toString inputs.nix-secrets;
|
|
||||||
in {
|
{
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot = {
|
boot = {
|
||||||
loader = {
|
loader = {
|
||||||
@@ -115,8 +115,7 @@ in {
|
|||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
description = "Shahab Dogar";
|
description = "Shahab Dogar";
|
||||||
extraGroups = ["networkmanager" "wheel" "input" "libvirtd"];
|
extraGroups = ["networkmanager" "wheel" "input" "libvirtd"];
|
||||||
initialPassword = "tempPass";
|
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
||||||
hashedPasswordFile = config.sops.secrets."user_passwords/shahab".path;
|
|
||||||
|
|
||||||
openssh.authorizedKeys = {
|
openssh.authorizedKeys = {
|
||||||
keys = [
|
keys = [
|
||||||
@@ -126,19 +125,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops = {
|
|
||||||
defaultSopsFile = "${secretspath}/secrets.yaml";
|
|
||||||
age = {
|
|
||||||
sshKeyPaths = ["/home/shahab/.ssh/id_ed25519"];
|
|
||||||
keyFile = "/home/shahab/.config/sops/age/keys.txt";
|
|
||||||
};
|
|
||||||
secrets = {
|
|
||||||
"user_passwords/shahab" = {
|
|
||||||
neededForUsers = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Allow unfree packages
|
# Allow unfree packages
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
|
|||||||
Reference in New Issue
Block a user