feat(sops): add sops-nix and set rafiq password with it
This commit is contained in:
parent
99b8255fd1
commit
26ba53fee3
6 changed files with 103 additions and 6 deletions
|
@ -1,13 +1,20 @@
|
|||
{pkgs, ...}: {
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
./networking.nix
|
||||
./shell.nix
|
||||
./stylix.nix
|
||||
./sops.nix
|
||||
];
|
||||
|
||||
users.mutableUsers = false; # Always reset users on system activation
|
||||
users.users.rafiq = {
|
||||
isNormalUser = true;
|
||||
description = "rafiq";
|
||||
hashedPasswordFile = config.sops.secrets.hashed_password_rafiq.path;
|
||||
extraGroups = ["networkmanager" "wheel"];
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILv8HqazE294YdyGaXK6q2EniDlTpGaUL071kk9+W0GJ rafiq@nemesis"
|
||||
|
|
15
systems/modules/sops.nix
Normal file
15
systems/modules/sops.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{inputs, ...}: {
|
||||
imports = [inputs.sops-nix.nixosModules.sops];
|
||||
sops = {
|
||||
defaultSopsFile = ../../secrets/secrets.yaml;
|
||||
age.sshKeyPaths = [
|
||||
"/home/rafiq/.ssh/id_ed25519"
|
||||
"/home/rafiq/.ssh/rafiq-master"
|
||||
];
|
||||
secrets = {
|
||||
hashed_password_rafiq = {
|
||||
neededForUsers = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue