os/hosts/chocolatebar/chocolatebar.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

87 lines
2.1 KiB
Nix
Raw Normal View History

2023-01-28 21:27:52 +00:00
{
config,
pkgs,
lib,
self,
...
}:
with lib; let
2021-09-04 13:56:44 +00:00
psCfg = config.pub-solar;
xdg = config.home-manager.users."${psCfg.user.name}".xdg;
2023-01-28 21:27:52 +00:00
in {
2021-09-04 13:56:44 +00:00
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;
2023-02-02 22:37:40 +00:00
age.secrets."drone-runner-exec-config" = {
file = "${self}/secrets/drone-runner-exec-config";
mode = "400";
owner = psCfg.user.name;
};
pub-solar.docker-ci-runner = {
enable = true;
runnerVarsFile = config.age.secrets.drone-runner-exec-config.path;
};
2022-04-27 13:21:40 +00:00
services.openssh.openFirewall = true;
2023-01-28 21:27:52 +00:00
networking.firewall.allowedTCPPorts =
[443]
++ (
if psCfg.sway.vnc.enable
then [5901]
else []
);
networking.firewall.allowedUDPPorts = [43050];
2022-04-27 13:21:40 +00:00
environment.systemPackages = with pkgs; [
wayvnc
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-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
};
# For OpenProject development with https
security.pki.certificates = [
(builtins.readFile ./step-roots.pem)
];
2021-09-04 13:56:44 +00:00
};
}