fix(headscale): override db_type option to use latest headscale
All checks were successful
Discord / discord commits (push) Has been skipped
All checks were successful
Discord / discord commits (push) Has been skipped
This commit is contained in:
parent
be7d468efc
commit
c5898a9a64
3 changed files with 52 additions and 47 deletions
|
@ -6,16 +6,24 @@
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
inherit (builtins) readFile;
|
inherit (builtins) readFile;
|
||||||
|
inherit (lib) mkAfter mkOption;
|
||||||
|
|
||||||
inherit (config.vars) mainUser hostName;
|
inherit (config.vars) mainUser hostName;
|
||||||
headscale-flake = headscale.packages.${pkgs.system}.headscale;
|
headscale-flake = headscale.packages.${pkgs.system}.headscale;
|
||||||
|
|
||||||
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
|
clusterIP = config.services.pcsd.virtualIps.caddy-vip.ip;
|
||||||
in {
|
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];
|
environment.systemPackages = [headscale-flake];
|
||||||
users.users.${mainUser}.extraGroups = ["headscale"];
|
users.users.${mainUser}.extraGroups = ["headscale"];
|
||||||
|
|
||||||
home-manager.users.${mainUser}
|
home-manager.users.${mainUser}
|
||||||
.programs.bash.bashrcExtra = lib.mkAfter (readFile ./completion.bash);
|
.programs.bash.bashrcExtra = mkAfter (readFile ./completion.bash);
|
||||||
|
|
||||||
services.headscale = {
|
services.headscale = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -33,7 +41,7 @@ in {
|
||||||
disable_check_updates = true;
|
disable_check_updates = true;
|
||||||
unix_socket_permission = "0770";
|
unix_socket_permission = "0770";
|
||||||
|
|
||||||
db_type = "sqlite3";
|
db_type = "sqlite";
|
||||||
db_path = "/var/lib/headscale/db.sqlite";
|
db_path = "/var/lib/headscale/db.sqlite";
|
||||||
private_key_path = "/var/lib/headscale/private.key";
|
private_key_path = "/var/lib/headscale/private.key";
|
||||||
noise.private_key_path = "/var/lib/headscale/noise_private.key";
|
noise.private_key_path = "/var/lib/headscale/noise_private.key";
|
||||||
|
@ -64,4 +72,5 @@ in {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -392,17 +392,16 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1707460001,
|
"lastModified": 1711135921,
|
||||||
"narHash": "sha256-K9ULZEAr4mdB6ds/uoAcwLecj+ss2OQvJHKk+P91REA=",
|
"narHash": "sha256-vv8+DnV4inQn+MfXCB0WMVLXAW4NbP2Em3VASbjeIjA=",
|
||||||
"owner": "juanfont",
|
"owner": "juanfont",
|
||||||
"repo": "headscale",
|
"repo": "headscale",
|
||||||
"rev": "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b",
|
"rev": "8a8e25a8d1e6bc5fa27b7f72f99bbf24b290e0a6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "juanfont",
|
"owner": "juanfont",
|
||||||
"repo": "headscale",
|
"repo": "headscale",
|
||||||
"rev": "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b",
|
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -171,9 +171,6 @@
|
||||||
owner = "juanfont";
|
owner = "juanfont";
|
||||||
repo = "headscale";
|
repo = "headscale";
|
||||||
|
|
||||||
# FIXME: wait for nixpkgs to reach this : https://github.com/juanfont/headscale/commit/94b30abf56ae09d82a1541bbc3d19557914f9b27
|
|
||||||
rev = "00e7550e760b2d3d759471ff55d2b6e2dc81ad2b";
|
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nixpkgs";
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue