diff --git a/flake.nix b/flake.nix index 27f321b..ae45594 100644 --- a/flake.nix +++ b/flake.nix @@ -84,6 +84,27 @@ inherit inputs; }; }; + "proxmox-discord" = nixpkgs.lib.nixosSystem { + system = "x86_64-linux"; + modules = [ + ./hosts/proxmox/discord-bots/configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.extraSpecialArgs = { + inherit inputs; + system = "x86_64-linux"; + nixvim = inputs.nixvim.packages."x86_64-linux".default; + zen-browser = inputs.zen-browser.packages."x86_64-linux".default; + }; + home-manager.users.raphael = hm-config.homeConfigurations."hm-fix"; + } + ]; + specialArgs = { + inherit inputs; + }; + }; "nixos-asahi" = nixpkgs.lib.nixosSystem { system = "aarch64-linux"; modules = [ diff --git a/hosts/proxmox/discord-bots/configuration.nix b/hosts/proxmox/discord-bots/configuration.nix new file mode 100644 index 0000000..7dc3891 --- /dev/null +++ b/hosts/proxmox/discord-bots/configuration.nix @@ -0,0 +1,64 @@ +{ + inputs, + config, + pkgs, + lib, + ... +}: + +{ + imports = [ + ../../global.nix + ./hardware-configuration.nix + ./secrets.nix + ../../../services/discord.nix + ]; + + networking = { + hostName = "pve-discord-bot"; + firewall.enable = false; + networkmanager.enable = true; + wireless.enable = false; + }; + + networking.nameservers = [ + "1.1.1.1" + "1.0.0.1" + "8.8.8.8" + "8.8.4.4" + ]; + + service = { + bot_discord = { + master = true; + bde = false; + tut = false; + marty = false; + ada = false; + music = false; + tempvoc = true; + ticket = true; + }; + }; + + # Bootloader. + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + services = { + openssh = { + enable = true; + ports = [ 42131 ]; + }; + redis.servers."" = { + enable = true; + }; + postgresql = { + enable = true; + }; + }; + virtualisation.docker.enable = true; + system.stateVersion = "24.05"; +}