Rearrange config
This commit is contained in:
parent
9cabd6d3af
commit
e6d768a88b
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue