os/hosts/chocolatebar/chocolatebar.nix

51 lines
1.4 KiB
Nix
Raw Normal View History

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
];
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-04-30 15:08:58 +00:00
networking.firewall.allowedTCPPorts = mkIf psCfg.sway.vnc.enable [ 5901 ];
2022-04-27 13:21:40 +00:00
environment.systemPackages = with pkgs; [
wayvnc
drone-docker-runner
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;
2021-09-04 13:56:44 +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;
};
};
}