From 56aa737255ae179fd78e4a9f02196c424fe302b6 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Fri, 8 Nov 2024 22:42:19 +0100 Subject: [PATCH] add logseq --- flake.lock | 64 ++++++++++++++-------------- hosts/nuc/default.nix | 1 + hosts/nuc/modules/logseq/default.nix | 15 +++++++ shared/systemd.nix | 5 +++ 4 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 hosts/nuc/modules/logseq/default.nix diff --git a/flake.lock b/flake.lock index 6f91f7d..d21de87 100644 --- a/flake.lock +++ b/flake.lock @@ -37,11 +37,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1730387901, - "narHash": "sha256-XnO0bx330mgfiLGIEnUEH4fBhKx5DcZTXl47VjLCeok=", + "lastModified": 1730835992, + "narHash": "sha256-XYr4WQMxJdZkrQlsouyURMY4iNL5SS2RlQ7XGnjEQBU=", "owner": "nix-community", "repo": "authentik-nix", - "rev": "74b5a8c5ffbca16f7af1def137e06a97a958a098", + "rev": "5af11599eaec65b5b6e6e39d77b541db361c08aa", "type": "github" }, "original": { @@ -53,16 +53,16 @@ "authentik-src": { "flake": false, "locked": { - "lastModified": 1730315123, - "narHash": "sha256-UYOdBlkGeIGCG/pCGLANWv1bKTdBEUp6jTiLG7BpY7E=", + "lastModified": 1730826392, + "narHash": "sha256-EuNOfMy7yVa1OqWwCtNtmdeIQeQCTCKBXgJdz0QCPIU=", "owner": "goauthentik", "repo": "authentik", - "rev": "e8b5e4c1272151f4a3666e53754f7deefb8e2fb3", + "rev": "665de8ef2211524f3cc13dce9344bd59c61c3a5c", "type": "github" }, "original": { "owner": "goauthentik", - "ref": "version/2024.8.4", + "ref": "version/2024.10.1", "repo": "authentik", "type": "github" } @@ -184,11 +184,11 @@ "nixpkgs-lib": "nixpkgs-lib" }, "locked": { - "lastModified": 1726153070, - "narHash": "sha256-HO4zgY0ekfwO5bX0QH/3kJ/h4KvUDFZg8YpkNwIbg1U=", + "lastModified": 1727826117, + "narHash": "sha256-K5ZLCyfO/Zj9mPFldf3iwS6oZStJcU4tSpiXTMYaaL0=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "bcef6817a8b2aa20a5a6dbb19b43e63c5bf8619a", + "rev": "3d04084d54bedc3d6b8b736c70ef449225c361b1", "type": "github" }, "original": { @@ -301,11 +301,11 @@ ] }, "locked": { - "lastModified": 1730633670, - "narHash": "sha256-ZFJqIXpvVKvzOVFKWNRDyIyAo+GYdmEPaYi1bZB6uf0=", + "lastModified": 1730837930, + "narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=", "owner": "nix-community", "repo": "home-manager", - "rev": "8f6ca7855d409aeebe2a582c6fd6b6a8d0bf5661", + "rev": "2f607e07f3ac7e53541120536708e824acccfaa8", "type": "github" }, "original": { @@ -430,11 +430,11 @@ ] }, "locked": { - "lastModified": 1703863825, - "narHash": "sha256-rXwqjtwiGKJheXB43ybM8NwWB8rO2dSRrEqes0S7F5Y=", + "lastModified": 1729742964, + "narHash": "sha256-B4mzTcQ0FZHdpeWcpDYPERtyjJd/NIuaQ9+BV1h+MpA=", "owner": "nix-community", "repo": "nix-github-actions", - "rev": "5163432afc817cf8bd1f031418d1869e4c9d5547", + "rev": "e04df33f62cdcf93d73e9a04142464753a16db67", "type": "github" }, "original": { @@ -465,11 +465,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1726937504, - "narHash": "sha256-bvGoiQBvponpZh8ClUcmJ6QnsNKw0EMrCQJARK3bI1c=", + "lastModified": 1730200266, + "narHash": "sha256-l253w0XMT8nWHGXuXqyiIC/bMvh1VRszGXgdpQlfhvU=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "9357f4f23713673f310988025d9dc261c20e70c6", + "rev": "807e9154dcb16384b1b765ebe9cd2bba2ac287fd", "type": "github" }, "original": { @@ -481,14 +481,14 @@ }, "nixpkgs-lib": { "locked": { - "lastModified": 1725233747, - "narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", + "lastModified": 1727825735, + "narHash": "sha256-0xHYkMkeLVQAMa7gvkddbPqpxph+hDzdu1XdGPJR+Os=", "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" }, "original": { "type": "tarball", - "url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" + "url": "https://github.com/NixOS/nixpkgs/archive/fb192fec7cc7a4c26d51779e9bab07ce6fa5597a.tar.gz" } }, "nixpkgs-lib_2": { @@ -524,11 +524,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1730531603, - "narHash": "sha256-Dqg6si5CqIzm87sp57j5nTaeBbWhHFaVyG7V6L8k3lY=", + "lastModified": 1730785428, + "narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7ffd9ae656aec493492b44d0ddfb28e79a1ea25d", + "rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7", "type": "github" }, "original": { @@ -575,11 +575,11 @@ "treefmt-nix": "treefmt-nix" }, "locked": { - "lastModified": 1727169160, - "narHash": "sha256-m/3tT0Wvk2V4H15riZC/yT7i7t+8V58HTDpthKV5yhk=", + "lastModified": 1730284601, + "narHash": "sha256-eHYcKVLIRRv3J1vjmxurS6HVdGphB53qxUeAkylYrZY=", "owner": "nix-community", "repo": "poetry2nix", - "rev": "7624b3e0275d9b52dbdda46ef7ffee66b36ff823", + "rev": "43a898b4d76f7f3f70df77a2cc2d40096bc9d75e", "type": "github" }, "original": { @@ -730,11 +730,11 @@ ] }, "locked": { - "lastModified": 1719749022, - "narHash": "sha256-ddPKHcqaKCIFSFc/cvxS14goUhCOAwsM1PbMr0ZtHMg=", + "lastModified": 1730120726, + "narHash": "sha256-LqHYIxMrl/1p3/kvm2ir925tZ8DkI0KA10djk8wecSk=", "owner": "numtide", "repo": "treefmt-nix", - "rev": "8df5ff62195d4e67e2264df0b7f5e8c9995fd0bd", + "rev": "9ef337e492a5555d8e17a51c911ff1f02635be15", "type": "github" }, "original": { diff --git a/hosts/nuc/default.nix b/hosts/nuc/default.nix index 67bd696..4af982b 100644 --- a/hosts/nuc/default.nix +++ b/hosts/nuc/default.nix @@ -9,6 +9,7 @@ ./modules/adguard ./modules/backup ./modules/cache + ./modules/logseq ./modules/matrix ./modules/mautrix-telegram ./modules/monitoring diff --git a/hosts/nuc/modules/logseq/default.nix b/hosts/nuc/modules/logseq/default.nix new file mode 100644 index 0000000..b21d2e9 --- /dev/null +++ b/hosts/nuc/modules/logseq/default.nix @@ -0,0 +1,15 @@ +{ config, ... }: +let + domain = "logseq.${config.networking.domain}"; +in +{ + virtualisation.oci-containers = { + containers.kanboard = { + image = "ghcr.io/logseq/logseq-webapp:latest"; + ports = [ "127.0.0.1:8045:80" ]; + }; + }; + services.caddy.virtualHosts."${domain}".extraConfig = '' + reverse_proxy 127.0.0.1:8045 + ''; +} diff --git a/shared/systemd.nix b/shared/systemd.nix index 691d568..421022d 100644 --- a/shared/systemd.nix +++ b/shared/systemd.nix @@ -20,4 +20,9 @@ }; }; + # https://github.com/NixOS/nixpkgs/pull/351151#issuecomment-2440083015 + # fix hosts using impermanence + boot.initrd.systemd.suppressedUnits = [ "systemd-machine-id-commit.service" ]; + systemd.suppressedSystemUnits = [ "systemd-machine-id-commit.service" ]; + }