chore: format all files to nixpkgs standards

This commit is contained in:
Alexandre Cavalheiro 2024-01-16 11:33:01 -03:00
parent c089af45ef
commit 965ac78482
Signed by: wizardlink
GPG key ID: A5767B54367CFBDF
12 changed files with 152 additions and 121 deletions

View file

@ -23,34 +23,36 @@
custom-neovim.url = "github:wizardlink/neovim"; custom-neovim.url = "github:wizardlink/neovim";
}; };
outputs = { outputs =
self, { self
nixpkgs, , nixpkgs
home-manager, , home-manager
hyprland, , hyprland
... , ...
}@inputs: { }@inputs: {
nixosConfigurations.nixos = nixosConfigurations.nixos =
let let
system = "x86_64-linux"; system = "x86_64-linux";
modules = [ modules = [
./nixos.nix ./nixos.nix
hyprland.nixosModules.default hyprland.nixosModules.default
{ {
programs.hyprland.enable = true; programs.hyprland.enable = true;
} }
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs; home-manager.extraSpecialArgs = inputs;
home-manager.users.wizardlink = import ./home-manager.nix; home-manager.users.wizardlink = import ./home-manager.nix;
} }
]; ];
in in
nixpkgs.lib.nixosSystem { inherit system modules; }; nixpkgs.lib.nixosSystem { inherit system modules; };
};
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixpkgs-fmt;
};
} }

View file

@ -5,7 +5,8 @@
{ {
imports = imports =
[ (modulesPath + "/installer/scan/not-detected.nix") [
(modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ];
@ -14,27 +15,32 @@
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" =
{ device = "/dev/disk/by-uuid/65e4c115-aff0-4c0e-8799-7309a25ecab6"; {
device = "/dev/disk/by-uuid/65e4c115-aff0-4c0e-8799-7309a25ecab6";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/2EFE-3A26"; {
device = "/dev/disk/by-uuid/2EFE-3A26";
fsType = "vfat"; fsType = "vfat";
}; };
fileSystems."/mnt/ssd" = fileSystems."/mnt/ssd" =
{ device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad"; {
device = "/dev/disk/by-uuid/f27f2224-d351-46fd-89f5-991de36166ad";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/mnt/internal" = fileSystems."/mnt/internal" =
{ device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc"; {
device = "/dev/disk/by-uuid/b8541c0d-9146-4388-b217-431f196957cc";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/mnt/media" = fileSystems."/mnt/media" =
{ device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434"; {
device = "/dev/disk/by-uuid/52c17b8b-46c1-4870-b86c-c3b9f4bd4434";
fsType = "ext4"; fsType = "ext4";
}; };

View file

@ -39,7 +39,7 @@
# or # or
# #
# /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh # /etc/profiles/per-user/wizardlink/etc/profile.d/hm-session-vars.sh
# if you don't want to manage your shell through Home Manager. # if you don't want to manage your shell through Home Manager.
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
NIXOS_OZONE_WL = "1"; NIXOS_OZONE_WL = "1";
@ -129,6 +129,27 @@
libsForQt5.qtwayland libsForQt5.qtwayland
qt6Packages.qtstyleplugin-kvantum qt6Packages.qtstyleplugin-kvantum
qt6Packages.qtwayland qt6Packages.qtwayland
# Create an FHS environment using the command `fhs`, enabling the execution of non-NixOS packages in NixOS!
(
let base = pkgs.appimageTools.defaultFhsEnvArgs; in
pkgs.buildFHSUserEnv (base // {
name = "fhs";
targetPkgs = pkgs: (
# pkgs.buildFHSUserEnv provides only a minimal FHS environment,
# lacking many basic packages needed by most software.
# Therefore, we need to add them manually.
#
# pkgs.appimageTools provides basic packages required by most software.
(base.targetPkgs pkgs) ++ (with pkgs; [
nodejs
])
);
profile = "export FHS=1";
runScript = "bash";
extraOutputsToInstall = [ "dev" ];
})
)
]; ];
# #

View file

@ -10,7 +10,8 @@
## ##
imports = imports =
[ # Include the results of the hardware scan. [
# Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
# Include service configuration # Include service configuration
./services/caddy.nix ./services/caddy.nix
@ -74,15 +75,15 @@
# Open ports in the firewall. # Open ports in the firewall.
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ allowedTCPPorts = [
80 # HTTP 80 # HTTP
11753 # OpenRCT2 11753 # OpenRCT2
443 # SSL 443 # SSL
]; ];
allowedUDPPorts = [ allowedUDPPorts = [
2626 # Dolphin emulator 2626 # Dolphin emulator
11753 # OpenRCT2 11753 # OpenRCT2
27015 # Source games 27015 # Source games
]; ];
allowedTCPPortRanges = [ allowedTCPPortRanges = [
@ -141,12 +142,12 @@
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
services.openssh = { services.openssh = {
enable = true; enable = true;
settings = { settings = {
PasswordAuthentication = false; PasswordAuthentication = false;
PermitRootLogin = "no"; PermitRootLogin = "no";
}; };
}; };
## ##
@ -287,7 +288,7 @@
## Hardware specific ## Hardware specific
openrazer-daemon # Razor products back-end openrazer-daemon # Razor products back-end
polychromatic # and it's Front-end polychromatic # and it's Front-end
]; ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are

View file

@ -33,11 +33,11 @@
fish_prompt.body = '' fish_prompt.body = ''
set_color CC241D set_color CC241D
echo '&' (set_color normal) echo '&' (set_color normal)
''; '';
fzf_edit.body = '' fzf_edit.body = ''
fzf --multi --bind 'enter:become(nvim {+})' fzf --multi --bind 'enter:become(nvim {+})'
''; '';
}; };
}; };
} }

View file

@ -27,7 +27,7 @@
extraConfig = { extraConfig = {
core = { core = {
# Set the editor to be used by GIT # Set the editor to be used by GIT
editor = "nvim"; editor = "nvim";
# Custom .gitignore # Custom .gitignore
@ -38,13 +38,13 @@
}; };
color = { color = {
# Use colors in GIT commmands. # Use colors in GIT commmands.
ui = "auto"; ui = "auto";
}; };
commit = { commit = {
# https://help.github.com/articles/signing-commits-using-gpg/ # https://help.github.com/articles/signing-commits-using-gpg/
gpgsign = true; gpgsign = true;
}; };
tag = { tag = {

View file

@ -27,7 +27,7 @@
cpu_mhz = true; cpu_mhz = true;
cpu_load_change = true; cpu_load_change = true;
cpu_load_value = [ 60 90 ]; cpu_load_value = [ 60 90 ];
cpu_load_color= [ "39F900" "FDFD09" "B22222" ]; cpu_load_color = [ "39F900" "FDFD09" "B22222" ];
# IO Statistics # IO Statistics
@ -48,7 +48,7 @@
fps_color = [ "B22222" "FDFD09" "39F900" ]; fps_color = [ "B22222" "FDFD09" "39F900" ];
frametime = true; frametime = true;
frame_timing = true; # Display graphs frame_timing = true; # Display graphs
histogram = true; # ^ histogram = true; # ^
# Show whether gamemode is enabled for the application. # Show whether gamemode is enabled for the application.
gamemode = true; gamemode = true;
@ -57,7 +57,7 @@
no_display = true; no_display = true;
# Where to output log files. # Where to output log files.
output_folder=/home/wizardlink/.config/MangoHud; output_folder = /home/wizardlink/.config/MangoHud;
}; };
}; };
} }

View file

@ -1,7 +1,7 @@
{ pkgs, ... }: { pkgs, ... }:
{ {
programs.obs-studio = programs.obs-studio =
{ {
enable = true; enable = true;
plugins = with pkgs.obs-studio-plugins; [ plugins = with pkgs.obs-studio-plugins; [

View file

@ -4,8 +4,8 @@
enable = true; enable = true;
package = (pkgs.waybar.overrideAttrs (oldAttrs: { package = (pkgs.waybar.overrideAttrs (oldAttrs: {
mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ]; mesonFlags = oldAttrs.mesonFlags ++ [ "-Dexperimental=true" ];
}) })
); );
settings = { settings = {
@ -14,30 +14,30 @@
position = "top"; position = "top";
modules-left = [ modules-left = [
"hyprland/submap" "hyprland/submap"
"hyprland/workspaces" "hyprland/workspaces"
"custom/arrow10" "custom/arrow10"
"hyprland/window" "hyprland/window"
]; ];
modules-right = [ modules-right = [
"custom/arrow9" "custom/arrow9"
"pulseaudio" "pulseaudio"
"custom/arrow8" "custom/arrow8"
"network" "network"
"custom/arrow7" "custom/arrow7"
"memory" "memory"
"custom/arrow6" "custom/arrow6"
"cpu" "cpu"
"custom/arrow5" "custom/arrow5"
"temperature" "temperature"
"custom/arrow4" "custom/arrow4"
"battery" "battery"
"custom/arrow3" "custom/arrow3"
"hyprland/language" "hyprland/language"
"custom/arrow2" "custom/arrow2"
"tray" "tray"
"clock#date" "clock#date"
"custom/arrow1" "custom/arrow1"
"clock#time" "clock#time"
]; ];
# Module configuration # Module configuration
@ -56,10 +56,10 @@
format-alt = "{icon} {power}W"; format-alt = "{icon} {power}W";
format-icons = [ format-icons = [
"" ""
"" ""
"" ""
"" ""
"" ""
]; ];
tooltip = false; tooltip = false;
}; };
@ -137,7 +137,7 @@
car = ""; car = "";
default = [ default = [
"" ""
"" ""
]; ];
}; };
scroll-step = 1; scroll-step = 1;
@ -151,10 +151,10 @@
format = "{icon} {temperatureC}°"; format = "{icon} {temperatureC}°";
format-icons = [ format-icons = [
"" ""
"" ""
"" ""
"" ""
"" ""
]; ];
tooltip = false; tooltip = false;
}; };

View file

@ -4,6 +4,6 @@
programs.wezterm = { programs.wezterm = {
enable = true; enable = true;
extraConfig = builtins.readFile ./wezterm.lua; extraConfig = builtins.readFile ./wezterm.lua;
package = (pkgs.callPackage ./package.nix {}); package = (pkgs.callPackage ./package.nix { });
}; };
} }

View file

@ -1,37 +1,38 @@
{ { fetchFromGitHub
fetchFromGitHub, , flavor ? "Mocha"
flavor ? "Mocha", , lib
lib, , stdenvNoCC
stdenvNoCC }:
}: let let
validFlavors = ["Frappe" "Latte" "Macchiato" "Mocha"]; validFlavors = [ "Frappe" "Latte" "Macchiato" "Mocha" ];
pname = "catppucin-qt5ct"; pname = "catppucin-qt5ct";
in in
lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ] lib.checkListOfEnum "${pname}: flavors" validFlavors [ flavor ]
stdenvNoCC.mkDerivation { stdenvNoCC.mkDerivation
inherit pname; {
version = "unstable-2023-10-24"; inherit pname;
version = "unstable-2023-10-24";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "catppuccin"; owner = "catppuccin";
repo = "qt5ct"; repo = "qt5ct";
rev = "89ee948e72386b816c7dad72099855fb0d46d41e"; rev = "89ee948e72386b816c7dad72099855fb0d46d41e";
sha256 = "sha256-t/uyK0X7qt6qxrScmkTU2TvcVJH97hSQuF0yyvSO/qQ="; sha256 = "sha256-t/uyK0X7qt6qxrScmkTU2TvcVJH97hSQuF0yyvSO/qQ=";
}; };
nativeBuildInputs = [ ]; nativeBuildInputs = [ ];
buildInputs = [ ]; buildInputs = [ ];
postPatch = '' postPatch = ''
export HOME=$(mktemp -d) export HOME=$(mktemp -d)
cp -r themes/* $HOME/.config/qt5ct/colors/ cp -r themes/* $HOME/.config/qt5ct/colors/
''; '';
meta = with lib; { meta = with lib; {
description = "Catppuccin for qt5ct"; description = "Catppuccin for qt5ct";
homepage = "https://github.com/catppuccin/qt5ct"; homepage = "https://github.com/catppuccin/qt5ct";
license = licenses.mit; license = licenses.mit;
maintainers = with maintainers; [ ]; maintainers = with maintainers; [ ];
}; };
} }

View file

@ -22,5 +22,5 @@ pkgs.stdenv.mkDerivation {
cd $out/ cd $out/
rm Background.jpg rm Background.jpg
cp -r ${image} $out/Background.jpg cp -r ${image} $out/Background.jpg
''; '';
} }