refactor: stop using inputs.self

This commit is contained in:
arcnmx 2024-05-21 14:28:34 -07:00
parent 213430704f
commit 8601560f7d
27 changed files with 111 additions and 130 deletions

View file

@ -1,14 +1,14 @@
{
name,
config,
lib,
access,
inputs,
gensokyo-zone,
lib,
...
}: let
inherit (inputs.self) nixosConfigurations;
inherit (inputs.self.lib) systems;
inherit (inputs.self.lib.lib) domain mkAddress6;
inherit (gensokyo-zone) systems;
inherit (gensokyo-zone.self) nixosConfigurations;
inherit (gensokyo-zone.lib) domain mkAddress6;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.modules) mkIf mkMerge mkDefault mkOptionDefault;
inherit (lib.attrsets) mapAttrs attrValues;

View file

@ -1,13 +1,9 @@
{
name,
config,
lib,
inputs,
...
}: let
inherit (inputs.self.lib.lib) domain;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.modules) mkIf mkOptionDefault;
in {
options.ci = with lib.types; {
enable =
@ -20,26 +16,4 @@ in {
default = false;
};
};
config = {
deploy = let
nixos = config.built;
in {
sshUser = mkOptionDefault "root";
user = mkOptionDefault "root";
sshOpts = mkIf (config.type == "NixOS") (
mkOptionDefault ["-p" "${builtins.toString (builtins.head nixos.config.services.openssh.ports)}"]
);
autoRollback = mkOptionDefault true;
magicRollback = mkOptionDefault true;
fastConnection = mkOptionDefault false;
hostname = mkOptionDefault "${name}.local.${domain}";
profiles.system = {
user = "root";
path = let
inherit (inputs.self.legacyPackages.${config.system}.deploy-rs) activate;
in
activate.nixos nixos;
};
};
};
}

View file

@ -1,15 +1,15 @@
{
name,
config,
gensokyo-zone,
lib,
inputs,
...
}: let
inherit (inputs.self.lib.lib) domain;
inherit (gensokyo-zone.lib) domain;
inherit (lib.modules) mkIf mkOptionDefault;
in {
options = let
inherit (inputs.self.lib.lib) json;
inherit (gensokyo-zone.lib) json;
inherit (lib.types) nullOr;
inherit (lib.options) mkOption;
in {
@ -33,7 +33,7 @@ in {
profiles.system = {
user = "root";
path = let
inherit (inputs.self.legacyPackages.${config.system}.deploy-rs) activate;
inherit (gensokyo-zone.self.legacyPackages.${config.system}.deploy-rs) activate;
in
activate.nixos nixos;
};

View file

@ -1,10 +1,10 @@
{
config,
gensokyo-zone,
lib,
inputs,
...
}: let
inherit (inputs.self.lib.lib) eui64;
inherit (gensokyo-zone.lib) eui64;
inherit (lib.options) mkOption mkEnableOption;
inherit (lib.modules) mkIf mkOptionDefault;
inherit (lib.trivial) mapNullable;