2022-04-28 21:24:33 +00:00
|
|
|
{ config, pkgs, lib, self, ... }:
|
2021-09-04 13:56:44 +00:00
|
|
|
with lib;
|
|
|
|
let
|
|
|
|
psCfg = config.pub-solar;
|
|
|
|
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./configuration.nix
|
|
|
|
./virtualisation
|
2022-10-17 13:56:48 +00:00
|
|
|
./factorio
|
2021-09-04 13:56:44 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
config = {
|
|
|
|
hardware.cpu.amd.updateMicrocode = true;
|
|
|
|
|
|
|
|
hardware.opengl.extraPackages = with pkgs; [
|
|
|
|
rocm-opencl-icd
|
|
|
|
rocm-opencl-runtime
|
|
|
|
];
|
|
|
|
|
2022-08-25 13:17:01 +00:00
|
|
|
pub-solar.core.hibernation.resumeDevice = "/dev/dm-0";
|
|
|
|
pub-solar.core.hibernation.resumeOffset = 115075072;
|
|
|
|
|
2022-04-27 13:21:40 +00:00
|
|
|
services.openssh.openFirewall = true;
|
2022-10-24 19:41:11 +00:00
|
|
|
networking.firewall.allowedTCPPorts = [ 443 ] ++ (if psCfg.sway.vnc.enable then [ 5901 ] else [ ]);
|
2023-01-02 19:29:01 +00:00
|
|
|
networking.firewall.allowedUDPPorts = [ 43050 ];
|
2022-04-27 13:21:40 +00:00
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
wayvnc
|
2022-05-02 21:49:08 +00:00
|
|
|
drone-docker-runner
|
2022-10-17 13:56:48 +00:00
|
|
|
stdenv.cc.cc.lib
|
2022-11-28 10:39:28 +00:00
|
|
|
pkgs.hplip
|
2022-04-27 13:21:40 +00:00
|
|
|
];
|
|
|
|
|
2022-04-28 21:24:33 +00:00
|
|
|
age.secrets."vnc-key.pem" = {
|
|
|
|
file = "${self}/secrets/vnc-key-chocolatebar.pem";
|
2022-08-23 16:04:21 +00:00
|
|
|
mode = "400";
|
2022-04-28 21:24:33 +00:00
|
|
|
owner = psCfg.user.name;
|
|
|
|
};
|
|
|
|
age.secrets."vnc-cert.pem" = {
|
|
|
|
file = "${self}/secrets/vnc-cert-chocolatebar.pem";
|
2022-08-23 16:04:21 +00:00
|
|
|
mode = "400";
|
2022-04-28 21:24:33 +00:00
|
|
|
owner = psCfg.user.name;
|
|
|
|
};
|
|
|
|
pub-solar.sway.vnc.enable = true;
|
2022-08-14 18:25:12 +00:00
|
|
|
pub-solar.ci-runner.enable = true;
|
2022-04-28 21:24:33 +00:00
|
|
|
|
2022-10-17 13:56:48 +00:00
|
|
|
home-manager.users."${psCfg.user.name}" = {
|
|
|
|
xdg.configFile = mkIf psCfg.sway.enable {
|
|
|
|
"sway/config.d/10-autostart.conf".source = ./.config/sway/config.d/autostart.conf;
|
|
|
|
"sway/config.d/10-input-defaults.conf".source = ./.config/sway/config.d/input-defaults.conf;
|
|
|
|
"sway/config.d/10-screens.conf".source = ./.config/sway/config.d/screens.conf;
|
|
|
|
};
|
|
|
|
|
|
|
|
home.sessionVariables = {
|
|
|
|
NIX_CC = "${pkgs.stdenv.cc}";
|
|
|
|
};
|
2021-09-04 13:56:44 +00:00
|
|
|
};
|
2022-10-24 19:41:11 +00:00
|
|
|
|
|
|
|
# For OpenProject development with https
|
|
|
|
security.pki.certificates = [
|
|
|
|
(builtins.readFile ./step-roots.pem)
|
|
|
|
];
|
2021-09-04 13:56:44 +00:00
|
|
|
};
|
|
|
|
}
|