feat: add profiles for all work host options

This commit is contained in:
Leon Schwarzäugl 2025-04-30 19:34:28 +02:00
parent e15ab08adf
commit 36d97926e6
Signed by: swarsel
GPG key ID: 26A54C31F2A4FD84
30 changed files with 891 additions and 403 deletions

View file

@ -1,13 +1,16 @@
{ lib, config, ... }:
{
options.swarselsystems.modules.network = lib.mkEnableOption "network config";
options.swarselsystems = {
modules.network = lib.mkEnableOption "network config";
firewall = lib.swarselsystems.mkTrueOption;
};
config = lib.mkIf config.swarselsystems.modules.network {
networking = {
nftables.enable = lib.mkDefault true;
enableIPv6 = lib.mkDefault true;
firewall = {
enable = lib.swarselsystems.mkStrong config.swarselsystems.firewall;
checkReversePath = lib.mkDefault false;
enable = lib.mkDefault true;
allowedUDPPorts = [ 51820 ]; # 51820: wireguard
allowedTCPPortRanges = [
{ from = 1714; to = 1764; } # kde-connect

View file

@ -10,7 +10,6 @@
yubico-pam
yubioath-flutter
yubikey-manager
yubikey-manager-qt
yubikey-touch-detector
yubico-piv-tool
cfssl
@ -25,6 +24,7 @@
swaylock-effects
syncthingtray-minimal
wl-mirror
swayosd
# secure boot
sbctl

View file

@ -0,0 +1,22 @@
{ lib, pkgs, config, ... }:
{
options.swarselsystems.modules.swayosd = lib.mkEnableOption "swayosd settings";
config = lib.mkIf config.swarselsystems.modules.swayosd {
environment.systemPackages = [ pkgs.swayosd ];
services.udev.packages = [ pkgs.swayosd ];
systemd.services.swayosd-libinput-backend = {
description = "SwayOSD LibInput backend for listening to certain keys like CapsLock, ScrollLock, VolumeUp, etc.";
documentation = [ "https://github.com/ErikReider/SwayOSD" ];
wantedBy = [ "graphical.target" ];
partOf = [ "graphical.target" ];
after = [ "graphical.target" ];
serviceConfig = {
Type = "dbus";
BusName = "org.erikreider.swayosd";
ExecStart = "${pkgs.swayosd}/bin/swayosd-libinput-backend";
Restart = "on-failure";
};
};
};
}