From 2721eaeecf857c922801910344dd2934965a7bab Mon Sep 17 00:00:00 2001 From: Guanran Wang Date: Sun, 22 Sep 2024 04:35:35 +0800 Subject: [PATCH] tyo0: move redlib to sin0 --- hosts/tyo0/default.nix | 1 - hosts/tyo0/ports.nix | 1 - hosts/vultr/sin0/anti-feature.nix | 16 ++++++++++++++++ hosts/vultr/sin0/default.nix | 8 +++++++- hosts/vultr/sin0/ports.nix | 5 +++++ hosts/{tyo0 => vultr/sin0}/services/redlib.nix | 0 6 files changed, 28 insertions(+), 3 deletions(-) create mode 100644 hosts/vultr/sin0/anti-feature.nix create mode 100644 hosts/vultr/sin0/ports.nix rename hosts/{tyo0 => vultr/sin0}/services/redlib.nix (100%) diff --git a/hosts/tyo0/default.nix b/hosts/tyo0/default.nix index fe035dd..56ef5f1 100644 --- a/hosts/tyo0/default.nix +++ b/hosts/tyo0/default.nix @@ -17,7 +17,6 @@ ./services/murmur.nix ./services/ntfy.nix ./services/prometheus.nix - ./services/redlib.nix ./services/vaultwarden.nix ./services/wastebin.nix diff --git a/hosts/tyo0/ports.nix b/hosts/tyo0/ports.nix index ae8f70f..254e4c0 100644 --- a/hosts/tyo0/ports.nix +++ b/hosts/tyo0/ports.nix @@ -2,7 +2,6 @@ lib.ports = { keycloak = 8010; miniflux = 8020; - redlib = 8030; vaultwarden = 8040; wastebin = 8050; diff --git a/hosts/vultr/sin0/anti-feature.nix b/hosts/vultr/sin0/anti-feature.nix new file mode 100644 index 0000000..390a2d7 --- /dev/null +++ b/hosts/vultr/sin0/anti-feature.nix @@ -0,0 +1,16 @@ +{ lib, ... }: +{ + nixpkgs.config = { + allowNonSource = false; + allowNonSourcePredicate = + pkg: + lib.elem (lib.getName pkg) [ + ]; + + allowUnfree = false; + allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [ ]; + + permittedInsecurePackages = [ + ]; + }; +} diff --git a/hosts/vultr/sin0/default.nix b/hosts/vultr/sin0/default.nix index 40d5000..458ff3b 100644 --- a/hosts/vultr/sin0/default.nix +++ b/hosts/vultr/sin0/default.nix @@ -1,6 +1,12 @@ { ... }: { - imports = [ ../../../nixos/profiles/sing-box-server ]; + imports = [ + ./ports.nix + + ./services/redlib.nix + + ../../../nixos/profiles/sing-box-server + ]; system.stateVersion = "24.05"; diff --git a/hosts/vultr/sin0/ports.nix b/hosts/vultr/sin0/ports.nix new file mode 100644 index 0000000..2f8376b --- /dev/null +++ b/hosts/vultr/sin0/ports.nix @@ -0,0 +1,5 @@ +{ + lib.ports = { + redlib = 8010; + }; +} diff --git a/hosts/tyo0/services/redlib.nix b/hosts/vultr/sin0/services/redlib.nix similarity index 100% rename from hosts/tyo0/services/redlib.nix rename to hosts/vultr/sin0/services/redlib.nix