flake: reformat with nixfmt

This commit is contained in:
Infinidoge 2025-01-28 20:33:04 -05:00
parent a79e641851
commit eaf4f56ac0
Signed by: Infinidoge
SSH key fingerprint: SHA256:oAMyvotlNFraMmZmr+p6AxnNfW/GioTs1pOn3V4tQ7A
117 changed files with 2667 additions and 1592 deletions

View file

@ -1,4 +1,10 @@
{ config, options, lib, pkgs, ... }:
{
config,
options,
lib,
pkgs,
...
}:
with lib;
with lib.our;
let
@ -32,16 +38,23 @@ in
config = mkMerge [
{
assertions = [{
assertion = (any id (with cfg; [
steam.enable
prismlauncher.enable
lutris.enable
olympus.enable
puzzles.enable
])) -> config.info.graphical;
message = "Games cannot be enabled in a non-graphical environment";
}];
assertions = [
{
assertion =
(any id (
with cfg;
[
steam.enable
prismlauncher.enable
lutris.enable
olympus.enable
puzzles.enable
]
))
-> config.info.graphical;
message = "Games cannot be enabled in a non-graphical environment";
}
];
home.home.packages = with pkgs; [
(mkIf cfg.prismlauncher.enable cfg.prismlauncher.package)
@ -56,12 +69,14 @@ in
programs.steam = {
enable = mkAliasDefinitions opt.steam.enable;
package = cfg.steam.package.override (optionalAttrs config.modules.hardware.gpu.nvidia {
extraProfile = ''
unset VK_ICD_FILENAMES
export VK_ICD_FILENAMES=${config.hardware.nvidia.package}/share/vulkan/icd.d/nvidia_icd.json:${config.hardware.nvidia.package.lib32}/share/vulkan/icd.d/nvidia_icd32.json
'';
});
package = cfg.steam.package.override (
optionalAttrs config.modules.hardware.gpu.nvidia {
extraProfile = ''
unset VK_ICD_FILENAMES
export VK_ICD_FILENAMES=${config.hardware.nvidia.package}/share/vulkan/icd.d/nvidia_icd.json:${config.hardware.nvidia.package.lib32}/share/vulkan/icd.d/nvidia_icd32.json
'';
}
);
extraCompatPackages = with pkgs; [
proton-ge-bin
];

View file

@ -1,4 +1,10 @@
{ config, common, pkgs, lib, ... }:
{
config,
common,
pkgs,
lib,
...
}:
with lib;
with lib.our;
let
@ -50,29 +56,34 @@ in
'';
};
home-manager.sharedModules = [{
xsession.enable = true;
}];
environment.systemPackages = with pkgs; flatten [
(with xorg; [
xwininfo
xprop
])
xclip
xdotool
pavucontrol
common.wm.locker
home-manager.sharedModules = [
{
xsession.enable = true;
}
];
environment.systemPackages =
with pkgs;
flatten [
(with xorg; [
xwininfo
xprop
])
xclip
xdotool
pavucontrol
common.wm.locker
];
}
(mkIf cfg.qtile.enable {
services.xserver.windowManager.qtile = {
enable = true;
extraPackages = p: with p; [
qtile-extras
];
extraPackages =
p: with p; [
qtile-extras
];
};
info.env.wm = "qtile";

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.our;

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.our;
let
@ -58,7 +63,13 @@ in
environment = {
variables.LAPTOP = "True";
systemPackages = with pkgs; [ acpi brightnessctl ] ++ optional config.powerManagement.powertop.enable pkgs.powertop;
systemPackages =
with pkgs;
[
acpi
brightnessctl
]
++ optional config.powerManagement.powertop.enable pkgs.powertop;
};
})

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.our;
let
@ -13,27 +18,39 @@ in
};
config = mkMerge [
(mkIf (any' (with cfg; [ amdgpu nvidia intel ])) {
hardware.graphics = {
enable = true;
enable32Bit = true;
(mkIf
(any' (
with cfg;
[
amdgpu
nvidia
intel
]
))
{
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; flatten [
libvdpau-va-gl
vaapiVdpau
extraPackages =
with pkgs;
flatten [
libvdpau-va-gl
vaapiVdpau
(optionals cfg.intel [
intel-compute-runtime
intel-media-driver
vaapiIntel
])
(optionals cfg.intel [
intel-compute-runtime
intel-media-driver
vaapiIntel
])
(optionals cfg.nvidia [
nvidia-vaapi-driver
])
];
};
})
(optionals cfg.nvidia [
nvidia-vaapi-driver
])
];
};
}
)
(mkIf cfg.amdgpu {
boot.initrd.kernelModules = [ "amdgpu" ];

View file

@ -1,4 +1,9 @@
{ config, lib, private, ... }:
{
config,
lib,
private,
...
}:
with lib;
with lib.our;
let

View file

@ -1,4 +1,9 @@
{ config, lib, pkgs, ... }:
{
config,
lib,
pkgs,
...
}:
with lib;
with lib.our;
let

View file

@ -1,4 +1,10 @@
{ config, lib, private, pkgs, ... }:
{
config,
lib,
private,
pkgs,
...
}:
with lib;
with lib.our;
let

View file

@ -20,26 +20,32 @@ in
config = mkIf cfg.enable {
services.apcupsd = {
enable = true;
configText = ''
UPSNAME UPS
UPSCLASS standalone
UPSMODE disable
NETSERVER on
NISPORT ${toString port}
configText =
''
UPSNAME UPS
UPSCLASS standalone
UPSMODE disable
NETSERVER on
NISPORT ${toString port}
BATTERYLEVEL ${toString cfg.config.battery_level}
MINUTES ${toString cfg.config.minutes}
'' +
(if cfg.primary then ''
UPSTYPE usb
UPSCABLE usb
NISIP ${cfg.config.address}
'' else ''
UPSCABLE ether
UPSTYPE net
DEVICE ${cfg.config.address}:${toString port}
POLLTIME 10
'');
BATTERYLEVEL ${toString cfg.config.battery_level}
MINUTES ${toString cfg.config.minutes}
''
+ (
if cfg.primary then
''
UPSTYPE usb
UPSCABLE usb
NISIP ${cfg.config.address}
''
else
''
UPSCABLE ether
UPSTYPE net
DEVICE ${cfg.config.address}:${toString port}
POLLTIME 10
''
);
hooks = cfg.config.hooks;
};
networking.firewall.allowedTCPPorts = mkIf cfg.primary [ port ];