mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 09:07:21 +01:00
feat: add profiles for all work host options
This commit is contained in:
parent
e15ab08adf
commit
36d97926e6
30 changed files with 891 additions and 403 deletions
|
|
@ -2,6 +2,18 @@
|
|||
{
|
||||
options.swarselsystems.modules.kanshi = lib.mkEnableOption "kanshi settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.kanshi {
|
||||
swarselsystems = {
|
||||
monitors = {
|
||||
homedesktop = {
|
||||
name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||
mode = "2560x1440";
|
||||
scale = "1";
|
||||
position = "0,0";
|
||||
workspace = "1:一";
|
||||
output = "DP-11";
|
||||
};
|
||||
};
|
||||
};
|
||||
services.kanshi = {
|
||||
enable = true;
|
||||
settings = [
|
||||
|
|
|
|||
|
|
@ -244,6 +244,28 @@ in
|
|||
definedAliases = [ "@hm" "@ho" "@hmo" ];
|
||||
};
|
||||
|
||||
"Confluence search" = {
|
||||
urls = [{
|
||||
template = "https://vbc.atlassian.net/wiki/search";
|
||||
params = [
|
||||
{ name = "text"; value = "{searchTerms}"; }
|
||||
];
|
||||
}];
|
||||
|
||||
definedAliases = [ "@c" "@cf" "@confluence" ];
|
||||
};
|
||||
|
||||
"Jira search" = {
|
||||
urls = [{
|
||||
template = "https://vbc.atlassian.net/issues/";
|
||||
params = [
|
||||
{ name = "jql"; value = "textfields ~ \"{searchTerms}*\"&wildcardFlag=true"; }
|
||||
];
|
||||
}];
|
||||
|
||||
definedAliases = [ "@j" "@jire" ];
|
||||
};
|
||||
|
||||
"google".metaData.alias = "@g";
|
||||
};
|
||||
force = true; # this is required because otherwise the search.json.mozlz4 symlink gets replaced on every firefox restart
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
type = lib.types.attrsOf lib.types.str;
|
||||
default = { };
|
||||
};
|
||||
|
||||
startup = lib.mkOption {
|
||||
type = lib.types.listOf (lib.types.attrsOf lib.types.str);
|
||||
default = [
|
||||
|
|
|
|||
14
modules/home/optional/framework.nix
Normal file
14
modules/home/optional/framework.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.optional.framework = lib.mkEnableOption "optional framework machine settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.framework {
|
||||
swarselsystems = {
|
||||
inputs = {
|
||||
"12972:18:Framework_Laptop_16_Keyboard_Module_-_ANSI_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -327,6 +327,104 @@ in
|
|||
|
||||
};
|
||||
};
|
||||
swarselsystems = {
|
||||
startup = [
|
||||
{ command = "teams-for-linux"; }
|
||||
{ command = "1password"; }
|
||||
];
|
||||
monitors = {
|
||||
main = {
|
||||
name = "BOE 0x0BC9 Unknown";
|
||||
mode = "2560x1600"; # TEMPLATE
|
||||
scale = "1";
|
||||
position = "2560,0";
|
||||
workspace = "15:L";
|
||||
output = "eDP-2";
|
||||
};
|
||||
homedesktop = {
|
||||
name = "Philips Consumer Electronics Company PHL BDM3270 AU11806002320";
|
||||
mode = "2560x1440";
|
||||
scale = "1";
|
||||
position = "0,0";
|
||||
workspace = "1:一";
|
||||
output = "DP-11";
|
||||
};
|
||||
work_back_middle = {
|
||||
name = "LG Electronics LG Ultra HD 0x000305A6";
|
||||
mode = "2560x1440";
|
||||
scale = "1";
|
||||
position = "5120,0";
|
||||
workspace = "1:一";
|
||||
output = "DP-10";
|
||||
};
|
||||
work_front_left = {
|
||||
name = "LG Electronics LG Ultra HD 0x0007AB45";
|
||||
mode = "3840x2160";
|
||||
scale = "1";
|
||||
position = "5120,0";
|
||||
workspace = "1:一";
|
||||
output = "DP-7";
|
||||
};
|
||||
work_back_right = {
|
||||
name = "HP Inc. HP Z32 CN41212T55";
|
||||
mode = "3840x2160";
|
||||
scale = "1";
|
||||
position = "5120,0";
|
||||
workspace = "1:一";
|
||||
output = "DP-3";
|
||||
};
|
||||
work_middle_middle_main = {
|
||||
name = "HP Inc. HP 732pk CNC4080YL5";
|
||||
mode = "3840x2160";
|
||||
scale = "1";
|
||||
position = "-1280,0";
|
||||
workspace = "11:M";
|
||||
output = "DP-8";
|
||||
};
|
||||
work_middle_middle_side = {
|
||||
name = "Hewlett Packard HP Z24i CN44250RDT";
|
||||
mode = "1920x1200";
|
||||
transform = "270";
|
||||
scale = "1";
|
||||
position = "-2480,0";
|
||||
workspace = "12:S";
|
||||
output = "DP-9";
|
||||
};
|
||||
work_seminary = {
|
||||
name = "Applied Creative Technology Transmitter QUATTRO201811";
|
||||
mode = "1280x720";
|
||||
scale = "1";
|
||||
position = "10000,10000"; # i.e. this screen is inaccessible by moving the mouse
|
||||
workspace = "14:T";
|
||||
output = "DP-4";
|
||||
};
|
||||
};
|
||||
inputs = {
|
||||
"1133:45081:MX_Master_2S_Keyboard" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
# "2362:628:PIXA3854:00_093A:0274_Touchpad" = {
|
||||
# dwt = "enabled";
|
||||
# tap = "enabled";
|
||||
# natural_scroll = "enabled";
|
||||
# middle_emulation = "enabled";
|
||||
# drag_lock = "disabled";
|
||||
# };
|
||||
"1133:50504:Logitech_USB_Receiver" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
"1133:45944:MX_KEYS_S" = {
|
||||
xkb_layout = "us";
|
||||
xkb_variant = "altgr-intl";
|
||||
};
|
||||
};
|
||||
keybindings = {
|
||||
"Mod4+Ctrl+Shift+p" = "exec screenshare";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
22
modules/nixos/common/swayosd.nix
Normal file
22
modules/nixos/common/swayosd.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/nixos/optional/amdcpu.nix
Normal file
9
modules/nixos/optional/amdcpu.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.optional.amdcpu = lib.mkEnableOption "optional amd cpu settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.amdcpu {
|
||||
hardware = {
|
||||
cpu.amd.updateMicrocode = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/nixos/optional/amdgpu.nix
Normal file
15
modules/nixos/optional/amdgpu.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.optional.amdgpu = lib.mkEnableOption "optional amd gpu settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.amdgpu {
|
||||
hardware = {
|
||||
amdgpu = {
|
||||
opencl.enable = true;
|
||||
amdvlk = {
|
||||
enable = true;
|
||||
support32Bit.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
9
modules/nixos/optional/btrfs.nix
Normal file
9
modules/nixos/optional/btrfs.nix
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.optional.btrfs = lib.mkEnableOption "optional btrfs settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.btrfs {
|
||||
boot = {
|
||||
supportedFilesystems = [ "btrfs" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/nixos/optional/framework.nix
Normal file
27
modules/nixos/optional/framework.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems.modules.optional.framework = lib.mkEnableOption "optional framework machine settings";
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.framework {
|
||||
services = {
|
||||
fwupd = {
|
||||
enable = true;
|
||||
# framework also uses lvfs-testing, but I do not want to use it
|
||||
extraRemotes = [ "lvfs" ];
|
||||
};
|
||||
udev.extraRules = ''
|
||||
# disable Wakeup on Framework Laptop 16 Keyboard (ANSI)
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0012", ATTR{power/wakeup}="disabled"
|
||||
# disable Wakeup on Framework Laptop 16 Numpad Module
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="32ac", ATTRS{idProduct}=="0014", ATTR{power/wakeup}="disabled"
|
||||
# disable Wakeup on Framework Laptop 16 Trackpad
|
||||
ACTION=="add", SUBSYSTEM=="i2c", DRIVERS=="i2c_hid_acpi", ATTRS{name}=="PIXA3854:00", ATTR{power/wakeup}="disabled"
|
||||
'';
|
||||
};
|
||||
programs.fw-fanctrl = {
|
||||
enable = true;
|
||||
config = {
|
||||
defaultStrategy = "lazy";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
24
modules/nixos/optional/hibernation.nix
Normal file
24
modules/nixos/optional/hibernation.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ lib, config, ... }:
|
||||
{
|
||||
options.swarselsystems = {
|
||||
modules.optional.hibernation = lib.mkEnableOption "optional amd gpu settings";
|
||||
hibernation = {
|
||||
offset = lib.mkOption {
|
||||
type = lib.types.int;
|
||||
default = 0;
|
||||
};
|
||||
resumeDevice = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "/dev/disk/by-label/nixos";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.hibernation {
|
||||
boot = {
|
||||
kernelParams = [
|
||||
"resume_offset=${builtins.toString config.swarselsystems.hibernation.offset}"
|
||||
];
|
||||
inherit (config.swarselsystems.hibernation) resumeDevice;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -24,7 +24,17 @@ let
|
|||
};
|
||||
in
|
||||
{
|
||||
options.swarselsystems.modules.optional.work = lib.mkEnableOption "optional work settings";
|
||||
options.swarselsystems = {
|
||||
modules.optional.work = lib.mkEnableOption "optional work settings";
|
||||
hostName = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
fqdn = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf config.swarselsystems.modules.optional.work {
|
||||
sops =
|
||||
let
|
||||
|
|
@ -86,7 +96,12 @@ in
|
|||
};
|
||||
|
||||
networking = {
|
||||
firewall.trustedInterfaces = [ "virbr0" ];
|
||||
inherit (config.swarselsystems) hostName fqdn;
|
||||
networkmanager.wifi.scanRandMacAddress = false;
|
||||
firewall = {
|
||||
enable = lib.mkDefault true;
|
||||
trustedInterfaces = [ "virbr0" ];
|
||||
};
|
||||
search = [
|
||||
"vbc.ac.at"
|
||||
"clip.vbc.ac.at"
|
||||
|
|
@ -122,7 +137,7 @@ in
|
|||
# cryptography
|
||||
# ]))
|
||||
# docker
|
||||
python39
|
||||
stable.python39
|
||||
qemu
|
||||
packer
|
||||
gnumake
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue