From 2509c316420c3d6b16781191405007e6c0318cbd Mon Sep 17 00:00:00 2001 From: ChaotiCryptidz Date: Fri, 12 Aug 2022 17:06:50 +0100 Subject: [PATCH] nya --- flake.lock | 59 +++++++++++++++++-- flake.nix | 4 ++ home/apps/restic.nix | 2 +- hosts/hetzner-vm/hetzner-vm.nix | 1 + .../services/gitlab-static-sites.nix | 21 +++++++ .../hetzner-vm/services/mailserver/config.nix | 2 +- hosts/hetzner-vm/services/restic.nix | 8 ++- hosts/lappy/lappy.nix | 1 - hosts/nixos.nix | 1 + profiles/base/nix.nix | 1 + 10 files changed, 90 insertions(+), 10 deletions(-) create mode 100644 hosts/hetzner-vm/services/gitlab-static-sites.nix diff --git a/flake.lock b/flake.lock index 9116023..ae8a02c 100644 --- a/flake.lock +++ b/flake.lock @@ -52,12 +52,47 @@ "type": "github" } }, + "flake-compat_3": { + "flake": false, + "locked": { + "lastModified": 1650374568, + "narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "b4a34015c698c7793d592d66adbab377907a2be8", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "gitlab_artifacts_sync": { + "inputs": { + "flake-compat": "flake-compat_2", + "nixpkgs": [ + "nixpkgs-unstable" + ], + "utils": "utils_2" + }, + "locked": { + "lastModified": 1660318049, + "narHash": "sha256-v/43l/g3CY7McRbRvLZsYYKPueD/PFCCbLheI+wJWkg=", + "path": "/home/chaos/Projects/gitlab_artifacts_sync", + "type": "path" + }, + "original": { + "path": "/home/chaos/Projects/gitlab_artifacts_sync", + "type": "path" + } + }, "home-manager-unstable": { "inputs": { "nixpkgs": [ "nixpkgs-unstable" ], - "utils": "utils_2" + "utils": "utils_3" }, "locked": { "lastModified": 1659484873, @@ -75,11 +110,11 @@ }, "musicutil": { "inputs": { - "flake-compat": "flake-compat_2", + "flake-compat": "flake-compat_3", "nixpkgs": [ "nixpkgs-unstable" ], - "utils": "utils_3" + "utils": "utils_4" }, "locked": { "lastModified": 1650728466, @@ -167,6 +202,7 @@ "root": { "inputs": { "deploy-rs": "deploy-rs", + "gitlab_artifacts_sync": "gitlab_artifacts_sync", "home-manager-unstable": "home-manager-unstable", "musicutil": "musicutil", "nix-darwin-unstable": "nix-darwin-unstable", @@ -190,6 +226,21 @@ } }, "utils_2": { + "locked": { + "lastModified": 1659877975, + "narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "utils_3": { "locked": { "lastModified": 1653893745, "narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=", @@ -204,7 +255,7 @@ "type": "github" } }, - "utils_3": { + "utils_4": { "locked": { "lastModified": 1649676176, "narHash": "sha256-OWKJratjt2RW151VUlJPRALb7OU2S5s+f0vLj4o1bHM=", diff --git a/flake.nix b/flake.nix index ff3ed7b..add84a4 100644 --- a/flake.nix +++ b/flake.nix @@ -16,6 +16,10 @@ musicutil.url = "gitlab:ChaotiCryptidz/musicutil"; musicutil.inputs.nixpkgs.follows = "nixpkgs-unstable"; + + gitlab_artifacts_sync.url = + "path:/home/chaos/Projects/gitlab_artifacts_sync"; + gitlab_artifacts_sync.inputs.nixpkgs.follows = "nixpkgs-unstable"; }; outputs = { ... }@inputs: import ./outputs.nix inputs; diff --git a/home/apps/restic.nix b/home/apps/restic.nix index 92b3f11..2fc36e2 100644 --- a/home/apps/restic.nix +++ b/home/apps/restic.nix @@ -1 +1 @@ -{ config, pkgs, ... }: { home.packages = with pkgs; [ restic ]; } \ No newline at end of file +{ config, pkgs, ... }: { home.packages = with pkgs; [ restic ]; } diff --git a/hosts/hetzner-vm/hetzner-vm.nix b/hosts/hetzner-vm/hetzner-vm.nix index 11fc091..3540342 100644 --- a/hosts/hetzner-vm/hetzner-vm.nix +++ b/hosts/hetzner-vm/hetzner-vm.nix @@ -17,6 +17,7 @@ hosts.hetzner-vm.services.mpd hosts.hetzner-vm.services.storage-sftp hosts.hetzner-vm.services.mail + hosts.hetzner-vm.services.gitlab-static-sites #hosts.hetzner-vm.services.misskey (modulesPath + "/profiles/qemu-guest.nix") diff --git a/hosts/hetzner-vm/services/gitlab-static-sites.nix b/hosts/hetzner-vm/services/gitlab-static-sites.nix new file mode 100644 index 0000000..ae11f65 --- /dev/null +++ b/hosts/hetzner-vm/services/gitlab-static-sites.nix @@ -0,0 +1,21 @@ +{ ... }: { + services.gitlab_artifacts_sync = { + enable = true; + credentialsEnvironmentFile = "/secrets/gitlab-env"; + repos = [ + { + repoName = "ChaotiCryptidz/VaultUI"; + domain = "vaultui.owo.monster"; + domainOptions = { withTryFiles = true; }; + } + { + repoName = "ChaotiCryptidz/music_library_website"; + domain = "musiclibrary.owo.monster"; + } + { + repoName = "ChaotiCryptidz/food"; + domain = "food.owo.monster"; + } + ]; + }; +} diff --git a/hosts/hetzner-vm/services/mailserver/config.nix b/hosts/hetzner-vm/services/mailserver/config.nix index 8cd498f..ef44ff0 100644 --- a/hosts/hetzner-vm/services/mailserver/config.nix +++ b/hosts/hetzner-vm/services/mailserver/config.nix @@ -2,7 +2,7 @@ fqdn = "mail.owo.monster"; domains = [ "owo.monster" "kitteh.pw" ]; - debug_mode = true; + debug_mode = false; ssl_config = { cert = "/var/lib/acme/${fqdn}/fullchain.pem"; diff --git a/hosts/hetzner-vm/services/restic.nix b/hosts/hetzner-vm/services/restic.nix index 1282bf8..00c7871 100644 --- a/hosts/hetzner-vm/services/restic.nix +++ b/hosts/hetzner-vm/services/restic.nix @@ -23,9 +23,11 @@ let mail_config.dkim_directory "/var/lib/redis-rspamd" ]; - backupPrepareCommand = "${(pkgs.writeShellScriptBin "backupPrepareCommand" '' - systemctl start postgresqlBackup --wait - '')}/bin/backupPrepareCommand"; + backupPrepareCommand = "${ + (pkgs.writeShellScriptBin "backupPrepareCommand" '' + systemctl start postgresqlBackup --wait + '') + }/bin/backupPrepareCommand"; timerConfig = { OnBootSec = "1m"; diff --git a/hosts/lappy/lappy.nix b/hosts/lappy/lappy.nix index 77d828d..e452ac2 100644 --- a/hosts/lappy/lappy.nix +++ b/hosts/lappy/lappy.nix @@ -86,7 +86,6 @@ in { home.apps.rclone home.apps.restic - home.programming.editors.vscode home.programming.languages.go home.programming.languages.nix diff --git a/hosts/nixos.nix b/hosts/nixos.nix index 5fa700c..7656949 100644 --- a/hosts/nixos.nix +++ b/hosts/nixos.nix @@ -15,6 +15,7 @@ let # NO_INLINE tree.impure.profiles.base inputs.home-manager-unstable.nixosModules.home-manager + inputs.gitlab_artifacts_sync.nixosModule ]; nixosUnstableSystem = nixpkgs-unstable.lib.nixosSystem; diff --git a/profiles/base/nix.nix b/profiles/base/nix.nix index 44e5e7b..1b81a3f 100644 --- a/profiles/base/nix.nix +++ b/profiles/base/nix.nix @@ -12,6 +12,7 @@ overlays = [ (import ../../overlay) inputs.musicutil.overlay + inputs.gitlab_artifacts_sync.overlay inputs.deploy-rs.overlay ]; };