1
0
Fork 0
mirror of https://git.sr.ht/~azikx/karbur synced 2024-10-30 13:06:19 +00:00

Compare commits

..

No commits in common. "12fb17362082b62eabaac4c20b091886c2bad8f5" and "ce54edbf09b442d894d239e3395b941d225b0e22" have entirely different histories.

61 changed files with 70 additions and 983 deletions

View file

@ -1,7 +1,5 @@
{ {
description = "azikx snowflake palace"; outputs = { nixpkgs, home-manager, ... }@inputs: {
outputs = { nixpkgs, home-manager, flake-parts, ... }@inputs: {
nixosConfigurations.karbur = nixpkgs.lib.nixosSystem { nixosConfigurations.karbur = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
modules = [ ./host ]; modules = [ ./host ];
@ -29,10 +27,6 @@
yazi.url = "github:sxyazi/yazi"; yazi.url = "github:sxyazi/yazi";
# TWO LINE SOFTWARE # TWO LINE SOFTWARE
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
home-manager = { home-manager = {
url = "github:nix-community/home-manager"; url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
@ -49,8 +43,6 @@
url = "github:pyt0xic/hyprfocus"; url = "github:pyt0xic/hyprfocus";
inputs.hyprland.follows = "hyprland"; inputs.hyprland.follows = "hyprland";
}; };
# WALLPAPERS
walls = { walls = {
url = "git+https://git.pub.solar/azikx/wallpapers?ref=main"; url = "git+https://git.pub.solar/azikx/wallpapers?ref=main";
flake = false; flake = false;

View file

@ -6,7 +6,7 @@
extraConfig = { extraConfig = {
color.ui = true; color.ui = true;
init.defaultBranch = "main"; init.defaultBranch = "main";
safe.directory = "*"; safe.directory = "/home/dragora/.flake";
}; };
}; };
} }

View file

@ -40,7 +40,7 @@ in {
# MPV & ANIME # MPV & ANIME
"nodim, ${cl}(mpv)$" "nodim, ${cl}(mpv)$"
"float, ${cl}(anicliru)$" "float, ${cl}(anicliru)$"
"size 810 630, ${cl}(anicliru)$" "size 660 630, ${cl}(anicliru)$"
"bordercolor rgb(${base08}) rgb(${base09}) 45deg, ${cl}(anicliru)$" "bordercolor rgb(${base08}) rgb(${base09}) 45deg, ${cl}(anicliru)$"
# KOMIKKU # KOMIKKU

View file

@ -1,5 +1,7 @@
{ {
imports = [ imports = [
./torrserver
./locale.nix ./locale.nix
./nh.nix ./nh.nix
./nix.nix ./nix.nix

View file

@ -1,9 +1,8 @@
{ ... }: { { ... }: {
programs.nh = { # NIX HELPER programs.nh = { # NIX HELPER
enable = true; enable = true;
clean = { clean.enable = true;
enable = true; clean.extraArgs = "--keep-since 4d --keep 3";
extraArgs = "--keep-since 4d --keep 3"; flake = "/home/dragora/.flake";
};
}; };
} }

View file

@ -16,7 +16,7 @@
"anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s="
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
]; ];
trusted-users = [ "@wheel" ]; trusted-users = [ "dragora" "@wheel" ];
}; };
}; };

View file

@ -1,12 +1,32 @@
{ pkgs, inputs, ... }: { pkgs, inputs, lib, ... }:
let hpkg = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}; let hpkg = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system};
in { in {
# OS PACKAGES # OS PACKAGES
environment.systemPackages = with pkgs; [ git helix home-manager ]; nixpkgs = { hostPlatform = lib.mkDefault "x86_64-linux"; };
environment.systemPackages = with pkgs; [
git
helix
hyprland
home-manager
# (callPackage ./torrserver/package.nix { })
];
# PROGRAMS ENABLE # PROGRAMS ENABLE
programs = { programs = {
fish.enable = true; fish.enable = true;
gamescope.enable = true;
steam = {
enable = true;
package = pkgs.steam.override {
extraEnv = {
MANGOHUD = true;
OBS_VKCAPTURE = true;
RADV_TEX_ANISO = 16;
};
};
extraCompatPackages = with pkgs; [ proton-ge-bin ];
protontricks.enable = true;
};
hyprland = { hyprland = {
enable = true; enable = true;
package = hpkg.hyprland; package = hpkg.hyprland;

View file

@ -1,31 +1,29 @@
{ comp, ... }: { { ... }: {
security = { security = {
sudo.enable = true;
doas = { # VERY TOP doas = { # VERY TOP
enable = true; enable = true;
wheelNeedsPassword = true; wheelNeedsPassword = true;
extraRules = [{ extraRules = [{
users = [ comp.user ]; users = [ "dragora" ];
keepEnv = true; keepEnv = true;
persist = true; persist = true;
}]; }];
extraConfig = '' extraConfig = ''
permit nopass ${comp.user} as root cmd light permit nopass dragora as root cmd light
permit nopass ${comp.user} as root cmd tee permit nopass dragora as root cmd tee
''; '';
}; };
sudo-rs = { # FAST SUDO sudo-rs = {
enable = false; enable = true;
wheelNeedsPassword = true; wheelNeedsPassword = true;
extraRules = [ extraRules = [{
{
groups = [ "sudo" ]; groups = [ "sudo" ];
commands = [ "ALL" ]; commands = [ "ALL" ];
} }
{ # {
groups = [ "wheel" ]; # users = [ "megamozg" ];
commands = [ "light" "tee" ]; # commands = [ "light" "tee" ];
} # }
]; ];
}; };
polkit = { enable = true; }; polkit = { enable = true; };

View file

@ -1,8 +1,8 @@
{ pkgs, comp, ... }: { { pkgs, ... }: {
system.stateVersion = "24.05"; system.stateVersion = "24.05";
users = { users = {
users = { # USERS users = { # USERS
"${comp.user}" = { dragora = {
shell = pkgs.fish; shell = pkgs.fish;
isNormalUser = true; isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" "video" ]; extraGroups = [ "networkmanager" "wheel" "video" ];

View file

@ -1,8 +0,0 @@
{
imports = [
./modules
./torrserver
../../default.nix
];
}

View file

@ -1 +0,0 @@
{ imports = [ ./disks.nix ./hardware.nix ./user-like.nix ]; }

View file

@ -1,19 +0,0 @@
{ config, lib, ... }: {
hardware = {
# AND VIDEOCARD DRIVE (maybe)
amdgpu = {
amdvlk = {
enable = true;
supportExperimental.enable = true;
support32Bit.enable = true;
};
};
# PROCCESOR
cpu.amd = {
updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
ryzen-smu.enable = true;
};
xone.enable = true;
};
}

View file

@ -1,20 +0,0 @@
{ pkgs, comp, ... }: {
networking.hostName = comp.host;
services.getty.autologinUser = comp.user;
programs = {
nh.flake = "/home/${comp.user}/.flake"; # NIX-HELPER
gamescope.enable = true;
steam = { # GAMING
enable = true;
package = pkgs.steam.override {
extraEnv = {
MANGOHUD = true;
OBS_VKCAPTURE = true;
RADV_TEX_ANISO = 16;
};
};
extraCompatPackages = with pkgs; [ proton-ge-bin ];
protontricks.enable = true;
};
};
}

View file

@ -1,10 +1,10 @@
{ {
imports = [ imports = [
./boot.nix ./boot.nix
./disks.nix
./hardware.nix ./hardware.nix
./network.nix
./services.nix ./services.nix
./network.nix
./sound.nix ./sound.nix
./minimal.nix
]; ];
} }

View file

@ -1,20 +1,30 @@
{ pkgs, ... }: { { config, lib, ... }: {
hardware = { hardware = {
# AND VIDEOCARD DRIVE (maybe)
amdgpu = {
# opencl.enable = true;
amdvlk = {
enable = true;
supportExperimental.enable = true;
support32Bit.enable = true;
};
};
# OPENGL # OPENGL
graphics = { # GPU graphics = {
enable = true; enable = true;
enable32Bit = true; enable32Bit = true;
extraPackages = with pkgs; [ amdvlk ]; };
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ]; # PROCCESOR
cpu.amd = {
updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
ryzen-smu.enable = true;
}; };
# BLUETOOTH # BLUETOOTH
bluetooth = { bluetooth = {
enable = true; enable = true;
powerOnBoot = true; powerOnBoot = true;
}; };
xone.enable = true; xone.enable = true;
system76.enableAll = true;
firmware = [ pkgs.linux-firmware ];
}; };
} }

View file

@ -1,9 +0,0 @@
{
documentation = {
enable = false;
doc.enable = false;
info.enable = false;
man.enable = false;
nixos.enable = false;
};
}

View file

@ -1,5 +1,6 @@
{ lib, ... }: { { lib, ... }: {
networking = { # NETWORK networking = { # NETWORK
hostName = "karbur";
networkmanager = { # NETWORK MANAGER networkmanager = { # NETWORK MANAGER
enable = true; enable = true;
insertNameservers = [ "1.1.1.1" "1.0.0.1" ]; insertNameservers = [ "1.1.1.1" "1.0.0.1" ];
@ -8,5 +9,6 @@
}; };
useDHCP = lib.mkDefault true; useDHCP = lib.mkDefault true;
nftables.enable = true; nftables.enable = true;
# resolvconf.dnsSingleRequest = true;
}; };
} }

View file

@ -1,5 +1,6 @@
{ ... }: { { ... }: {
services = { # SERVICES services = { # SERVICES
getty.autologinUser = "dragora";
xserver = { # XORG? xserver = { # XORG?
xkb = { xkb = {
layout = "us"; layout = "us";

View file

@ -1,8 +0,0 @@
{ systemModules, lib, ... }:
{
# Read all directories from systemModules
imports = builtins.filter (module: lib.pathIsDirectory module)
(map (module: "${systemModules}/${module}")
(builtins.attrNames (builtins.readDir systemModules)));
}

View file

@ -1,20 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.hardware.bluetooth;
in {
options = { module.hardware.bluetooth.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
hardware.bluetooth = { # BLUETOOTH LOL
enable = true;
powerOnBoot = true;
};
environment.systemPackages = with pkgs; [ # TUI FOR BLUETOOTH
bluetuith
bluetooth_battery
];
};
}

View file

@ -1,65 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.hardware.boot;
in {
options = { module.hardware.boot.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
boot = { # ITSELF LOL
kernelPackages = pkgs.linuxPackages_zen;
kernelModules = [ "kvm-amd" ];
consoleLogLevel = 0;
kernelParams = [
"quiet"
"loglevel=3"
"nowatchdog"
"page_alloc.shuffle=1"
"threadirqs"
"split_lock_detect=off"
"pci=pcie_bus_perf"
"psmouse.synaptics_intertouch=0"
"rd.systemd.show_status=false"
];
loader = { # SYSTEMD BOOT AS DEFAULT
systemd-boot = {
enable = true;
configurationLimit = 4;
};
efi.canTouchEfiVariables = true;
timeout = 0; # TIMEOUT FOR LAUNCH
};
initrd = { # IDK
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"ohci_pci"
"ehci_pci"
"pata_atiixp"
"ums_realtek"
"sd_mod"
"sr_mod"
"sdhci_pci"
"usb_storage"
];
systemd.enable = true;
compressor = "zstd";
compressorArgs = [ "-9" ];
verbose = false;
};
plymouth = { # PLYMOUTH WITH NIXOS LOGO
enable = true;
logo =
"${pkgs.nixos-icons}/share/icons/hicolor/48x48/apps/nix-snowflake-white.png";
};
tmp.cleanOnBoot = true;
};
};
}

View file

@ -1,16 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.hardware.cpu;
in {
options = { module.hardware.cpu.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
hardware.cpu.amd = { # OPTIMIZATION FOR CPU
updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
ryzen-smu.enable = true;
};
};
}

View file

@ -1,9 +0,0 @@
{ systemModules, lib, ... }:
let hostProgramModulesPath = "${systemModules}/hardware";
in {
imports = builtins.filter (module: lib.pathIsDirectory module)
(map (module: "${hostProgramModulesPath}/${module}")
(builtins.attrNames (builtins.readDir hostProgramModulesPath)));
}

View file

@ -1,25 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.hardware.graphics;
in {
options = { module.hardware.graphics.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
hardware = {
graphics = { # GPU
enable = true;
enable32Bit = true;
extraPackages32 = with pkgs; [ driversi686Linux.amdvlk ];
};
amdgpu = {
amdvlk = {
enable = true;
support32Bit.enable = true;
supportExperimental.enable = true;
};
};
};
};
}

View file

@ -1,37 +0,0 @@
{ lib, config, hostname, ... }:
with lib;
let cfg = config.module.hardware.network;
in {
options = { module.hardware.network.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services.resolved.enable = true;
systemd.services = { # IDK
NetworkManager-wait-online.enable = false;
systemd-networkd-wait-online.enable = mkForce false;
};
networking = { # FOR NETWORK
hostName = hostname;
networkmanager = {
enable = true;
insertNameservers = [ "1.1.1.1" "1.0.0.1" ];
dns = "systemd-resolved";
wifi = {
powersave = true;
macAddress = "random";
backend = "iwd";
};
};
wireless.iwd = {
enable = true;
settings = { Settings = { AutoConnect = true; }; };
};
useDHCP = mkDefault true;
nftables.enable = true;
};
};
}

View file

@ -1,34 +0,0 @@
{ lib, config, username, ... }:
with lib;
let cfg = config.module.hardware.security;
in {
options = { module.hardware.security.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
security = {
sudo.enable = false;
sudo-rs = {
enable = true;
execWheelOnly = true;
wheelNeedsPassword = true;
};
doas = { # VERY TOP
enable = true;
wheelNeedsPassword = true;
extraRules = [{
users = [ username ];
keepEnv = true;
persist = true;
}];
};
pam.services = {
gtklock = { };
swaylock = { };
hyprlock = { };
};
};
};
}

View file

@ -1,27 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.hardware.sound;
in {
options = { module.hardware.sound.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
pulse.enable = true;
wireplumber.enable = true;
alsa = {
enable = true;
support32Bit = true;
};
lowLatency = {
enable = true;
quantum = 64;
rate = 48000;
};
};
};
}

View file

@ -1,9 +0,0 @@
{ systemModules, lib, ... }:
let hostProgramModulesPath = "${systemModules}/misc";
in {
imports = builtins.filter (module: lib.pathIsDirectory module)
(map (module: "${hostProgramModulesPath}/${module}")
(builtins.attrNames (builtins.readDir hostProgramModulesPath)));
}

View file

@ -1,18 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.misc.locales;
in {
options = { module.misc.locales.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
time.timeZone = "Asia/Chita"; # TIME
services.chrony.enable = true; # SYNC TIME
i18n = { # LOCALE LANG
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "all" ];
};
};
}

View file

@ -1,21 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.misc.minimal;
in {
options = { module.misc.minimal.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
programs.command-not-found.enable = mkDefault false;
documentation = { # DISABLE MAN AND GUIDES
enable = mkDefault false;
doc.enable = mkDefault false;
info.enable = mkDefault false;
man.enable = mkDefault false;
nixos.enable = mkDefault false;
};
};
}

View file

@ -1,16 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.misc.power;
in {
options = { module.misc.power.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
powerManagement = { # POWER OPTIMIZATION
enable = true;
powertop.enable = true;
};
};
}

View file

@ -1,25 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.misc.system76;
in {
options = { module.misc.system76.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
hardware.system76 = { # OPTIMIZATIONS
enableAll = true;
power-daemon.enable = true;
firmware-daemon.enable = true;
kernel-modules.enable = true;
};
services.system76-scheduler = { # SCHEDULER
enable = true;
settings = {
cfsProfiles.enable = true;
processScheduler.pipewireBoost.enable = true;
};
};
};
}

View file

@ -1,27 +0,0 @@
{ lib, config, ... }:
with lib;
let
cfg = config.module.misc.torrserver;
torr = pkgs.callPackage ./package.nix { };
in {
options = { module.misc.torrserver.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
systemd.services = {
torrserver = { # TORRSERVER
enable = true;
after = [ "multi-user.target" "network.target" ];
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = "${torr}/bin/torrserver";
Restart = "on-failure";
Type = "simple";
TimeoutSec = 30;
};
};
};
};
}

View file

@ -1,27 +0,0 @@
{ lib, stdenv, fetchurl, autoPatchelfHook }:
let
version = "134";
hash = "sha256-WDygG9aGnD20nGxtG0t+T2KEwbJ+fZ0uRaCndirrsXI=";
in stdenv.mkDerivation {
name = "torrserver";
dontUnpack = true;
src = fetchurl {
url =
"https://github.com/YouROK/TorrServer/releases/download/MatriX.${version}/TorrServer-linux-amd64";
sha256 = "${hash}";
};
nativeBuildInputs = [ autoPatchelfHook ];
installPhase =
" mkdir -p $out/bin\n cp $src $out/bin/torrserver\n chmod +x $out/bin/torrserver\n";
meta = with lib; {
description = "Torrserver";
homepage = "https://github.com/YouROK/TorrServer";
license = licenses.unlicense;
meta.platforms = platforms.all;
mainProgram = "torrserver";
};
}

View file

@ -1,30 +0,0 @@
{ pkgs, lib, config, username, ... }:
with lib;
let cfg = config.module.misc.users;
in {
options = { module.misc.users.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
users = {
mutableUsers = false;
defaultUserShell = pkgs.fish;
groups = { ${username} = { gid = 1000; }; };
users = {
root.useDefaultShell = true;
${username} = {
uid = 1000;
home = "/home/${username}";
group = "${username}";
useDefaultShell = true;
createHome = true;
isSystemUser = true;
extraGroups =
[ "video" "audio" "networkmanager" "wheel" "docker" "libvirtd" ];
};
};
};
};
}

View file

@ -1,30 +0,0 @@
{ lib, config, username, ... }:
with lib;
let cfg = config.module.misc.variables;
in {
options = { module.misc.variables.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
environment.variables = {
QT_QPA_PLATFORM = "wayland";
SDL_VIDEODRIVER = "wayland";
CLUTTER_BACKEND = "wayland";
GDK_BACKEND = "wayland";
NIXPKGS_ALLOW_UNFREE = "1";
NIXPKGS_ALLOW_INSECURE = "1";
MOZ_ENABLE_WAYLAND = "1";
XDG_SESSION_TYPE = "wayland";
NIXOS_OZONE_WL = "1";
};
environment.sessionVariables = {
MOZ_LEGACY_PROFILES = "1";
FLAKE = "/home/${username}/.flake";
QT_QPA_PLATFORMTHEME = "gtk3";
TDESKTOP_I_KNOW_ABOUT_GTK_INCOMPATIBILITY = "1";
};
};
}

View file

@ -1,57 +0,0 @@
{ lib, config, pkgs, ... }:
with lib;
let cfg = config.module.misc.zapret;
in {
options = { module.misc.zapret.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
systemd = {
services = {
zapret = {
wantedBy = [ "multi-user.target" ];
requires = [ "network.target" ];
path = with pkgs; [ iptables nftables zapret ipset curl gawk ];
serviceConfig = {
Type = "forking";
Restart = "no";
TimeoutSec = "30sec";
IgnoreSIGPIPE = "no";
KillMode = "none";
GuessMainPID = "no";
ExecStart = "${pkgs.zapret}/bin/zapret start";
ExecStop = "${pkgs.zapret}/bin/zapret stop";
EnvironmentFile = pkgs.writeText "zapret-environment" ''
FWTYPE="iptables"
SET_MAXELEM=522288
IPSET_OPT="hashsize 262144 maxelem $SET_MAXELEM"
AUTOHOSTLIST_RETRANS_THRESHOLD=3
AUTOHOSTLIST_FAIL_THRESHOLD=3
AUTOHOSTLIST_FAIL_TIME=60
AUTOHOSTLIST_DEBUGLOG=0
MDIG_THREADS=30
GZIP_LISTS=1
MODE=nfqws
MODE_HTTP=1
MODE_HTTP_KEEPALIVE=0
MODE_HTTPS=1
MODE_QUIC=0
MODE_FILTER=none
DESYNC_MARK=0x40000000
DESYNC_MARK_POSTNAT=0x20000000
NFQWS_OPT_DESYNC="--dpi-desync=fake,split2 --dpi-desync-ttl=3"
TPWS_OPT="--hostspell=HOST --split-http-req=method --split-pos=3 --oob"
FLOWOFFLOAD=donttouch
INIT_APPLY_FW=1
DISABLE_IPV6=0
'';
};
};
};
};
};
}

View file

@ -1,9 +0,0 @@
{ systemModules, lib, ... }:
let hostProgramModulesPath = "${systemModules}/programs";
in {
imports = builtins.filter (module: lib.pathIsDirectory module)
(map (module: "${hostProgramModulesPath}/${module}")
(builtins.attrNames (builtins.readDir hostProgramModulesPath)));
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.programs.fish;
in {
options = { module.programs.fish.enable = mkEnableOption ""; };
config = mkIf cfg.enable { programs.fish.enable = true; };
}

View file

@ -1,16 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.programs.git;
in {
options = { module.programs.git.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
programs.git = {
enable = true;
package = pkgs.gitMinimal;
};
};
}

View file

@ -1,17 +0,0 @@
{ inputs, lib, config, ... }:
with lib;
let cfg = config.module.programs.hm;
in {
options = { module.programs.hm.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
};
};
}

View file

@ -1,16 +0,0 @@
{ inputs, pkgs, lib, config, ... }:
with lib;
let cfg = config.module.programs.hyprland;
in {
options = { module.programs.hyprland.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.programs.light;
in {
options = { module.programs.light.enable = mkEnableOption ""; };
config = mkIf cfg.enable { programs.light.enable = true; };
}

View file

@ -1,20 +0,0 @@
{ lib, config, username, ... }:
with lib;
let cfg = config.module.programs.nh;
in {
options = { module.programs.nh.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
programs.nh = {
enable = true;
flake = "/home/${username}/.flake";
clean = {
enable = true;
extraArgs = "--keep-since 3d --keep 3";
};
};
};
}

View file

@ -1,13 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.module.programs.packages;
in {
options = { module.programs.packages.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
environment.systemPackages = with pkgs; [ helix killall ];
};
}

View file

@ -1,28 +0,0 @@
{ pkgs, lib, config, ... }:
with lib;
let cfg = config.module.programs.steam;
in {
options = { module.programs.steam.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
hardware.xone.enable = true;
programs = {
gamescope.enable = true;
steam = { # GAMING
enable = true;
package = pkgs.steam.override {
extraEnv = {
MANGOHUD = true;
OBS_VKCAPTURE = true;
RADV_TEX_ANISO = 16;
};
};
extraCompatPackages = with pkgs; [ proton-ge-bin ];
protontricks.enable = true;
};
};
};
}

View file

@ -1,28 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.autocpu;
in {
options = { module.services.autocpu.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services.auto-cpufreq = {
enable = true;
settings = {
charger = { # AC MODE
governor = "performance";
turbo = "auto";
};
battery = { # BAT MODE
governor = "powersave";
turbo = "auto";
energy_perf_bias = "balance_power";
platform_profile = "low-power";
enable_thresholds = true;
};
};
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.dbus;
in {
options = { module.services.dbus.enable = mkEnableOption ""; };
config = mkIf cfg.enable { services.dbus.implementation = "broker"; };
}

View file

@ -1,9 +0,0 @@
{ systemModules, lib, ... }:
let hostServicesModulesPath = "${systemModules}/services";
in {
imports = builtins.filter (module: lib.pathIsDirectory module)
(map (module: "${hostServicesModulesPath}/${module}")
(builtins.attrNames (builtins.readDir hostServicesModulesPath)));
}

View file

@ -1,16 +0,0 @@
{ lib, config, username, ... }:
with lib;
let cfg = config.module.services.getty;
in {
options = { module.services.getty.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services.getty = {
autologinUser = username;
greetingLine = "Good day my lord ahhhh";
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.gvfs;
in {
options = { module.services.gvfs.enable = mkEnableOption ""; };
config = mkIf cfg.enable { services.gvfs.enable = true; };
}

View file

@ -1,63 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.tlp;
in {
options = { module.services.tlp.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services = {
thermald.enable = true;
upower.enable = true;
fprintd = { # FINGER PRINT
enable = true;
package = pkgs.fprintd-tod;
tod = {
enable = true;
driver = pkgs.libfprint-2-tod1-vfs0090;
};
};
tlp = {
enable = true;
settings = {
PLATFORM_PROFILE_ON_AC = "performance";
PLATFORM_PROFILE_ON_BAT = "balanced";
# CPU
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
CPU_ENERGY_PERF_POLICY_ON_AC = "performance";
CPU_ENERGY_PERF_POLICY_ON_BAT = "balance_performance";
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_MIN_PERF_ON_AC = 0;
CPU_MAX_PERF_ON_AC = 100;
CPU_MIN_PERF_ON_BAT = 0;
CPU_MAX_PERF_ON_BAT = 40;
# NETWORKING
WIFI_PWR_ON_AC = "off";
WIFI_PWR_ON_BAT = "on";
# GRAPHICS
RADEON_DPM_STATE_ON_AC = "performance";
RADEON_DPM_STATE_ON_BAT = "battery";
RADEON_POWER_PROFILE_ON_AC = "default";
RADEON_POWER_PROFILE_ON_BAT = "default";
# IDK
TLP_DEFAULT_MODE = "BAT";
RUNTIME_PM_ON_AC = "auto";
RUNTIME_PM_ON_BAT = "auto";
USB_AUTOSUSPEND = 0;
};
};
};
};
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.polkit;
in {
options = { module.services.polkit.enable = mkEnableOption ""; };
config = mkIf cfg.enable { security.polkit.enable = true; };
}

View file

@ -1,11 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.printing;
in {
options = { module.services.printing.enable = mkEnableOption ""; };
config = mkIf cfg.enable { services.printing.enable = true; };
}

View file

@ -1,18 +0,0 @@
{ lib, config, username, ... }:
with lib;
let cfg = config.module.services.syncthing;
in {
options = { module.services.syncthing.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services.syncthing = {
enable = false;
user = username;
dataDir = "/home/${username}/.obsidian/obsidian";
configDir = "/home/${username}/.config/syncthing";
};
};
}

View file

@ -1,18 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.tailscale;
in {
options = { module.services.tailscale.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services = {
tailscale = { # OWN VPN NETWORK
enable = true;
useRoutingFeatures = "both";
};
};
};
}

View file

@ -1,23 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.xserver;
in {
options = { module.services.xserver.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
services = {
xserver = {
enable = true;
libinput.enable = true;
xkb = {
layout = "us";
variant = "qwerty";
options = "grp:caps_toggle";
};
};
};
};
}

View file

@ -1,19 +0,0 @@
{ lib, config, ... }:
with lib;
let cfg = config.module.services.zram;
in {
options = { module.services.zram.enable = mkEnableOption ""; };
config = mkIf cfg.enable {
zramSwap = {
enable = true;
priority = 1000;
algorithm = "zstd";
swapDevices = 1;
memoryPercent = 100;
};
};
}