fix(headscale): override db_type option to use latest headscale
All checks were successful
Discord / discord commits (push) Has been skipped

This commit is contained in:
matt1432 2024-03-31 23:42:49 -04:00
parent be7d468efc
commit c5898a9a64
3 changed files with 49 additions and 40 deletions

View file

@ -6,16 +6,24 @@
...
}: let
inherit (builtins) readFile;
inherit (lib) mkAfter mkOption;
inherit (config.vars) mainUser hostName;
headscale-flake = headscale.packages.${pkgs.system}.headscale;
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
in {
# FIXME: wait for nixpkgs to reach this : https://github.com/juanfont/headscale/commit/94b30abf56ae09d82a1541bbc3d19557914f9b27
options.services.headscale.settings.db_type = mkOption {
type = lib.types.enum ["sqlite" "postgres"];
};
config = {
environment.systemPackages = [headscale-flake];
users.users.${mainUser}.extraGroups = ["headscale"];
home-manager.users.${mainUser}
.programs.bash.bashrcExtra = lib.mkAfter (readFile ./completion.bash);
.programs.bash.bashrcExtra = mkAfter (readFile ./completion.bash);
services.headscale = {
enable = true;
@ -33,7 +41,7 @@ in {
disable_check_updates = true;
unix_socket_permission = "0770";
db_type = "sqlite3";
db_type = "sqlite";
db_path = "/var/lib/headscale/db.sqlite";
private_key_path = "/var/lib/headscale/private.key";
noise.private_key_path = "/var/lib/headscale/noise_private.key";
@ -64,4 +72,5 @@ in {
};
};
};
};
}

Binary file not shown.

BIN
flake.nix

Binary file not shown.