Merge branch 'b12f' of git.pub.solar:pub-solar/os into b12f

This commit is contained in:
Benjamin Bädorf 2022-12-11 22:10:56 +01:00
commit d043855b44
No known key found for this signature in database
GPG key ID: 4406E80E13CD656C
7 changed files with 39 additions and 14 deletions

View file

@ -29,6 +29,7 @@ in
wayvnc wayvnc
drone-docker-runner drone-docker-runner
stdenv.cc.cc.lib stdenv.cc.cc.lib
pkgs.hplip
]; ];
age.secrets."vnc-key.pem" = { age.secrets."vnc-key.pem" = {

View file

@ -22,6 +22,7 @@ in
enable = true; enable = true;
port = 34197; # The default, but make it explicit port = 34197; # The default, but make it explicit
lan = true; lan = true;
game-password = "pls-dont-grief";
admins = [ admins = [
"doubtwriter" "doubtwriter"
"kattykat" "kattykat"
@ -30,9 +31,13 @@ in
autosave-interval = 3; autosave-interval = 3;
game-name = "Babes plays v2"; game-name = "Babes plays v2";
requireUserVerification = false; requireUserVerification = false;
bind = "::";
mods = [ mods = [
far-reach far-reach
]; ];
}; };
networking.firewall.allowedUDPPorts = [ 34197 ];
networking.firewall.allowedTCPPorts = [ 34197 ];
}; };
} }

View file

@ -2,7 +2,7 @@
let let
shutdownWaitMinutes = 15; shutdownWaitMinutes = 15;
shutdownScript = pkgs.writeScript "shutdown" '' shutdownScript = pkgs.writeShellScriptBin "shutdown-wait" ''
STATUS_FILES="/media/internal/backups-pub-solar/status" STATUS_FILES="/media/internal/backups-pub-solar/status"
running="" running=""
@ -37,7 +37,7 @@ in
systemd.services."shutdown-after-backup" = { systemd.services."shutdown-after-backup" = {
enable = true; enable = true;
serviceConfig = { serviceConfig = {
ExecStart = "${pkgs.bash}/bin/bash ${shutdownScript}"; ExecStart = "${shutdownScript}/bin/shutdown-wait";
Type = "oneshot"; Type = "oneshot";
}; };
}; };
@ -45,7 +45,7 @@ in
systemd.timers."shutdown-after-backup" = { systemd.timers."shutdown-after-backup" = {
enable = true; enable = true;
timerConfig = { timerConfig = {
OnCalendar = "3..9:*"; OnCalendar = "3..9:* Etc/UTC";
}; };
wantedBy = [ "timers.target" ]; wantedBy = [ "timers.target" ];
partOf = [ "shutdown-after-backup.service" ]; partOf = [ "shutdown-after-backup.service" ];

View file

@ -43,11 +43,17 @@ in
nix.binaryCachePublicKeys = cfg.publicKeys; nix.binaryCachePublicKeys = cfg.publicKeys;
# These entries get added to /etc/hosts # These entries get added to /etc/hosts
networking.hosts = { networking.hosts =
"127.0.0.1" = [ ] let
hostnames = [ ]
++ lib.optionals cfg.enableCaddy [ "caddy.local" ] ++ lib.optionals cfg.enableCaddy [ "caddy.local" ]
++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ] ++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ]
++ lib.optionals config.pub-solar.paperless.enable [ "paperless.local" ]
++ lib.optionals cfg.enableHelp [ "help.local" ]; ++ lib.optionals cfg.enableHelp [ "help.local" ];
in
{
"127.0.0.1" = hostnames;
"::1" = hostnames;
}; };
# Caddy reverse proxy for local services like cups # Caddy reverse proxy for local services like cups
@ -67,6 +73,15 @@ in
} }
'') '')
(lib.optionalString
config.pub-solar.paperless.enable
''
paperless.local:80 {
request_header Host localhost:28981
reverse_proxy localhost:28981
}
'')
(lib.optionalString (lib.optionalString
cfg.enableHelp cfg.enableHelp
'' ''

View file

@ -23,15 +23,15 @@ in
}; };
config = mkIf cfg.enable { config = mkIf cfg.enable {
services.paperless-ng = { services.paperless = {
enable = true; enable = true;
user = psCfg.user.name;
consumptionDir = cfg.consumptionDir; consumptionDir = cfg.consumptionDir;
extraConfig = { extraConfig = {
PAPERLESS_OCR_LANGUAGE = cfg.ocrLanguage; PAPERLESS_OCR_LANGUAGE = cfg.ocrLanguage;
PAPERLESS_ADMIN_USER = psCfg.user.name;
PAPERLESS_AUTO_LOGIN_USERNAME = psCfg.user.name;
}; };
}; };
environment.systemPackages = [
pkgs.hplip
];
}; };
} }

View file

@ -30,7 +30,10 @@ in
]; ];
}; };
paperless.enable = true; paperless = {
enable = false;
ocrLanguage = "nld+deu";
};
arduino.enable = true; arduino.enable = true;
email.enable = true; email.enable = true;
uhk.enable = true; uhk.enable = true;

View file

@ -11,6 +11,7 @@ in
home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] { home-manager = pkgs.lib.setAttrByPath [ "users" psCfg.user.name ] {
home.packages = with pkgs; [ home.packages = with pkgs; [
inkscape
nix-output-monitor nix-output-monitor
tigervnc tigervnc
dogecoin dogecoin