diff --git a/flake.nix b/flake.nix index 7582d49..dff7b60 100644 --- a/flake.nix +++ b/flake.nix @@ -117,6 +117,12 @@ deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vno1-oh2; user = "root"; }; + updaterbot = { + sshUser = "updaterbot"; + path = + deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.vno1-oh2; + user = "root"; + }; }; }; @@ -125,7 +131,6 @@ // flake-utils.lib.eachDefaultSystem (system: let pkgs = import nixpkgs {inherit system;}; in { - apps.deploy-rs = { type = "app"; program = "${deploy-rs.packages."${system}".default}/bin/deploy"; diff --git a/hosts/vno1-oh2/configuration.nix b/hosts/vno1-oh2/configuration.nix index cb7883f..9f4ee44 100644 --- a/hosts/vno1-oh2/configuration.nix +++ b/hosts/vno1-oh2/configuration.nix @@ -64,7 +64,7 @@ services = { updaterbot = { - enable = true; + enableMaster = true; uidgid = myData.uidgid.updaterbot; repo = "git@git.jakstys.lt:motiejus/config"; deployDerivations = [".#vno1-oh2"]; diff --git a/modules/services/updaterbot/default.nix b/modules/services/updaterbot/default.nix index 83368e2..ac1185e 100644 --- a/modules/services/updaterbot/default.nix +++ b/modules/services/updaterbot/default.nix @@ -5,13 +5,14 @@ ... }: { options.mj.services.updaterbot = with lib.types; { - enable = lib.mkEnableOption "Enable system updater"; + enableMaster = lib.mkEnableOption "Enable system updater orchestrator"; + enableDeployer = lib.mkEnableOption "Enable system updater deployer"; deployDerivations = lib.mkOption {type = listOf str;}; uidgid = lib.mkOption {type = int;}; repo = lib.mkOption {type = str;}; }; - config = lib.mkIf config.mj.services.updaterbot.enable { + config = lib.mkIf config.mj.services.updaterbot.enableMaster { users = { users = { # TODO: git config --global user.email updaterbot@jakstys.lt