lto server
This commit is contained in:
@@ -1,29 +1,34 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
namespace,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.mjallen.sops;
|
||||
cfg = config.${namespace}.sops;
|
||||
in
|
||||
{
|
||||
imports = [ ./options.nix ];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
# sops = {
|
||||
# age.keyFile = "/home/${user}/.config/sops/age/keys.txt";
|
||||
# defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
|
||||
# validateSopsFiles = false;
|
||||
# secrets = {
|
||||
# "ssh-keys-public/desktop-nixos" = {
|
||||
# path = "/home/${user}/.ssh/id_ed25519.pub";
|
||||
# mode = "0644";
|
||||
# };
|
||||
# "ssh-keys-private/desktop-nixos" = {
|
||||
# path = "/home/${user}/.ssh/id_ed25519";
|
||||
# mode = "0600";
|
||||
# };
|
||||
# };
|
||||
# };
|
||||
sops = {
|
||||
age.keyFile = "/home/${config.${namespace}.user.name}/.config/sops/age/keys.txt";
|
||||
defaultSopsFile = "/etc/nixos/secrets/secrets.yaml";
|
||||
validateSopsFiles = false;
|
||||
secrets = {
|
||||
"github-token" = { };
|
||||
};
|
||||
templates = {
|
||||
".env".content = ''
|
||||
GITHUB_TOKEN = "${config.sops.placeholder.github-token}"
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
programs.zsh.initExtra = ''
|
||||
if [ -f ${config.sops.templates.".env".path} ]; then
|
||||
export $(grep -v '^#' ${config.sops.templates.".env".path} | xargs)
|
||||
fi
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{ lib, ... }:
|
||||
{ lib, namespace, ... }:
|
||||
with lib;
|
||||
{
|
||||
options.mjallen.sops = {
|
||||
options.${namespace}.sops = {
|
||||
enable = mkEnableOption "enable sops";
|
||||
|
||||
defaultSopsFile = mkOption {
|
||||
|
||||
Reference in New Issue
Block a user