secrets for mediawiki and formatting
This commit is contained in:
parent
7131ba8691
commit
87bd442eed
113
flake.nix
113
flake.nix
|
@ -6,65 +6,66 @@
|
||||||
fsr-infoscreen.url = github:fsr/infoscreen;
|
fsr-infoscreen.url = github:fsr/infoscreen;
|
||||||
};
|
};
|
||||||
outputs = { self, nixpkgs, sops-nix, fsr-infoscreen, ... }@inputs:
|
outputs = { self, nixpkgs, sops-nix, fsr-infoscreen, ... }@inputs:
|
||||||
let
|
let
|
||||||
in {
|
in {
|
||||||
#packages."aarch64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
|
#packages."aarch64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
|
||||||
#packages."x86_64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
|
#packages."x86_64-linux".sanddorn = self.nixosConfigurations.sanddorn.config.system.build.sdImage;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
birne = nixpkgs.lib.nixosSystem {
|
birne = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/birne/configuration.nix
|
./hosts/birne/configuration.nix
|
||||||
|
|
||||||
./modules/base.nix
|
./modules/base.nix
|
||||||
./modules/autoupdate.nix
|
./modules/autoupdate.nix
|
||||||
./modules/desktop.nix
|
./modules/desktop.nix
|
||||||
./modules/printing.nix
|
./modules/printing.nix
|
||||||
./modules/wifi.nix
|
./modules/wifi.nix
|
||||||
./modules/options.nix
|
./modules/options.nix
|
||||||
{
|
{
|
||||||
fsr.enable_office_bloat = true;
|
fsr.enable_office_bloat = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
sanddorn = nixpkgs.lib.nixosSystem {
|
sanddorn = nixpkgs.lib.nixosSystem {
|
||||||
system = "aarch64-linux";
|
system = "aarch64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{
|
||||||
nixpkgs.overlays = [ fsr-infoscreen.overlay."aarch64-linux"];
|
nixpkgs.overlays = [ fsr-infoscreen.overlay."aarch64-linux" ];
|
||||||
nixpkgs.config.allowBroken = true;
|
nixpkgs.config.allowBroken = true;
|
||||||
sdImage.compressImage = false;
|
sdImage.compressImage = false;
|
||||||
}
|
}
|
||||||
./hosts/sanddorn/configuration.nix
|
./hosts/sanddorn/configuration.nix
|
||||||
./modules/infoscreen.nix
|
./modules/infoscreen.nix
|
||||||
./modules/base.nix
|
./modules/base.nix
|
||||||
./modules/autoupdate.nix
|
./modules/autoupdate.nix
|
||||||
./modules/wifi.nix
|
./modules/wifi.nix
|
||||||
./modules/desktop.nix
|
./modules/desktop.nix
|
||||||
./modules/options.nix
|
./modules/options.nix
|
||||||
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
"${nixpkgs}/nixos/modules/installer/sd-card/sd-image-aarch64.nix"
|
||||||
{
|
{
|
||||||
fsr.enable_office_bloat = false;
|
fsr.enable_office_bloat = false;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
quitte = nixpkgs.lib.nixosSystem {
|
quitte = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
modules = [
|
modules = [
|
||||||
inputs.sops-nix.nixosModules.sops
|
inputs.sops-nix.nixosModules.sops
|
||||||
./hosts/quitte/configuration.nix
|
./hosts/quitte/configuration.nix
|
||||||
./modules/base.nix
|
./modules/base.nix
|
||||||
./modules/sops.nix
|
./modules/sops.nix
|
||||||
./modules/keycloak.nix
|
./modules/keycloak.nix
|
||||||
./modules/nginx.nix
|
./modules/nginx.nix
|
||||||
./modules/hedgedoc.nix
|
./modules/hedgedoc.nix
|
||||||
{
|
./modules/wiki.nix
|
||||||
sops.defaultSopsFile = ./secrets/durian.yaml;
|
{
|
||||||
}
|
sops.defaultSopsFile = ./secrets/durian.yaml;
|
||||||
];
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =[ # Include the results of the hardware scan.
|
imports = [
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -24,11 +25,11 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
users.users.printer = {
|
users.users.printer = {
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
password = "printer";
|
password = "printer";
|
||||||
extraGroups = [];
|
extraGroups = [ ];
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
firefox
|
firefox
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "ohci_pci" "ehci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||||
|
@ -14,18 +15,19 @@
|
||||||
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
boot.extraModulePackages = [ config.boot.kernelPackages.broadcom_sta ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-uuid/9799b183-a191-484e-b9a4-05e29412af25";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/9799b183-a191-484e-b9a4-05e29412af25";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/CF58-EB12";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/CF58-EB12";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
swapDevices =
|
||||||
[ { device = "/dev/disk/by-uuid/94622e8e-8b58-4b3b-9494-d144ccaeb486"; }
|
[{ device = "/dev/disk/by-uuid/94622e8e-8b58-4b3b-9494-d144ccaeb486"; }];
|
||||||
];
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ # Include the results of the hardware scan.
|
[
|
||||||
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -19,12 +20,12 @@
|
||||||
networking.hostId = "a41d87fc";
|
networking.hostId = "a41d87fc";
|
||||||
|
|
||||||
networking.interfaces.enp65s0f0np0 = {
|
networking.interfaces.enp65s0f0np0 = {
|
||||||
useDHCP = false;
|
useDHCP = false;
|
||||||
ipv4.addresses = [
|
ipv4.addresses = [
|
||||||
{
|
{
|
||||||
address = "141.30.30.169";
|
address = "141.30.30.169";
|
||||||
prefixLength = 25;
|
prefixLength = 25;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
networking.defaultGateway = "141.30.30.129";
|
networking.defaultGateway = "141.30.30.129";
|
||||||
|
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(modulesPath + "/installer/scan/not-detected.nix")
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "megaraid_sas" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
boot.initrd.availableKernelModules = [ "megaraid_sas" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sr_mod" ];
|
||||||
|
@ -14,36 +15,42 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "rpool/nixos/root";
|
{
|
||||||
|
device = "rpool/nixos/root";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "zfsutil" ];
|
options = [ "zfsutil" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/home" =
|
fileSystems."/home" =
|
||||||
{ device = "rpool/nixos/home";
|
{
|
||||||
|
device = "rpool/nixos/home";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "zfsutil" ];
|
options = [ "zfsutil" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/lib" =
|
fileSystems."/var/lib" =
|
||||||
{ device = "rpool/nixos/var/lib";
|
{
|
||||||
|
device = "rpool/nixos/var/lib";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "zfsutil" ];
|
options = [ "zfsutil" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/var/log" =
|
fileSystems."/var/log" =
|
||||||
{ device = "rpool/nixos/var/log";
|
{
|
||||||
|
device = "rpool/nixos/var/log";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "zfsutil" ];
|
options = [ "zfsutil" ];
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-uuid/7FE6-F583";
|
{
|
||||||
|
device = "/dev/disk/by-uuid/7FE6-F583";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/nix" =
|
fileSystems."/nix" =
|
||||||
{ device = "rpool/nixos/nix";
|
{
|
||||||
|
device = "rpool/nixos/nix";
|
||||||
fsType = "zfs";
|
fsType = "zfs";
|
||||||
options = [ "zfsutil" ];
|
options = [ "zfsutil" ];
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,9 +21,9 @@
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
"/swap" = {
|
"/swap" = {
|
||||||
device = "/dev/disk/by-uuid/SWAP";
|
device = "/dev/disk/by-uuid/SWAP";
|
||||||
fsType = "btrfs";
|
fsType = "btrfs";
|
||||||
options = [ "subvol=swap" "compress=lzo" "noatime" ]; # Note these options effect the entire BTRFS filesystem and not just this volume, with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
options = [ "subvol=swap" "compress=lzo" "noatime" ]; # Note these options effect the entire BTRFS filesystem and not just this volume, with the exception of `"subvol=swap"`, the other options are repeated in my other `fileSystem` mounts
|
||||||
};
|
};
|
||||||
"/" = {
|
"/" = {
|
||||||
device = "/dev/disk/by-label/NIXOS_SD";
|
device = "/dev/disk/by-label/NIXOS_SD";
|
||||||
|
@ -32,8 +32,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [{
|
swapDevices = [{
|
||||||
device = "/swap/swapfile";
|
device = "/swap/swapfile";
|
||||||
size = (1024 * 2);
|
size = (1024 * 2);
|
||||||
}];
|
}];
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
hardware.enableRedistributableFirmware = true;
|
||||||
|
|
|
@ -2,27 +2,28 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
extra_office_packages = (lib.ifEnable config.fsr.enable_office_bloat (with pkgs; [
|
extra_office_packages = (lib.ifEnable config.fsr.enable_office_bloat (with pkgs; [
|
||||||
vlc
|
vlc
|
||||||
libreoffice-fresh
|
libreoffice-fresh
|
||||||
okular
|
okular
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
]));
|
]));
|
||||||
|
|
||||||
|
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
# enable XFCE as lightweight desktop environment
|
# enable XFCE as lightweight desktop environment
|
||||||
services = {
|
services = {
|
||||||
xserver.enable = true;
|
xserver.enable = true;
|
||||||
xserver.desktopManager.xfce.enable = true;
|
xserver.desktopManager.xfce.enable = true;
|
||||||
xserver.displayManager.defaultSession = "xfce";
|
xserver.displayManager.defaultSession = "xfce";
|
||||||
|
|
||||||
# Configure keymap in X11
|
# Configure keymap in X11
|
||||||
xserver.layout = "de";
|
xserver.layout = "de";
|
||||||
xserver.xkbOptions = "eurosign:e,ctrl:nocaps,compose:prsc";
|
xserver.xkbOptions = "eurosign:e,ctrl:nocaps,compose:prsc";
|
||||||
|
|
||||||
# enable touchpad support
|
# enable touchpad support
|
||||||
xserver.libinput.enable = true;
|
xserver.libinput.enable = true;
|
||||||
};
|
};
|
||||||
# enable sound
|
# enable sound
|
||||||
sound.enable = true;
|
sound.enable = true;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
let
|
let
|
||||||
domain = "pad.quitte.tassilo-tanneberger.de";
|
domain = "pad.quitte.tassilo-tanneberger.de";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
services = {
|
services = {
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
{ pkgs, lib, config, ...}:
|
{ pkgs, lib, config, ... }:
|
||||||
let
|
let
|
||||||
fsr-infoscreen = pkgs.fsr-infoscreen;
|
fsr-infoscreen = pkgs.fsr-infoscreen;
|
||||||
|
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
services."fsr-infoscreen" = {
|
services."fsr-infoscreen" = {
|
||||||
|
@ -13,16 +14,16 @@ in {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "infoscreen";
|
User = "infoscreen";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
|
||||||
users.users.infoscreen = {
|
users.users.infoscreen = {
|
||||||
name = "infoscreen";
|
name = "infoscreen";
|
||||||
description = "custom user for service infoscreen service";
|
description = "custom user for service infoscreen service";
|
||||||
isNormalUser = true;
|
isNormalUser = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{pkgs, config, lib, ...}: {
|
{ pkgs, config, lib, ... }: {
|
||||||
|
|
||||||
sops.secrets.postgres_keycloak = {
|
sops.secrets.postgres_keycloak = {
|
||||||
owner = config.systemd.services.keycloak.serviceConfig.User;
|
owner = config.systemd.services.keycloak.serviceConfig.User;
|
||||||
|
@ -24,8 +24,8 @@
|
||||||
hostname = "keycloak.quitte.tassilo-tanneberger.de";
|
hostname = "keycloak.quitte.tassilo-tanneberger.de";
|
||||||
http-host = "127.0.0.1";
|
http-host = "127.0.0.1";
|
||||||
http-port = 8000;
|
http-port = 8000;
|
||||||
https-port = 8001;
|
https-port = 8001;
|
||||||
proxy = "edge";
|
proxy = "edge";
|
||||||
};
|
};
|
||||||
|
|
||||||
database = {
|
database = {
|
||||||
|
@ -34,30 +34,31 @@
|
||||||
passwordFile = config.sops.secrets.postgres_keycloak.path;
|
passwordFile = config.sops.secrets.postgres_keycloak.path;
|
||||||
name = "keycloak";
|
name = "keycloak";
|
||||||
host = "localhost";
|
host = "localhost";
|
||||||
createLocally = true;
|
createLocally = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
postgresql = {
|
postgresql = {
|
||||||
enable = true;
|
enable = true;
|
||||||
};
|
};
|
||||||
nginx = {
|
nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
recommendedProxySettings = true;
|
recommendedProxySettings = true;
|
||||||
virtualHosts = {
|
virtualHosts = {
|
||||||
"${config.services.keycloak.settings.hostname}" = {
|
"${config.services.keycloak.settings.hostname}" = {
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
http2 = true;
|
http2 = true;
|
||||||
locations = {
|
locations = {
|
||||||
"/" =
|
"/" =
|
||||||
let
|
let
|
||||||
cfg = config.services.keycloak.settings;
|
cfg = config.services.keycloak.settings;
|
||||||
in {
|
in
|
||||||
proxyPass = "http://${cfg.http-host}:${toString cfg.http-port}";
|
{
|
||||||
};
|
proxyPass = "http://${cfg.http-host}:${toString cfg.http-port}";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{config, lib, ...}: with lib; {
|
{ config, lib, ... }: with lib; {
|
||||||
options.fsr.enable_office_bloat = mkOption {
|
options.fsr.enable_office_bloat = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
# Enable CUPS to print documents.
|
# Enable CUPS to print documents.
|
||||||
services= {
|
services = {
|
||||||
printing.enable = true;
|
printing.enable = true;
|
||||||
printing.drivers = with pkgs; [
|
printing.drivers = with pkgs; [
|
||||||
gutenprint
|
gutenprint
|
||||||
|
@ -18,19 +18,19 @@
|
||||||
];
|
];
|
||||||
# set up Heiko
|
# set up Heiko
|
||||||
hardware.printers.ensurePrinters = [
|
hardware.printers.ensurePrinters = [
|
||||||
{
|
{
|
||||||
description = "Drucker im FSR Buero";
|
description = "Drucker im FSR Buero";
|
||||||
deviceUri = "dnssd://Kyocera%20ECOSYS%20M6630cidn._ipp._tcp.local/?uuid=4509a320-007e-002c-00dd-002507504ad0";
|
deviceUri = "dnssd://Kyocera%20ECOSYS%20M6630cidn._ipp._tcp.local/?uuid=4509a320-007e-002c-00dd-002507504ad0";
|
||||||
location = "FSR Buero";
|
location = "FSR Buero";
|
||||||
model = "Kyocera ECOSYS M6630cidn KPDL";
|
model = "Kyocera ECOSYS M6630cidn KPDL";
|
||||||
name = "Heiko";
|
name = "Heiko";
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
description = "Drucker im FSR Buero";
|
description = "Drucker im FSR Buero";
|
||||||
deviceUri = "dnssd://Kyocera%20ECOSYS%20M6630cidn._pdl-datastream._tcp.local/?uuid=4509a320-007e-002c-00dd-002507504ad0";
|
deviceUri = "dnssd://Kyocera%20ECOSYS%20M6630cidn._pdl-datastream._tcp.local/?uuid=4509a320-007e-002c-00dd-002507504ad0";
|
||||||
location = "FSR Buero";
|
location = "FSR Buero";
|
||||||
model = "Kyocera ECOSYS M6630cidn KPDL";
|
model = "Kyocera ECOSYS M6630cidn KPDL";
|
||||||
name = "Heiko";
|
name = "Heiko";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,8 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, ... }:
|
||||||
let
|
let
|
||||||
password = "$(${pkgs.coreutils}/bin/cat /run/secrets/fsr_wifi_psk)";
|
password = "$(${pkgs.coreutils}/bin/cat /run/secrets/fsr_wifi_psk)";
|
||||||
in {
|
in
|
||||||
|
{
|
||||||
networking = {
|
networking = {
|
||||||
wireless = {
|
wireless = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -1,40 +1,42 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
{
|
{
|
||||||
sops.secrets.postgres_mediawiki.owner = config.systemd.services.mediawiki.serviceConfig.User;
|
sops.secrets.postgres_mediawiki.owner = config.systemd.services.mediawiki.serviceConfig.User;
|
||||||
services = {
|
sops.secrets.mediawiki_initial_admin.owner = config.systemd.services.mediawiki.serviceConfig.User;
|
||||||
mediawiki = {
|
services = {
|
||||||
enable = true;
|
mediawiki = {
|
||||||
name = "FSR Wiki";
|
enable = true;
|
||||||
database = {
|
name = "FSR Wiki";
|
||||||
user = "mediawiki";
|
passwordFile = config.sops.secrets.mediawiki_initial_admin.path;
|
||||||
type = "postgres";
|
database = {
|
||||||
socket = "/var/run/postgresql";
|
user = "mediawiki";
|
||||||
port = 5432;
|
type = "postgres";
|
||||||
name = "mediawiki";
|
socket = "/var/run/postgresql";
|
||||||
host = "localhost";
|
port = 5432;
|
||||||
passwordFile = config.sops.secrets.postgres_mediawiki.path;
|
name = "mediawiki";
|
||||||
createLocally = true;
|
host = "localhost";
|
||||||
};
|
passwordFile = config.sops.secrets.postgres_mediawiki.path;
|
||||||
virtualHost = {
|
createLocally = false;
|
||||||
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
};
|
||||||
adminAddr = "root@ifsr.de";
|
virtualHost = {
|
||||||
forceSSL = true;
|
hostName = "wiki.quitte.tassilo-tanneberger.de";
|
||||||
enableACME = true;
|
adminAddr = "root@ifsr.de";
|
||||||
};
|
forceSSL = true;
|
||||||
};
|
enableACME = true;
|
||||||
postgres = {
|
};
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
systemd.services.mediawiki-pgsetup = {
|
postgresql = {
|
||||||
description = "Prepare Mediawiki postgres database";
|
enable = true;
|
||||||
wantedBy = [ "multi-user.target" ];
|
};
|
||||||
after = [ "networking.target" "postgresql.service" ];
|
};
|
||||||
serviceConfig.Type = "oneshot";
|
systemd.services.mediawiki-pgsetup = {
|
||||||
|
description = "Prepare Mediawiki postgres database";
|
||||||
|
wantedBy = [ "multi-user.target" ];
|
||||||
|
after = [ "networking.target" "postgresql.service" ];
|
||||||
|
serviceConfig.Type = "oneshot";
|
||||||
|
|
||||||
path = [ pkgs.sudo config.services.postgresql.package ];
|
path = [ pkgs.sudo config.services.postgresql.package ];
|
||||||
script = ''
|
script = ''
|
||||||
sudo -u ${config.services.postgresql.superUser} psql -c "ALTER ROLE mediawiki WITH PASSWORD '$(cat ${config.sops.secrets.postgres_mediawiki.path})'"
|
sudo -u ${config.services.postgresql.superUser} psql -c "ALTER ROLE mediawiki WITH PASSWORD '$(cat ${config.sops.secrets.postgres_mediawiki.path})'"
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
|
@ -1,49 +1,50 @@
|
||||||
{ lib
|
{ lib
|
||||||
,pkgs
|
, pkgs
|
||||||
#, buildpythonApplication
|
#, buildpythonApplication
|
||||||
#, buildPythonPackage
|
#, buildPythonPackage
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
#, fetchPypi
|
#, fetchPypi
|
||||||
}:
|
}:
|
||||||
let
|
let
|
||||||
|
|
||||||
dvb = pkgs.python39Packages.buildPythonPackage rec {
|
dvb = pkgs.python39Packages.buildPythonPackage rec {
|
||||||
pname = "dvb";
|
pname = "dvb";
|
||||||
version = "1.2.0";
|
version = "1.2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "revol-xut";
|
owner = "revol-xut";
|
||||||
repo = "dvbpy";
|
repo = "dvbpy";
|
||||||
rev = "66c975f58b9f831ff6044aa65da58c3246938e5e";
|
rev = "66c975f58b9f831ff6044aa65da58c3246938e5e";
|
||||||
sha256 = "sha256-OzK9r6tyyjawdDzqrDw9CFh0lf8Bn11rJpQl60YCoT8=";
|
sha256 = "sha256-OzK9r6tyyjawdDzqrDw9CFh0lf8Bn11rJpQl60YCoT8=";
|
||||||
|
};
|
||||||
|
|
||||||
|
doCheck = false;
|
||||||
|
propagatedBuildInputs = with pkgs.python39Packages; [ pyproj numpy requests ];
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = false;
|
flask-misaka = pkgs.python39Packages.buildPythonPackage rec {
|
||||||
propagatedBuildInputs = with pkgs.python39Packages; [ pyproj numpy requests ];
|
pname = "flask-misaka";
|
||||||
};
|
version = "1.0.0";
|
||||||
|
|
||||||
flask-misaka = pkgs.python39Packages.buildPythonPackage rec {
|
src = fetchFromGitHub {
|
||||||
pname = "flask-misaka";
|
owner = "singingwolfboy";
|
||||||
version = "1.0.0";
|
repo = "flask-misaka";
|
||||||
|
rev = "d960e512ac1ea16225d236984fcf130a46bb7b83";
|
||||||
|
sha256 = "sha256-RYDD+Bj3+S2isTdccl04zvLjpbalQ5sqb3sYnUy1+bU=";
|
||||||
|
};
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
doCheck = false;
|
||||||
owner = "singingwolfboy";
|
propagatedBuildInputs = with pkgs.python39Packages; [ flask misaka ];
|
||||||
repo = "flask-misaka";
|
|
||||||
rev = "d960e512ac1ea16225d236984fcf130a46bb7b83";
|
|
||||||
sha256 = "sha256-RYDD+Bj3+S2isTdccl04zvLjpbalQ5sqb3sYnUy1+bU=";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
propagatedBuildInputs = with pkgs.python39Packages; [ flask misaka ];
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
in
|
||||||
in pkgs.python39Packages.buildPythonApplication rec {
|
pkgs.python39Packages.buildPythonApplication rec {
|
||||||
pname = "fsr-infoscreen";
|
pname = "fsr-infoscreen";
|
||||||
version = "2.1.0";
|
version = "2.1.0";
|
||||||
|
|
||||||
src = fetchFromGitHub{
|
src = fetchFromGitHub {
|
||||||
owner = "fsr";
|
owner = "fsr";
|
||||||
repo = "infoscreen";
|
repo = "infoscreen";
|
||||||
rev = "43fb1fdc9dd15ccf40ef28b448ac6cfd51f32bc4";
|
rev = "43fb1fdc9dd15ccf40ef28b448ac6cfd51f32bc4";
|
||||||
|
@ -52,7 +53,7 @@ in pkgs.python39Packages.buildPythonApplication rec {
|
||||||
nativeBuildInputs = with pkgs; [ pkg-config python3Packages.wrapPython ];
|
nativeBuildInputs = with pkgs; [ pkg-config python3Packages.wrapPython ];
|
||||||
propagatedBuildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
|
propagatedBuildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
|
||||||
buildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
|
buildInputs = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
|
||||||
pythonPath = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb];
|
pythonPath = with pkgs.python39Packages; [ flask python-forecastio flask-misaka dvb ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/build/middleware
|
mkdir -p $out/build/middleware
|
||||||
|
|
|
@ -2,6 +2,7 @@ postgres_keycloak: ENC[AES256_GCM,data:Vi0NLjpYDvFGIYYL/VPdgOqAS51KXQynBFlBjK64e
|
||||||
postgres_hedgedoc: ENC[AES256_GCM,data:VCoWXZbNGWfmorTNZRFWkDUp0B5JMmsA+bJFVrUREj0=,iv:fnSs3FOgmFn5/BqKTODpwIq023ZRMF8s/JiDyf2ZqkE=,tag:oit5sHf6QffhYYi/WJk5SQ==,type:str]
|
postgres_hedgedoc: ENC[AES256_GCM,data:VCoWXZbNGWfmorTNZRFWkDUp0B5JMmsA+bJFVrUREj0=,iv:fnSs3FOgmFn5/BqKTODpwIq023ZRMF8s/JiDyf2ZqkE=,tag:oit5sHf6QffhYYi/WJk5SQ==,type:str]
|
||||||
hedgedoc_session_secret: ENC[AES256_GCM,data:uz7KggZqeZ2eqiCnOcnYh2I1p5BBXTQbC8PUhB2kM2U=,iv:aJDHKCPkccCT/OF6AGZMfRESNmoV9muGHbuCUfLQhH8=,tag:uEVXylpE8MSebqRr+4mQOw==,type:str]
|
hedgedoc_session_secret: ENC[AES256_GCM,data:uz7KggZqeZ2eqiCnOcnYh2I1p5BBXTQbC8PUhB2kM2U=,iv:aJDHKCPkccCT/OF6AGZMfRESNmoV9muGHbuCUfLQhH8=,tag:uEVXylpE8MSebqRr+4mQOw==,type:str]
|
||||||
postgres_mediawiki: ENC[AES256_GCM,data:abxT4VB9c0YwqHI8OLvfLFjpJoLAoDNNE9ml58BpD2A=,iv:jn7e3oDWtADuK3o8x26uRbwruQ07zglMyXpThBV6uG0=,tag:9NF49KqdXoAgz8U/VWIKsg==,type:str]
|
postgres_mediawiki: ENC[AES256_GCM,data:abxT4VB9c0YwqHI8OLvfLFjpJoLAoDNNE9ml58BpD2A=,iv:jn7e3oDWtADuK3o8x26uRbwruQ07zglMyXpThBV6uG0=,tag:9NF49KqdXoAgz8U/VWIKsg==,type:str]
|
||||||
|
mediawiki_initial_admin: ENC[AES256_GCM,data:V62NRMkQaXqHl4Jj69BNsprafEqszeoHiLWurexLuvs=,iv:aSZJLviR0Tt2RCeb22pPP4i/B4APNFvU1l8ipeNvER8=,tag:mWv8fN1RZwJHUqIxQonO8Q==,type:str]
|
||||||
sops:
|
sops:
|
||||||
kms: []
|
kms: []
|
||||||
gcp_kms: []
|
gcp_kms: []
|
||||||
|
@ -17,8 +18,8 @@ sops:
|
||||||
bzNnbFZnZnZiY0xsbVlvUStBblBMWGcK7HSz9iFQiH0BJ3etF09opJreBoBtiBZ0
|
bzNnbFZnZnZiY0xsbVlvUStBblBMWGcK7HSz9iFQiH0BJ3etF09opJreBoBtiBZ0
|
||||||
L74EBGuEV4+dNWqY3QwAASmDYJJ8ocQMuAgctjsgstKBKUeOrkhDRg==
|
L74EBGuEV4+dNWqY3QwAASmDYJJ8ocQMuAgctjsgstKBKUeOrkhDRg==
|
||||||
-----END AGE ENCRYPTED FILE-----
|
-----END AGE ENCRYPTED FILE-----
|
||||||
lastmodified: "2022-09-06T15:00:39Z"
|
lastmodified: "2022-09-06T15:14:55Z"
|
||||||
mac: ENC[AES256_GCM,data:Arjto/Cl6wcF99jUOWGZB28NME4t68oYL0yGdjUMTUCU+CKz2Y2sX82ncb6JpRPrSEzzhFAiEqK0QuXvxrgPnBp7MH0+fS8rNa87LEVOoesDnv0pcCZQXxDsJypNMkzEz1aZVEr9U212vulbShyz8HKcGioy5fLSx98fTCpaK/c=,iv:Bng+AlN0rnkXwMNiOKR8dIa3cf1sT8xpC8CFV0/xods=,tag:cKfI0BVDCKtV1W8j9riP/w==,type:str]
|
mac: ENC[AES256_GCM,data:jd8op8K6jIyzUwiCX/6I716EI903rVZIMIRvxM/8w+oxqNVwaKGgY8IwQ3psg9SsGg+Sq+CNrm0Rf58Urz9hUywk2z70k/u/+5qWO7qUUuHNpYDLCLsOQ/BjYN+ZDATVFaD2hC+xYfwNKQXPPRTnnZ8oQ4AgybkSmrnjC13GCyM=,iv:VWKZITb/6wZe5lkru93AL27Pf/o1OCOPC0neNRRY79U=,tag:W3SBWD4ypcJx3mgRdWSNug==,type:str]
|
||||||
pgp:
|
pgp:
|
||||||
- created_at: "2022-08-16T13:01:34Z"
|
- created_at: "2022-08-16T13:01:34Z"
|
||||||
enc: |
|
enc: |
|
||||||
|
|
Loading…
Reference in a new issue