Rearrange config

This commit is contained in:
niten 2024-05-27 18:05:35 -07:00
parent 9cabd6d3af
commit e6d768a88b
1 changed files with 6 additions and 3 deletions

View File

@ -2,9 +2,12 @@
with lib; with lib;
let let
cfg = config.fudo.paris-container;
packages = with pkgs; [ rtorrent ];
in { in {
options = { options.fudo.paris-container = {
enable = mkEnableOption "Enable Fudo Paris user server."; enable = mkEnableOption "Enable Fudo Paris user server.";
state-directory = mkOption { state-directory = mkOption {
@ -69,11 +72,11 @@ in {
config = { config = {
nixpkgs.pkgs = pkgs; nixpkgs.pkgs = pkgs;
environment.systemPackages = with pkgs; [ rtorrent ]; environment.systemPackages = packages;
networking = { networking = {
defaultGateway = { defaultGateway = {
address = getSiteGatewayV4 siteName; address = config.networking.defaultGateway.address;
interface = "mv-${cfg.networking.interface}"; interface = "mv-${cfg.networking.interface}";
}; };
enableIPv6 = !isNull cfg.networking.ipv6; enableIPv6 = !isNull cfg.networking.ipv6;