nix-flakes/hosts/server/hikari/amia/configuration.nix
2026-07-26 03:29:26 +09:00

63 lines
1.6 KiB
Nix

{ pkgs, inputs, ... }:
let
amiaBot = pkgs.rustPlatform.buildRustPackage {
pname = "discord-profile-widget-bot";
version = "0.1.0";
src = inputs.amiaBot;
cargoLock.lockFile = "${inputs.amiaBot}/Cargo.lock";
};
in
{
imports = [
./hardware-configuration.nix
"${inputs.self}/modules/mizukios/base"
"${inputs.self}/modules/mizukios/features/system/boot.nix"
"${inputs.self}/modules/mizukios/features/remote/ssh.nix"
];
services.qemuGuest.enable = true;
users.users.imnyang.openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOHP3Z+AYrRh9f8TYyqChKfeyNm3lOe0F75AwRHTTaxD imnyang@kazusa"
];
environment.systemPackages = with pkgs; [
eza
neovim
nil
nixd
];
programs.git.config = {
safe.directory = "*";
};
nix.settings.require-sigs = false;
networking.firewall.enable = false;
systemd.services.amia = {
description = "Discord Profile Widget Bot";
wantedBy = [ "multi-user.target" ];
after = [ "network-online.target" ];
wants = [ "network-online.target" ];
unitConfig.ConditionPathExists = "/home/imnyang/amia/config.toml";
serviceConfig = {
Type = "simple";
User = "imnyang";
WorkingDirectory = "/home/imnyang/amia";
UMask = "0077";
ExecStart = "${amiaBot}/bin/discord-profile-widget-bot";
Restart = "on-failure";
RestartSec = "5s";
NoNewPrivileges = true;
PrivateTmp = true;
ProtectSystem = "strict";
ProtectHome = false;
};
};
networking.hostName = "amia";
system.stateVersion = "26.05";
}