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 52 additions and 47 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 {
};
};
};
};
}

View file

@ -392,17 +392,16 @@
]
},
"locked": {
"lastModified": 1707460001,
"narHash": "sha256-K9ULZEAr4mdB6ds/uoAcwLecj+ss2OQvJHKk+P91REA=",
"lastModified": 1711135921,
"narHash": "sha256-vv8+DnV4inQn+MfXCB0WMVLXAW4NbP2Em3VASbjeIjA=",
"owner": "juanfont",
"repo": "headscale",
"rev": "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b",
"rev": "8a8e25a8d1e6bc5fa27b7f72f99bbf24b290e0a6",
"type": "github"
},
"original": {
"owner": "juanfont",
"repo": "headscale",
"rev": "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b",
"type": "github"
}
},

View file

@ -171,9 +171,6 @@
owner = "juanfont";
repo = "headscale";
# FIXME: wait for nixpkgs to reach this : https://github.com/juanfont/headscale/commit/94b30abf56ae09d82a1541bbc3d19557914f9b27
rev = "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b";
inputs.nixpkgs.follows = "nixpkgs";
};