Opt-in to formatting for the services/
subdirectory
This commit is contained in:
parent
4b77808f3f
commit
a888540580
|
@ -27,7 +27,10 @@
|
||||||
## opt-in. Maybe one day we will decide to have them everywhere.
|
## opt-in. Maybe one day we will decide to have them everywhere.
|
||||||
let
|
let
|
||||||
inherit (builtins) concatStringsSep;
|
inherit (builtins) concatStringsSep;
|
||||||
optin = [ "deployment" ];
|
optin = [
|
||||||
|
"deployment"
|
||||||
|
"services"
|
||||||
|
];
|
||||||
files = "^((" + concatStringsSep "|" optin + ")/.*\\.nix|[^/]*\\.nix)$";
|
files = "^((" + concatStringsSep "|" optin + ")/.*\\.nix|[^/]*\\.nix)$";
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
|
@ -141,12 +141,8 @@ in
|
||||||
types.submodule {
|
types.submodule {
|
||||||
# TODO: these should be managed as secrets, not in the nix store
|
# TODO: these should be managed as secrets, not in the nix store
|
||||||
options = {
|
options = {
|
||||||
id = mkOption {
|
id = mkOption { type = types.str; };
|
||||||
type = types.str;
|
secret = mkOption { type = types.str; };
|
||||||
};
|
|
||||||
secret = mkOption {
|
|
||||||
type = types.str;
|
|
||||||
};
|
|
||||||
# TODO: assert at least one of these is true
|
# TODO: assert at least one of these is true
|
||||||
# NOTE: this currently needs to be done at the top level module
|
# NOTE: this currently needs to be done at the top level module
|
||||||
ensureAccess = mkOption {
|
ensureAccess = mkOption {
|
||||||
|
@ -184,9 +180,7 @@ in
|
||||||
pkgs.awscli
|
pkgs.awscli
|
||||||
];
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [ fedicfg.rpc.port ];
|
||||||
fedicfg.rpc.port
|
|
||||||
];
|
|
||||||
services.garage = {
|
services.garage = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.garage_0_9;
|
package = pkgs.garage_0_9;
|
||||||
|
|
|
@ -5,11 +5,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{ config, lib, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (config.fediversity.enable && config.fediversity.mastodon.enable) {
|
lib.mkIf (config.fediversity.enable && config.fediversity.mastodon.enable) {
|
||||||
#### garage setup
|
#### garage setup
|
||||||
|
|
|
@ -5,11 +5,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
{
|
{ config, lib, ... }:
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
|
lib.mkIf (config.fediversity.enable && config.fediversity.peertube.enable) {
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
|
|
|
@ -128,9 +128,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.${system}.default = pkgs.mkShell {
|
devShells.${system}.default = pkgs.mkShell {
|
||||||
inputs = with pkgs; [
|
inputs = with pkgs; [ nil ];
|
||||||
nil
|
|
||||||
];
|
|
||||||
shellHook = self.checks.${system}.pre-commit.shellHook;
|
shellHook = self.checks.${system}.pre-commit.shellHook;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,9 +42,7 @@ let
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [ "${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix" ];
|
||||||
"${nixpkgs}/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"
|
|
||||||
];
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
services.getty.autologinUser = lib.mkForce "root";
|
services.getty.autologinUser = lib.mkForce "root";
|
||||||
programs.bash.loginShellInit = nixpkgs.lib.getExe bootstrap;
|
programs.bash.loginShellInit = nixpkgs.lib.getExe bootstrap;
|
||||||
|
|
|
@ -7,9 +7,7 @@ let
|
||||||
|
|
||||||
seleniumScript =
|
seleniumScript =
|
||||||
pkgs.writers.writePython3Bin "selenium-script"
|
pkgs.writers.writePython3Bin "selenium-script"
|
||||||
{
|
{ libraries = with pkgs.python3Packages; [ selenium ]; }
|
||||||
libraries = with pkgs.python3Packages; [ selenium ];
|
|
||||||
}
|
|
||||||
''
|
''
|
||||||
from selenium import webdriver
|
from selenium import webdriver
|
||||||
from selenium.webdriver.common.by import By
|
from selenium.webdriver.common.by import By
|
||||||
|
|
|
@ -54,9 +54,7 @@ let
|
||||||
|
|
||||||
seleniumScriptPostPicture =
|
seleniumScriptPostPicture =
|
||||||
pkgs.writers.writePython3Bin "selenium-script-post-picture"
|
pkgs.writers.writePython3Bin "selenium-script-post-picture"
|
||||||
{
|
{ libraries = with pkgs.python3Packages; [ selenium ]; }
|
||||||
libraries = with pkgs.python3Packages; [ selenium ];
|
|
||||||
}
|
|
||||||
''
|
''
|
||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
@ -99,9 +97,7 @@ let
|
||||||
|
|
||||||
seleniumScriptGetSrc =
|
seleniumScriptGetSrc =
|
||||||
pkgs.writers.writePython3Bin "selenium-script-get-src"
|
pkgs.writers.writePython3Bin "selenium-script-get-src"
|
||||||
{
|
{ libraries = with pkgs.python3Packages; [ selenium ]; }
|
||||||
libraries = with pkgs.python3Packages; [ selenium ];
|
|
||||||
}
|
|
||||||
''
|
''
|
||||||
${seleniumImports}
|
${seleniumImports}
|
||||||
${seleniumSetup}
|
${seleniumSetup}
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{
|
{ lib, modulesPath, ... }:
|
||||||
lib,
|
|
||||||
modulesPath,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (lib) mkVMOverride;
|
inherit (lib) mkVMOverride;
|
||||||
|
|
Loading…
Reference in a new issue