From 3bb6c8bc66cf46b2b0504c358a4334c8165b67f2 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sun, 24 Oct 2021 01:14:04 +0200 Subject: [PATCH] agenix: init environment-secrets --- hosts/dumpyourvms/dumpyourvms.nix | 9 +++++++-- secrets/environment-secrets.age | Bin 0 -> 490 bytes secrets/secrets.nix | 1 + users/teutat3s/session-variables.nix | 2 +- users/teutat3s/zshrc.nix | 1 + 5 files changed, 10 insertions(+), 3 deletions(-) create mode 100755 secrets/environment-secrets.age diff --git a/hosts/dumpyourvms/dumpyourvms.nix b/hosts/dumpyourvms/dumpyourvms.nix index 722ced61..c463a8cb 100644 --- a/hosts/dumpyourvms/dumpyourvms.nix +++ b/hosts/dumpyourvms/dumpyourvms.nix @@ -1,4 +1,4 @@ -{ config, pkgs, lib, ... }: +{ config, pkgs, lib, self, ... }: with lib; let psCfg = config.pub-solar; @@ -10,7 +10,12 @@ in ]; config = { - pub-solar.x-os.keyfile = "/etc/nixos/hosts/dumpyourvms/secrets/keyfile.bin"; + age.secrets.environment-secrets = { + file = "${self}/secrets/environment-secrets.age"; + mode = "700"; + owner = "teutat3s"; + }; + pub-solar.virtualisation.enable = true; # fix backlight for keyboard and brightness, adjust function key binding diff --git a/secrets/environment-secrets.age b/secrets/environment-secrets.age new file mode 100755 index 0000000000000000000000000000000000000000..78fb44f0254982027226c7543d9e50f7dc2fb1e9 GIT binary patch literal 490 zcmVeQw(&fDM2b3S*C)% zY-{=l3f6S;4)`ww?17r=fjR`on%NGoljiL?hODcfN-rHSXB)R=|npv51qv0T8Y(UuFI#f6Gj60YVl}jwrQ2k;# z+1M_&mk*3Fkef6QAuDWUK+gfk)#2@*jmj_eU+TGN6u&-a&Njc- zvf+f5b0izt#>+)aYRr^c5d8wy0U>sD`fD4{(0Ig& gRhCo+%TV)g#c8mgU?`IMO@rT>&u!#wkJUp#T5? literal 0 HcmV?d00001 diff --git a/secrets/secrets.nix b/secrets/secrets.nix index 96c3cc0f..9babba45 100644 --- a/secrets/secrets.nix +++ b/secrets/secrets.nix @@ -6,4 +6,5 @@ let in { "example-secret.age".publicKeys = allKeys; + "environment-secrets.age".publicKeys = allKeys; } diff --git a/users/teutat3s/session-variables.nix b/users/teutat3s/session-variables.nix index a5850f73..e9db7172 100644 --- a/users/teutat3s/session-variables.nix +++ b/users/teutat3s/session-variables.nix @@ -6,7 +6,7 @@ in { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home.sessionVariables = { - DRONE_SERVER = "https://drone.greenbaum.cloud"; + DRONE_SERVER = "https://ci.b12f.io"; }; }; } diff --git a/users/teutat3s/zshrc.nix b/users/teutat3s/zshrc.nix index 26b11f41..97bc4861 100644 --- a/users/teutat3s/zshrc.nix +++ b/users/teutat3s/zshrc.nix @@ -83,4 +83,5 @@ pkgs: complete -o nospace -C ${pkgs.waypoint}/bin/waypoint waypoint complete -C '${pkgs.awscli2}/bin/aws_completer' ${pkgs.awscli2}/bin/aws + source /run/secrets/environment-secrets ''