2024-08-03 20:32:15 +02:00
|
|
|
{
|
|
|
|
nix-config,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-04-07 00:18:30 +02:00
|
|
|
|
|
|
|
let
|
2024-04-07 16:41:16 +02:00
|
|
|
inherit (nix-config.inputs.sakaya.packages.${pkgs.system}) sakaya;
|
2024-04-07 00:18:30 +02:00
|
|
|
inherit (config.modules.system) username;
|
2024-04-07 16:41:16 +02:00
|
|
|
inherit (lib) singleton getExe;
|
2024-04-07 04:48:22 +02:00
|
|
|
|
|
|
|
sakayaPort = 39493;
|
2024-04-07 00:18:30 +02:00
|
|
|
in
|
|
|
|
{
|
2024-10-11 18:27:50 +02:00
|
|
|
imports = with nix-config.nixosModules; [
|
|
|
|
shell
|
|
|
|
desktop
|
|
|
|
system
|
|
|
|
stylix
|
|
|
|
fonts
|
|
|
|
];
|
|
|
|
|
|
|
|
home-manager.sharedModules = with nix-config.homeModules; [
|
|
|
|
fish
|
|
|
|
git
|
|
|
|
gtk
|
|
|
|
kitty
|
|
|
|
neovim
|
|
|
|
xresources
|
|
|
|
yazi
|
|
|
|
];
|
|
|
|
|
|
|
|
nixpkgs.overlays = builtins.attrValues nix-config.overlays;
|
|
|
|
|
|
|
|
environment = {
|
|
|
|
systemPackages =
|
|
|
|
(with pkgs; [
|
|
|
|
wineWowPackages.waylandFull
|
|
|
|
winetricks
|
|
|
|
])
|
|
|
|
++ [ sakaya ];
|
|
|
|
|
|
|
|
variables = {
|
|
|
|
TERM = "xterm-kitty";
|
|
|
|
};
|
|
|
|
|
|
|
|
sessionVariables = {
|
|
|
|
WAYLAND_DISPLAY = "wayland-1";
|
|
|
|
QT_QPA_PLATFORM = "wayland";
|
|
|
|
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
|
|
|
|
SDL_VIDEODRIVER = "wayland";
|
|
|
|
CLUTTER_BACKEND = "wayland";
|
|
|
|
MOZ_ENABLE_WAYLAND = "1";
|
|
|
|
XDG_RUNTIME_DIR = "/run/user/1000";
|
|
|
|
DISPLAY = ":0";
|
|
|
|
QT_IM_MODULE = "fcitx";
|
|
|
|
XMODIFIERS = "@im=fcitx";
|
|
|
|
SDL_IM_MODULE = "fcitx";
|
|
|
|
GLFW_IM_MODULE = "ibus";
|
|
|
|
LC_ALL = "ja_JP.UTF-8";
|
|
|
|
TZ = "Asia/Tokyo";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
hardware.graphics.enable = true;
|
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
networking = {
|
|
|
|
nat.forwardPorts = singleton {
|
|
|
|
destination = "192.168.100.49:${sakayaPort}";
|
|
|
|
sourcePort = sakayaPort;
|
|
|
|
};
|
2024-04-07 00:18:30 +02:00
|
|
|
|
2024-08-11 02:55:04 +02:00
|
|
|
firewall.allowedTCPPorts = [ sakayaPort ];
|
|
|
|
};
|
2024-04-07 00:18:30 +02:00
|
|
|
|
|
|
|
systemd.services.sakaya = {
|
|
|
|
enable = true;
|
|
|
|
description = "sakaya server";
|
|
|
|
|
|
|
|
unitConfig = {
|
|
|
|
Type = "simple";
|
|
|
|
};
|
|
|
|
|
2024-08-07 22:32:53 +02:00
|
|
|
path = with pkgs; [ su ];
|
2024-04-07 00:18:30 +02:00
|
|
|
|
|
|
|
serviceConfig = {
|
2024-04-07 16:41:16 +02:00
|
|
|
ExecStart = "/usr/bin/env su ${username} --command=${getExe sakaya}";
|
2024-04-07 00:18:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
};
|
|
|
|
}
|