From ea06ff9985f2a8f4b7a9256d60059ce0140ad033 Mon Sep 17 00:00:00 2001 From: coolneng Date: Fri, 21 Feb 2020 12:24:13 +0100 Subject: [PATCH] Package cleanup and reverse proxy service restart Squashed commit of the following: commit db95d142d42f97891db9aecd61625886c84e18a4 Author: coolneng Date: Thu Jan 30 13:23:23 2020 +0100 Update Syncthing IDs and add roamer to Wireguard commit 6a2346d4a1b6bf39e57130bf2a70e5e190850fc9 Author: coolneng Date: Wed Jan 29 14:30:31 2020 +0100 Add wireguard server configuration commit 09c5755ec8119db3f17df180034ea5c03adc5242 Author: coolneng Date: Wed Jan 29 00:20:52 2020 +0100 Add wireguard packages commit c542b06c9d718da9ca5ec6b00bf5179e970ccbdb Author: coolneng Date: Tue Jan 28 21:57:53 2020 +0100 Move zeroconf section to networking commit 1af6e07072ba345482b71b1817563c6a8c01f71c Author: coolneng Date: Tue Jan 28 21:54:39 2020 +0100 Revert "Clean up packages and refactor nginx config" This reverts commit 375758a958c4dd9f1ba99d25fc6840c52a5582a7. commit 5eb5e446ade2854e966ba0f60067e3b153a7a119 Author: coolneng Date: Sun Jan 26 19:39:28 2020 +0100 Add wallabag docker container commit 375758a958c4dd9f1ba99d25fc6840c52a5582a7 Author: coolneng Date: Sun Jan 26 08:45:56 2020 +0100 Clean up packages and refactor nginx config commit f210353ce53d378eb01f7124c889df156758470a Author: coolneng Date: Tue Dec 31 18:41:34 2019 +0100 Delete Security folder from Syncthing commit 65afa32e57032eb59444fecb223d69dbfef585bd Author: coolneng Date: Thu Dec 26 04:19:38 2019 +0100 Use 'after' instead of 'wantedBy' commit 8cc829e06329a0eb75b3d924c9843370e41c9555 Author: coolneng Date: Thu Dec 26 04:16:21 2019 +0100 Use wantedBy instead of partOf commit e490102d74fada01a336d42086c186c06ab4ff8b Merge: 91d4b24 51ed142 Author: coolneng Date: Wed Dec 25 17:47:14 2019 +0100 Merge branch 'test' of gitea into test commit 51ed142c5f851a718ec814a8badc0ca670f22d7b Author: coolneng Date: Wed Dec 25 17:15:42 2019 +0100 Use mkforce for 'partOf' option commit caf4a49ec2796948213539f0dcb6a38d51228f6f Author: coolneng Date: Wed Dec 25 16:37:11 2019 +0100 Configure nginx service as dependent on gitea commit e8850eff5166ae6f6e56ac11d58cc56491fca255 Author: coolneng Date: Wed Dec 25 16:24:10 2019 +0100 Restart nginx after Gitea commit 91d4b240d7b188b973ec7c3a86138587c52920fe Author: coolneng Date: Sun Dec 15 22:54:00 2019 +0100 # This is a combination of 2 commits. # This is the 1st commit message: Revert "Disable wizard on Gitea" This reverts commit d8b415ee16e1a560dac430f577d34cb098e0f832. # This is the commit message #2: Remove Gitea socket connection to the DB --- configuration.nix | 17 ++--------------- modules/datasync.nix | 7 ++----- modules/devops.nix | 5 ----- modules/networking.nix | 1 - modules/webstack.nix | 4 ++++ 5 files changed, 8 insertions(+), 26 deletions(-) diff --git a/configuration.nix b/configuration.nix index 5f77455..e9c9d44 100644 --- a/configuration.nix +++ b/configuration.nix @@ -19,7 +19,6 @@ environment.systemPackages = with pkgs; [ raspberrypi-tools git - tmux htop vim ]; @@ -69,32 +68,20 @@ # Auto-upgrade the system and reboot if needed system.autoUpgrade = { enable = true; - allowReboot = false; - }; - - # Enable zeroconf - services.avahi = { - enable = true; - nssmdns = true; - publish = { - enable = true; - userServices = true; - }; + allowReboot = true; }; # Run Nix garbage collector daily nix.gc = { automatic = true; dates = "03:15"; + options = "--delete-older-than 14d"; }; # Configure fish shell programs.fish.enable = true; users.users.root.shell = "/run/current-system/sw/bin/fish"; - # Start a tmux session - #programs.tmux.enable = true; - # Import other configuration modules imports = [ ./modules/printing.nix diff --git a/modules/datasync.nix b/modules/datasync.nix index 2ea28d5..696238e 100644 --- a/modules/datasync.nix +++ b/modules/datasync.nix @@ -15,8 +15,8 @@ dataDir = "/vault/syncthing"; declarative = { devices = { - monolith = { id = "QGDGEZQ-INE7XDY-DNX2QI4-QI7ANQJ-57REEO2-FUMH545-FZS5RYU-ULF7HA2"; }; - roamer = { id = "DS3PJH3-J6SNMHM-XUJTDLO-DHGJL5U-J3RUMAG-4OSJWIK-VSJSDVJ-PIHZ2QP"; }; + monolith = { id = "64P2YDH-S5V7PKM-XXBOSXC-WEXUSC7-B553ELI-6IJ3CPJ-ZFB3YA5-MTKAFAH"; }; + roamer = { id = "XE6YPFU-TB7ARWF-7NDSJ35-2PBNNDS-VTXGGCH-KC2UBLE-UHWAXH3-MWD26A5"; }; unit = { id = "VYHHL4A-KJ6WUYQ-4SNWNA3-YRCFTHE-52ZTRLP-4LV6ZDV-4VAJLHC-RJXYYQY"; }; }; folders = { @@ -24,21 +24,18 @@ "Notes" = { devices = [ "monolith" "roamer" "unit" ]; id = "kafhz-bfmzm"; }; "Music" = { devices = [ "monolith" "roamer" "unit" ]; id = "2aqt7-vpprc"; }; "Photos" = { devices = [ "monolith" "roamer" "unit" ]; id = "mjibc-ustcg"; }; - "Security" = { devices = [ "monolith" "roamer" "unit" ]; id = "z4lpn-pmm3v"; }; "Projects" = { devices = [ "monolith" "unit" ]; id = "cjhmu-avy9v"; }; Documents.type = "receiveonly"; Notes.type = "receiveonly"; Music.type = "receiveonly"; Photos.type = "receiveonly"; - Security.type = "receiveonly"; Projects.type = "receiveonly"; Documents.path = "/vault/syncthing/Documents"; Notes.path = "/vault/syncthing/Notes"; Music.path = "/vault/syncthing/Music"; Photos.path = "/vault/syncthing/Photos"; - Security.path = "/vault/syncthing/Security"; Projects.path = "/vault/syncthing/Projects"; }; }; diff --git a/modules/devops.nix b/modules/devops.nix index 5d5478a..7f97c55 100644 --- a/modules/devops.nix +++ b/modules/devops.nix @@ -1,10 +1,6 @@ # Software development configuration { config, pkgs, lib, ... }: { - environment.systemPackages = with pkgs; [ - gitea - ]; - # Gitea setup with daily backup services.gitea = { enable = true; @@ -20,5 +16,4 @@ dump.enable = true; appName = "Gitea"; }; - } diff --git a/modules/networking.nix b/modules/networking.nix index d114dcb..e8846b0 100644 --- a/modules/networking.nix +++ b/modules/networking.nix @@ -6,7 +6,6 @@ { environment.systemPackages = with pkgs; [ - ddclient ]; # Dynamic DNS configuration diff --git a/modules/webstack.nix b/modules/webstack.nix index fa7a3bd..3edbf39 100644 --- a/modules/webstack.nix +++ b/modules/webstack.nix @@ -133,4 +133,8 @@ }; }; + + # Restart nginx after + systemd.services.nginx.after = [ "gitea.service" "syncthing.service" "miniflux.service" ]; + }