Add openvpn
This commit is contained in:
parent
3ba643bab9
commit
8fd3d9cbe7
@ -2,7 +2,7 @@
|
|||||||
with lib;
|
with lib;
|
||||||
with types;
|
with types;
|
||||||
let
|
let
|
||||||
password-store = "/home/balsoft/.local/share/password-store";
|
password-store = config.secretsConfig.password-store;
|
||||||
secret = { name, ... }: {
|
secret = { name, ... }: {
|
||||||
options = {
|
options = {
|
||||||
encrypted = mkOption {
|
encrypted = mkOption {
|
||||||
@ -121,6 +121,10 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
options.secretsConfig = {
|
options.secretsConfig = {
|
||||||
|
password-store = lib.mkOption {
|
||||||
|
type = lib.types.path;
|
||||||
|
default = "/home/balsoft/.local/share/password-store";
|
||||||
|
};
|
||||||
repo = lib.mkOption {
|
repo = lib.mkOption {
|
||||||
type = str;
|
type = str;
|
||||||
default = "ssh://git@github.com/balsoft/pass";
|
default = "ssh://git@github.com/balsoft/pass";
|
||||||
|
15
profiles/workspace/openvpn.nix
Normal file
15
profiles/workspace/openvpn.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, pkgs, ... }: let password-store = config.secretsConfig.password-store; in {
|
||||||
|
secrets.tawasal_eu1 = {
|
||||||
|
encrypted = "${password-store}/openvpn/tawasal_eu1.gpg";
|
||||||
|
services = [ "openvpn-tawasal-eu1.service" ];
|
||||||
|
};
|
||||||
|
secrets.tawasal_eu2 = {
|
||||||
|
encrypted = "${password-store}/openvpn/tawasal_eu2.gpg";
|
||||||
|
services = [ "openvpn-tawasal-eu2.service" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
services.openvpn.servers = {
|
||||||
|
tawasal-eu1.config = "config ${config.secrets.tawasal_eu1.decrypted}";
|
||||||
|
tawasal-eu2.config = "config ${config.secrets.tawasal_eu2.decrypted}";
|
||||||
|
};
|
||||||
|
}
|
@ -41,6 +41,7 @@
|
|||||||
light
|
light
|
||||||
mako
|
mako
|
||||||
# mopidy
|
# mopidy
|
||||||
|
openvpn
|
||||||
simple-osd-daemons
|
simple-osd-daemons
|
||||||
sway
|
sway
|
||||||
yubikey-touch-detector
|
yubikey-touch-detector
|
||||||
|
Loading…
Reference in New Issue
Block a user