security: start setting permissions on secrets properly

This commit is contained in:
Christoph Hollizeck 2025-12-01 23:53:27 +01:00
parent 01fb6d8ec9
commit ad9862019c
Signed by: Daholli
GPG key ID: 249300664F2AF2C7
11 changed files with 126 additions and 53 deletions

View file

@ -1,18 +1,15 @@
{
config,
...
}:
{
topLevel: {
flake = {
modules.nixos.root =
{ pkgs, ... }:
{ config, pkgs, ... }:
{
programs.fish.enable = true;
sops.secrets.passwordHash.neededForUsers = true;
users.users.root = {
shell = pkgs.fish;
openssh.authorizedKeys.keys = config.flake.meta.users.cholli.authorizedKeys;
initialPassword = "asdf1234";
openssh.authorizedKeys.keys = topLevel.config.flake.meta.users.cholli.authorizedKeys;
hashedPasswordFile = config.sops.secrets.passwordHash.path;
};
};
};