stormd works fully!

This commit is contained in:
RingOfStorms (Joshua Bell) 2024-10-14 03:51:21 -05:00
parent 7afc927424
commit 4b12a463af
4 changed files with 20 additions and 9 deletions

8
flake.lock generated
View file

@ -1251,11 +1251,11 @@
"rust-overlay": "rust-overlay_4" "rust-overlay": "rust-overlay_4"
}, },
"locked": { "locked": {
"lastModified": 1728889741, "lastModified": 1728895723,
"narHash": "sha256-EbgfN3lQc8nkg2SrVL/HkuNZjXlJ5HSsCejvBNFIisI=", "narHash": "sha256-4fnIovUKtPdzb0FxTTxPa2XY/OyHmh2O30LaoWpm7OQ=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "613a70c6f514c463f456cf7a4d750f9895bb0dee", "rev": "14cc763f75a3cd3af2a5efbf4cf98ba8a407cd8f",
"revCount": 34, "revCount": 39,
"type": "git", "type": "git",
"url": "ssh://git.joshuabell.xyz:3032/stormd" "url": "ssh://git.joshuabell.xyz:3032/stormd"
}, },

View file

@ -20,9 +20,9 @@
tty_caps_esc.enable = true; tty_caps_esc.enable = true;
docker.enable = true; docker.enable = true;
fonts.enable = true; fonts.enable = true;
# nebula.enable = true;
ssh.enable = true; ssh.enable = true;
stormd.enable = true; # TODO figure out why this is failing stormd.enable = true;
nebula.enable = true;
}; };
# machine specific configuration # machine specific configuration

View file

@ -13,6 +13,13 @@ in
options = { options = {
mods.${name} = { mods.${name} = {
enable = mkEnableOption (lib.mdDoc "Enable ${name}"); enable = mkEnableOption (lib.mdDoc "Enable ${name}");
preflight = mkOption {
type = types.bool;
default = false;
description = ''
Does not enable the service since we're in preflight mode.
'';
};
}; };
}; };
@ -24,7 +31,7 @@ in
networking.firewall.allowedUDPPorts = [ 4242 ]; networking.firewall.allowedUDPPorts = [ 4242 ];
systemd.services."nebula" = { systemd.services."nebula" = mkIf (!cfg.preflight) {
description = "Nebula VPN service"; description = "Nebula VPN service";
wants = [ "basic.target" ]; wants = [ "basic.target" ];
after = [ after = [

View file

@ -1,6 +1,7 @@
{ {
config, config,
lib, lib,
pkgs,
ringofstorms-stormd, ringofstorms-stormd,
settings, settings,
... ...
@ -20,7 +21,10 @@ in
imports = [ ringofstorms-stormd.nixosModules.${settings.system.system} ]; imports = [ ringofstorms-stormd.nixosModules.${settings.system.system} ];
config = mkIf cfg.enable { config = mkIf cfg.enable {
users.users.root.packages = [ ringofstorms-stormd.packages.${settings.system.system}.stormd ]; services.stormd = {
services.stormd.enable = true; enable = true;
nebulaPackage = pkgs.nebula;
extraOptions = [ "-v" ];
};
}; };
} }