Files
platform/tos/hive.nix
2025-12-02 09:57:46 +01:00

95 lines
2.4 KiB
Nix

let
sources = import ../nix;
nixpkgs = sources.nixos-2511;
pkgs = import nixpkgs { };
dashboard = "https://grafana.adm.oceanbox.io/d/ba1383fb-b53d-4a90-bd0c-bc76c75450bc/umami?orgId=1&kiosk&refresh=5m&from=now-7d&to=now&timezone=browser&var-groups=$__all";
krdp = pkgs.callPackage ../packages/krdp.nix { };
in
{
meta = {
nixpkgs = nixpkgs;
};
hashmap =
{ ... }:
{
imports = [
(import ./hashmap)
(import ../modules)
(import ../nixos)
(import "${sources.nixos-hardware}/common/cpu/intel/comet-lake")
];
deployment = {
# NOTE: Build on hashmap
buildOnTarget = true;
targetHost = "hashmap.ts.obx";
tags = [
"tos"
"dashboard"
];
};
# Why would you ever use this :(((((
system = {
copySystemConfiguration = true;
autoUpgrade.enable = pkgs.lib.mkForce false;
};
environment.systemPackages = with pkgs; [
htop
btop
intel-gpu-tools
];
features = {
gitlab-runner.enable = true;
};
services = {
displayManager = {
defaultSession = "plasma";
autoLogin = {
enable = true;
user = "coffee-kai";
};
};
};
systemd.user.services.krdp = {
enable = true;
description = "KDE RDP server";
after = [
"plasma-core.target"
"plasma-xdg-desktop-portal-kde.service"
];
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "exec";
ExecStart = "${krdp}/bin/krdpserver -u admin -p 'en to tre fire'";
# Restart when closed/on-failure
Restart = "on-abnormal";
};
unitConfig.ConditionUser = "coffee-kai";
};
systemd.user.services.dashboard = {
enable = true;
description = "Kiosk Dashboard";
after = [
"plasma-core.target"
"plasma-xdg-desktop-portal-kde.service"
];
wantedBy = [ "plasma-workspace.target" ];
serviceConfig = {
Type = "exec";
ExecStart = "${pkgs.chromium}/bin/chromium-browser --kiosk ${dashboard}";
# Restart when closed/on-failure
Restart = "always";
RestartSec = 3;
};
unitConfig.ConditionUser = "coffee-kai";
};
};
}