From de6f6a76408debd31a1b4cf483efa60dcf172341 Mon Sep 17 00:00:00 2001 From: DarkGuibrine Date: Tue, 27 Jan 2026 16:59:40 -0300 Subject: [PATCH] =?UTF-8?q?Organiza=C3=A7ao=20e=20diminui=C3=A7ao=20de=20a?= =?UTF-8?q?rquivos=20desnessesarios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nixos/conf/GM/Pkgs/distrobox.nix | 14 - nixos/conf/GM/Pkgs/fontes.nix | 17 -- nixos/conf/GM/Pkgs/imp_pkgs.nix | 6 +- nixos/conf/GM/Pkgs/lact.nix | 13 - nixos/conf/GM/Pkgs/obs.nix | 19 -- nixos/conf/GM/Pkgs/pkgsconfig.nix | 89 ++++++ nixos/conf/GM/Pkgs/steam.nix | 20 -- nixos/conf/GM/cfgeral/alias.nix | 10 - nixos/conf/GM/cfgeral/audio.nix | 16 -- nixos/conf/GM/cfgeral/fish.nix | 15 -- nixos/conf/GM/cfgeral/flakeconfig.nix | 11 - nixos/conf/GM/cfgeral/flatpak.nix | 14 - nixos/conf/GM/cfgeral/idioma.nix | 26 -- nixos/conf/GM/cfgeral/impcf.nix | 18 -- nixos/conf/GM/cfgeral/udev.nix | 16 -- nixos/conf/GM/cfgeral/variables.nix | 7 - nixos/conf/GM/cfgeral/wireless.nix | 17 -- nixos/conf/GM/cfgeral/zstd.nix | 17 -- nixos/conf/GM/configs/cfsystem.nix | 67 +++++ nixos/conf/GM/configs/imp.nix | 9 + .../GM/{cfgeral => configs}/nixhelper.nix | 20 +- nixos/conf/GM/{cfgeral => configs}/nvidia.nix | 20 +- .../patchgames.nix => configs/patchs.nix} | 21 ++ nixos/conf/GM/imp.nix | 2 +- nixos/conf/HM/Fontes/fontes.nix | 14 - nixos/conf/HM/configs/cfhome.nix | 42 +++ nixos/conf/HM/git/git.nix | 9 - nixos/conf/HM/imp.nix | 7 +- nixos/conf/HM/pkgs/imp_pkgs.nix | 6 - nixos/conf/HM/shell/fish.nix | 14 - nixos/conf/HM/shell/starship.nix | 9 - nixos/configuration.nix | 2 +- nixos/flake.lock | 254 ++++++++---------- nixos/flake.nix | 10 +- nixos/imp.nix | 7 - 35 files changed, 385 insertions(+), 473 deletions(-) delete mode 100644 nixos/conf/GM/Pkgs/distrobox.nix delete mode 100644 nixos/conf/GM/Pkgs/fontes.nix delete mode 100644 nixos/conf/GM/Pkgs/lact.nix delete mode 100644 nixos/conf/GM/Pkgs/obs.nix create mode 100644 nixos/conf/GM/Pkgs/pkgsconfig.nix delete mode 100644 nixos/conf/GM/Pkgs/steam.nix delete mode 100644 nixos/conf/GM/cfgeral/alias.nix delete mode 100644 nixos/conf/GM/cfgeral/audio.nix delete mode 100644 nixos/conf/GM/cfgeral/fish.nix delete mode 100644 nixos/conf/GM/cfgeral/flakeconfig.nix delete mode 100644 nixos/conf/GM/cfgeral/flatpak.nix delete mode 100644 nixos/conf/GM/cfgeral/idioma.nix delete mode 100644 nixos/conf/GM/cfgeral/impcf.nix delete mode 100644 nixos/conf/GM/cfgeral/udev.nix delete mode 100644 nixos/conf/GM/cfgeral/variables.nix delete mode 100644 nixos/conf/GM/cfgeral/wireless.nix delete mode 100644 nixos/conf/GM/cfgeral/zstd.nix create mode 100644 nixos/conf/GM/configs/cfsystem.nix create mode 100644 nixos/conf/GM/configs/imp.nix rename nixos/conf/GM/{cfgeral => configs}/nixhelper.nix (69%) rename nixos/conf/GM/{cfgeral => configs}/nvidia.nix (70%) rename nixos/conf/GM/{cfgeral/patchgames.nix => configs/patchs.nix} (78%) delete mode 100644 nixos/conf/HM/Fontes/fontes.nix create mode 100644 nixos/conf/HM/configs/cfhome.nix delete mode 100644 nixos/conf/HM/git/git.nix delete mode 100644 nixos/conf/HM/pkgs/imp_pkgs.nix delete mode 100644 nixos/conf/HM/shell/fish.nix delete mode 100644 nixos/conf/HM/shell/starship.nix delete mode 100644 nixos/imp.nix diff --git a/nixos/conf/GM/Pkgs/distrobox.nix b/nixos/conf/GM/Pkgs/distrobox.nix deleted file mode 100644 index e092b90..0000000 --- a/nixos/conf/GM/Pkgs/distrobox.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## distro box - #virtualisation.podman = { - #enable = true; - #dockerCompat = true; - #}; - - users.users.gui.extraGroups = [ "docker" ]; - users.groups.docker.gid = 131; - virtualisation.docker = { - enable = true; - }; -} diff --git a/nixos/conf/GM/Pkgs/fontes.nix b/nixos/conf/GM/Pkgs/fontes.nix deleted file mode 100644 index a72c0c0..0000000 --- a/nixos/conf/GM/Pkgs/fontes.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - fonts.fontDir.enable = true; - fonts.fontconfig.enable = true; - fonts.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - nerd-fonts.ubuntu-mono - nerd-fonts.ubuntu-sans - nerd-fonts.dejavu-sans-mono - nerd-fonts.fira-code - nerd-fonts.overpass - noto-fonts - liberation_ttf - dejavu_fonts - ]; - -} diff --git a/nixos/conf/GM/Pkgs/imp_pkgs.nix b/nixos/conf/GM/Pkgs/imp_pkgs.nix index 4d1f0c3..18ead76 100644 --- a/nixos/conf/GM/Pkgs/imp_pkgs.nix +++ b/nixos/conf/GM/Pkgs/imp_pkgs.nix @@ -1,11 +1,7 @@ { config, lib, inputs, pkgs, ... }: { imports = [ - ./distrobox.nix + ./pkgsconfig.nix ./pkgs.nix - ./steam.nix - ./lact.nix - ./obs.nix - ./fontes.nix ]; } diff --git a/nixos/conf/GM/Pkgs/lact.nix b/nixos/conf/GM/Pkgs/lact.nix deleted file mode 100644 index 4335350..0000000 --- a/nixos/conf/GM/Pkgs/lact.nix +++ /dev/null @@ -1,13 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - environment.systemPackages = with pkgs; [lact]; - systemd.services.lact = { - description = "GPU Control Daemon"; - after = ["multi-user.target"]; - wantedBy = ["multi-user.target"]; - serviceConfig = { - ExecStart = "${pkgs.lact}/bin/lact daemon"; - }; - enable = true; - }; -} \ No newline at end of file diff --git a/nixos/conf/GM/Pkgs/obs.nix b/nixos/conf/GM/Pkgs/obs.nix deleted file mode 100644 index ee4b1e9..0000000 --- a/nixos/conf/GM/Pkgs/obs.nix +++ /dev/null @@ -1,19 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - programs.obs-studio = { - enable = true; - # optional Nvidia hardware acceleration - package = ( - pkgs.obs-studio.override { - cudaSupport = true; - } - ); - plugins = with pkgs.obs-studio-plugins; [ - wlrobs - obs-pipewire-audio-capture - obs-gstreamer - obs-vkcapture - ]; - #enableVirtualCamera = true; - }; -} diff --git a/nixos/conf/GM/Pkgs/pkgsconfig.nix b/nixos/conf/GM/Pkgs/pkgsconfig.nix new file mode 100644 index 0000000..18c0e8d --- /dev/null +++ b/nixos/conf/GM/Pkgs/pkgsconfig.nix @@ -0,0 +1,89 @@ +{ config, lib, inputs, pkgs, ... }: { + + + + ## configuraçao da steam + programs.steam = { + enable = true; + remotePlay.openFirewall = true; + dedicatedServer.openFirewall = true; + localNetworkGameTransfers.openFirewall = true; + }; + + nixpkgs.config.allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [ + "steam" + "steam-original" + "steam-unwrapped" + "steam-run" + ]; + programs = { + gamescope.enable = true; + gamemode.enable = true; + }; + + ## Configuraçoes do obs + + programs.obs-studio = { + enable = true; + # optional Nvidia hardware acceleration + package = ( + pkgs.obs-studio.override { + cudaSupport = true; + } + ); + plugins = with pkgs.obs-studio-plugins; [ + wlrobs + obs-pipewire-audio-capture + obs-gstreamer + obs-vkcapture + ]; + #enableVirtualCamera = true; + }; + + ## Configuraçoes do LACT + environment.systemPackages = with pkgs; [lact]; + systemd.services.lact = { + description = "GPU Control Daemon"; + after = ["multi-user.target"]; + wantedBy = ["multi-user.target"]; + serviceConfig = { + ExecStart = "${pkgs.lact}/bin/lact daemon"; + }; + enable = true; + }; + + ## Configuraçao de Docker + + #virtualisation.podman = { + #enable = true; + #dockerCompat = true; + #}; + + users.users.gui.extraGroups = [ "docker" ]; + users.groups.docker.gid = 131; + virtualisation.docker = { + enable = true; + }; + + ## Fontes + fonts.fontDir.enable = true; + fonts.fontconfig.enable = true; + fonts.packages = with pkgs; [ + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.ubuntu-sans + nerd-fonts.dejavu-sans-mono + nerd-fonts.fira-code + nerd-fonts.overpass + noto-fonts + liberation_ttf + dejavu_fonts + ]; + + ## OpenRGB + services.hardware.openrgb = { + enable = true; + motherboard = "amd"; + package = pkgs.openrgb-with-all-plugins; # enable all plugins + }; +} \ No newline at end of file diff --git a/nixos/conf/GM/Pkgs/steam.nix b/nixos/conf/GM/Pkgs/steam.nix deleted file mode 100644 index b013e15..0000000 --- a/nixos/conf/GM/Pkgs/steam.nix +++ /dev/null @@ -1,20 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - programs.steam = { - enable = true; - remotePlay.openFirewall = true; - dedicatedServer.openFirewall = true; - localNetworkGameTransfers.openFirewall = true; - }; - - nixpkgs.config.allowUnfreePredicate = pkg: lib.elem (lib.getName pkg) [ - "steam" - "steam-original" - "steam-unwrapped" - "steam-run" - ]; - programs = { - gamescope.enable = true; - gamemode.enable = true; - }; -} \ No newline at end of file diff --git a/nixos/conf/GM/cfgeral/alias.nix b/nixos/conf/GM/cfgeral/alias.nix deleted file mode 100644 index 8920bb3..0000000 --- a/nixos/conf/GM/cfgeral/alias.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - programs.fish.shellAliases = { - # upd = "sudo nix flake update --flake /etc/nixos && sudo nixos-rebuild switch --flake path:/etc/nixos#Alfa"; - upd = "nh home switch -a -u && nh os switch -a"; - updhome = "nh home switch -a -u"; - updsystem = "nh os switch -a -u"; - gitupdate = "git add . && git commit && git push origin main"; - }; -} \ No newline at end of file diff --git a/nixos/conf/GM/cfgeral/audio.nix b/nixos/conf/GM/cfgeral/audio.nix deleted file mode 100644 index 8e5ebc6..0000000 --- a/nixos/conf/GM/cfgeral/audio.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## Configuração de áudio com Pipewire (desativa PulseAudio) - services = { - pulseaudio.enable = false; - pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; - #jack.enable = true; # Descomente se usar aplicações JACK - }; - }; - security.rtkit.enable = true; - -} diff --git a/nixos/conf/GM/cfgeral/fish.nix b/nixos/conf/GM/cfgeral/fish.nix deleted file mode 100644 index 238889d..0000000 --- a/nixos/conf/GM/cfgeral/fish.nix +++ /dev/null @@ -1,15 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - programs.fish.enable = true; - - ## auto start fish com bash - programs.bash = { - interactiveShellInit = - '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] - then - shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" - exec ${pkgs.fish}/bin/fish $LOGIN_OPTION - fi ''; - }; - -} diff --git a/nixos/conf/GM/cfgeral/flakeconfig.nix b/nixos/conf/GM/cfgeral/flakeconfig.nix deleted file mode 100644 index 39c0bbc..0000000 --- a/nixos/conf/GM/cfgeral/flakeconfig.nix +++ /dev/null @@ -1,11 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - nix = { - ## ativar flakes - settings.experimental-features = ["nix-command" "flakes"]; - nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; - registry = lib.mapAttrs (_: value: {flake = value;}) (lib.filterAttrs (_: value: lib.isType "flake" value) inputs); - settings.flake-registry = ""; - }; - -} diff --git a/nixos/conf/GM/cfgeral/flatpak.nix b/nixos/conf/GM/cfgeral/flatpak.nix deleted file mode 100644 index e0eeedb..0000000 --- a/nixos/conf/GM/cfgeral/flatpak.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - services.flatpak = { - enable = true; - packages = [ - "org.vinegarhq.Sober" - ]; - update.auto = { - enable = true; - onCalendar = "weekly"; - }; - }; - -} diff --git a/nixos/conf/GM/cfgeral/idioma.nix b/nixos/conf/GM/cfgeral/idioma.nix deleted file mode 100644 index 51d18fe..0000000 --- a/nixos/conf/GM/cfgeral/idioma.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## Definir fuso horário - time.timeZone = "America/Bahia"; - - ## Configurações de idioma e localidade - i18n.defaultLocale = "pt_BR.UTF-8"; - i18n.extraLocaleSettings = { - LC_ADDRESS = "pt_BR.UTF-8"; - LC_IDENTIFICATION = "pt_BR.UTF-8"; - LC_MEASUREMENT = "pt_BR.UTF-8"; - LC_MONETARY = "pt_BR.UTF-8"; - LC_NAME = "pt_BR.UTF-8"; - LC_NUMERIC = "pt_BR.UTF-8"; - LC_PAPER = "pt_BR.UTF-8"; - LC_TELEPHONE = "pt_BR.UTF-8"; - LC_TIME = "pt_BR.UTF-8"; - }; - ## Configurar layout do teclado no X11 e console - services.xserver.xkb = { - layout = "br"; - variant = ""; - }; - console.keyMap = "br-abnt2"; - -} diff --git a/nixos/conf/GM/cfgeral/impcf.nix b/nixos/conf/GM/cfgeral/impcf.nix deleted file mode 100644 index f02dea5..0000000 --- a/nixos/conf/GM/cfgeral/impcf.nix +++ /dev/null @@ -1,18 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - imports = [ - ./alias.nix - ./audio.nix - ./idioma.nix - ./nixhelper.nix - ./flakeconfig.nix - ./flatpak.nix - ./nvidia.nix - ./variables.nix - ./wireless.nix - ./zstd.nix - ./fish.nix - ./udev.nix - ./patchgames.nix - ]; -} diff --git a/nixos/conf/GM/cfgeral/udev.nix b/nixos/conf/GM/cfgeral/udev.nix deleted file mode 100644 index 59aae7b..0000000 --- a/nixos/conf/GM/cfgeral/udev.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - # OpenRGB setup - services.hardware.openrgb = { - enable = true; - motherboard = "amd"; - package = pkgs.openrgb-with-all-plugins; # enable all plugins - }; - services = { - udev.enable = true; - udev.extraRules = '' - KERNEL=="hidraw*", ATTRS{idVendor}=="1d57", ATTRS{idProduct}=="fa60", MODE="0666", SYMLINK+="xenta-mouse-hidraw" - KERNEL=="hidraw*", ATTRS{idVendor}=="1d57", ATTRS{idProduct}=="fa55", MODE="0666", SYMLINK+="xenta-mouse-hidraw" - ''; - }; -} diff --git a/nixos/conf/GM/cfgeral/variables.nix b/nixos/conf/GM/cfgeral/variables.nix deleted file mode 100644 index 865b37d..0000000 --- a/nixos/conf/GM/cfgeral/variables.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - environment.variables = { - __GL_SHADER_DISK_CACHE_SIZE = "12000000000"; - VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; - }; -} diff --git a/nixos/conf/GM/cfgeral/wireless.nix b/nixos/conf/GM/cfgeral/wireless.nix deleted file mode 100644 index 17dce0d..0000000 --- a/nixos/conf/GM/cfgeral/wireless.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## Configuração da internet - networking = { - networkmanager.enable = true; - interfaces.enp9s0.wakeOnLan.enable = true; - - firewall.allowedTCPPorts = [ ]; - firewall.allowedUDPPorts = [ - - ]; - }; - - ## Ativar Bluetooth - hardware.bluetooth.enable = true; - -} diff --git a/nixos/conf/GM/cfgeral/zstd.nix b/nixos/conf/GM/cfgeral/zstd.nix deleted file mode 100644 index 1e175a2..0000000 --- a/nixos/conf/GM/cfgeral/zstd.nix +++ /dev/null @@ -1,17 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## compressao brtfs - fileSystems = { - "/" = { - options = [ "compress=zstd:3" ]; - }; - }; - - ## zram - zramSwap = { - enable = true; - memoryPercent = 40; - algorithm = "zstd"; - }; - -} diff --git a/nixos/conf/GM/configs/cfsystem.nix b/nixos/conf/GM/configs/cfsystem.nix new file mode 100644 index 0000000..81bd2c8 --- /dev/null +++ b/nixos/conf/GM/configs/cfsystem.nix @@ -0,0 +1,67 @@ +{ config, lib, inputs, pkgs, ... }: { + + ## Configuração da internet + networking = { + networkmanager.enable = true; + interfaces.enp9s0.wakeOnLan.enable = true; + firewall.allowedTCPPorts = [ ]; + firewall.allowedUDPPorts = [ + ]; + }; + ## Ativar Bluetooth + hardware.bluetooth.enable = true; + + ## Configuração de áudio + services = { + pulseaudio.enable = false; + pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + #jack.enable = true; # Descomente se usar aplicações JACK + }; + }; + security.rtkit.enable = true; + + ## Configuraçao de idioma + ## Definir fuso horário + time.timeZone = "America/Bahia"; + ## Configurações de idioma e localidade + i18n.defaultLocale = "pt_BR.UTF-8"; + i18n.extraLocaleSettings = { + LC_ADDRESS = "pt_BR.UTF-8"; + LC_IDENTIFICATION = "pt_BR.UTF-8"; + LC_MEASUREMENT = "pt_BR.UTF-8"; + LC_MONETARY = "pt_BR.UTF-8"; + LC_NAME = "pt_BR.UTF-8"; + LC_NUMERIC = "pt_BR.UTF-8"; + LC_PAPER = "pt_BR.UTF-8"; + LC_TELEPHONE = "pt_BR.UTF-8"; + LC_TIME = "pt_BR.UTF-8"; + }; + ## Configurar layout do teclado no X11 e console + services.xserver.xkb = { + layout = "br"; + variant = ""; + }; + console.keyMap = "br-abnt2"; + + ## Alias do fish + programs.fish.shellAliases = { + # upd = "sudo nix flake update --flake /etc/nixos && sudo nixos-rebuild switch --flake path:/etc/nixos#Alfa"; + upd = "nh home switch -a -u && nh os switch -a"; + gitupdate = "git add . && git commit && git push origin main"; + }; + + ## Config do fish + programs.fish.enable = true; + programs.bash = { + interactiveShellInit = + '' if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]] + then + shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION="" + exec ${pkgs.fish}/bin/fish $LOGIN_OPTION + fi ''; + }; +} diff --git a/nixos/conf/GM/configs/imp.nix b/nixos/conf/GM/configs/imp.nix new file mode 100644 index 0000000..de33a69 --- /dev/null +++ b/nixos/conf/GM/configs/imp.nix @@ -0,0 +1,9 @@ +{ config, lib, inputs, pkgs, ... }: { + + imports = [ + ./cfsystem.nix + ./nixhelper.nix + ./nvidia.nix + ./patchs.nix + ]; +} diff --git a/nixos/conf/GM/cfgeral/nixhelper.nix b/nixos/conf/GM/configs/nixhelper.nix similarity index 69% rename from nixos/conf/GM/cfgeral/nixhelper.nix rename to nixos/conf/GM/configs/nixhelper.nix index 4aa7507..43469a2 100644 --- a/nixos/conf/GM/cfgeral/nixhelper.nix +++ b/nixos/conf/GM/configs/nixhelper.nix @@ -18,6 +18,9 @@ enable = true; binfmt = true; }; + ## Cache + ccache.enable = true; + ccache.cacheDir = "/var/cache/ccache"; }; ## Configuração do gerenciador nix @@ -32,14 +35,23 @@ auto-optimise-store = true; extra-sandbox-paths = [ "/var/cache/ccache" ]; - ## cache kernel + + ## ativaçao do flakes + settings.experimental-features = ["nix-command" "flakes"]; + nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry; + registry = lib.mapAttrs (_: value: {flake = value;}) (lib.filterAttrs (_: value: lib.isType "flake" value) inputs); + settings.flake-registry = ""; + + ## cache kernel substituters = [ "https://attic.xuyh0120.win/lantian" ]; trusted-public-keys = [ "lantian:EeAUQ+W+6r7EtwnmYjeVwx5kOGEBpjlBfPlzGlTNvHc=" ]; }; }; - programs = { - ccache.enable = true; - ccache.cacheDir = "/var/cache/ccache"; + + services = { + flatpak = { + enable = true; + }; }; } diff --git a/nixos/conf/GM/cfgeral/nvidia.nix b/nixos/conf/GM/configs/nvidia.nix similarity index 70% rename from nixos/conf/GM/cfgeral/nvidia.nix rename to nixos/conf/GM/configs/nvidia.nix index 92c512e..cbd6f3e 100644 --- a/nixos/conf/GM/cfgeral/nvidia.nix +++ b/nixos/conf/GM/configs/nvidia.nix @@ -1,5 +1,15 @@ { config, lib, inputs, pkgs, ... }: { + + ## Driver da nvidia proprietario + services.xserver.videoDrivers = [ "nvidia" ]; + hardware = { + graphics.enable = true; + nvidia.open = false; ## Se sua placa for pascal pra cima troque isso para true + }; + + ## Teste sobre o nvk nao recomendo usar + #services.xserver.videoDrivers = [ "nouveau" ]; #hardware.graphics = { # enable = true; @@ -13,14 +23,4 @@ # MESA_VK_DRIVER_OVERRIDE = "nvk"; # VK_ICD_FILENAMES = "/run/opengl-driver/share/vulkan/icd.d/nouveau_icd.x86_64.json"; #}; - - - services.xserver.videoDrivers = [ "nvidia" ]; - hardware = { - graphics.enable = true; - nvidia.open = false; - #nvidia.package = config.boot.kernelPackages.nvidiaPackages.production; - #nvidia.package = config.boot.kernelPackages.nvidiaPackages.legacy_580; - }; - #chaotic.mesa-git.enable = true; } diff --git a/nixos/conf/GM/cfgeral/patchgames.nix b/nixos/conf/GM/configs/patchs.nix similarity index 78% rename from nixos/conf/GM/cfgeral/patchgames.nix rename to nixos/conf/GM/configs/patchs.nix index 7941da4..6b98d6d 100644 --- a/nixos/conf/GM/cfgeral/patchgames.nix +++ b/nixos/conf/GM/configs/patchs.nix @@ -1,5 +1,12 @@ { config, lib, inputs, pkgs, ... }: { + ## Variaveis de ambiente contendo o aumento de cache para placas da nvidia + environment.variables = { + __GL_SHADER_DISK_CACHE_SIZE = "12000000000"; + VK_LAYER_PATH = "${pkgs.vulkan-validation-layers}/share/vulkan/explicit_layer.d"; + }; + + ## Configuraçoes de boot para otimzar o kernel e alguns patchs para nvidia boot = { modprobeConfig.enable = true; kernelModules = [ "tcp_bbr" ]; @@ -27,6 +34,7 @@ ]; }; + ## Otimizaçao do Udev para placas de Video da Nvidia udev = { enable = true; extraRules = '' @@ -78,6 +86,19 @@ ''; }; + ## sistema de compressao compressao brtfs + fileSystems = { + "/" = { + options = [ "compress=zstd:3" ]; + }; + }; + + ## confiuraçao da zram + zramSwap = { + enable = true; + memoryPercent = 40; + algorithm = "zstd"; + }; } diff --git a/nixos/conf/GM/imp.nix b/nixos/conf/GM/imp.nix index 2204ea4..dcf9c4b 100644 --- a/nixos/conf/GM/imp.nix +++ b/nixos/conf/GM/imp.nix @@ -1,7 +1,7 @@ { config, lib, inputs, pkgs, ... }: { imports = [ - ./cfgeral/impcf.nix + ./configs/imp.nix ./DE/impde.nix ./Pkgs/imp_pkgs.nix ]; diff --git a/nixos/conf/HM/Fontes/fontes.nix b/nixos/conf/HM/Fontes/fontes.nix deleted file mode 100644 index 409a151..0000000 --- a/nixos/conf/HM/Fontes/fontes.nix +++ /dev/null @@ -1,14 +0,0 @@ -{config, pkgs, ...}: { -fonts.fontconfig.enable = true; -home.packages = with pkgs; [ - nerd-fonts.jetbrains-mono - nerd-fonts.ubuntu-mono - nerd-fonts.ubuntu-sans - nerd-fonts.dejavu-sans-mono - nerd-fonts.fira-code - nerd-fonts.overpass - noto-fonts - liberation_ttf - dejavu_fonts -]; -} \ No newline at end of file diff --git a/nixos/conf/HM/configs/cfhome.nix b/nixos/conf/HM/configs/cfhome.nix new file mode 100644 index 0000000..f067236 --- /dev/null +++ b/nixos/conf/HM/configs/cfhome.nix @@ -0,0 +1,42 @@ +{config, pkgs, ...}: { + + ## starship + programs.starship = { + enable = true; + settings = lib.importTOML "${config.programs.starship.package}/share/starship/presets/nerd-font-symbols.toml"; + enableFishIntegration = true; + }; + + ## Configuraçao Git + programs.git.settings = { + enable = true; + user.email = "darkgui@protonmail.com"; + user.name = "DarkGui"; + credential.helper = "store"; + }; + + ## Pacotes extras + fonts.fontconfig.enable = true; + home.packages = with pkgs; [ + + ## Fish + fishPlugins.done + fishPlugins.fzf-fish + fishPlugins.forgit + fishPlugins.hydro + fzf + fishPlugins.grc + grc + + ## Fontes + nerd-fonts.jetbrains-mono + nerd-fonts.ubuntu-mono + nerd-fonts.ubuntu-sans + nerd-fonts.dejavu-sans-mono + nerd-fonts.fira-code + nerd-fonts.overpass + noto-fonts + liberation_ttf + dejavu_fonts + ]; +} \ No newline at end of file diff --git a/nixos/conf/HM/git/git.nix b/nixos/conf/HM/git/git.nix deleted file mode 100644 index 1a27100..0000000 --- a/nixos/conf/HM/git/git.nix +++ /dev/null @@ -1,9 +0,0 @@ -{pkgs, config, lib, ...}: { - - programs.git.settings = { - enable = true; - user.email = "darkgui@protonmail.com"; - user.name = "DarkGui"; - credential.helper = "store"; - }; -} \ No newline at end of file diff --git a/nixos/conf/HM/imp.nix b/nixos/conf/HM/imp.nix index 47d7f9d..1b6b10a 100644 --- a/nixos/conf/HM/imp.nix +++ b/nixos/conf/HM/imp.nix @@ -1,11 +1,8 @@ { config, lib, inputs, pkgs, ... }: { imports = [ - ./Fontes/fontes.nix - ./git/git.nix + ./config/cfhome.nix ./kitty/kitty.nix - ./pkgs/imp_pkgs.nix - ./shell/fish.nix - ./shell/starship.nix + ./pkgs/pkgs.nix ]; } diff --git a/nixos/conf/HM/pkgs/imp_pkgs.nix b/nixos/conf/HM/pkgs/imp_pkgs.nix deleted file mode 100644 index 3c0150d..0000000 --- a/nixos/conf/HM/pkgs/imp_pkgs.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - imports = [ - ./pkgs.nix - ]; -} diff --git a/nixos/conf/HM/shell/fish.nix b/nixos/conf/HM/shell/fish.nix deleted file mode 100644 index 07e8410..0000000 --- a/nixos/conf/HM/shell/fish.nix +++ /dev/null @@ -1,14 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - ## config fish - home.packages = with pkgs; [ - fishPlugins.done - fishPlugins.fzf-fish - fishPlugins.forgit - fishPlugins.hydro - fzf - fishPlugins.grc - grc - ]; - -} diff --git a/nixos/conf/HM/shell/starship.nix b/nixos/conf/HM/shell/starship.nix deleted file mode 100644 index 05e97d8..0000000 --- a/nixos/conf/HM/shell/starship.nix +++ /dev/null @@ -1,9 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - programs.starship = { - enable = true; - settings = lib.importTOML "${config.programs.starship.package}/share/starship/presets/nerd-font-symbols.toml"; - enableFishIntegration = true; - }; - -} diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 29c8201..bd0a903 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -3,7 +3,7 @@ imports = [ # Importa a configuração de hardware detectada ./hardware-configuration.nix - ./imp.nix + ./conf/GM/imp.nix ]; ## Configuração do bootloader diff --git a/nixos/flake.lock b/nixos/flake.lock index c7b579e..b49ea61 100644 --- a/nixos/flake.lock +++ b/nixos/flake.lock @@ -1,13 +1,33 @@ { "nodes": { + "aagl": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1767520119, + "narHash": "sha256-+OmNQLA9Fv5WBaxYHlPghS9XmnYWDaLt+AatCGhG+hc=", + "owner": "ezKEa", + "repo": "aagl-gtk-on-nix", + "rev": "5720d3282844b6b23b26dfac075a5f1f58ea8844", + "type": "github" + }, + "original": { + "owner": "ezKEa", + "repo": "aagl-gtk-on-nix", + "type": "github" + } + }, "cachyos-kernel": { "flake": false, "locked": { - "lastModified": 1769201405, - "narHash": "sha256-k/KQL7J9ZnLlF28E6ywGpfo5dxkuxCcEtJ/XEZDTw3M=", + "lastModified": 1769435645, + "narHash": "sha256-xxIqw5x8U+13ya2BUcwmAW6BdpCpMhrMTn6Pd0bzocE=", "owner": "CachyOS", "repo": "linux-cachyos", - "rev": "ff53672af48a106f52857d62c9275b165cc452ef", + "rev": "e8675eeb9b48a23167b3e43f84e3be76e321935e", "type": "github" }, "original": { @@ -19,11 +39,11 @@ "cachyos-kernel-patches": { "flake": false, "locked": { - "lastModified": 1769199354, - "narHash": "sha256-y1DKMryOr1w4xcZnDkaZjvENIPmr3j/YB4Srtfd3I2Y=", + "lastModified": 1769420040, + "narHash": "sha256-OsO2Pi2oDE2hZoxCJ40mx9/wag9XXQ5FkcwIUcJN4Go=", "owner": "CachyOS", "repo": "kernel-patches", - "rev": "c8b990198baf3c34b64e4e5c5ffeb7c068eede1a", + "rev": "d2f1d070c0303b3b2bcb71df73c623a274258e22", "type": "github" }, "original": { @@ -32,49 +52,23 @@ "type": "github" } }, - "dms": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ], - "quickshell": "quickshell" - }, - "locked": { - "lastModified": 1768575133, - "narHash": "sha256-P//moH3z9r4PXirTzXVsccQINsK5AIlF9RWOBwK3vLc=", - "owner": "AvengeMedia", - "repo": "DankMaterialShell", - "rev": "a7cdb39b0b89b9af86160ad4e847a7d14ea44512", - "type": "github" - }, - "original": { - "owner": "AvengeMedia", - "ref": "stable", - "repo": "DankMaterialShell", - "type": "github" - } - }, - "dms-plugin-registry": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1769389686, - "narHash": "sha256-Fpj3161QZHcTcTd71AVlyMMwPs8Y6q7idVGRVQj0enQ=", - "owner": "AvengeMedia", - "repo": "dms-plugin-registry", - "rev": "88a1f4e7fa3b14d4617a57140e944fbc572d106b", - "type": "github" - }, - "original": { - "owner": "AvengeMedia", - "repo": "dms-plugin-registry", - "type": "github" - } - }, "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1761588595, + "narHash": "sha256-XKUZz9zewJNUj46b4AJdiRZJAvSZ0Dqj2BNfXvFlJC4=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "f387cd2afec9419c8ee37694406ca490c3f34ee5", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-compat_2": { "flake": false, "locked": { "lastModified": 1767039857, @@ -212,16 +206,16 @@ "inputs": { "cachyos-kernel": "cachyos-kernel", "cachyos-kernel-patches": "cachyos-kernel-patches", - "flake-compat": "flake-compat", + "flake-compat": "flake-compat_2", "flake-parts": "flake-parts", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs_3" }, "locked": { - "lastModified": 1769363279, - "narHash": "sha256-XJCuB8GWkFLRFBR6GQoxRB9/lobB45ERp0JN0Lo2nvs=", + "lastModified": 1769450230, + "narHash": "sha256-PQXy2jBktNh4akTrykZm/iFP6Z1oyhN1FNrrspcto34=", "owner": "xddxdd", "repo": "nix-cachyos-kernel", - "rev": "4aa98db78c1d663c3dad59775e95ad93fe58a844", + "rev": "5a69e7afa1281df9df8965778a81083603a1e518", "type": "github" }, "original": { @@ -231,33 +225,18 @@ "type": "github" } }, - "nix-flatpak": { - "locked": { - "lastModified": 1768656715, - "narHash": "sha256-Sbh037scxKFm7xL0ahgSCw+X2/5ZKeOwI2clqrYr9j4=", - "owner": "gmodena", - "repo": "nix-flatpak", - "rev": "123fe29340a5b8671367055b75a6e7c320d6f89a", - "type": "github" - }, - "original": { - "owner": "gmodena", - "repo": "nix-flatpak", - "type": "github" - } - }, "nixpkgs": { "locked": { - "lastModified": 1769300497, - "narHash": "sha256-W7NbQnQGqUPRnpHOlLXk3g52TSQDkFVzhax9YNv9K+U=", - "owner": "NixOS", + "lastModified": 1764242076, + "narHash": "sha256-sKoIWfnijJ0+9e4wRvIgm/HgE27bzwQxcEmo2J/gNpI=", + "owner": "nixos", "repo": "nixpkgs", - "rev": "60f9d776547020ff3be5a2cfbd0a457fddd88ecc", + "rev": "2fad6eac6077f03fe109c4d4eb171cf96791faa4", "type": "github" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable-small", + "owner": "nixos", + "ref": "nixos-unstable", "repo": "nixpkgs", "type": "github" } @@ -279,11 +258,11 @@ }, "nixpkgs-master": { "locked": { - "lastModified": 1769455088, - "narHash": "sha256-gycQwY8GaStGq3Jr3qTXk2jfOFeHLeK7lC2uAe3GTDA=", + "lastModified": 1769523065, + "narHash": "sha256-4ogIJZxEz14BMCNkw2q0aNcrg2opGWXIBq/KIXjFs+M=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ffccca4e4faec5e1b2e4631b34e2a52fece182a6", + "rev": "f985c6b3fcd1b33b20bc1a3e1f13b4bd8ef8f626", "type": "github" }, "original": { @@ -310,11 +289,43 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1769421245, - "narHash": "sha256-m5QLKjpdhbDrhyrUbEm5Haq3lqE5Z6xh2tab5vTHUTo=", + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1769434638, + "narHash": "sha256-4NVXUmdbTTZa13qX1MFCVbPxiMT1nzF7OnuRbPMk0lI=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "9c2822d7024c032e66000a8b8a47e91b4e63ffc8", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable-small", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1769433173, + "narHash": "sha256-Gf1dFYgD344WZ3q0LPlRoWaNdNQq8kSBDLEWulRQSEs=", "owner": "nixos", "repo": "nixpkgs", - "rev": "5b265bda51b42a2a85af0a543c3e57b778b01b7d", + "rev": "13b0f9e6ac78abbbb736c635d87845c4f4bee51b", "type": "github" }, "original": { @@ -324,7 +335,7 @@ "type": "github" } }, - "nixpkgs_3": { + "nixpkgs_5": { "locked": { "lastModified": 1769170682, "narHash": "sha256-oMmN1lVQU0F0W2k6OI3bgdzp2YOHWYUAw79qzDSjenU=", @@ -348,11 +359,11 @@ ] }, "locked": { - "lastModified": 1769455063, - "narHash": "sha256-xk3qMSuc+GvcKU8pscp6de+SGt289H2Gz/RI8jKocHY=", + "lastModified": 1769510829, + "narHash": "sha256-Zce7RVaNRKmLXC5iTceP4mqv8VvWOPX2UEwvYJ/BJlQ=", "owner": "nix-community", "repo": "NUR", - "rev": "2ac96986b5b36dd78b97ca7b2eee858064846994", + "rev": "22087f41186c3a3ef09a60d5518f5c56f91a9814", "type": "github" }, "original": { @@ -364,7 +375,7 @@ "preload-ng": { "inputs": { "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_5" }, "locked": { "lastModified": 1768356181, @@ -380,65 +391,38 @@ "type": "github" } }, - "quickshell": { - "inputs": { - "nixpkgs": [ - "dms", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1766725085, - "narHash": "sha256-O2aMFdDUYJazFrlwL7aSIHbUSEm3ADVZjmf41uBJfHs=", - "ref": "refs/heads/master", - "rev": "41828c4180fb921df7992a5405f5ff05d2ac2fff", - "revCount": 715, - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - }, - "original": { - "rev": "41828c4180fb921df7992a5405f5ff05d2ac2fff", - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - } - }, - "quickshell_2": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1768985439, - "narHash": "sha256-qkU4r+l+UPz4dutMMRZSin64HuVZkEv9iFpu9yMWVY0=", - "ref": "refs/heads/master", - "rev": "191085a8821b35680bba16ce5411fc9dbe912237", - "revCount": 731, - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - }, - "original": { - "type": "git", - "url": "https://git.outfoxxed.me/quickshell/quickshell" - } - }, "root": { "inputs": { - "dms": "dms", - "dms-plugin-registry": "dms-plugin-registry", + "aagl": "aagl", "hayase": "hayase", "home-manager": "home-manager", "nix-cachyos-kernel": "nix-cachyos-kernel", - "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_2", + "nixpkgs": "nixpkgs_4", "nixpkgs-master": "nixpkgs-master", "nixpkgs-stable": "nixpkgs-stable", "nur": "nur", "preload-ng": "preload-ng", - "quickshell": "quickshell_2", "zen-browser": "zen-browser" } }, + "rust-overlay": { + "inputs": { + "nixpkgs": "nixpkgs_2" + }, + "locked": { + "lastModified": 1764470739, + "narHash": "sha256-sa9f81B1dWO16QtgDTWHX8DQbiHKzHndpaunY5EQtwE=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "3bfa664055e1a09c6aedab5533c5fc8d6ca5741a", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, "systems": { "locked": { "lastModified": 1681028828, @@ -462,11 +446,11 @@ ] }, "locked": { - "lastModified": 1769431876, - "narHash": "sha256-FnOW+ulwocxfYGVKV2H/7MlSbn52+hfX9oaRR6FClZ4=", + "lastModified": 1769491693, + "narHash": "sha256-bbqeCDML1yXI6kpy8q8BshKRV1szk3xV0StAbzw4Z+o=", "owner": "0xc000022070", "repo": "zen-browser-flake", - "rev": "d5ef79d18dca7617aefe511db8267d47f7cf953f", + "rev": "708e0f10aba5de7d0f55883d06fa08aa6a7cd462", "type": "github" }, "original": { diff --git a/nixos/flake.nix b/nixos/flake.nix index d8ebd19..f76151a 100644 --- a/nixos/flake.nix +++ b/nixos/flake.nix @@ -5,10 +5,10 @@ nixpkgs.url = "github:nixos/nixpkgs?ref=nixpkgs-unstable"; nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-25.11"; nixpkgs-master.url = "github:nixos/nixpkgs"; - nix-flatpak.url = "github:gmodena/nix-flatpak"; preload-ng.url = "github:miguel-b-p/preload-ng"; #chaotic.url = "github:lonerOrz/nyx-loner"; nix-cachyos-kernel.url = "github:xddxdd/nix-cachyos-kernel/release"; + aagl.url = "github:ezKEa/aagl-gtk-on-nix"; home-manager = { url = "github:nix-community/home-manager/"; inputs.nixpkgs.follows = "nixpkgs"; @@ -26,7 +26,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - outputs = {self ,nixpkgs ,nixpkgs-stable ,nixpkgs-master ,home-manager ,zen-browser ,nur ,hayase ,nix-flatpak ,preload-ng ,nix-cachyos-kernel , ...} @ inputs: { + outputs = {self ,nixpkgs ,nixpkgs-stable ,nixpkgs-master ,home-manager ,zen-browser ,nur ,hayase ,preload-ng ,nix-cachyos-kernel ,aagl , ...} @ inputs: { nixosConfigurations = { "Alfa" = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; @@ -34,10 +34,14 @@ modules = [ ./configuration.nix nur.modules.nixos.default - nix-flatpak.nixosModules.nix-flatpak preload-ng.nixosModules.default {services.preload-ng.enable = true;} #chaotic.nixosModules.default + {imports = [ aagl.nixosModules.default ]; + nix.settings = aagl.nixConfig; + programs.anime-game-launcher.enable = true; + programs.sleepy-launcher.enable = true; + } ]; }; }; diff --git a/nixos/imp.nix b/nixos/imp.nix deleted file mode 100644 index c26642a..0000000 --- a/nixos/imp.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ config, lib, inputs, pkgs, ... }: { - - imports = [ - ./hardware-configuration.nix - ./conf/GM/imp.nix - ]; -}