Compare commits
11 Commits
ustetind-g
...
main
Author | SHA1 | Date | |
---|---|---|---|
edb448f7a0 | |||
4507ffe2ab | |||
882a8f2e88 | |||
65da25da7e | |||
fd81d61a56 | |||
2776273a27 | |||
ebc5b269ef | |||
850d0b0ec5 | |||
02792fc20e | |||
40dd069a52 | |||
04a838fc62 |
@ -7,7 +7,7 @@
|
|||||||
# --update-input is deprecated since nix 2.22, and removed in lix 2.90
|
# --update-input is deprecated since nix 2.22, and removed in lix 2.90
|
||||||
# https://git.lix.systems/lix-project/lix/issues/400
|
# https://git.lix.systems/lix-project/lix/issues/400
|
||||||
"--refresh"
|
"--refresh"
|
||||||
"--override-input" "nixpkgs" "github:nixos/nixpkgs/nixos-24.05-small"
|
"--override-input" "nixpkgs" "github:nixos/nixpkgs/nixos-24.11-small"
|
||||||
"--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable-small"
|
"--override-input" "nixpkgs-unstable" "github:nixos/nixpkgs/nixos-unstable-small"
|
||||||
"--no-write-lock-file"
|
"--no-write-lock-file"
|
||||||
];
|
];
|
||||||
|
@ -1,42 +1,8 @@
|
|||||||
{ ... }:
|
{ ... }:
|
||||||
{
|
{
|
||||||
# source: https://github.com/logrotate/logrotate/blob/main/examples/logrotate.service
|
|
||||||
systemd.services.logrotate = {
|
systemd.services.logrotate = {
|
||||||
documentation = [ "man:logrotate(8)" "man:logrotate.conf(5)" ];
|
documentation = [ "man:logrotate(8)" "man:logrotate.conf(5)" ];
|
||||||
unitConfig.RequiresMountsFor = "/var/log";
|
unitConfig.RequiresMountsFor = "/var/log";
|
||||||
serviceConfig = {
|
serviceConfig.ReadWritePaths = [ "/var/log" ];
|
||||||
Nice = 19;
|
|
||||||
IOSchedulingClass = "best-effort";
|
|
||||||
IOSchedulingPriority = 7;
|
|
||||||
|
|
||||||
ReadWritePaths = [ "/var/log" ];
|
|
||||||
|
|
||||||
AmbientCapabilities = [ "" ];
|
|
||||||
CapabilityBoundingSet = [ "" ];
|
|
||||||
DeviceAllow = [ "" ];
|
|
||||||
LockPersonality = true;
|
|
||||||
MemoryDenyWriteExecute = true;
|
|
||||||
NoNewPrivileges = true; # disable for third party rotate scripts
|
|
||||||
PrivateDevices = true;
|
|
||||||
PrivateNetwork = true; # disable for mail delivery
|
|
||||||
PrivateTmp = true;
|
|
||||||
ProtectClock = true;
|
|
||||||
ProtectControlGroups = true;
|
|
||||||
ProtectHome = true; # disable for userdir logs
|
|
||||||
ProtectHostname = true;
|
|
||||||
ProtectKernelLogs = true;
|
|
||||||
ProtectKernelModules = true;
|
|
||||||
ProtectKernelTunables = true;
|
|
||||||
ProtectProc = "invisible";
|
|
||||||
ProtectSystem = "full";
|
|
||||||
RestrictNamespaces = true;
|
|
||||||
RestrictRealtime = true;
|
|
||||||
RestrictSUIDSGID = true; # disable for creating setgid directories
|
|
||||||
SocketBindDeny = [ "any" ];
|
|
||||||
SystemCallArchitectures = "native";
|
|
||||||
SystemCallFilter = [
|
|
||||||
"@system-service"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
systemd.services.nginx.serviceConfig = lib.mkIf config.services.nginx.enable {
|
systemd.services.nginx.serviceConfig = lib.mkIf config.services.nginx.enable {
|
||||||
LimitNOFILE = 65536;
|
LimitNOFILE = 65536;
|
||||||
|
# We use jit my dudes
|
||||||
|
MemoryDenyWriteExecute = lib.mkForce false;
|
||||||
|
# What the fuck do we use that where the defaults are not enough???
|
||||||
|
SystemCallFilter = lib.mkForce null;
|
||||||
};
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."_" = lib.mkIf config.services.nginx.enable {
|
services.nginx.virtualHosts."_" = lib.mkIf config.services.nginx.enable {
|
||||||
|
53
flake.lock
generated
53
flake.lock
generated
@ -7,11 +7,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731746438,
|
"lastModified": 1733168902,
|
||||||
"narHash": "sha256-f3SSp1axoOk0NAI7oFdRzbxG2XPBSIXC+/DaAXnvS1A=",
|
"narHash": "sha256-8dupm9GfK+BowGdQd7EHK5V61nneLfr9xR6sc5vtDi0=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "disko",
|
"repo": "disko",
|
||||||
"rev": "cb64993826fa7a477490be6ccb38ba1fa1e18fa8",
|
"rev": "785c1e02c7e465375df971949b8dcbde9ec362e5",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -119,43 +119,27 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731663789,
|
"lastModified": 1733466147,
|
||||||
"narHash": "sha256-x07g4NcqGP6mQn6AISXJaks9sQYDjZmTMBlKIvajvyc=",
|
"narHash": "sha256-1QAch5UZXGDc8Kh3PvdIKfVNeebjZFWiIKn8lAr1ZBM=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "035d434d48f4375ac5d3a620954cf5fda7dd7c36",
|
"rev": "66dddf2c2aae34272f117ea95a06efe376edbe27",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.05-small",
|
"ref": "nixos-24.11-small",
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs-stable": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1730602179,
|
|
||||||
"narHash": "sha256-efgLzQAWSzJuCLiCaQUCDu4NudNlHdg2NzGLX5GYaEY=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "3c2f1c4ca372622cb2f9de8016c9a0b1cbd0f37c",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"ref": "release-24.05",
|
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs-unstable": {
|
"nixpkgs-unstable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731745710,
|
"lastModified": 1733603762,
|
||||||
"narHash": "sha256-SVeiClbgqL071JpAspOu0gCkPSAL51kSIRwo4C/pghA=",
|
"narHash": "sha256-E+cuaL8s1oHCumWD/Zkw0gkLOOQcz848pVyLfvqWDVw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "dfaa4cb76c2d450d8f396bb6b9f43cede3ade129",
|
"rev": "b1dd465e8139748a8e26037fdd4c5ffe79457cbd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -192,11 +176,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1725212759,
|
"lastModified": 1734820349,
|
||||||
"narHash": "sha256-yZBsefIarFUEhFRj+rCGMp9Zvag3MCafqV/JfGVRVwc=",
|
"narHash": "sha256-ZjfttVIMtDqns9wNRyWfP7Ae+kuEZfyXK5sqLmxzsgU=",
|
||||||
"ref": "refs/heads/master",
|
"ref": "refs/heads/master",
|
||||||
"rev": "e7b66b4bc6a89bab74bac45b87e9434f5165355f",
|
"rev": "2930f9863ffa4bdc036535159717c9605bcb5a06",
|
||||||
"revCount": 473,
|
"revCount": 474,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
|
"url": "https://git.pvv.ntnu.no/Projects/nettsiden.git"
|
||||||
},
|
},
|
||||||
@ -245,15 +229,14 @@
|
|||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
"nixpkgs"
|
"nixpkgs"
|
||||||
],
|
]
|
||||||
"nixpkgs-stable": "nixpkgs-stable"
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1731748189,
|
"lastModified": 1733128155,
|
||||||
"narHash": "sha256-Zd/Uukvpcu26M6YGhpbsgqm6LUSLz+Q8mDZ5LOEGdiE=",
|
"narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=",
|
||||||
"owner": "Mic92",
|
"owner": "Mic92",
|
||||||
"repo": "sops-nix",
|
"repo": "sops-nix",
|
||||||
"rev": "d2bd7f433b28db6bc7ae03d5eca43564da0af054",
|
"rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
22
flake.nix
22
flake.nix
@ -2,7 +2,7 @@
|
|||||||
description = "PVV System flake";
|
description = "PVV System flake";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05-small"; # remember to also update the url in base/services/auto-upgrade.nix
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11-small"; # remember to also update the url in base/services/auto-upgrade.nix
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixos-unstable-small";
|
||||||
|
|
||||||
sops-nix.url = "github:Mic92/sops-nix";
|
sops-nix.url = "github:Mic92/sops-nix";
|
||||||
@ -33,13 +33,13 @@
|
|||||||
|
|
||||||
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
outputs = { self, nixpkgs, nixpkgs-unstable, sops-nix, disko, ... }@inputs:
|
||||||
let
|
let
|
||||||
nixlib = nixpkgs.lib;
|
inherit (nixpkgs) lib;
|
||||||
systems = [
|
systems = [
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-linux"
|
"aarch64-linux"
|
||||||
"aarch64-darwin"
|
"aarch64-darwin"
|
||||||
];
|
];
|
||||||
forAllSystems = f: nixlib.genAttrs systems f;
|
forAllSystems = f: lib.genAttrs systems f;
|
||||||
allMachines = builtins.attrNames self.nixosConfigurations;
|
allMachines = builtins.attrNames self.nixosConfigurations;
|
||||||
importantMachines = [
|
importantMachines = [
|
||||||
"bekkalokk"
|
"bekkalokk"
|
||||||
@ -49,11 +49,11 @@
|
|||||||
"ildkule"
|
"ildkule"
|
||||||
];
|
];
|
||||||
in {
|
in {
|
||||||
inputs = nixlib.mapAttrs (_: src: src.outPath) inputs;
|
inputs = lib.mapAttrs (_: src: src.outPath) inputs;
|
||||||
|
|
||||||
nixosConfigurations = let
|
nixosConfigurations = let
|
||||||
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
unstablePkgs = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||||
nixosConfig = nixpkgs: name: config: nixpkgs.lib.nixosSystem (nixpkgs.lib.recursiveUpdate
|
nixosConfig = nixpkgs: name: config: lib.nixosSystem (lib.recursiveUpdate
|
||||||
rec {
|
rec {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
@ -156,19 +156,19 @@
|
|||||||
in rec {
|
in rec {
|
||||||
default = important-machines;
|
default = important-machines;
|
||||||
important-machines = pkgs.linkFarm "important-machines"
|
important-machines = pkgs.linkFarm "important-machines"
|
||||||
(nixlib.getAttrs importantMachines self.packages.x86_64-linux);
|
(lib.getAttrs importantMachines self.packages.x86_64-linux);
|
||||||
all-machines = pkgs.linkFarm "all-machines"
|
all-machines = pkgs.linkFarm "all-machines"
|
||||||
(nixlib.getAttrs allMachines self.packages.x86_64-linux);
|
(lib.getAttrs allMachines self.packages.x86_64-linux);
|
||||||
|
|
||||||
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
simplesamlphp = pkgs.callPackage ./packages/simplesamlphp { };
|
||||||
|
|
||||||
} //
|
} //
|
||||||
(nixlib.pipe null [
|
(lib.pipe null [
|
||||||
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
(_: pkgs.callPackage ./packages/mediawiki-extensions { })
|
||||||
(nixlib.flip builtins.removeAttrs ["override" "overrideDerivation"])
|
(lib.flip builtins.removeAttrs ["override" "overrideDerivation"])
|
||||||
(nixlib.mapAttrs' (name: nixlib.nameValuePair "mediawiki-${name}"))
|
(lib.mapAttrs' (name: lib.nameValuePair "mediawiki-${name}"))
|
||||||
])
|
])
|
||||||
// nixlib.genAttrs allMachines
|
// lib.genAttrs allMachines
|
||||||
(machine: self.nixosConfigurations.${machine}.config.system.build.toplevel);
|
(machine: self.nixosConfigurations.${machine}.config.system.build.toplevel);
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -6,7 +6,7 @@ in {
|
|||||||
./module.nix # From danio, pending upstreaming
|
./module.nix # From danio, pending upstreaming
|
||||||
];
|
];
|
||||||
|
|
||||||
disabledModules = [ "services/web-servers/bluemap.nix" ];
|
disabledModules = [ "services/web-apps/bluemap.nix" ];
|
||||||
|
|
||||||
sops.secrets."bluemap/ssh-key" = { };
|
sops.secrets."bluemap/ssh-key" = { };
|
||||||
sops.secrets."bluemap/ssh-known-hosts" = { };
|
sops.secrets."bluemap/ssh-known-hosts" = { };
|
||||||
|
@ -27,6 +27,7 @@ in
|
|||||||
users.users."gitea-web" = {
|
users.users."gitea-web" = {
|
||||||
group = "gitea-web";
|
group = "gitea-web";
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
|
shell = pkgs.bash;
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.secrets."gitea/web-secret-provider/token" = {
|
sops.secrets."gitea/web-secret-provider/token" = {
|
||||||
@ -58,6 +59,7 @@ in
|
|||||||
key-dir = "/var/lib/gitea-web/keys/%i";
|
key-dir = "/var/lib/gitea-web/keys/%i";
|
||||||
authorized-keys-path = "/var/lib/gitea-web/authorized_keys.d/%i";
|
authorized-keys-path = "/var/lib/gitea-web/authorized_keys.d/%i";
|
||||||
rrsync-script = pkgs.writeShellScript "rrsync-chown" ''
|
rrsync-script = pkgs.writeShellScript "rrsync-chown" ''
|
||||||
|
mkdir -p "$1"
|
||||||
${lib.getExe pkgs.rrsync} -wo "$1"
|
${lib.getExe pkgs.rrsync} -wo "$1"
|
||||||
${pkgs.coreutils}/bin/chown -R gitea-web:gitea-web "$1"
|
${pkgs.coreutils}/bin/chown -R gitea-web:gitea-web "$1"
|
||||||
'';
|
'';
|
||||||
|
@ -34,7 +34,21 @@ def get_org_repo_list(args: argparse.Namespace, token: str):
|
|||||||
f"{args.api_url}/orgs/{args.org}/repos",
|
f"{args.api_url}/orgs/{args.org}/repos",
|
||||||
headers = { 'Authorization': 'token ' + token },
|
headers = { 'Authorization': 'token ' + token },
|
||||||
)
|
)
|
||||||
return [repo["name"] for repo in result.json()]
|
|
||||||
|
results = [repo["name"] for repo in result.json()]
|
||||||
|
target = int(result.headers['X-Total-Count'])
|
||||||
|
|
||||||
|
i = 2
|
||||||
|
while len(results) < target:
|
||||||
|
result = requests.get(
|
||||||
|
f"{args.api_url}/orgs/{args.org}/repos",
|
||||||
|
params = { 'page': i },
|
||||||
|
headers = { 'Authorization': 'token ' + token },
|
||||||
|
)
|
||||||
|
results += [repo["name"] for repo in result.json()]
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
return results
|
||||||
|
|
||||||
|
|
||||||
def generate_ssh_key(args: argparse.Namespace, repository: str):
|
def generate_ssh_key(args: argparse.Namespace, repository: str):
|
||||||
|
@ -83,7 +83,6 @@ in {
|
|||||||
ProtectKernelLogs = true;
|
ProtectKernelLogs = true;
|
||||||
ProtectKernelModules = true;
|
ProtectKernelModules = true;
|
||||||
ProtectKernelTunables = true;
|
ProtectKernelTunables = true;
|
||||||
ProtectProc = "invisible";
|
|
||||||
RestrictAddressFamilies = [
|
RestrictAddressFamilies = [
|
||||||
"AF_INET"
|
"AF_INET"
|
||||||
"AF_INET6"
|
"AF_INET6"
|
||||||
@ -98,7 +97,6 @@ in {
|
|||||||
"@system-service"
|
"@system-service"
|
||||||
"~@privileged"
|
"~@privileged"
|
||||||
];
|
];
|
||||||
UMask = "0007";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ in
|
|||||||
custom_from
|
custom_from
|
||||||
]);
|
]);
|
||||||
|
|
||||||
dicts = with pkgs.aspellDicts; [ en en-science en-computers nb nn fr de it ];
|
dicts = with pkgs.aspellDicts; [ en en-computers nb nn fr de it ];
|
||||||
maxAttachmentSize = 20;
|
maxAttachmentSize = 20;
|
||||||
hostName = "roundcubeplaceholder.example.com";
|
hostName = "roundcubeplaceholder.example.com";
|
||||||
|
|
||||||
|
@ -6,10 +6,6 @@ let
|
|||||||
webhookListenPort = 8435;
|
webhookListenPort = 8435;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./module.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
sops.secrets."matrix/hookshot/as_token" = {
|
sops.secrets."matrix/hookshot/as_token" = {
|
||||||
sopsFile = fp /secrets/bicep/matrix.yaml;
|
sopsFile = fp /secrets/bicep/matrix.yaml;
|
||||||
key = "hookshot/as_token";
|
key = "hookshot/as_token";
|
||||||
|
@ -1,127 +0,0 @@
|
|||||||
{
|
|
||||||
config,
|
|
||||||
pkgs,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
let
|
|
||||||
cfg = config.services.matrix-hookshot;
|
|
||||||
settingsFormat = pkgs.formats.yaml { };
|
|
||||||
configFile = settingsFormat.generate "matrix-hookshot-config.yml" cfg.settings;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
options = {
|
|
||||||
services.matrix-hookshot = {
|
|
||||||
enable = lib.mkEnableOption "matrix-hookshot, a bridge between Matrix and project management services";
|
|
||||||
|
|
||||||
package = lib.mkPackageOption pkgs "matrix-hookshot" { };
|
|
||||||
|
|
||||||
registrationFile = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
description = ''
|
|
||||||
Appservice registration file.
|
|
||||||
As it contains secret tokens, you may not want to add this to the publicly readable Nix store.
|
|
||||||
'';
|
|
||||||
example = lib.literalExpression ''
|
|
||||||
pkgs.writeText "matrix-hookshot-registration" \'\'
|
|
||||||
id: matrix-hookshot
|
|
||||||
as_token: aaaaaaaaaa
|
|
||||||
hs_token: aaaaaaaaaa
|
|
||||||
namespaces:
|
|
||||||
rooms: []
|
|
||||||
users:
|
|
||||||
- regex: "@_webhooks_.*:foobar"
|
|
||||||
exclusive: true
|
|
||||||
|
|
||||||
sender_localpart: hookshot
|
|
||||||
url: "http://localhost:9993"
|
|
||||||
rate_limited: false
|
|
||||||
\'\'
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
settings = lib.mkOption {
|
|
||||||
description = ''
|
|
||||||
{file}`config.yml` configuration as a Nix attribute set.
|
|
||||||
|
|
||||||
For details please see the [documentation](https://matrix-org.github.io/matrix-hookshot/latest/setup/sample-configuration.html).
|
|
||||||
'';
|
|
||||||
example = {
|
|
||||||
bridge = {
|
|
||||||
domain = "example.com";
|
|
||||||
url = "http://localhost:8008";
|
|
||||||
mediaUrl = "https://example.com";
|
|
||||||
port = 9993;
|
|
||||||
bindAddress = "127.0.0.1";
|
|
||||||
};
|
|
||||||
listeners = [
|
|
||||||
{
|
|
||||||
port = 9000;
|
|
||||||
bindAddress = "0.0.0.0";
|
|
||||||
resources = [ "webhooks" ];
|
|
||||||
}
|
|
||||||
{
|
|
||||||
port = 9001;
|
|
||||||
bindAddress = "localhost";
|
|
||||||
resources = [
|
|
||||||
"metrics"
|
|
||||||
"provisioning"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
default = { };
|
|
||||||
type = lib.types.submodule {
|
|
||||||
freeformType = settingsFormat.type;
|
|
||||||
options = {
|
|
||||||
passFile = lib.mkOption {
|
|
||||||
type = lib.types.path;
|
|
||||||
default = "/var/lib/matrix-hookshot/passkey.pem";
|
|
||||||
description = ''
|
|
||||||
A passkey used to encrypt tokens stored inside the bridge.
|
|
||||||
File will be generated if not found.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
serviceDependencies = lib.mkOption {
|
|
||||||
type = with lib.types; listOf str;
|
|
||||||
default = lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit;
|
|
||||||
defaultText = lib.literalExpression ''
|
|
||||||
lib.optional config.services.matrix-synapse.enable config.services.matrix-synapse.serviceUnit
|
|
||||||
'';
|
|
||||||
description = ''
|
|
||||||
List of Systemd services to require and wait for when starting the application service,
|
|
||||||
such as the Matrix homeserver if it's running on the same host.
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
|
||||||
systemd.services.matrix-hookshot = {
|
|
||||||
description = "a bridge between Matrix and multiple project management services";
|
|
||||||
|
|
||||||
wantedBy = [ "multi-user.target" ];
|
|
||||||
wants = [ "network-online.target" ] ++ cfg.serviceDependencies;
|
|
||||||
after = [ "network-online.target" ] ++ cfg.serviceDependencies;
|
|
||||||
|
|
||||||
preStart = ''
|
|
||||||
if [ ! -f '${cfg.settings.passFile}' ]; then
|
|
||||||
mkdir -p $(dirname '${cfg.settings.passFile}')
|
|
||||||
${pkgs.openssl}/bin/openssl genpkey -out '${cfg.settings.passFile}' -outform PEM -algorithm RSA -pkeyopt rsa_keygen_bits:4096
|
|
||||||
fi
|
|
||||||
'';
|
|
||||||
|
|
||||||
serviceConfig = {
|
|
||||||
Type = "simple";
|
|
||||||
Restart = "always";
|
|
||||||
ExecStart = "${cfg.package}/bin/matrix-hookshot ${configFile} ${cfg.registrationFile}";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
meta.maintainers = with lib.maintainers; [ flandweber ];
|
|
||||||
}
|
|
@ -16,19 +16,28 @@
|
|||||||
networking.hostName = "ustetind";
|
networking.hostName = "ustetind";
|
||||||
|
|
||||||
networking.useHostResolvConf = lib.mkForce false;
|
networking.useHostResolvConf = lib.mkForce false;
|
||||||
# systemd.network.enable = lib.mkForce false;
|
|
||||||
# networking.useDHCP = lib.mkForce true;
|
|
||||||
# networking.address = with values.hosts.georg; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
|
||||||
|
|
||||||
systemd.network.networks."30-lxc-veth" = values.defaultNetworkConfig // {
|
systemd.network.networks = {
|
||||||
matchConfig = {
|
"30-lxc-eth" = values.defaultNetworkConfig // {
|
||||||
Type = "ether";
|
matchConfig = {
|
||||||
Kind = "veth";
|
Type = "ether";
|
||||||
Name = [
|
Kind = "veth";
|
||||||
"eth*"
|
Name = [
|
||||||
];
|
"eth*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
address = with values.hosts.ustetind; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
||||||
|
};
|
||||||
|
"40-podman-veth" = values.defaultNetworkConfig // {
|
||||||
|
matchConfig = {
|
||||||
|
Type = "ether";
|
||||||
|
Kind = "veth";
|
||||||
|
Name = [
|
||||||
|
"veth*"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
DHCP = "yes";
|
||||||
};
|
};
|
||||||
address = with values.hosts.ustetind; [ (ipv4 + "/25") (ipv6 + "/64") ];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
system.stateVersion = "24.11";
|
system.stateVersion = "24.11";
|
||||||
|
@ -15,8 +15,8 @@ let
|
|||||||
enable = true;
|
enable = true;
|
||||||
name = "git-runner-${name}"; url = "https://git.pvv.ntnu.no";
|
name = "git-runner-${name}"; url = "https://git.pvv.ntnu.no";
|
||||||
labels = [
|
labels = [
|
||||||
"debian-latest:docker://node:18-bullseye"
|
"debian-latest:docker://node:current-bookworm"
|
||||||
"ubuntu-latest:docker://node:18-bullseye"
|
"ubuntu-latest:docker://node:current-bookworm"
|
||||||
];
|
];
|
||||||
tokenFile = config.sops.secrets."gitea/runners/${name}".path;
|
tokenFile = config.sops.secrets."gitea/runners/${name}".path;
|
||||||
};
|
};
|
||||||
@ -27,5 +27,15 @@ lib.mkMerge [
|
|||||||
(mkRunner "alpha")
|
(mkRunner "alpha")
|
||||||
(mkRunner "beta")
|
(mkRunner "beta")
|
||||||
(mkRunner "epsilon")
|
(mkRunner "epsilon")
|
||||||
{ virtualisation.podman.enable = true; }
|
{
|
||||||
|
virtualisation.podman = {
|
||||||
|
enable = true;
|
||||||
|
defaultNetwork.settings.dns_enabled = true;
|
||||||
|
autoPrune.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.dhcpcd.IPv6rs = false;
|
||||||
|
|
||||||
|
networking.firewall.interfaces."podman+".allowedUDPPorts = [53 5353];
|
||||||
|
}
|
||||||
]
|
]
|
||||||
|
@ -12,7 +12,7 @@ let
|
|||||||
name
|
name
|
||||||
, commit
|
, commit
|
||||||
, hash
|
, hash
|
||||||
, tracking-branch ? "REL1_41"
|
, tracking-branch ? "REL1_42"
|
||||||
, kebab-name ? kebab-case-name name
|
, kebab-name ? kebab-case-name name
|
||||||
, fetchgit ? pkgs.fetchgit
|
, fetchgit ? pkgs.fetchgit
|
||||||
}:
|
}:
|
||||||
@ -33,63 +33,63 @@ in
|
|||||||
lib.mergeAttrsList [
|
lib.mergeAttrsList [
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "CodeEditor";
|
name = "CodeEditor";
|
||||||
commit = "7d8447035e381d76387e38b92e4d1e2b8d373a01";
|
commit = "9f69f2cf7616342d236726608a702d651b611938";
|
||||||
hash = "sha256-v2AlbP0vZma3qZyEAWGjZ/rLcvOpIMroyc1EixKjlAU=";
|
hash = "sha256-sRaYj34+7aghJUw18RoowzEiMx0aOANU1a7YT8jivBw=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "CodeMirror";
|
name = "CodeMirror";
|
||||||
commit = "a7b4541089f9b88a0b722d9d790e4cf0f13aa328";
|
commit = "1a1048c770795789676adcf8a33c1b69f6f5d3ae";
|
||||||
hash = "sha256-clyzN3v3+J4GjdyhrCsytBrH7VR1tq5yd0rB+32eWCg=";
|
hash = "sha256-Y5ePrtLNiko2uU/sesm8jdYmxZkYzQDHfkIG1Q0v47I=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "DeleteBatch";
|
name = "DeleteBatch";
|
||||||
commit = "cad869fbd95637902673f744581b29e0f3e3f61a";
|
commit = "b76bb482e026453079104d00f9675b4ab851947e";
|
||||||
hash = "sha256-M1ek1WdO1/uTjeYlrk3Tz+nlb/fFZH+O0Ok7b10iKak=";
|
hash = "sha256-GebF9B3RVwpPw8CYKDDT6zHv/MrrzV6h2TEIvNlRmcw=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "PluggableAuth";
|
name = "PluggableAuth";
|
||||||
commit = "4111a57c34e25bde579cce5d14ea094021e450c8";
|
commit = "1da98f447fd8321316d4286d8106953a6665f1cc";
|
||||||
hash = "sha256-aPtN8A9gDxLlq2+EloRZBO0DfHtE0E5kbV/adk82jvM=";
|
hash = "sha256-DKDVcAfWL90FmZbSsdx1J5PkGu47EsDQmjlCpcgLCn4=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "Popups";
|
name = "Popups";
|
||||||
commit = "f1bcadbd8b868f32ed189feff232c47966c2c49e";
|
commit = "9b9e986316b9662b1b45ce307a58dd0320dd33cf";
|
||||||
hash = "sha256-PQAjq/X4ZYwnnZ6ADCp3uGWMIucJy0ZXxsTTbAyxlSE=";
|
hash = "sha256-rSOZHT3yFIxA3tPhIvztwMSmSef/XHKmNfQl1JtGrUA=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "Scribunto";
|
name = "Scribunto";
|
||||||
commit = "7b99c95f588b06635ee3c487080d6cb04617d4b5";
|
commit = "eb6a987e90db47b09b0454fd06cddb69fdde9c40";
|
||||||
hash = "sha256-pviueRHQAsSlv4AtnUpo2Cjci7CbJ5aM75taEXY+WrI=";
|
hash = "sha256-Nr0ZLIrS5jnpiBgGnd90lzi6KshcsxeC+xGmNsB/g88=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "SimpleSAMLphp";
|
name = "SimpleSAMLphp";
|
||||||
kebab-name = "simple-saml-php";
|
kebab-name = "simple-saml-php";
|
||||||
commit = "ecb47191fecd1e0dc4c9d8b90a9118e393d82c23";
|
commit = "fd4d49cf48d16efdb91ae8128cdd507efe84d311";
|
||||||
hash = "sha256-gKu+O49XrAVt6hXdt36Ru7snjsKX6g2CYJ0kk/d+CI8=";
|
hash = "sha256-Qdtroew2j3AsZYlhAAUKQXXS2kUzUeQFnuR6ZHdFhAQ=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "TemplateData";
|
name = "TemplateData";
|
||||||
commit = "1ec66ce80f8a4322138efa56864502d0ee069bad";
|
commit = "836e3ca277301addd2578b2e746498ff6eb8e574";
|
||||||
hash = "sha256-Lv3Lq9dYAtdgWcwelveTuOhkP38MTu0m5kmW8+ltRis=";
|
hash = "sha256-UMcRLYxYn+AormwTYjKjjZZjA806goMY2TRQ4KoS5fY=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "TemplateStyles";
|
name = "TemplateStyles";
|
||||||
commit = "581180e898d6a942e2a65c8f13435a5d50fffa67";
|
commit = "06a2587689eba0a17945fd9bd4bb61674d3a7853";
|
||||||
hash = "sha256-zW8O0mzG4jYfQoKi2KzsP+8iwRCLnWgH7qfmDE2R+HU=";
|
hash = "sha256-C7j0jCkMeVZiLKpk+55X+lLnbG4aeH+hWIm3P5fF4fw=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "UserMerge";
|
name = "UserMerge";
|
||||||
commit = "c17c919bdb9b67bb69f80df43e9ee9d33b1ecf1b";
|
commit = "41759d0c61377074d159f7d84130a095822bc7a3";
|
||||||
hash = "sha256-+mkzTCo8RVlGoFyfCrSb5YMh4J6Pbi1PZLFu5ps8bWY=";
|
hash = "sha256-pGjA7r30StRw4ff0QzzZYUhgD3dC3ZuiidoSEz8kA8Q=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "VisualEditor";
|
name = "VisualEditor";
|
||||||
commit = "90bb3d455892e25317029ffd4bda93159e8faac8";
|
commit = "a128b11fe109aa882de5a40d2be0cdd0947ab11b";
|
||||||
hash = "sha256-SZAVELQUKZtwSM6NVlxvIHdFPodko8fhZ/uwB0LCFDA=";
|
hash = "sha256-bv1TkomouOxe+DKzthyLyppdEUFSXJ9uE0zsteVU+D4=";
|
||||||
})
|
})
|
||||||
(mw-ext {
|
(mw-ext {
|
||||||
name = "WikiEditor";
|
name = "WikiEditor";
|
||||||
commit = "8dba5b13246d7ae09193f87e6273432b3264de5f";
|
commit = "21383e39a4c9169000acd03edfbbeec4451d7974";
|
||||||
hash = "sha256-vF9PBuM+VfOIs/a2X1JcPn6WH4GqP/vUJDFkfXzWyFU=";
|
hash = "sha256-aPVpE6e4qLLliN9U5TA36e8tFrIt7Fl8RT1cGPUWoNI=";
|
||||||
})
|
})
|
||||||
]
|
]
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
gitea:
|
gitea:
|
||||||
runners:
|
runners:
|
||||||
alpha: ENC[AES256_GCM,data:aAFv+/ygC7oxGT3qnoEf+AZL3Nk1yOq3HupL9l0j8P913GefPKqlBt/mbuRVug==,iv:usXElENwbOHxUdoqHScK7PjeZavXUwoxpQWEMjxU2u4=,tag:E8OzZ9pmxIru7Glgh7v0lg==,type:str]
|
alpha: ENC[AES256_GCM,data:Hnq2guka4oERPIFCv1/ggrLjaePA7907VHXMStDQ7ll3hntTioT76qGOUJgfIw==,iv:wDPYuuL6VAWJakrz6asVRrzwRxqw0JDRes13MgJIT6E=,tag:ogFUeUirHVkCLN63nctxOw==,type:str]
|
||||||
beta: ENC[AES256_GCM,data:riRSBDzX9DAxKl2UCds1ANddl3ij+byAgigOafJ5RjWl8cNVlowK21klBiKTxw==,iv:clijEUKX9o52p5A94eEW0f8qGGhFpy/LFe+uQG/iQLg=,tag:PchXbsZMnW//O7brEAEeWw==,type:str]
|
beta: ENC[AES256_GCM,data:HmdjBvW8eO5MkzXf7KEzSNQAptF/RKN8Bh03Ru7Ru/Ky+eJJtk91aqSSIjFa+Q==,iv:Hz9HE3U6CFfZFcPmYMd6wSzZkSvszt92L2gV+pUlMis=,tag:LG3NfsS7B1EdRFvnP3XESQ==,type:str]
|
||||||
epsilon: ENC[AES256_GCM,data:lUt8uaqh9eC1IdIUfiw3dzxcDErSWaiT9lzg4ONf/QZeXj7Do7Es0GXBFd41Hw==,iv:hPm5Lez5ISHIlw1+i4z/oBsh4H5ZXPVYnXXSGq1eal0=,tag:/KcmPw30622tN9ruMUwfUw==,type:str]
|
epsilon: ENC[AES256_GCM,data:wfGxwWwDzb6AJaFnxe/93WNZGtuTpCkLci/Cc5MTCTKJz6XlNuy3m/1Xsnw0hA==,iv:I6Zl+4BBAUTXym2qUlFfdnoLTHShu+VyxPMjRlFzMis=,tag:jjTyZs1Nzqlhjd8rAldxDw==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
@ -63,8 +63,8 @@ sops:
|
|||||||
aU4xWjVYYlNvSmYxajVGdzk5dTQ4WG8Klq12bSegsW29xp4qteuCB5Tzis6EhVCk
|
aU4xWjVYYlNvSmYxajVGdzk5dTQ4WG8Klq12bSegsW29xp4qteuCB5Tzis6EhVCk
|
||||||
53jqtYe5UG9MjFVQYiSi2jJz5/dxfqSINMZ/Y/EB5LxbwgbFws8Yuw==
|
53jqtYe5UG9MjFVQYiSi2jJz5/dxfqSINMZ/Y/EB5LxbwgbFws8Yuw==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2024-12-09T21:17:40Z"
|
lastmodified: "2024-12-12T12:20:19Z"
|
||||||
mac: ENC[AES256_GCM,data:HensJbPU1Kx9aQNUhdtFkX/6qdxj7yby6GeSruOT+HYEtoq0py/zvMtdCqmfjc4AOptYlXdgK7w30P976dG1esjlYwF07qtVvAbUqvExkksuV4zp81VKHMXUOAyiQK79kLe3rx6cvEdUDbOjZOsxN02eRrcanN+7rJS6f7vNN88=,iv:PlePCik6JcOtVBQhhOj9khhp2LwwfXBwAGpzu4ywhTA=,tag:Clz+xX1Cffs8Zpv2LdsGVA==,type:str]
|
mac: ENC[AES256_GCM,data:D9/NAd/zrF6pHFdZjTUqI+u4WiwJqt0w5Y+SYCS1o/dAXJE/ajHzse/vCSGXZIjP0yqe+S/NyTvhf+stw2B4dk6Njtabjd+PhG0hR4L0X07FtFqzB3u5pLHCb0bH9QLG5zWcyMkwNiNTCvhRUZzbcqLEGqqJ7ZjZAEUfYSR+Jls=,iv:5xPfODPxtQjgbl8delUHsmhD0TI2gHjrxpHV+qiFE00=,tag:HHLo5G8jhy/sKB3R+sKmwQ==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2024-12-09T21:17:27Z"
|
- created_at: "2024-12-09T21:17:27Z"
|
||||||
enc: |-
|
enc: |-
|
||||||
@ -87,4 +87,4 @@ sops:
|
|||||||
-----END PGP MESSAGE-----
|
-----END PGP MESSAGE-----
|
||||||
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
|
fp: F7D37890228A907440E1FD4846B9228E814A2AAC
|
||||||
unencrypted_suffix: _unencrypted
|
unencrypted_suffix: _unencrypted
|
||||||
version: 3.8.1
|
version: 3.9.2
|
||||||
|
Loading…
Reference in New Issue
Block a user