migrated bitwarden

This commit is contained in:
Ingolf Wagner 2022-01-23 20:23:47 +01:00
parent 766f4a8b4b
commit 9c62efc86e
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
8 changed files with 72 additions and 43 deletions

View file

@ -111,4 +111,9 @@
after = [ "media.mount" ]; after = [ "media.mount" ];
}; };
backup.dirs = [
config.services.syncthing.folders.finance.path
];
} }

View file

@ -1,25 +1,28 @@
{ lib, config, pkgs, ... }: { { lib, config, pkgs, ... }: {
imports = [ imports = [
../../system/all/defaults.nix
../../system/all/tinc.nix
../../system/all/borg-jobs.nix ../../system/all/borg-jobs.nix
../../system/all/defaults.nix
../../system/all/sshd-known-hosts-bootup.nix
../../system/all/sshd-known-hosts-private.nix
../../system/all/sshd-known-hosts-public.nix
../../system/all/syncthing.nix
../../system/all/tinc.nix
../../system/server/netdata.nix ../../system/server/netdata.nix
./hetzner.nix ./hetzner.nix
./codimd.nix
./gitea.nix
./grocy.nix
./nextcloud.nix
./packages.nix ./packages.nix
./tinc.nix
./syncthing.nix ./syncthing.nix
./taskserver.nix ./taskserver.nix
./tinc.nix
./transmission.nix ./transmission.nix
./nextcloud.nix ./vaultwarden.nix
./codimd.nix
./gitea.nix
#./gitlab.nix
# todo
#./bitwarden.nix
#../../system/server #../../system/server
@ -78,7 +81,5 @@
fsType = "ext4"; fsType = "ext4";
}; };
} }

View file

@ -0,0 +1,16 @@
{ config, lib, pkgs, ... }:
{
services.grocy = {
enable = true;
settings = {
culture = "de";
currency = "EUR";
};
hostName = "grocy.ingolf-wagner.de";
nginx.enableSSL = true;
};
backup.dirs = [ config.services.grocy.dataDir ];
}

View file

@ -66,28 +66,28 @@ in
priority = 210; priority = 210;
extraConfig = "return 301 $scheme://$host/remote.php/dav;"; extraConfig = "return 301 $scheme://$host/remote.php/dav;";
}; };
"~ .(?:css|js|svg|gif)$" = { #"~ .(?:css|js|svg|gif)$" = {
proxyPass = "http://${containerAddress}$request_uri"; # proxyPass = "http://${containerAddress}$request_uri";
extraConfig = '' # extraConfig = ''
expires 6M; # Cache-Control policy borrowed from `.htaccess` # expires 6M; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets # access_log off; # Optional: Don't log access to assets
sub_filter "http://nextcloud.ingolf-wagner.de" "https://nextcloud.ingolf-wagner.de"; # sub_filter "http://nextcloud.ingolf-wagner.de" "https://nextcloud.ingolf-wagner.de";
sub_filter "nextcloud.workhorse.private" "nextcloud.ingolf-wagner.de"; # sub_filter "nextcloud.workhorse.private" "nextcloud.ingolf-wagner.de";
# used for view/edit office file via Office Online Server # # used for view/edit office file via Office Online Server
client_max_body_size 0; # client_max_body_size 0;
''; # '';
}; #};
"~ .woff2?$" = { #"~ .woff2?$" = {
proxyPass = "http://${containerAddress}$request_uri"; # proxyPass = "http://${containerAddress}$request_uri";
extraConfig = '' # extraConfig = ''
expires 7d; # Cache-Control policy borrowed from `.htaccess` # expires 7d; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets # access_log off; # Optional: Don't log access to assets
sub_filter "http://nextcloud.ingolf-wagner.de" "https://nextcloud.ingolf-wagner.de"; # sub_filter "http://nextcloud.ingolf-wagner.de" "https://nextcloud.ingolf-wagner.de";
sub_filter "nextcloud.workhorse.private" "nextcloud.ingolf-wagner.de"; # sub_filter "nextcloud.workhorse.private" "nextcloud.ingolf-wagner.de";
# used for view/edit office file via Office Online Server # # used for view/edit office file via Office Online Server
client_max_body_size 0; # client_max_body_size 0;
''; # '';
}; #};
}; };
}; };
}; };
@ -240,7 +240,7 @@ in
# nextcloud setup # nextcloud setup
services.nextcloud = { services.nextcloud = {
enable = true; enable = true;
package = pkgs.nextcloud22; package = pkgs.nextcloud23;
autoUpdateApps.enable = true; autoUpdateApps.enable = true;
#nginx.enable = true; #nginx.enable = true;
hostName = "nextcloud.ingolf-wagner.de"; hostName = "nextcloud.ingolf-wagner.de";

View file

@ -1,5 +1,7 @@
{ config, lib, pkgs, ... }: { { config, lib, pkgs, ... }: {
imports = [ ../../system/all/tinc.nix ];
module.cluster.services.tinc = { module.cluster.services.tinc = {
"private" = { "private" = {
enable = true; enable = true;

View file

@ -23,13 +23,15 @@
security.wrappers = { security.wrappers = {
pmount = { pmount = {
source = "${pkgs.pmount}/bin/pmount"; source = "${pkgs.pmount}/bin/pmount";
owner = config.users.users.mainUser.name; setuid = true;
group = "nogroup"; owner = "root";
group = "root";
}; };
pumount = { pumount = {
source = "${pkgs.pmount}/bin/pumount"; source = "${pkgs.pmount}/bin/pumount";
owner = config.users.users.mainUser.name; setuid = true;
group = "nogroup"; owner = "root";
group = "root";
}; };
}; };

View file

@ -1,12 +1,15 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
nextcloudSync = folder: nextcloudSync = folder:
let
password = "$( pass show home/nextcloud/palo/nextcloudcmd-token)";
user = "palo";
in
pkgs.writers.writeBashBin "nextcloud-sync-${folder}" '' pkgs.writers.writeBashBin "nextcloud-sync-${folder}" ''
${pkgs.nextcloud-client}/bin/nextcloudcmd \ ${pkgs.nextcloud-client}/bin/nextcloudcmd \
--user palo \ --path "${folder}" \
--password `pass show home/nextcloud/palo/nextcloudcmd-token` \
~/Nextcloud/${folder} \ ~/Nextcloud/${folder} \
https://nextcloud.ingolf-wagner.de/remote.php/webdav/${folder} "https://${user}:${password}@nextcloud.ingolf-wagner.de"
''; '';
in in