Opt-in to formatting for the services/ subdirectory

This commit is contained in:
Nicolas Jeannerod 2024-11-14 09:49:49 +01:00
parent 4b77808f3f
commit a888540580
Signed by untrusted user: Niols
GPG key ID: 35DB9EC8886E1CB8
9 changed files with 15 additions and 40 deletions

View file

@ -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
{

View file

@ -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;

View file

@ -5,11 +5,7 @@ let
};
in
{
config,
lib,
...
}:
{ config, lib, ... }:
lib.mkIf (config.fediversity.enable && config.fediversity.mastodon.enable) {
#### garage setup

View file

@ -5,11 +5,7 @@ let
};
in
{
config,
lib,
...
}:
{ config, lib, ... }:
lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
networking.firewall.allowedTCPPorts = [

View file

@ -128,9 +128,7 @@
};
devShells.${system}.default = pkgs.mkShell {
inputs = with pkgs; [
nil
];
inputs = with pkgs; [ nil ];
shellHook = self.checks.${system}.pre-commit.shellHook;
};
};

View file

@ -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;

View file

@ -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

View file

@ -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}

View file

@ -1,8 +1,4 @@
{
lib,
modulesPath,
...
}:
{ lib, modulesPath, ... }:
let
inherit (lib) mkVMOverride;