mirror of
https://github.com/elwrcl/copnix.git
synced 2026-10-31 22:28:03 +03:00
token
This commit is contained in:
1 file changed
+21
@@ -0,0 +1,21 @@
|
|||||||
|
{ lib, ... }:
|
||||||
|
let
|
||||||
|
tokenSecret = ./secrets/nix-access-tokens.age;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
flake.nixosModules.common-nix-access-tokens =
|
||||||
|
{ config, ... }:
|
||||||
|
{
|
||||||
|
config = lib.mkIf (builtins.pathExists tokenSecret) {
|
||||||
|
age.secrets.nix-access-tokens = {
|
||||||
|
file = tokenSecret;
|
||||||
|
owner = "elars";
|
||||||
|
mode = "0400";
|
||||||
|
};
|
||||||
|
|
||||||
|
nix.extraOptions = ''
|
||||||
|
!include ${config.age.secrets.nix-access-tokens.path}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in new issue
Block a user