refactor(system): flatten

This commit is contained in:
ooks-io 2024-05-24 23:44:07 +12:00
parent 24dee2cadc
commit f47154c234
29 changed files with 32 additions and 268 deletions

View file

@ -0,0 +1,69 @@
{ lib, config, pkgs, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
steamFix = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [
xorg.libXcursor
xorg.libXi
xorg.libXinerama
xorg.libXScrnSaver
libpng
libpulseaudio
libvorbis
stdenv.cc.cc.lib
libkrb5
keyutils
mangohud
winetricks
protontricks
gtk3
gtk3-x11
];
};
host = config.systemModules.host;
in
{
config = mkIf (elem "gaming" host.function) {
hardware.opengl.extraPackages = [ pkgs.gamescope ];
services.flatpak.enable = true;
programs = {
steam = {
enable = true;
package = steamFix;
extraCompatPackages = [ pkgs.proton-ge-bin.steamcompattool ];
};
gamescope = {
enable = true;
capSysNice = true;
};
gamemode = {
enable = true;
settings = {
general = {
renice = 15;
softrealtime = "auto";
};
custom = {
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
};
};
};
};
networking.firewall = {
allowedTCPPorts = [ 3074 ];
allowedUDPPorts = [
88
500
3074
2075
3544
4500
];
};
};
}

View file

@ -0,0 +1,5 @@
{
imports = [
./programs
];
}

View file

@ -0,0 +1,18 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
host = config.systemModules.host;
in
{
config = mkIf (host.type != "phone") {
programs = {
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = [ "${host.admin.name}" ];
};
};
};
}

View file

@ -0,0 +1,13 @@
{ lib, config, ... }:
let
inherit (lib) mkIf;
inherit (builtins) elem;
host = config.systemModules.host;
in
{
config = mkIf (elem "workstation" host.function){
programs.dconf.enable = true;
};
}

View file

@ -0,0 +1,7 @@
{
imports = [
./dconf.nix
./kdeconnect.nix
./1password.nix
];
}

View file

@ -0,0 +1,7 @@
{ ... }:
{
programs.kdeconnect = {
enable = true;
};
}