refactor: move secrets off-shore
This commit is contained in:
parent
0ecc1cbf40
commit
d3d0ae8fcb
23 changed files with 231 additions and 179 deletions
|
|
@ -1,10 +1,10 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
keys,
|
||||
...
|
||||
}: let
|
||||
inherit (config.ooknet.host) admin;
|
||||
inherit (config.ooknet.secrets) keys;
|
||||
|
||||
ifTheyExist = groups: builtins.filter (group: builtins.hasAttr group config.users.groups) groups;
|
||||
in {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
./admin.nix
|
||||
./locale.nix
|
||||
./options.nix
|
||||
./secrets.nix
|
||||
./openssh.nix
|
||||
./tailscale.nix
|
||||
./networking.nix
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
keys,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
|
|
@ -7,6 +6,7 @@
|
|||
inherit (lib) mkIf;
|
||||
inherit (config.ooknet.host) admin;
|
||||
inherit (config.networking) hostName;
|
||||
inherit (config.ooknet.secrets) keys;
|
||||
|
||||
mkBuilderMachine = {
|
||||
host,
|
||||
|
|
|
|||
|
|
@ -23,7 +23,6 @@ in {
|
|||
defaultPackages = [];
|
||||
systemPackages = attrValues {
|
||||
inherit (pkgs) git deadnix statix;
|
||||
inherit (inputs'.agenix.packages) default;
|
||||
};
|
||||
|
||||
# location of the configuration flake
|
||||
|
|
|
|||
|
|
@ -1,43 +0,0 @@
|
|||
{
|
||||
config,
|
||||
lib,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf;
|
||||
|
||||
inherit (config.ooknet) host;
|
||||
inherit (host) admin;
|
||||
inherit (config.services) tailscale transmission;
|
||||
in {
|
||||
age.identityPaths = [
|
||||
"/home/${admin.name}/.ssh/id_ed25519"
|
||||
];
|
||||
|
||||
age.secrets = {
|
||||
tailscale-auth = mkIf tailscale.enable {
|
||||
file = "${self}/secrets/tailscale-auth.age";
|
||||
mode = "444";
|
||||
};
|
||||
github_key = mkIf admin.homeManager {
|
||||
file = "${self}/secrets/github_key.age";
|
||||
path = "/home/${admin.name}/.ssh/github_key";
|
||||
owner = "${admin.name}";
|
||||
group = "users";
|
||||
};
|
||||
ooknet_org = mkIf admin.homeManager {
|
||||
file = "${self}/secrets/ooknet_org.age";
|
||||
path = "/home/${admin.name}/.ssh/ooknet_org";
|
||||
owner = "${admin.name}";
|
||||
group = "users";
|
||||
};
|
||||
spotify_key = mkIf admin.homeManager {
|
||||
file = "${self}/secrets/spotify_key.age";
|
||||
owner = "${admin.name}";
|
||||
group = "users";
|
||||
};
|
||||
"mullvad_wg.conf" = mkIf transmission.enable {
|
||||
file = "${self}/secrets/mullvad_wg.age";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue