mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-12 15:42:39 +02:00
fix: migrate secrets from /run/agenix(deleted after reboot) to /etc/agenix
This commit is contained in:
@@ -3,14 +3,14 @@
|
|||||||
programs.bash = {
|
programs.bash = {
|
||||||
# load the alias file for work
|
# load the alias file for work
|
||||||
bashrcExtra = ''
|
bashrcExtra = ''
|
||||||
source /run/agenix/alias-for-work.bash
|
source /etc/agenix/alias-for-work.bash
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.nushell = {
|
programs.nushell = {
|
||||||
# load the alias file for work
|
# load the alias file for work
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
source /run/agenix/alias-for-work.nushell
|
source /etc/agenix/alias-for-work.nushell
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+16
-11
@@ -1,4 +1,4 @@
|
|||||||
{ pkgs, agenix, mysecrets, ... }:
|
{ config, pkgs, agenix, mysecrets, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
@@ -12,8 +12,6 @@
|
|||||||
# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!
|
# if you changed this key, you need to regenerate all encrypt files from the decrypt contents!
|
||||||
age.identityPaths = [ "/home/ryan/.ssh/juliet-age" ];
|
age.identityPaths = [ "/home/ryan/.ssh/juliet-age" ];
|
||||||
|
|
||||||
age.secretsDir = "/run/agenix/";
|
|
||||||
|
|
||||||
############################################################################
|
############################################################################
|
||||||
#
|
#
|
||||||
# The following secrets are used by NixOS Modules
|
# The following secrets are used by NixOS Modules
|
||||||
@@ -47,17 +45,24 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
age.secrets."alias-for-work.nushell" = {
|
age.secrets."alias-for-work.nushell" = {
|
||||||
# path = "/etc/agenix/";
|
|
||||||
file = "${mysecrets}/alias-for-work.nushell.age";
|
file = "${mysecrets}/alias-for-work.nushell.age";
|
||||||
mode = "0600";
|
|
||||||
owner = "ryan";
|
|
||||||
group = "ryan";
|
|
||||||
};
|
};
|
||||||
age.secrets."alias-for-work.bash" = {
|
age.secrets."alias-for-work.bash" = {
|
||||||
# path = "/etc/agenix/";
|
|
||||||
file = "${mysecrets}/alias-for-work.bash.age";
|
file = "${mysecrets}/alias-for-work.bash.age";
|
||||||
mode = "0600";
|
};
|
||||||
owner = "ryan";
|
|
||||||
group = "ryan";
|
environment.etc = {
|
||||||
|
"agenix/alias-for-work.nushell" = {
|
||||||
|
source = config.age.secrets."alias-for-work.nushell".path;
|
||||||
|
mode = "0600";
|
||||||
|
uid = 1000;
|
||||||
|
gid = 1000;
|
||||||
|
};
|
||||||
|
"agenix/alias-for-work.bash" = {
|
||||||
|
source = config.age.secrets."alias-for-work.bash".path;
|
||||||
|
mode = "0600";
|
||||||
|
uid = 1000;
|
||||||
|
gid = 1000;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user