Compare commits
5 commits
c03c0a0348
...
6261d8bf97
| Author | SHA1 | Date | |
|---|---|---|---|
| 6261d8bf97 | |||
| 4b3ed18218 | |||
| f3adc3a8d5 | |||
| f99a81bc9b | |||
| 06984f9d3f |
3 changed files with 47 additions and 1 deletions
|
|
@ -7,6 +7,8 @@ let
|
|||
fullName = "Alexander Kobjolke";
|
||||
mail = "me@failco.de";
|
||||
};
|
||||
|
||||
myEza = if builtins.hasAttr "eza" pkgs then "eza" else "exa";
|
||||
in {
|
||||
imports = [
|
||||
# shell config
|
||||
|
|
@ -126,7 +128,7 @@ in {
|
|||
};
|
||||
|
||||
# better ls with icons and stuff, maybe also try lsd
|
||||
eza = {
|
||||
${myEza} = {
|
||||
enable = true;
|
||||
icons = true;
|
||||
enableAliases = true;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ let
|
|||
in {
|
||||
imports = [ # Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
../../modules/upgrade-pg-cluster.nix
|
||||
];
|
||||
|
||||
nix.package = pkgs.nixUnstable;
|
||||
|
|
@ -98,6 +99,11 @@ in {
|
|||
publicKey = "NG9y+0RMDTjiG65yC4Z0ymJ0G5fe1mOhl4GyC3xAh1k=";
|
||||
allowedIPs = [ "10.0.0.3/32" ];
|
||||
}
|
||||
{
|
||||
# homematic
|
||||
publicKey = "slqWgVksOCav0bASxupaFGqfr6vajxDRNIlZYocONQ4=";
|
||||
allowedIPs = [ "10.0.0.4/32" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
@ -203,6 +209,11 @@ in {
|
|||
extraConfig = ''
|
||||
add_header X-Frame-Options 'SAMEORIGIN';
|
||||
'';
|
||||
|
||||
locations."/photo-groove" = {
|
||||
proxyPass = "http://127.0.0.1:8000/";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
|
||||
"www.jakalx.net" = {
|
||||
|
|
@ -378,6 +389,7 @@ in {
|
|||
virusScanning = true;
|
||||
};
|
||||
|
||||
services.postgresql = { package = pkgs.postgresql_15; };
|
||||
services.roundcube = {
|
||||
enable = true;
|
||||
hostName = "mail.failco.de";
|
||||
|
|
|
|||
32
modules/upgrade-pg-cluster.nix
Normal file
32
modules/upgrade-pg-cluster.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = [
|
||||
(let
|
||||
# XXX specify the postgresql package you'd like to upgrade to.
|
||||
# Do not forget to list the extensions you need.
|
||||
newPostgres = pkgs.postgresql_15.withPackages (pp: [
|
||||
# pp.plv8
|
||||
]);
|
||||
in pkgs.writeScriptBin "upgrade-pg-cluster" ''
|
||||
set -eux
|
||||
# XXX it's perhaps advisable to stop all services that depend on postgresql
|
||||
systemctl stop postgresql
|
||||
|
||||
export NEWDATA="/var/lib/postgresql/${newPostgres.psqlSchema}"
|
||||
|
||||
export NEWBIN="${newPostgres}/bin"
|
||||
|
||||
export OLDDATA="${config.services.postgresql.dataDir}"
|
||||
export OLDBIN="${config.services.postgresql.package}/bin"
|
||||
|
||||
install -d -m 0700 -o postgres -g postgres "$NEWDATA"
|
||||
cd "$NEWDATA"
|
||||
sudo -u postgres $NEWBIN/initdb -D "$NEWDATA"
|
||||
|
||||
sudo -u postgres $NEWBIN/pg_upgrade \
|
||||
--old-datadir "$OLDDATA" --new-datadir "$NEWDATA" \
|
||||
--old-bindir $OLDBIN --new-bindir $NEWBIN \
|
||||
"$@"
|
||||
'')
|
||||
];
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue