workhorse: fix 20.03
This commit is contained in:
parent
67b59d050c
commit
6278b53e94
3 changed files with 38 additions and 26 deletions
|
@ -13,11 +13,12 @@ in {
|
||||||
|
|
||||||
# lvm volume group
|
# lvm volume group
|
||||||
# ----------------
|
# ----------------
|
||||||
boot.initrd.luks.devices = [{
|
boot.initrd.luks.devices = {
|
||||||
name = "vg";
|
vg = {
|
||||||
device = "/dev/sda2";
|
device = "/dev/sda2";
|
||||||
preLVM = true;
|
preLVM = true;
|
||||||
}];
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# NTFS support
|
# NTFS support
|
||||||
# ------------
|
# ------------
|
||||||
|
|
|
@ -93,17 +93,17 @@ in {
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/maintenance/backup.html
|
# https://docs.nextcloud.com/server/stable/admin_manual/maintenance/backup.html
|
||||||
# https://docs.nextcloud.com/server/stable/admin_manual/maintenance/upgrade.html
|
# https://docs.nextcloud.com/server/stable/admin_manual/maintenance/upgrade.html
|
||||||
# use snapshots in case of a rollback
|
# use snapshots in case of a rollback
|
||||||
nixpkgs.config.packageOverrides = super: {
|
#nixpkgs.config.packageOverrides = super: {
|
||||||
nextcloud = super.nextcloud.overrideAttrs (old: rec {
|
# nextcloud = super.nextcloud.overrideAttrs (old: rec {
|
||||||
name = "nextcloud-${version}";
|
# name = "nextcloud-${version}";
|
||||||
version = "18.0.1";
|
# version = "18.0.1";
|
||||||
src = super.fetchurl {
|
# src = super.fetchurl {
|
||||||
url =
|
# url =
|
||||||
"https://download.nextcloud.com/server/releases/nextcloud-18.0.1.tar.bz2";
|
# "https://download.nextcloud.com/server/releases/nextcloud-18.0.1.tar.bz2";
|
||||||
sha256 = "1h0rxpdssn1hc65k41zbvww9r4f79vbd9bixc9ri5n7hp0say3vp";
|
# sha256 = "1h0rxpdssn1hc65k41zbvww9r4f79vbd9bixc9ri5n7hp0say3vp";
|
||||||
};
|
# };
|
||||||
});
|
# });
|
||||||
};
|
#};
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [ 80 ];
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
networking.firewall.allowedUDPPorts = [ 80 ];
|
networking.firewall.allowedUDPPorts = [ 80 ];
|
||||||
|
@ -147,6 +147,16 @@ in {
|
||||||
# nextcloud setup
|
# nextcloud setup
|
||||||
services.nextcloud = {
|
services.nextcloud = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
package = pkgs.nextcloud18;
|
||||||
|
#package = pkgs.nextcloud.overrideAttrs (old: rec {
|
||||||
|
# name = "nextcloud-${version}";
|
||||||
|
# version = "18.0.1";
|
||||||
|
# src = pkgs.fetchurl {
|
||||||
|
# url =
|
||||||
|
# "https://download.nextcloud.com/server/releases/nextcloud-18.0.1.tar.bz2";
|
||||||
|
# sha256 = "1h0rxpdssn1hc65k41zbvww9r4f79vbd9bixc9ri5n7hp0say3vp";
|
||||||
|
# };
|
||||||
|
#});
|
||||||
autoUpdateApps.enable = true;
|
autoUpdateApps.enable = true;
|
||||||
nginx.enable = true;
|
nginx.enable = true;
|
||||||
hostName = "nextcloud.ingolf-wagner.de";
|
hostName = "nextcloud.ingolf-wagner.de";
|
||||||
|
|
|
@ -71,27 +71,28 @@ in {
|
||||||
# tor setup
|
# tor setup
|
||||||
boot.initrd.secrets = {
|
boot.initrd.secrets = {
|
||||||
"/etc/tor/onion/bootup" = /var/lib/tor/onion/bootup;
|
"/etc/tor/onion/bootup" = /var/lib/tor/onion/bootup;
|
||||||
"/etc/tor/tor.rc" = (pkgs.writeText "tor.rc" ''
|
|
||||||
DataDirectory /etc/tor
|
|
||||||
SOCKSPort 127.0.0.1:9050 IsolateDestAddr
|
|
||||||
SOCKSPort 127.0.0.1:9063
|
|
||||||
HiddenServiceDir /etc/tor/onion/bootup
|
|
||||||
HiddenServicePort ${toString cfg.port} 127.0.0.1:${toString cfg.port}
|
|
||||||
'');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.extraUtilsCommands = ''
|
boot.initrd.extraUtilsCommands = ''
|
||||||
copy_bin_and_libs ${pkgs.tor}/bin/tor
|
copy_bin_and_libs ${pkgs.tor}/bin/tor
|
||||||
'';
|
'';
|
||||||
|
|
||||||
boot.initrd.network.postCommands = ''
|
boot.initrd.network.postCommands = let
|
||||||
|
torRc = (pkgs.writeText "tor.rc" ''
|
||||||
|
DataDirectory /etc/tor
|
||||||
|
SOCKSPort 127.0.0.1:9050 IsolateDestAddr
|
||||||
|
SOCKSPort 127.0.0.1:9063
|
||||||
|
HiddenServiceDir /etc/tor/onion/bootup
|
||||||
|
HiddenServicePort ${toString cfg.port} 127.0.0.1:${toString cfg.port}
|
||||||
|
'');
|
||||||
|
in ''
|
||||||
echo "tor: preparing onion folder"
|
echo "tor: preparing onion folder"
|
||||||
# have to do this otherwise tor does not want to start
|
# have to do this otherwise tor does not want to start
|
||||||
chmod -R 700 /etc/tor
|
chmod -R 700 /etc/tor
|
||||||
|
|
||||||
echo "tor: starting tor"
|
echo "tor: starting tor"
|
||||||
tor -f /etc/tor/tor.rc --verify-config
|
tor -f ${torRc} --verify-config
|
||||||
tor -f /etc/tor/tor.rc &
|
tor -f ${torRc} &
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# ssh setup
|
# ssh setup
|
||||||
|
|
Loading…
Reference in a new issue