Rename module namespaces

This commit is contained in:
SebastianStork 2024-07-15 20:16:50 +02:00
parent 0dcf8cc292
commit ca1357b2d4
35 changed files with 4 additions and 4 deletions

24
modules/home/sops.nix Normal file
View file

@ -0,0 +1,24 @@
{
self,
inputs,
config,
lib,
...
}@moduleArgs:
{
imports = [ inputs.sops-nix.homeManagerModules.sops ];
options.myConfig.sops.enable = lib.mkEnableOption "";
config = lib.mkIf config.myConfig.sops.enable {
sops = {
age.sshKeyPaths = [ "${config.home.homeDirectory}/.ssh/id_ed25519" ];
defaultSopsFile =
let
hostName = moduleArgs.osConfig.networking.hostName or "";
hostDir = if hostName != "" then "/@" + hostName else "";
in
"${self}/users/${config.home.username}${hostDir}/secrets.yaml";
};
};
}