diff options
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/containerize.nix | 8 | ||||
| -rw-r--r-- | nix/module.nix | 24 | ||||
| -rw-r--r-- | nix/package.nix | 6 |
3 files changed, 19 insertions, 19 deletions
diff --git a/nix/containerize.nix b/nix/containerize.nix index b936b90..2be02ef 100644 --- a/nix/containerize.nix +++ b/nix/containerize.nix @@ -2,18 +2,18 @@ let containerize = - chill-discord-bot: + moyai-discord-bot: let - inherit (chill-discord-bot.passthru) crossPkgs; + inherit (moyai-discord-bot.passthru) crossPkgs; architecture = crossPkgs.go.GOARCH; in dockerTools.buildLayeredImage { - name = "chill-discord-bot"; + name = "moyai-discord-bot"; tag = "latest-${architecture}"; contents = [ dockerTools.caCertificates ]; - config.Cmd = [ (lib.getExe chill-discord-bot) ]; + config.Cmd = [ (lib.getExe moyai-discord-bot) ]; inherit architecture; }; in diff --git a/nix/module.nix b/nix/module.nix index 5062f5e..7ff7d62 100644 --- a/nix/module.nix +++ b/nix/module.nix @@ -19,17 +19,17 @@ let ; inherit (pkgs.stdenv.hostPlatform) system; - cfg = config.services.chill-discord-bot; + cfg = config.services.moyai-discord-bot; - defaultUser = "chill-discord-bot"; - flakePackages = self.packages.${system} or (throw "getchoo/chill: ${system} is not supported"); + defaultUser = "moyai-discord-bot"; + flakePackages = self.packages.${system} or (throw "getchoo/moyai-bot: ${system} is not supported"); in { - options.services.chill-discord-bot = { - enable = mkEnableOption "chill"; + options.services.moyai-discord-bot = { + enable = mkEnableOption "moyai-discord-bot"; - package = mkPackageOption flakePackages "chill-discord-bot" { }; + package = mkPackageOption flakePackages "moyai-discord-bot" { }; user = mkOption { description = '' @@ -77,30 +77,30 @@ in type = types.nullOr types.path; default = null; example = literalExpression '' - "/run/agenix.d/1/chillDiscordBot" + "/run/agenix.d/1/moyaiDiscordBot" ''; }; }; imports = [ - (lib.mkRenamedOptionModule [ "services" "teawiebot" ] [ "services" "chill-discord-bot" ]) + (lib.mkRenamedOptionModule [ "services" "teawiebot" ] [ "services" "moyai-discord-bot" ]) ]; config = mkIf cfg.enable { services.redis.servers = mkIf (cfg.redisUrl == "local") { - chill-discord-bot = { + moyai-discord-bot = { enable = true; inherit (cfg) user; port = 0; # disable tcp listener }; }; - systemd.services.chill-discord-bot = { + systemd.services.moyai-discord-bot = { enable = true; wantedBy = [ "multi-user.target" ]; after = [ "network.target" - ] ++ optionals (cfg.redisUrl == "local") [ "redis-chill-discord-bot.service" ]; + ] ++ optionals (cfg.redisUrl == "local") [ "redis-moyai-discord-bot.service" ]; script = '' ${getExe cfg.package} @@ -109,7 +109,7 @@ in environment = { REDIS_URL = if cfg.redisUrl == "local" then - "unix:${config.services.redis.servers.chill-discord-bot.unixSocket}" + "unix:${config.services.redis.servers.moyai-discord-bot.unixSocket}" else cfg.redisUrl; }; diff --git a/nix/package.nix b/nix/package.nix index abb3129..bc0a76f 100644 --- a/nix/package.nix +++ b/nix/package.nix @@ -11,7 +11,7 @@ let in rustPlatform.buildRustPackage { - pname = "chill-discord-bot"; + pname = "moyai-discord-bot"; version = (lib.importTOML ../Cargo.toml).package.version or "unknown"; src = fs.toSource { @@ -52,9 +52,9 @@ rustPlatform.buildRustPackage { meta = { description = "funni bot"; - homepage = "https://github.com/getchoo/chill"; + homepage = "https://github.com/getchoo/moyai-bot"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ getchoo ]; - mainProgram = "chill"; + mainProgram = "moyai-bot"; }; } |
