refactor
This commit is contained in:
74
modules/system/boot/kernel/default.nix
Normal file
74
modules/system/boot/kernel/default.nix
Normal file
@@ -0,0 +1,74 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption;
|
||||
cfg = config.system.boot.kernel;
|
||||
in {
|
||||
options = {
|
||||
system.boot.kernel = {
|
||||
variant = mkOption {
|
||||
type = lib.types.enum ["stable" "latest" "cachyos"];
|
||||
default = "latest";
|
||||
description = "Kernel variant to use.";
|
||||
};
|
||||
|
||||
hardware = mkOption {
|
||||
type = lib.types.enum ["amd" "nvidia"];
|
||||
default = "amd";
|
||||
description = "Hardware type (GPU) configuration.";
|
||||
};
|
||||
|
||||
extraKernelParams = mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Additional kernel parameters.";
|
||||
};
|
||||
|
||||
extraBlacklistedModules = mkOption {
|
||||
type = lib.types.listOf lib.types.str;
|
||||
default = [];
|
||||
description = "Additional kernel system.to blacklist.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = {
|
||||
boot = {
|
||||
consoleLogLevel = 3;
|
||||
|
||||
kernelPackages = let
|
||||
variant = cfg.variant or "latest"; # Ensure a default value
|
||||
in
|
||||
if variant == "stable"
|
||||
then pkgs.linuxPackages
|
||||
else if variant == "latest"
|
||||
then pkgs.linuxPackages_latest
|
||||
else if variant == "cachyos"
|
||||
then pkgs.linuxPackages_cachyos
|
||||
else throw "Unknown kernel variant: ${variant}";
|
||||
|
||||
kernelParams =
|
||||
[
|
||||
"quiet"
|
||||
"splash"
|
||||
]
|
||||
++ (
|
||||
if cfg.hardware == "amd"
|
||||
then ["amd_pstate=active"]
|
||||
else []
|
||||
)
|
||||
++ cfg.extraKernelParams;
|
||||
|
||||
blacklistedKernelModules =
|
||||
(
|
||||
if cfg.hardware == "nvidia"
|
||||
then ["nouveau"]
|
||||
else []
|
||||
)
|
||||
++ cfg.extraBlacklistedModules;
|
||||
};
|
||||
};
|
||||
}
|
||||
60
modules/system/boot/loader/default.nix
Normal file
60
modules/system/boot/loader/default.nix
Normal file
@@ -0,0 +1,60 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkMerge mkForce;
|
||||
cfg = config.system.boot.loader;
|
||||
in {
|
||||
options = {
|
||||
system.boot.loader = {
|
||||
default = {
|
||||
enable = mkEnableOption "Enable default boot loader configuration.";
|
||||
};
|
||||
lanzaboote = {
|
||||
enable = mkEnableOption "Enable Lanzaboote boot loader configuration.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
imports = [
|
||||
inputs.lanzaboote.nixosModules.lanzaboote
|
||||
];
|
||||
|
||||
config = mkMerge [
|
||||
{
|
||||
assertions = [
|
||||
{
|
||||
assertion = !(cfg.default.enable && cfg.lanzaboote.enable);
|
||||
message = "Only one of system.boot.loader.default.enable and system.boot.loader.lanzaboote.enable can be set to true.";
|
||||
}
|
||||
];
|
||||
}
|
||||
|
||||
(mkIf cfg.default.enable {
|
||||
# Default boot loader configuration
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
systemd-boot.graceful = true;
|
||||
efi.canTouchEfiVariables = false;
|
||||
};
|
||||
})
|
||||
|
||||
(mkIf cfg.lanzaboote.enable {
|
||||
# Lanzaboote boot loader configuration
|
||||
boot = {
|
||||
lanzaboote = {
|
||||
enable = true;
|
||||
pkiBundle = "/etc/secureboot";
|
||||
};
|
||||
|
||||
# We let Lanzaboote install systemd-boot
|
||||
loader.systemd-boot.enable = mkForce false;
|
||||
};
|
||||
|
||||
environment.systemPackages = [pkgs.sbctl];
|
||||
})
|
||||
];
|
||||
}
|
||||
48
modules/system/gaming/gamemode/default.nix
Normal file
48
modules/system/gaming/gamemode/default.nix
Normal file
@@ -0,0 +1,48 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption;
|
||||
cfg = config.system.gaming.gamemode;
|
||||
pipewireLowLatencyModule = inputs.nix-gaming.nixosModules.pipewireLowLatency;
|
||||
in {
|
||||
imports = [
|
||||
pipewireLowLatencyModule
|
||||
];
|
||||
options = {
|
||||
system.gaming.gamemode = {
|
||||
enable = mkEnableOption "Enables gamemode";
|
||||
optimizeGpu.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to apply GPU optimizations.";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.gamemode = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
inhibit_screensaver = 1;
|
||||
softrealtime = "auto";
|
||||
# renice = 15;
|
||||
};
|
||||
gpu = mkIf cfg.optimizeGpu.enable {
|
||||
apply_gpu_optimisations = "accept-responsibility";
|
||||
gpu_device = 0;
|
||||
amd_performance_level = "high";
|
||||
};
|
||||
custom = {
|
||||
start = "${pkgs.libnotify}/bin/notify-send 'GameMode started'";
|
||||
end = "${pkgs.libnotify}/bin/notify-send 'GameMode ended'";
|
||||
};
|
||||
};
|
||||
};
|
||||
# see https://github.com/fufexan/nix-gaming/#pipewire-low-latency
|
||||
services.pipewire.lowLatency.enable = true;
|
||||
};
|
||||
}
|
||||
22
modules/system/gaming/gamescope/default.nix
Normal file
22
modules/system/gaming/gamescope/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.gaming.gamescope;
|
||||
in {
|
||||
options = {
|
||||
system.gaming.gamescope.enable = mkEnableOption "Enables gamescope";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.gamescope = {
|
||||
enable = true;
|
||||
capSysNice = true;
|
||||
args = [
|
||||
"--rt"
|
||||
"--expose-wayland"
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/system/gaming/lutris/default.nix
Normal file
18
modules/system/gaming/lutris/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.gaming.lutris;
|
||||
in {
|
||||
options = {
|
||||
system.gaming.lutris.enable = mkEnableOption "Enables lutris";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
lutris
|
||||
];
|
||||
};
|
||||
}
|
||||
20
modules/system/gaming/steam/default.nix
Normal file
20
modules/system/gaming/steam/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.gaming.steam;
|
||||
in {
|
||||
options = {
|
||||
system.gaming.steam.enable = mkEnableOption "Enables steam";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
steam = {
|
||||
enable = true;
|
||||
gamescopeSession.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
22
modules/system/gui/gnome/default.nix
Normal file
22
modules/system/gui/gnome/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.gui.gnome;
|
||||
in {
|
||||
options = {
|
||||
system.gui.gnome.enable = mkEnableOption "Enables gnome";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
xserver = {
|
||||
desktopManager.gnome = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
gnome.games.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/system/gui/hyprland/default.nix
Normal file
23
modules/system/gui/hyprland/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.gui.hyprland;
|
||||
in {
|
||||
options = {
|
||||
system.gui.hyprland.enable = mkEnableOption "Enables hyprland";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
xwayland.enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.default;
|
||||
portalPackage = inputs.hyprland.packages.${pkgs.system}.xdg-desktop-portal-hyprland;
|
||||
};
|
||||
environment.variables.NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
}
|
||||
20
modules/system/hardware/bluetooth/default.nix
Normal file
20
modules/system/hardware/bluetooth/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.hardware.bluetooth;
|
||||
in {
|
||||
options = {
|
||||
system.hardware.bluetooth.enable = mkEnableOption "Enables bluetooth";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/system/hardware/graphics/amd/default.nix
Normal file
32
modules/system/hardware/graphics/amd/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
# pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.hardware.graphics.amd;
|
||||
in {
|
||||
options = {
|
||||
system.hardware.graphics.amd.enable = mkEnableOption "Enables AMD graphics";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
# extraPackages = with pkgs; [
|
||||
# libva
|
||||
# vaapiVdpau
|
||||
# libvdpau-va-gl
|
||||
# amdvlk
|
||||
# vulkan-tools
|
||||
# ];
|
||||
# extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
# vaapiVdpau
|
||||
# libvdpau-va-gl
|
||||
# ];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
72
modules/system/hardware/graphics/nvidia/default.nix
Normal file
72
modules/system/hardware/graphics/nvidia/default.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export LIBVA_DRIVER_NAME=nvidia
|
||||
export GBM_BACKEND=nvidia-drm
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __GL_VRR_ALLOWED=1
|
||||
export XDG_SESSION_TYPE=wayland
|
||||
export NVD_BACKEND=direct
|
||||
export ELECTRON_OZONE_PLATFORM_HINT=auto
|
||||
exec "$@"
|
||||
'';
|
||||
inherit (lib) types mkIf mkEnableOption mkOption;
|
||||
cfg = config.system.hardware.graphics.nvidia;
|
||||
in {
|
||||
options = {
|
||||
system.hardware.graphics.nvidia = {
|
||||
enable = mkEnableOption "Enables NVidia graphics";
|
||||
package = mkOption {
|
||||
type = types.enum ["stable" "beta" "production" "latest"];
|
||||
default = "stable";
|
||||
description = "Choose between the stable, beta, latest, or production NVidia driver package";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
egl-wayland
|
||||
];
|
||||
hardware = {
|
||||
graphics = {
|
||||
enable = true;
|
||||
enable32Bit = true;
|
||||
extraPackages = with pkgs; [
|
||||
nvidia-offload
|
||||
libva
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
intel-media-driver
|
||||
nvidia-vaapi-driver
|
||||
vulkan-tools
|
||||
];
|
||||
extraPackages32 = with pkgs.pkgsi686Linux; [
|
||||
vaapiVdpau
|
||||
libvdpau-va-gl
|
||||
];
|
||||
};
|
||||
nvidia = {
|
||||
package =
|
||||
if cfg.package == "beta"
|
||||
then config.boot.kernelPackages.nvidiaPackages.beta
|
||||
else if cfg.package == "latest"
|
||||
then config.boot.kernelPackages.nvidiaPackages.latest
|
||||
else if cfg.package == "production"
|
||||
then config.boot.kernelPackages.nvidiaPackages.prodution
|
||||
else config.boot.kernelPackages.nvidiaPackages.stable;
|
||||
modesetting.enable = true;
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
finegrained = false;
|
||||
};
|
||||
open = true;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/system/hardware/logitech/default.nix
Normal file
20
modules/system/hardware/logitech/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.hardware.logitech;
|
||||
in {
|
||||
options = {
|
||||
system.hardware.logitech.enable = mkEnableOption "Enables logitech";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hardware = {
|
||||
logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
62
modules/system/hardware/network/default.nix
Normal file
62
modules/system/hardware/network/default.nix
Normal file
@@ -0,0 +1,62 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption types;
|
||||
cfg = config.system.hardware.network;
|
||||
in {
|
||||
options = {
|
||||
system = {
|
||||
hardware = {
|
||||
network = {
|
||||
enable = mkEnableOption "Enable the custom networking module";
|
||||
|
||||
hostName = mkOption {
|
||||
type = types.str;
|
||||
default = "default-hostname";
|
||||
description = "Hostname for the system.";
|
||||
};
|
||||
|
||||
interfaces = mkOption {
|
||||
type = types.attrsOf (types.submodule {
|
||||
options = {
|
||||
allowedTCPPorts = mkOption {
|
||||
type = types.listOf types.int;
|
||||
default = [];
|
||||
description = "List of allowed TCP ports for this interface.";
|
||||
};
|
||||
};
|
||||
});
|
||||
default = {};
|
||||
description = "Network interface configurations.";
|
||||
};
|
||||
nm-applet = {
|
||||
enable = mkEnableOption "Enables the nm-applet service.";
|
||||
indicator = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables the nm-applet indicator.";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
inherit (cfg) hostName;
|
||||
nftables.enable = true;
|
||||
firewall = {
|
||||
enable = true;
|
||||
inherit (cfg) interfaces;
|
||||
};
|
||||
};
|
||||
programs.nm-applet = {
|
||||
enable = cfg.nm-applet.enable;
|
||||
indicator = cfg.nm-applet.indicator;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/system/studio/beekeeper/default.nix
Normal file
18
modules/system/studio/beekeeper/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.studio.beekeeper;
|
||||
in {
|
||||
options = {
|
||||
system.studio.beekeeper.enable = mkEnableOption "Enables Beekeeper Studio";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
beekeeper-studio
|
||||
];
|
||||
};
|
||||
}
|
||||
29
modules/system/studio/blender/default.nix
Normal file
29
modules/system/studio/blender/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption;
|
||||
cfg = config.system.studio.blender;
|
||||
in {
|
||||
options = {
|
||||
system.studio.blender = {
|
||||
enable = mkEnableOption "Enables Blender";
|
||||
hip.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Use the HIP-enabled version of Blender (for AMD GPUs).";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
(
|
||||
if cfg.hip.enable
|
||||
then pkgs.blender-hip
|
||||
else pkgs.blender
|
||||
)
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/system/studio/gimp/default.nix
Normal file
18
modules/system/studio/gimp/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.studio.gimp;
|
||||
in {
|
||||
options = {
|
||||
system.studio.gimp.enable = mkEnableOption "Enables gimp";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.gimp-with-plugins
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/system/studio/inkscape/default.nix
Normal file
18
modules/system/studio/inkscape/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.studio.inkscape;
|
||||
in {
|
||||
options = {
|
||||
system.studio.inkscape.enable = mkEnableOption "Enables inkscape";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
inkscape-with-extensions
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/system/studio/mysql-workbench/default.nix
Normal file
18
modules/system/studio/mysql-workbench/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.studio.mysql-workbench;
|
||||
in {
|
||||
options = {
|
||||
system.studio.mysql-workbench.enable = mkEnableOption "Enables MySQL Workbench";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = with pkgs; [
|
||||
mysql-workbench
|
||||
];
|
||||
};
|
||||
}
|
||||
17
modules/system/sysd/network/blueman/default.nix
Normal file
17
modules/system/sysd/network/blueman/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.network.blueman;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.network.blueman.enable = mkEnableOption "Enables blueman";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
blueman.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
19
modules/system/sysd/network/mullvad/default.nix
Normal file
19
modules/system/sysd/network/mullvad/default.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.network.mullvad;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.network.mullvad.enable = mkEnableOption "Enables mullvad";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.mullvad-vpn = {
|
||||
enable = true;
|
||||
package = pkgs.mullvad-vpn;
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/system/sysd/network/openssh/default.nix
Normal file
17
modules/system/sysd/network/openssh/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.network.openssh;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.network.openssh.enable = mkEnableOption "Enables openssh";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
32
modules/system/sysd/network/samba/default.nix
Normal file
32
modules/system/sysd/network/samba/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.network.samba;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.network.samba.enable = mkEnableOption "Enables samba";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
samba = {
|
||||
enable = true;
|
||||
package = pkgs.samba4Full;
|
||||
openFirewall = true;
|
||||
};
|
||||
avahi = {
|
||||
publish.enable = true;
|
||||
publish.userServices = true;
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
samba-wsdd = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
modules/system/sysd/security/agenix/default.nix
Normal file
63
modules/system/sysd/security/agenix/default.nix
Normal file
@@ -0,0 +1,63 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
pkgs,
|
||||
self,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption mkMerge;
|
||||
cfg = config.system.sysd.security.agenix;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.security.agenix = {
|
||||
enable = mkEnableOption "Enables agenix system environment";
|
||||
cnix.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Apply cnix agenix settings";
|
||||
};
|
||||
toothpc.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Apply toothpc agenix settings";
|
||||
};
|
||||
cnixpad.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Apply cnixpad agenix settings";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
age = mkMerge [
|
||||
(mkIf cfg.cnix.enable {
|
||||
secrets = {
|
||||
cnstssh.file = "${self}/secrets/cnstssh.age";
|
||||
cnixssh.file = "${self}/secrets/cnixssh.age";
|
||||
helix-gpt = {
|
||||
file = "${self}/secrets/helix-gpt.age";
|
||||
owner = "cnst";
|
||||
group = "users";
|
||||
};
|
||||
};
|
||||
})
|
||||
(mkIf cfg.toothpc.enable {
|
||||
secrets = {
|
||||
# Add toothpc specific secrets here
|
||||
};
|
||||
})
|
||||
(mkIf cfg.cnixpad.enable {
|
||||
secrets = {
|
||||
# Add adampad specific secrets here
|
||||
};
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = [
|
||||
inputs.agenix.packages.x86_64-linux.default
|
||||
pkgs.age
|
||||
];
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/security/gnome-keyring/default.nix
Normal file
15
modules/system/sysd/security/gnome-keyring/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.security.gnome-keyring;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.security.gnome-keyring.enable = mkEnableOption "Enables gnome-keyring";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
};
|
||||
}
|
||||
21
modules/system/sysd/session/dbus/default.nix
Normal file
21
modules/system/sysd/session/dbus/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.session.dbus;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.session.dbus.enable = mkEnableOption "Enables dbus";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.dbus = {
|
||||
enable = true;
|
||||
packages = with pkgs; [
|
||||
gcr
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/session/dconf/default.nix
Normal file
15
modules/system/sysd/session/dconf/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.session.dconf;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.session.dconf.enable = mkEnableOption "Enables dconf";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.dconf.enable = true;
|
||||
};
|
||||
}
|
||||
29
modules/system/sysd/session/xserver/default.nix
Normal file
29
modules/system/sysd/session/xserver/default.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkOption types;
|
||||
cfg = config.system.sysd.session.xserver;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.session.xserver = {
|
||||
videoDrivers = mkOption {
|
||||
type = types.listOf (types.enum ["amdgpu" "nvidia"]);
|
||||
default = ["amdgpu"];
|
||||
description = "The names of the video drivers the configuration supports";
|
||||
};
|
||||
xkbLayout = mkOption {
|
||||
type = types.str;
|
||||
default = "se";
|
||||
description = "X keyboard layout, or multiple keyboard layouts separated by commas.";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
services.xserver = {
|
||||
videoDrivers = cfg.videoDrivers;
|
||||
xkb.layout = cfg.xkbLayout;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/system/fwupd/default.nix
Normal file
15
modules/system/sysd/system/fwupd/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.fwupd;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.fwupd.enable = mkEnableOption "Enables fwupd";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.fwupd.enable = true;
|
||||
};
|
||||
}
|
||||
58
modules/system/sysd/system/greetd/default.nix
Normal file
58
modules/system/sysd/system/greetd/default.nix
Normal file
@@ -0,0 +1,58 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkMerge mkOption types;
|
||||
cfg = config.system.sysd.system.greetd;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.greetd = {
|
||||
enable = mkEnableOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables the greetd service.";
|
||||
};
|
||||
gnomeKeyring.enable = mkEnableOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables GnomeKeyring PAM service for greetd.";
|
||||
};
|
||||
autologin.enable = mkEnableOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Enables autologin for a specified user.";
|
||||
};
|
||||
autologin.user = mkOption {
|
||||
type = types.str;
|
||||
default = "cnst";
|
||||
description = "The username to auto-login when autologin is enabled.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = mkMerge [
|
||||
# Conditionally include initial_session if autologin is enabled
|
||||
(mkIf cfg.autologin.enable {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
||||
user = cfg.autologin.user;
|
||||
};
|
||||
})
|
||||
{
|
||||
default_session = {
|
||||
command = "${pkgs.greetd.tuigreet}/bin/tuigreet -r --remember-session --asterisks";
|
||||
user = "greeter";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
# Apply GnomeKeyring PAM Service based on user configuration
|
||||
security.pam.services.greetd.enableGnomeKeyring = cfg.gnomeKeyring.enable;
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/system/gvfs/default.nix
Normal file
15
modules/system/sysd/system/gvfs/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.gvfs;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.gvfs.enable = mkEnableOption "Enables gvfs";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.gvfs.enable = true;
|
||||
};
|
||||
}
|
||||
23
modules/system/sysd/system/kanata/default.nix
Normal file
23
modules/system/sysd/system/kanata/default.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.kanata;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.kanata.enable = mkEnableOption "Enables kanata keyboard remapping";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.kanata = {
|
||||
enable = true;
|
||||
package = pkgs.kanata-with-cmd;
|
||||
keyboards.hhkbse = {
|
||||
devices = ["/dev/input/by-id/usb-PFU_Limited_HHKB-Hybrid-event-kbd"];
|
||||
config = builtins.readFile (./. + "/hhkbse.kbd");
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
52
modules/system/sysd/system/kanata/hhkbse.kbd
Normal file
52
modules/system/sysd/system/kanata/hhkbse.kbd
Normal file
@@ -0,0 +1,52 @@
|
||||
(deflocalkeys-linux
|
||||
§ 41
|
||||
+ 12
|
||||
´ 13
|
||||
å 26
|
||||
¨ 27
|
||||
ö 39
|
||||
ä 40
|
||||
' 43
|
||||
< 86
|
||||
> 100
|
||||
, 51
|
||||
. 52
|
||||
- 53
|
||||
)
|
||||
|
||||
(defsrc
|
||||
esc 1 2 3 4 5 6 7 8 9 0 + ´ ' §
|
||||
tab q w e r t y u i o p å ¨ bspc
|
||||
lctl a s d f g h j k l ö ä ret
|
||||
lsft z x c v b n m , . - rsft
|
||||
lalt lmet spc rmet ralt
|
||||
)
|
||||
|
||||
(deflayer default
|
||||
esc 1 2 3 4 5 6 7 8 9 0 + pgdn pgup del
|
||||
tab q w e r t y u i o p å ' bspc
|
||||
lctl a s d f g h j k l ö ä ret
|
||||
@shift z x c v b n m , . - rsft
|
||||
lalt lmet spc @level3 ralt
|
||||
)
|
||||
|
||||
(deflayer shift
|
||||
esc S-1 S-2 S-3 RA-4 S-5 S-6 S-7 S-8 S-9 S-0 S-+ RA-7 RA-0 RA-<
|
||||
tab S-q S-w S-e S-r S-t S-y S-u S-i S-o S-p S-å S-¨ bspc
|
||||
lctl S-a S-s S-d S-f S-g S-h S-j S-k S-l S-ö S-ä S-ret
|
||||
@shift S-z S-x S-c S-v S-b S-n S-m S-, S-. S-- rsft
|
||||
lalt lmet spc @level3 ralt
|
||||
)
|
||||
|
||||
(deflayer level3
|
||||
esc 1 RA-2 RA-3 S-4 RA-5 RA-6 RA-7 RA-8 RA-9 RA-0 RA-+ ⇤ ⇥ S-'
|
||||
tab q w RA-5 r t y u i o ▲ å RA-¨ bspc
|
||||
lctl a s d f g h j k ◀ ▼ ▶ ret
|
||||
@shift RA-S-z RA-S-x c v b n m , . - rsft
|
||||
lalt lmet spc @level3 ralt
|
||||
)
|
||||
|
||||
(defalias
|
||||
shift (layer-toggle shift)
|
||||
level3 (layer-toggle level3)
|
||||
)
|
||||
20
modules/system/sysd/system/locate/default.nix
Normal file
20
modules/system/sysd/system/locate/default.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.locate;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.locate.enable = mkEnableOption "Enables plocate";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.locate = {
|
||||
enable = true;
|
||||
package = pkgs.plocate;
|
||||
localuser = null;
|
||||
};
|
||||
};
|
||||
}
|
||||
103
modules/system/sysd/system/nix-ld/default.nix
Normal file
103
modules/system/sysd/system/nix-ld/default.nix
Normal file
@@ -0,0 +1,103 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.nix-ld;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.nix-ld.enable = mkEnableOption "Enables nix-ld";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
# Sets up all the libraries to load
|
||||
libraries = with pkgs; [
|
||||
stdenv.cc.cc
|
||||
openssl
|
||||
xorg.libXcomposite
|
||||
xorg.libXtst
|
||||
xorg.libXrandr
|
||||
xorg.libXext
|
||||
xorg.libX11
|
||||
xorg.libXfixes
|
||||
libGL
|
||||
libva
|
||||
xorg.libxcb
|
||||
xorg.libXdamage
|
||||
xorg.libxshmfence
|
||||
xorg.libXxf86vm
|
||||
libelf
|
||||
glib
|
||||
gtk3
|
||||
bzip2
|
||||
xorg.libXinerama
|
||||
xorg.libXcursor
|
||||
xorg.libXrender
|
||||
xorg.libXScrnSaver
|
||||
xorg.libXi
|
||||
xorg.libSM
|
||||
xorg.libICE
|
||||
gnome2.GConf
|
||||
nspr
|
||||
nss
|
||||
cups
|
||||
libcap
|
||||
SDL2
|
||||
libusb1
|
||||
dbus-glib
|
||||
ffmpeg
|
||||
libudev0-shim
|
||||
xorg.libXt
|
||||
xorg.libXmu
|
||||
libogg
|
||||
libvorbis
|
||||
SDL
|
||||
SDL2_image
|
||||
glew110
|
||||
libidn
|
||||
tbb
|
||||
flac
|
||||
freeglut
|
||||
libjpeg
|
||||
libpng
|
||||
libpng12
|
||||
libsamplerate
|
||||
libmikmod
|
||||
libtheora
|
||||
libtiff
|
||||
pixman
|
||||
speex
|
||||
SDL_image
|
||||
SDL_ttf
|
||||
SDL_mixer
|
||||
SDL2_ttf
|
||||
SDL2_mixer
|
||||
libappindicator-gtk2
|
||||
libdbusmenu-gtk2
|
||||
libindicator-gtk2
|
||||
libcaca
|
||||
libcanberra
|
||||
libgcrypt
|
||||
libvpx
|
||||
librsvg
|
||||
xorg.libXft
|
||||
libvdpau
|
||||
gnome2.pango
|
||||
cairo
|
||||
atk
|
||||
gdk-pixbuf
|
||||
fontconfig
|
||||
freetype
|
||||
dbus
|
||||
alsaLib
|
||||
expat
|
||||
libdrm
|
||||
mesa
|
||||
libxkbcommon
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/system/pcscd/default.nix
Normal file
15
modules/system/sysd/system/pcscd/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.pcscd;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.pcscd.enable = mkEnableOption "Enables pcscd";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.pcscd.enable = true;
|
||||
};
|
||||
}
|
||||
24
modules/system/sysd/system/pipewire/default.nix
Normal file
24
modules/system/sysd/system/pipewire/default.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.pipewire;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.pipewire.enable = mkEnableOption "Enables pipewire";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
hardware.pulseaudio.enable = false;
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/system/sysd/system/powerd/default.nix
Normal file
18
modules/system/sysd/system/powerd/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.powerd;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.powerd.enable = mkEnableOption "Enables power-profiles-daemon";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services = {
|
||||
power-profiles-daemon.enable = true;
|
||||
upower.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/system/udisks/default.nix
Normal file
15
modules/system/sysd/system/udisks/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.udisks;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.udisks.enable = mkEnableOption "Enables udisks";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
services.udisks2.enable = true;
|
||||
};
|
||||
}
|
||||
15
modules/system/sysd/system/zram/default.nix
Normal file
15
modules/system/sysd/system/zram/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.sysd.system.zram;
|
||||
in {
|
||||
options = {
|
||||
system.sysd.system.zram.enable = mkEnableOption "Enables zram";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
zramSwap.enable = true;
|
||||
};
|
||||
}
|
||||
15
modules/system/utils/android/default.nix
Normal file
15
modules/system/utils/android/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.android;
|
||||
in {
|
||||
options = {
|
||||
system.utils.android.enable = mkEnableOption "Enables android tools";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.adb.enable = true;
|
||||
};
|
||||
}
|
||||
18
modules/system/utils/anyrun/default.nix
Normal file
18
modules/system/utils/anyrun/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.anyrun;
|
||||
in {
|
||||
options = {
|
||||
system.utils.anyrun.enable = mkEnableOption "Enables anyrun";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.anyrun
|
||||
];
|
||||
};
|
||||
}
|
||||
18
modules/system/utils/brightnessctl/default.nix
Normal file
18
modules/system/utils/brightnessctl/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.brightnessctl;
|
||||
in {
|
||||
options = {
|
||||
system.utils.brightnessctl.enable = mkEnableOption "Enables brigthnessctl";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.brightnessctl
|
||||
];
|
||||
};
|
||||
}
|
||||
61
modules/system/utils/chaotic/default.nix
Normal file
61
modules/system/utils/chaotic/default.nix
Normal file
@@ -0,0 +1,61 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption mkMerge;
|
||||
cfg = config.system.utils.chaotic;
|
||||
in {
|
||||
options = {
|
||||
system.utils.chaotic = {
|
||||
enable = mkEnableOption "Enables Chaotic AUR packages";
|
||||
amd.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to install AMD-specific settings.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
{
|
||||
chaotic.scx.enable = true;
|
||||
}
|
||||
(mkIf cfg.amd.enable {
|
||||
# AMD-specific configuration
|
||||
chaotic = {
|
||||
scx.scheduler = "scx_lavd";
|
||||
mesa-git = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [
|
||||
libva
|
||||
vaapiVdpau
|
||||
libdrm_git
|
||||
latencyflex-vulkan
|
||||
mesa_git
|
||||
mesa_git.opencl
|
||||
vulkanPackages_latest.gfxreconstruct
|
||||
vulkanPackages_latest.spirv-cross
|
||||
vulkanPackages_latest.spirv-headers
|
||||
vulkanPackages_latest.spirv-tools
|
||||
vulkanPackages_latest.vulkan-extension-layer
|
||||
vulkanPackages_latest.vulkan-headers
|
||||
vulkanPackages_latest.vulkan-loader
|
||||
vulkanPackages_latest.vulkan-tools
|
||||
vulkanPackages_latest.vulkan-tools-lunarg
|
||||
vulkanPackages_latest.vulkan-utility-libraries
|
||||
vulkanPackages_latest.vulkan-validation-layers
|
||||
vulkanPackages_latest.vulkan-volk
|
||||
];
|
||||
extraPackages32 = with pkgs; [
|
||||
mesa32_git
|
||||
libdrm32_git
|
||||
libva
|
||||
vaapiVdpau
|
||||
];
|
||||
};
|
||||
};
|
||||
})
|
||||
]);
|
||||
}
|
||||
21
modules/system/utils/corectrl/default.nix
Normal file
21
modules/system/utils/corectrl/default.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.corectrl;
|
||||
in {
|
||||
options = {
|
||||
system.utils.corectrl.enable = mkEnableOption "Enables CoreCtrl";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.corectrl = {
|
||||
enable = true;
|
||||
gpuOverclock = {
|
||||
enable = true;
|
||||
ppfeaturemask = "0xffffffff";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
16
modules/system/utils/microfetch/default.nix
Normal file
16
modules/system/utils/microfetch/default.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.microfetch;
|
||||
in {
|
||||
options = {
|
||||
system.utils.microfetch.enable = mkEnableOption "Enables microfetch";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [inputs.microfetch.packages.x86_64-linux.default];
|
||||
};
|
||||
}
|
||||
33
modules/system/utils/misc/default.nix
Normal file
33
modules/system/utils/misc/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption mkMerge;
|
||||
cfg = config.system.utils.misc;
|
||||
in {
|
||||
options = {
|
||||
system.utils.misc = {
|
||||
enable = mkEnableOption "Enables miscellaneous packages";
|
||||
desktop.enable = mkOption {
|
||||
type = lib.types.bool;
|
||||
default = false;
|
||||
description = "Whether to install desktop-specific packages.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = mkMerge [
|
||||
[
|
||||
pkgs.nodejs_22
|
||||
pkgs.tree
|
||||
]
|
||||
(mkIf cfg.desktop.enable [
|
||||
pkgs.protonup
|
||||
pkgs.winetricks
|
||||
])
|
||||
];
|
||||
};
|
||||
}
|
||||
33
modules/system/utils/nh/default.nix
Normal file
33
modules/system/utils/nh/default.nix
Normal file
@@ -0,0 +1,33 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption mkOption;
|
||||
cfg = config.system.utils.nh;
|
||||
in {
|
||||
options = {
|
||||
system.utils.nh = {
|
||||
enable = mkEnableOption "Enables nix helper";
|
||||
clean = {
|
||||
enable = mkEnableOption "Enables nix helper cleaning";
|
||||
extraArgs = mkOption {
|
||||
type = lib.types.str;
|
||||
description = "Extra arguments for the clean command";
|
||||
default = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs = {
|
||||
nh = {
|
||||
enable = cfg.enable;
|
||||
clean = {
|
||||
enable = cfg.clean.enable;
|
||||
extraArgs = cfg.clean.extraArgs;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/system/utils/npm/default.nix
Normal file
17
modules/system/utils/npm/default.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.npm;
|
||||
in {
|
||||
options = {
|
||||
system.utils.npm.enable = mkEnableOption "Enables npm";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.npm = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
18
modules/system/utils/obsidian/default.nix
Normal file
18
modules/system/utils/obsidian/default.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.obsidian;
|
||||
in {
|
||||
options = {
|
||||
system.utils.obsidian.enable = mkEnableOption "Enables obsidian";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.obsidian
|
||||
];
|
||||
};
|
||||
}
|
||||
22
modules/system/utils/yubikey/default.nix
Normal file
22
modules/system/utils/yubikey/default.nix
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.yubikey;
|
||||
in {
|
||||
options = {
|
||||
system.utils.yubikey.enable = mkEnableOption "Enables yubikey utilities";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
environment.systemPackages = [
|
||||
pkgs.yubioath-flutter
|
||||
pkgs.yubikey-manager
|
||||
pkgs.yubikey-personalization
|
||||
pkgs.yubikey-personalization-gui
|
||||
pkgs.pcsc-tools
|
||||
];
|
||||
};
|
||||
}
|
||||
15
modules/system/utils/zsh/default.nix
Normal file
15
modules/system/utils/zsh/default.nix
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
inherit (lib) mkIf mkEnableOption;
|
||||
cfg = config.system.utils.zsh;
|
||||
in {
|
||||
options = {
|
||||
system.utils.zsh.enable = mkEnableOption "Enables android tools";
|
||||
};
|
||||
config = mkIf cfg.enable {
|
||||
programs.zsh.enable = cfg.enable;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user