dot_testing/boxes/mainsail.nix

106 lines
2.7 KiB
Nix
Raw Normal View History

2023-10-30 16:15:31 -05:00
{ lib, config, pkgs, ...}:
{
imports = [
2023-11-15 21:04:50 -06:00
../common/steam.nix
2023-10-30 16:15:31 -05:00
../common/desktop.nix
];
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
networking.hostName = "mainsail";
services.paperless = {
enable = true;
passwordFile = "/etc/paperless-password";
port = 3004;
address = "localhost";
extraConfig = {
PAPERLESS_URL = "https://paperless.beepboop.systems";
};
};
2023-11-15 21:04:50 -06:00
programs.adb.enable = true;
users.users.usr.extraGroups = ["adbusers"];
services.radicale = {
enable = true;
config = ''
[auth]
type = htpasswd
htpasswd_filename = radicale-passwd
htpasswd_encryption = plain
'';
};
2023-11-15 21:04:50 -06:00
environment.etc."nextcloud-admin-pass".text = "aslkfjaslkdfjsalkdfjlKJFLKJDLFKJLSKDJFLSKDJFLSKDJFLSKDFJ";
services.nextcloud = {
enable = true;
hostName = "beepboop.systems";
config.adminpassFile = "/etc/nextcloud-admin-pass";
package = pkgs.nextcloud27;
# Instead of using pkgs.nextcloud27Packages.apps,
# we'll reference the package version specified above
extraApps = with config.services.nextcloud.package.packages.apps; {
inherit news contacts calendar tasks;
};
extraAppsEnable = true;
};
systemd.targets.sleep.enable = false;
systemd.targets.suspend.enable = false;
systemd.targets.hibernate.enable = false;
systemd.targets.hybrid-sleep.enable = false;
2023-10-30 16:15:31 -05:00
services.getty.greetingLine = "
welcome to mainsail |`-:_
,----....____ | `+.
( ````----....|___ |
\\ _ ````----....____
\\ _) ```---.._
\\ \\
)`.\\ )`. )`. )`. )`. )`. )`. )`. )`. )`. )`.
-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `-' `
";
environment.systemPackages = with pkgs; [
2023-11-15 21:04:50 -06:00
vscodium-fhs
libreoffice
anki
2023-11-21 11:09:16 -06:00
ytfzf
2023-11-15 21:04:50 -06:00
kdenlive
libreoffice
i3
gcc
gnumake
scrcpy
2023-10-30 16:15:31 -05:00
];
2023-11-22 16:53:33 -06:00
2023-12-03 20:15:10 -06:00
systemd.services.paperless-activate = {
2023-11-22 16:53:33 -06:00
script = ''
while true; do
# restart every 5 minutes
echo "starting link"
2023-12-03 20:15:10 -06:00
${pkgs.openssh}/bin/ssh -v -NR 3004:localhost:3004 -p 55555 useracc@beepboop.systems &
ONE="$!"
${pkgs.openssh}/bin/ssh -v -NR 4000:localhost:80 -p 55555 useracc@beepboop.systems &
TWO="$!"
${pkgs.openssh}/bin/ssh -v -NR 5232:localhost:5232 -p 55555 useracc@beepboop.systems &
THREE="$!"
2023-11-22 16:53:33 -06:00
echo "waiting"
sleep $((60 * 5))
echo "killing and restarting"
2023-12-03 20:15:10 -06:00
kill $ONE || true
kill $TWO || true
kill $THREE || true
2023-11-22 16:53:33 -06:00
done
'';
wantedBy = [ "multi-user.target" ];
after = [ "network.target" "ankisyncd.service" ];
2023-11-22 16:53:33 -06:00
};
2023-10-30 16:15:31 -05:00
}