update wg1 scripts
This commit is contained in:
parent
ccec2860ec
commit
db6e5d3828
2 changed files with 12 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
clan.core.facts.services.wg1 = {
|
clan.core.facts.services.wg1 = {
|
||||||
secret."wg1.conf" = { };
|
secret."wg1.conf" = { };
|
||||||
|
@ -12,9 +12,12 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager.users.root.packages = [
|
home-manager.users.root.home.packages = [
|
||||||
(pkgs.writers.writeBashBin "wg1-connect" ''
|
(pkgs.writers.writeBashBin "wg1-up" ''
|
||||||
${pkgs.wireguard-tools}/bin/wg-quick up ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
${pkgs.wireguard-tools}/bin/wg-quick up ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
||||||
'')
|
'')
|
||||||
|
(pkgs.writers.writeBashBin "wg1-down" ''
|
||||||
|
${pkgs.wireguard-tools}/bin/wg-quick down ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, ... }:
|
{ pkgs, config, ... }:
|
||||||
{
|
{
|
||||||
clan.core.facts.services.wg1 = {
|
clan.core.facts.services.wg1 = {
|
||||||
secret."wg1.conf" = { };
|
secret."wg1.conf" = { };
|
||||||
|
@ -12,8 +12,11 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
home-manager.users.root.packages = [
|
home-manager.users.root.home.packages = [
|
||||||
(pkgs.writers.writeBashBin "wg1-connect" ''
|
(pkgs.writers.writeBashBin "wg1-up" ''
|
||||||
|
${pkgs.wireguard-tools}/bin/wg-quick up ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
||||||
|
'')
|
||||||
|
(pkgs.writers.writeBashBin "wg1-down" ''
|
||||||
${pkgs.wireguard-tools}/bin/wg-quick up ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
${pkgs.wireguard-tools}/bin/wg-quick up ${config.clan.core.facts.services.wg1.secret."wg1.conf".path}
|
||||||
'')
|
'')
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue