From d7b6e6b94487cc9a50ecc43e1350d62d423f6b38 Mon Sep 17 00:00:00 2001 From: Nathan Braswell Date: Tue, 2 Jul 2024 00:25:02 -0400 Subject: [PATCH] Post media moved to 4800h, postgresql upgrade --- flake.lock | 18 +++--- flake.nix | 169 +++++++++++++++++----------------------------------- sway_config | 3 + 3 files changed, 66 insertions(+), 124 deletions(-) diff --git a/flake.lock b/flake.lock index 69e41da..28a0892 100644 --- a/flake.lock +++ b/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1702735279, - "narHash": "sha256-SztEzDOE/6bDNnWWvnRbSHPVrgewLwdSei1sxoZFejM=", + "lastModified": 1719180626, + "narHash": "sha256-vZAzm5KQpR6RGple1dzmSJw5kPivES2heCFM+ZWkt0I=", "owner": "nix-community", "repo": "home-manager", - "rev": "e9b9ecef4295a835ab073814f100498716b05a96", + "rev": "6b1f90a8ff92e81638ae6eb48cd62349c3e387bb", "type": "github" }, "original": { @@ -22,11 +22,11 @@ }, "nixos-hardware": { "locked": { - "lastModified": 1702453208, - "narHash": "sha256-0wRi9SposfE2wHqjuKt8WO2izKB/ASDOV91URunIqgo=", + "lastModified": 1719145664, + "narHash": "sha256-+0bBlerLxsHUJcKPDWZM1wL3V9bzCFjz+VyRTG8fnUA=", "owner": "NixOS", "repo": "nixos-hardware", - "rev": "7763c6fd1f299cb9361ff2abf755ed9619ef01d6", + "rev": "c3e48cbd88414f583ff08804eb57b0da4c194f9e", "type": "github" }, "original": { @@ -38,11 +38,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1702312524, - "narHash": "sha256-gkZJRDBUCpTPBvQk25G0B7vfbpEYM5s5OZqghkjZsnE=", + "lastModified": 1719075281, + "narHash": "sha256-CyyxvOwFf12I91PBWz43iGT1kjsf5oi6ax7CrvaMyAo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "a9bf124c46ef298113270b1f84a164865987a91c", + "rev": "a71e967ef3694799d0c418c98332f7ff4cc5f6af", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index f425a94..5408a47 100644 --- a/flake.nix +++ b/flake.nix @@ -285,19 +285,20 @@ }; }; # For steam, and Vulkan in general - hardware.opengl.driSupport = true; + #hardware.opengl.driSupport = true; hardware.opengl.driSupport32Bit = true; hardware.steam-hardware.enable = true; programs.steam.enable = true; environment.systemPackages = with pkgs; [ - tmux vim wget curl git w3m iftop iotop killall file unzip zip ripgrep imv killall gomuks htop python3 + tmux vim wget curl git w3m iftop iotop killall file unzip zip p7zip ripgrep imv killall gomuks htop python3 waypipe firefox-wayland chromium gnome.nautilus vlc mpv libreoffice calibre foliate transmission-gtk mupdf gimp pavucontrol pywal sway wayland glib dracula-theme gnome.adwaita-icon-theme swaylock swayidle wl-clipboard - monado openxr-loader xrgears + #monado openxr-loader xrgears + lean4 blas elan vscode (pkgs.writeTextFile { name = "dbus-sway-environment"; destination = "/bin/dbus-sway-environment"; @@ -358,7 +359,7 @@ nixos-hardware.nixosModules.framework-13-7040-amd home-manager.nixosModules.home-manager homeManagerSharedModule - ({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs [ pkgs.light pkgs.gpodder pkgs.evince pkgs.wezterm pkgs.gnome.gnome-tweaks pkgs.vulkan-tools ]) { + ({ config, lib, pkgs, modulesPath, ... }@innerArgs: (lib.recursiveUpdate (commonConfigFunc innerArgs [ pkgs.light pkgs.gpodder pkgs.evince pkgs.wezterm pkgs.gnome.gnome-tweaks pkgs.vulkan-tools pkgs.openconnect pkgs.blender pkgs.discord]) { # HARDWARE imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; @@ -536,6 +537,22 @@ }; # END HARDWARE + fileSystems."/var/lib/matrix-synapse/media" = { + device = "nathan@100.64.0.1:/home/nathan/synapse_media/media/"; + fsType = "sshfs"; + options = [ + # Filesystem Options + "allow_other" # non-root access + "_netdev" # this is a network fs + "x-systemd.automount" # mount on demand + + # SSH options + "reconnect" # handle connection drops + "ServerAliveInterval=15" # Keep connections alive + "IdentityFile=/var/lib/private/sshfs-key" + ]; + }; + nix.gc.automatic = true; imports = [ ]; @@ -661,15 +678,6 @@ # port = 8888; #}; - services.matrix-synapse.sliding-sync = { - enable = true; - createDatabase = true; - environmentFile = "/var/lib/private/matrix-sliding-sync/secrets"; - settings = { - SYNCV3_SERVER="https://synapse.room409.xyz"; - }; - }; - services.matrix-synapse = { enable = true; @@ -727,6 +735,7 @@ #}; services.postgresql = { + package = pkgs.postgresql_16; enable = true; # postgresql user and db name in the service.matrix-synapse.databse_args setting is default initialScript = pkgs.writeText "synapse-init.sql" '' @@ -750,6 +759,7 @@ services.ttyd = { enable = true; port = 9134; + writeable = true; username = "miloignis"; passwordFile = /var/lib/ttyd/secrets; clientOptions.fontFamily="Recursive"; @@ -805,11 +815,6 @@ proxy_set_header X-Forwarded-For $remote_addr; ''; }; - virtualHosts."syncv3.room409.xyz" = { - forceSSL = true; - enableACME = true; - locations."/".proxyPass = "http://localhost:8009"; - }; virtualHosts."element-synapse.room409.xyz" = { forceSSL = true; @@ -936,103 +941,6 @@
  • 📄 Resume/About Me
  • -

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ''; @@ -1124,6 +1032,37 @@ config.services.headscale.package #wireguard droopy + sshfs + + # (let + # # XXX specify the postgresql package you'd like to upgrade to. + # # Do not forget to list the extensions you need. + # newPostgres = pkgs.postgresql_16.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 \ + # "$@" + #'') + + ]; users.extraUsers.nathan = { name = "nathan"; diff --git a/sway_config b/sway_config index 9b69642..99ea97b 100644 --- a/sway_config +++ b/sway_config @@ -22,6 +22,9 @@ output eDP-1 scale 1 #Output HDMI-A-1 'Goldstar Company Ltd LG TV SSCR2 0x00000101' output HDMI-A-1 mode 1920x1080@60Hz +#Output DP-4 'LG Electronics LG TV SSCR2 0x00000101' +output DP-4 mode 1280x720@60Hz + # reload the configuration file bindsym $mod+Shift+q reload # restart i3 inplace (preserves your layout/session, can be used to upgrade i3)