Compare commits

...

2 commits

Author SHA1 Message Date
Benjamin Bädorf 12ebe35ece
Update paperless 2022-11-28 11:39:28 +01:00
Benjamin Bädorf 3960ae45c9
update factorio settings 2022-11-28 11:39:21 +01:00
5 changed files with 35 additions and 11 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

@ -43,12 +43,18 @@ 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
++ lib.optionals cfg.enableCaddy [ "caddy.local" ] hostnames = [ ]
++ lib.optionals config.pub-solar.printing.enable [ "cups.local" ] ++ lib.optionals cfg.enableCaddy [ "caddy.local" ]
++ lib.optionals cfg.enableHelp [ "help.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" ];
in
{
"127.0.0.1" = hostnames;
"::1" = hostnames;
};
# Caddy reverse proxy for local services like cups # Caddy reverse proxy for local services like cups
services.caddy = { services.caddy = {
@ -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;