Fix eval
This commit is contained in:
parent
923ca6cd9a
commit
f8765b410a
3 changed files with 67 additions and 58 deletions
24
flake.nix
24
flake.nix
|
@ -2,7 +2,6 @@
|
|||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
outputs = { self, nixpkgs, ... }: let
|
||||
inherit (nixpkgs) lib;
|
||||
eachSystem = lib.genAttrs [ "x86_64-linux" "aarch64-linux" ];
|
||||
in {
|
||||
nixosModules = {
|
||||
default = import ./module.nix;
|
||||
|
@ -11,23 +10,24 @@
|
|||
};
|
||||
};
|
||||
|
||||
nixosConfigurations = eachSystem (system: lib.nixosSystem {
|
||||
inherit system;
|
||||
nixosConfigurations.testEval = lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [ {
|
||||
system.stateVersion = "24.11";
|
||||
networking.hostName = "hostName";
|
||||
networking.domain = "domain";
|
||||
fileSystems."/".device = "nodev";
|
||||
boot.loader.grub.enable = false;
|
||||
services.akkoma.enable = true;
|
||||
services.akkoma.config.":pleroma".":instance" = {
|
||||
name = "test";
|
||||
description = "test";
|
||||
email = "test@test.test";
|
||||
services.akkoma.config.":pleroma" = {
|
||||
"Pleroma.Upload".base_url = "nonEmptyStr";
|
||||
":instance" = {
|
||||
name = "test";
|
||||
description = "test";
|
||||
email = "test@test.test";
|
||||
};
|
||||
};
|
||||
} ] ++ (with self.nixosModules; [ default florp ]);
|
||||
});
|
||||
|
||||
checks = eachSystem (system: {
|
||||
default = self.nixosConfigurations.${system}.config.system.build.toplevel;
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
10
florp.nix
10
florp.nix
|
@ -1,4 +1,6 @@
|
|||
{ lib, ... }: {
|
||||
{ lib, ... }: let
|
||||
genAction = instances: action: lib.genAttrs instances (_: action);
|
||||
in {
|
||||
instances = {
|
||||
"kiwifarms.*" = {
|
||||
reason = "Targeted harassment.";
|
||||
|
@ -31,7 +33,7 @@
|
|||
};
|
||||
}
|
||||
# Right‐wing extremism
|
||||
// lib.genAttrs [
|
||||
// genAction [
|
||||
"brighteon.social"
|
||||
"detroitriotcity.com"
|
||||
"freeatlantis.com"
|
||||
|
@ -45,7 +47,7 @@
|
|||
media = "mark";
|
||||
}
|
||||
# Lolicon, shotacon
|
||||
// lib.genAttrs [
|
||||
// genAction [
|
||||
"inumimi.love"
|
||||
"filly.love"
|
||||
"loli.church"
|
||||
|
@ -56,7 +58,7 @@
|
|||
media = "strip";
|
||||
}
|
||||
# CSAM suspects
|
||||
// lib.genAttrs [
|
||||
// genAction [
|
||||
"eepy.express"
|
||||
"megasugki.xyz"
|
||||
"minor.cafe"
|
||||
|
|
91
module.nix
91
module.nix
|
@ -11,29 +11,31 @@ in {
|
|||
options.services.akkoma.moderation = {
|
||||
instances = lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule {
|
||||
inherit reason;
|
||||
options = {
|
||||
inherit reason;
|
||||
|
||||
activities = lib.mkOption {
|
||||
type = with lib.types; (nullOr enum [ "unlist" "restrict" "reject" ]);
|
||||
default = null;
|
||||
description = ''
|
||||
Activity moderation:
|
||||
activities = lib.mkOption {
|
||||
type = with lib.types; (nullOr (enum [ "unlist" "restrict" "reject" "followersOnly" ]));
|
||||
default = null;
|
||||
description = ''
|
||||
Activity moderation:
|
||||
|
||||
- `unlist`: Remove activities from federated timeline.
|
||||
- `restrict`: Force activities to be visible to followers only.
|
||||
- `reject`: Reject all activities except deletes.
|
||||
'';
|
||||
};
|
||||
- `unlist`: Remove activities from federated timeline.
|
||||
- `restrict`: Force activities to be visible to followers only.
|
||||
- `reject`: Reject all activities except deletes.
|
||||
'';
|
||||
};
|
||||
|
||||
media = lib.mkOption {
|
||||
type = with lib.types; (nullOr enum [ "mark" "strip" ]);
|
||||
default = null;
|
||||
description = ''
|
||||
Media attachment moderation:
|
||||
media = lib.mkOption {
|
||||
type = with lib.types; (nullOr (enum [ "mark" "strip" ]));
|
||||
default = null;
|
||||
description = ''
|
||||
Media attachment moderation:
|
||||
|
||||
- `mark`: Mark media attachments as sensitive.
|
||||
- `strip`: Strip all media attachments.
|
||||
'';
|
||||
- `mark`: Mark media attachments as sensitive.
|
||||
- `strip`: Strip all media attachments.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -58,22 +60,25 @@ in {
|
|||
|
||||
hashtags = lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule {
|
||||
inherit reason;
|
||||
options = {
|
||||
inherit reason;
|
||||
|
||||
sensitive = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Mark tagged activities as sensitive.
|
||||
'';
|
||||
};
|
||||
sensitive = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Mark tagged activities as sensitive.
|
||||
'';
|
||||
};
|
||||
|
||||
unlisted = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Remove tagged activities from federated timeline.
|
||||
'';
|
||||
unlisted = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Remove tagged activities from federated timeline.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -92,17 +97,19 @@ in {
|
|||
};
|
||||
|
||||
keywords = lib.mkOption {
|
||||
type = with lib.types; attrsOf (submodule {
|
||||
inherit reason;
|
||||
type = with lib.types; attrsOf (submodule {
|
||||
options = {
|
||||
inherit reason;
|
||||
|
||||
action = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Activity moderation:
|
||||
action = lib.mkOption {
|
||||
type = lib.types.bool;
|
||||
description = ''
|
||||
Activity moderation:
|
||||
|
||||
- `unlist`: Remove matching activities from federated timelines.
|
||||
- `reject`: Reject matching activities.
|
||||
'';
|
||||
- `unlist`: Remove matching activities from federated timelines.
|
||||
- `reject`: Reject matching activities.
|
||||
'';
|
||||
};
|
||||
};
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue