Add git-crypt support and update Sops configuration for multiple hosts
- Introduced a new secrets file for git-crypt personal documents. - Updated .sops.yaml to include new key groups for host-specific secrets. - Configured Sops settings in client-services.nix for managing secrets. - Removed redundant Sops configurations from multiple host configurations (14900k, ideapad, t2mbp, uConsole) to streamline secret management. - Added git-crypt to desktop-home-base package list.
This commit is contained in:
@@ -2,8 +2,15 @@
|
||||
# Module (not bare attrset) so catalog entries can use `config.*` for sops paths etc.
|
||||
{ ... }: {
|
||||
flake.nixosModules.usersCatalogDefaults =
|
||||
{ config, ... }:
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
olivierEnabled = lib.elem "olivier" config.chiasson.users.enabled;
|
||||
in
|
||||
{
|
||||
sops.secrets."users/olivier/hashedPassword" = lib.mkIf olivierEnabled {
|
||||
neededForUsers = true;
|
||||
};
|
||||
|
||||
config.chiasson.users.catalog = {
|
||||
olivier = {
|
||||
isNormalUser = true;
|
||||
@@ -24,9 +31,11 @@
|
||||
"input"
|
||||
];
|
||||
|
||||
# Host must set `sops.secrets."users/olivier/hashedPassword".neededForUsers = true`.
|
||||
# With that, `.path` is under /run/secrets-for-users/… (sops-nix README).
|
||||
hashedPasswordFile = config.sops.secrets."users/olivier/hashedPassword".path;
|
||||
# Declared in this module when olivier is in `chiasson.users.enabled`.
|
||||
# With `neededForUsers`, `.path` is under /run/secrets-for-users/… (sops-nix README).
|
||||
hashedPasswordFile = lib.mkIf olivierEnabled (
|
||||
config.sops.secrets."users/olivier/hashedPassword".path
|
||||
);
|
||||
|
||||
homeManager = {
|
||||
enable = true;
|
||||
|
||||
Reference in New Issue
Block a user