diff --git a/flake.nix b/flake.nix index 38975cab..7192e506 100644 --- a/flake.nix +++ b/flake.nix @@ -27,7 +27,10 @@ ## opt-in. Maybe one day we will decide to have them everywhere. let inherit (builtins) concatStringsSep; - optin = [ "deployment" ]; + optin = [ + "deployment" + "services" + ]; files = "^((" + concatStringsSep "|" optin + ")/.*\\.nix|[^/]*\\.nix)$"; in { diff --git a/services/fediversity/garage.nix b/services/fediversity/garage.nix index 758a151c..16b57027 100644 --- a/services/fediversity/garage.nix +++ b/services/fediversity/garage.nix @@ -141,12 +141,8 @@ in types.submodule { # TODO: these should be managed as secrets, not in the nix store options = { - id = mkOption { - type = types.str; - }; - secret = mkOption { - type = types.str; - }; + id = mkOption { type = types.str; }; + secret = mkOption { type = types.str; }; # TODO: assert at least one of these is true # NOTE: this currently needs to be done at the top level module ensureAccess = mkOption { @@ -184,9 +180,7 @@ in pkgs.awscli ]; - networking.firewall.allowedTCPPorts = [ - fedicfg.rpc.port - ]; + networking.firewall.allowedTCPPorts = [ fedicfg.rpc.port ]; services.garage = { enable = true; package = pkgs.garage_0_9; diff --git a/services/fediversity/mastodon.nix b/services/fediversity/mastodon.nix index 8b6e95bc..8cd74540 100644 --- a/services/fediversity/mastodon.nix +++ b/services/fediversity/mastodon.nix @@ -5,11 +5,7 @@ let }; in -{ - config, - lib, - ... -}: +{ config, lib, ... }: lib.mkIf (config.fediversity.enable && config.fediversity.mastodon.enable) { #### garage setup diff --git a/services/fediversity/peertube.nix b/services/fediversity/peertube.nix index 4a4a07b2..1d1ea081 100644 --- a/services/fediversity/peertube.nix +++ b/services/fediversity/peertube.nix @@ -5,11 +5,7 @@ let }; in -{ - config, - lib, - ... -}: +{ config, lib, ... }: lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) { networking.firewall.allowedTCPPorts = [ diff --git a/services/flake.nix b/services/flake.nix index aec006b7..b55b2812 100644 --- a/services/flake.nix +++ b/services/flake.nix @@ -128,9 +128,7 @@ }; devShells.${system}.default = pkgs.mkShell { - inputs = with pkgs; [ - nil - ]; + inputs = with pkgs; [ nil ]; shellHook = self.checks.${system}.pre-commit.shellHook; }; }; diff --git a/services/installer.nix b/services/installer.nix index f87be582..a5f787ef 100644 --- a/services/installer.nix +++ b/services/installer.nix @@ -42,9 +42,7 @@ let }; in { - imports = [ - "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" - ]; + imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ]; nixpkgs.hostPlatform = "x86_64-linux"; services.getty.autologinUser = lib.mkForce "root"; programs.bash.loginShellInit = nixpkgs.lib.getExe bootstrap; diff --git a/services/tests/mastodon-garage.nix b/services/tests/mastodon-garage.nix index 75e269c3..242e8650 100644 --- a/services/tests/mastodon-garage.nix +++ b/services/tests/mastodon-garage.nix @@ -7,9 +7,7 @@ let seleniumScript = pkgs.writers.writePython3Bin "selenium-script" - { - libraries = with pkgs.python3Packages; [ selenium ]; - } + { libraries = with pkgs.python3Packages; [ selenium ]; } '' from selenium import webdriver from selenium.webdriver.common.by import By diff --git a/services/tests/pixelfed-garage.nix b/services/tests/pixelfed-garage.nix index 746728bd..bdac4029 100644 --- a/services/tests/pixelfed-garage.nix +++ b/services/tests/pixelfed-garage.nix @@ -54,9 +54,7 @@ let seleniumScriptPostPicture = pkgs.writers.writePython3Bin "selenium-script-post-picture" - { - libraries = with pkgs.python3Packages; [ selenium ]; - } + { libraries = with pkgs.python3Packages; [ selenium ]; } '' import os import time @@ -99,9 +97,7 @@ let seleniumScriptGetSrc = pkgs.writers.writePython3Bin "selenium-script-get-src" - { - libraries = with pkgs.python3Packages; [ selenium ]; - } + { libraries = with pkgs.python3Packages; [ selenium ]; } '' ${seleniumImports} ${seleniumSetup} diff --git a/services/vm/pixelfed-vm.nix b/services/vm/pixelfed-vm.nix index 8ec156a7..b5e820f7 100644 --- a/services/vm/pixelfed-vm.nix +++ b/services/vm/pixelfed-vm.nix @@ -1,8 +1,4 @@ -{ - lib, - modulesPath, - ... -}: +{ lib, modulesPath, ... }: let inherit (lib) mkVMOverride;