From 3c9619093d033cd1af3c48b16285a7b066648010 Mon Sep 17 00:00:00 2001 From: Kat Inskip Date: Sun, 14 Jan 2024 11:01:52 -0800 Subject: [PATCH] TF deluge --- nixos/profiles/server/profile-inheritance.nix | 5 ----- systems/default.nix | 15 ++++++++++++--- tf/gensokyo-media.tf | 1 + 3 files changed, 13 insertions(+), 8 deletions(-) delete mode 100644 nixos/profiles/server/profile-inheritance.nix diff --git a/nixos/profiles/server/profile-inheritance.nix b/nixos/profiles/server/profile-inheritance.nix deleted file mode 100644 index 97b86566..00000000 --- a/nixos/profiles/server/profile-inheritance.nix +++ /dev/null @@ -1,5 +0,0 @@ -{tree, ...}: { - imports = with tree.nixos.profiles; [ - bootable - ]; -} diff --git a/systems/default.nix b/systems/default.nix index 3cbedee3..e7d20615 100644 --- a/systems/default.nix +++ b/systems/default.nix @@ -7,7 +7,7 @@ }: let # The purpose of this file is to set up the host module which allows assigning of the system, e.g. aarch64-linux and the builder used with less pain. inherit (lib.modules) evalModules; - inherit (std) string types optional set; + inherit (std) string types optional set list; defaultSpecialArgs = { inherit inputs tree std; }; @@ -133,6 +133,10 @@ tree.systems; processHost = name: cfg: let host = cfg.config; + serverLocations = { + mediabox = "10.1.1.167"; + orb = "orb"; + }; in { deploy.nodes = set.merge [ (set.optional (host.folder == "nixos") { @@ -145,17 +149,22 @@ magicRollback = false; }; }) - (set.optional (name != "renko" && host.folder == "nixos") { + (set.optional (!(list.elem name (set.keys serverLocations)) && host.folder == "nixos") { ${name} = { hostname = "${name}.inskip.me"; sshUser = "deploy"; sshOpts = ["-oControlMaster=no" "-oControlPath=/tmp/willneverexist" "-p" "${builtins.toString (builtins.head inputs.self.nixosConfigurations.${name}.config.services.openssh.ports)}"]; }; }) + (set.optional ((list.elem name (set.keys serverLocations)) && host.folder == "nixos") { + ${name} = { + hostname = serverLocations.${name}; + sshUser = "root"; + }; + }) (set.optional (name == "renko" && host.folder == "nixos") { ${name} = { sshUser = "nixos"; - hostname = "orb"; fastConnection = true; sshOpts = ["-oControlMaster=no" "-oControlPath=/tmp/willneverexist" "-p" "32222"]; }; diff --git a/tf/gensokyo-media.tf b/tf/gensokyo-media.tf index 9ae48cd4..a73c612b 100644 --- a/tf/gensokyo-media.tf +++ b/tf/gensokyo-media.tf @@ -11,6 +11,7 @@ locals { "tautulli", "bazarr", "ombi", + "deluge", ] }