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