From 49cacd8d9c52fa7980d5d68f90e380a792fb103e Mon Sep 17 00:00:00 2001 From: Crony Akatsuki Date: Sat, 16 Mar 2024 19:03:53 +0100 Subject: [PATCH] Update formatting. --- flake.nix | 8 ++-- home-manager/modules/alacritty.nix | 3 +- home-manager/modules/btop.nix | 3 +- home-manager/modules/dmenu.nix | 22 +++++------ home-manager/modules/gpg.nix | 2 +- home-manager/modules/mangohud.nix | 3 +- home-manager/modules/mpv.nix | 28 ++++++++------ home-manager/modules/newsboat.nix | 11 ++---- home-manager/modules/nnn.nix | 38 ++++++++++++++++--- home-manager/modules/plasma.nix | 8 ++-- home-manager/modules/restic.nix | 53 +++++++++++---------------- home-manager/modules/shell.nix | 23 ++++++------ home-manager/modules/theming.nix | 8 ++-- home-manager/modules/tmux.nix | 11 +++--- home-manager/modules/tofi.nix | 9 ++--- home-manager/modules/vkbasalt.nix | 7 +--- nixos/configuration.nix | 8 ++-- nixos/hardware-configuration.nix | 26 ++++++------- nixos/modules/disable-hibernation.nix | 3 +- nixos/modules/dns-over-https.nix | 6 +-- nixos/modules/nvidia.nix | 3 +- nixos/modules/wifi-dongle.nix | 7 +--- 22 files changed, 146 insertions(+), 144 deletions(-) diff --git a/flake.nix b/flake.nix index e6769c7..d6b9991 100644 --- a/flake.nix +++ b/flake.nix @@ -24,17 +24,15 @@ nixosConfigurations = { default = nixpkgs.lib.nixosSystem { system = "x86_64-linux"; - modules = [ + modules = [ ./nixos/configuration.nix home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; - home-manager.extraSpecialArgs = {inherit inputs;}; + home-manager.extraSpecialArgs = { inherit inputs; }; home-manager.users.crony = { - imports = [ - ./home-manager/home.nix - ]; + imports = [ ./home-manager/home.nix ]; }; } ]; diff --git a/home-manager/modules/alacritty.nix b/home-manager/modules/alacritty.nix index 53187f2..6d62f67 100644 --- a/home-manager/modules/alacritty.nix +++ b/home-manager/modules/alacritty.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ +{ inputs, ... }: { # Install alacritty programs.alacritty.enable = true; diff --git a/home-manager/modules/btop.nix b/home-manager/modules/btop.nix index 1c6b25e..fe66042 100644 --- a/home-manager/modules/btop.nix +++ b/home-manager/modules/btop.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ +{ inputs, ... }: { # Btop settings programs.btop = { enable = true; diff --git a/home-manager/modules/dmenu.nix b/home-manager/modules/dmenu.nix index 27d1754..d5c7bb3 100644 --- a/home-manager/modules/dmenu.nix +++ b/home-manager/modules/dmenu.nix @@ -1,12 +1,12 @@ -{ inputs, pkgs, ... }: -{ - home.packages = with pkgs; [ - # My custom dmenu build - (dmenu.overrideAttrs (oldAttrs: rec { - src = builtins.fetchGit { - url = "https://code.cronyakatsuki.xyz/crony/dmenu"; - rev = "10dcddf14b38cfd965ab27f084139513baed70bf"; - }; - })) - ]; +{ inputs, pkgs, ... }: { + home.packages = with pkgs; + [ + # My custom dmenu build + (dmenu.overrideAttrs (oldAttrs: rec { + src = builtins.fetchGit { + url = "https://code.cronyakatsuki.xyz/crony/dmenu"; + rev = "10dcddf14b38cfd965ab27f084139513baed70bf"; + }; + })) + ]; } diff --git a/home-manager/modules/gpg.nix b/home-manager/modules/gpg.nix index 1b9cdf5..28c9f74 100644 --- a/home-manager/modules/gpg.nix +++ b/home-manager/modules/gpg.nix @@ -1,4 +1,4 @@ -{ inputs, config, pkgs, ...}: +{ inputs, config, pkgs, ... }: { # gpg settings diff --git a/home-manager/modules/mangohud.nix b/home-manager/modules/mangohud.nix index 5560d36..0589774 100644 --- a/home-manager/modules/mangohud.nix +++ b/home-manager/modules/mangohud.nix @@ -1,5 +1,4 @@ -{ inputs, ... }: -{ +{ inputs, ... }: { # Mangohud settings programs.mangohud = { enable = true; diff --git a/home-manager/modules/mpv.nix b/home-manager/modules/mpv.nix index 68518fd..38f6cc7 100644 --- a/home-manager/modules/mpv.nix +++ b/home-manager/modules/mpv.nix @@ -1,18 +1,24 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { # Mpv settings programs.mpv = { enable = true; config = { - ytdl-format="bestvideo[height<=?1080][fps<=?60][vcodec!=?vp9]+bestaudio/best"; - ytdl-raw-options="extractor-args=youtube:player-client=android"; - fs=true; - force-window="immediate"; - screenshot-template="%F - [%P]v%#01n"; - sub-file-paths="Subs;subs"; - sub-auto="all"; - slang="english,eng,en"; + ytdl-format = + "bestvideo[height<=?1080][fps<=?60][vcodec!=?vp9]+bestaudio/best"; + ytdl-raw-options = "extractor-args=youtube:player-client=android"; + fs = true; + force-window = "immediate"; + screenshot-template = "%F - [%P]v%#01n"; + sub-file-paths = "Subs;subs"; + sub-auto = "all"; + slang = "english,eng,en"; }; - scripts = with pkgs.mpvScripts; [ mpris sponsorblock uosc thumbfast quality-menu ]; + scripts = with pkgs.mpvScripts; [ + mpris + sponsorblock + uosc + thumbfast + quality-menu + ]; }; } diff --git a/home-manager/modules/newsboat.nix b/home-manager/modules/newsboat.nix index df4e900..a08d08f 100644 --- a/home-manager/modules/newsboat.nix +++ b/home-manager/modules/newsboat.nix @@ -1,12 +1,7 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { # Install newsboat - home.packages = [ - pkgs.newsboat - ]; + home.packages = [ pkgs.newsboat ]; # Setup my config file - home.file = { - ".config/newsboat/config".source = ./confs/newsboat; - }; + home.file = { ".config/newsboat/config".source = ./confs/newsboat; }; } diff --git a/home-manager/modules/nnn.nix b/home-manager/modules/nnn.nix index 3d84580..20a3c25 100644 --- a/home-manager/modules/nnn.nix +++ b/home-manager/modules/nnn.nix @@ -1,12 +1,38 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { # NNN Settings programs.nnn = { enable = true; package = pkgs.nnn.override ({ withNerdIcons = true; }); - bookmarks = { d = "~/Documents"; D = "~/Downloads"; p = "~/Pictures"; v = "~/Videos";}; - extraPackages = with pkgs; [ pmount ffmpegthumbnailer mediainfo ueberzugpp poppler_utils gnome-epub-thumbnailer nsxiv ]; - plugins.mappings = { u = "nmount"; c = "chksum"; r = "gitroot"; v = "imgview"; m = "mtpmount"; d = "xdgdefault"; x = "togglex"; p = "preview-tui"; }; - plugins.src = (pkgs.fetchFromGitHub { owner = "jarun"; repo = "nnn"; rev = "v4.9"; sha256 = "sha256-g19uI36HyzTF2YUQKFP4DE2ZBsArGryVHhX79Y0XzhU=";}) + "/plugins"; + bookmarks = { + d = "~/Documents"; + D = "~/Downloads"; + p = "~/Pictures"; + v = "~/Videos"; + }; + extraPackages = with pkgs; [ + pmount + ffmpegthumbnailer + mediainfo + ueberzugpp + poppler_utils + gnome-epub-thumbnailer + nsxiv + ]; + plugins.mappings = { + u = "nmount"; + c = "chksum"; + r = "gitroot"; + v = "imgview"; + m = "mtpmount"; + d = "xdgdefault"; + x = "togglex"; + p = "preview-tui"; + }; + plugins.src = (pkgs.fetchFromGitHub { + owner = "jarun"; + repo = "nnn"; + rev = "v4.9"; + sha256 = "sha256-g19uI36HyzTF2YUQKFP4DE2ZBsArGryVHhX79Y0XzhU="; + }) + "/plugins"; }; } diff --git a/home-manager/modules/plasma.nix b/home-manager/modules/plasma.nix index a7cd1c2..ff4db87 100644 --- a/home-manager/modules/plasma.nix +++ b/home-manager/modules/plasma.nix @@ -1,8 +1,10 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { home.packages = [ pkgs.catppuccin-cursors.frappeRosewater pkgs.catppuccin-gtk - (pkgs.catppuccin-papirus-folders.override { flavor = "frappe"; accent = "pink"; }) + (pkgs.catppuccin-papirus-folders.override { + flavor = "frappe"; + accent = "pink"; + }) ]; } diff --git a/home-manager/modules/restic.nix b/home-manager/modules/restic.nix index 0ea4515..8cc8d54 100644 --- a/home-manager/modules/restic.nix +++ b/home-manager/modules/restic.nix @@ -1,5 +1,4 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { ##-- Restic Timers And Services --## # Restic backup @@ -8,14 +7,12 @@ Unit.Description = "Restic backup service"; Service = { Type = "oneshot"; - ExecStart = toString ( - pkgs.writeShellScript "restic-backup" '' - . /etc/restic/local - restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 - . /etc/restic/online - restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 - '' - ); + ExecStart = toString (pkgs.writeShellScript "restic-backup" '' + . /etc/restic/local + restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 + . /etc/restic/online + restic backup --files-from /home/crony/.config/restic/list --verbose && restic forget --keep-last 10 --keep-daily 7 --keep-weekly 5 --keep-monthly 12 + ''); }; }; }; @@ -36,23 +33,19 @@ Unit.Description = "Restic check service"; Service = { Type = "oneshot"; - ExecStart = toString ( - pkgs.writeShellScript "restic-check" '' - . /etc/restic/local - restic check --read-data-subset=10% - . /etc/restic/online - restic check --read-data-subset=10% - '' - ); + ExecStart = toString (pkgs.writeShellScript "restic-check" '' + . /etc/restic/local + restic check --read-data-subset=10% + . /etc/restic/online + restic check --read-data-subset=10% + ''); }; }; }; systemd.user.timers = { restic_check = { Unit.Description = "Restic check timer"; - Timer = { - OnCalendar="Thu *-*-* 18:00:00"; - }; + Timer = { OnCalendar = "Thu *-*-* 18:00:00"; }; Install.WantedBy = [ "timers.target" ]; }; }; @@ -63,23 +56,19 @@ Unit.Description = "Restic prune service"; Service = { Type = "oneshot"; - ExecStart = toString ( - pkgs.writeShellScript "restic-prune" '' - . /etc/restic/local - restic prune - . /etc/restic/online - restic prune - '' - ); + ExecStart = toString (pkgs.writeShellScript "restic-prune" '' + . /etc/restic/local + restic prune + . /etc/restic/online + restic prune + ''); }; }; }; systemd.user.timers = { restic_prune = { Unit.Description = "Restic prune timer"; - Timer = { - OnCalendar="Fri *-*-* 18:00:00"; - }; + Timer = { OnCalendar = "Fri *-*-* 18:00:00"; }; Install.WantedBy = [ "timers.target" ]; }; }; diff --git a/home-manager/modules/shell.nix b/home-manager/modules/shell.nix index 77a275e..3d67ec4 100644 --- a/home-manager/modules/shell.nix +++ b/home-manager/modules/shell.nix @@ -1,5 +1,4 @@ -{ inputs, config, ... }: -{ +{ inputs, config, ... }: { # But we all know I love zsh programs.zsh = { enable = true; @@ -22,30 +21,30 @@ BLK="03" CHR="03" DIR="04" EXE="02" REG="07" HARDLINK="05" SYMLINK="05" MISSING="08" ORPHAN="01" FIFO="06" SOCK="03" UNKNOWN="01" export NNN_COLORS="#04020301;4231" export NNN_FCOLORS="$BLK$CHR$DIR$EXE$REG$HARDLINK$SYMLINK$MISSING$ORPHAN$FIFO$SOCK$UNKNOWN" - ''; + ''; initExtra = '' # VI Mode escape timeout fix export KEYTIMEOUT=1 - + # Substring search settings export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND="bg=blue,fg=black,bold" export HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND='bg=red,fg=black,bold' bindkey -M vicmd 'k' history-substring-search-up bindkey -M vicmd 'j' history-substring-search-down - ''; + ''; initExtraFirst = '' nitch - ''; + ''; zplug = { enable = true; plugins = [ { name = "zap-zsh/supercharge"; } - { name = "zap-zsh/completions"; } - { name = "zap-zsh/vim"; } - { name = "chivalryq/git-alias"; } - { name = "zdharma-continuum/fast-syntax-highlighting"; } - { name = "MichaelAquilina/zsh-you-should-use"; } - { name = "zsh-users/zsh-history-substring-search"; } + { name = "zap-zsh/completions"; } + { name = "zap-zsh/vim"; } + { name = "chivalryq/git-alias"; } + { name = "zdharma-continuum/fast-syntax-highlighting"; } + { name = "MichaelAquilina/zsh-you-should-use"; } + { name = "zsh-users/zsh-history-substring-search"; } ]; }; }; diff --git a/home-manager/modules/theming.nix b/home-manager/modules/theming.nix index 64c526a..3e46fb5 100644 --- a/home-manager/modules/theming.nix +++ b/home-manager/modules/theming.nix @@ -1,5 +1,4 @@ -{ pkgs, ... }: -{ +{ pkgs, ... }: { # Enable qt qt.enable = true; @@ -21,7 +20,10 @@ gtk.theme.name = "Catppuccin-Frappe-Standard-Blue-Dark"; # Gtk icon theme - gtk.iconTheme.package = (pkgs.catppuccin-papirus-folders.override { flavor = "frappe"; accent = "pink"; }); + gtk.iconTheme.package = (pkgs.catppuccin-papirus-folders.override { + flavor = "frappe"; + accent = "pink"; + }); gtk.iconTheme.name = "Papirus-Dark"; # Font name diff --git a/home-manager/modules/tmux.nix b/home-manager/modules/tmux.nix index e2f3bef..1d7cefc 100644 --- a/home-manager/modules/tmux.nix +++ b/home-manager/modules/tmux.nix @@ -1,5 +1,4 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { programs.tmux = { enable = true; disableConfirmationPrompt = true; @@ -16,11 +15,11 @@ set -g @catppuccin_window_right_separator "█ " set -g @catppuccin_window_number_position "right" set -g @catppuccin_window_middle_separator " | " - + set -g @catppuccin_window_default_fill "none" - + set -g @catppuccin_window_current_fill "all" - + set -g @catppuccin_status_modules_right "application session date_time" set -g @catppuccin_status_left_separator "█" set -g @catppuccin_status_right_separator "█" @@ -60,7 +59,7 @@ # Status bar border setw -g pane-border-status top setw -g pane-border-format '─' - + # Bar to top set-option -g status-position top ''; diff --git a/home-manager/modules/tofi.nix b/home-manager/modules/tofi.nix index 4217549..f93cddc 100644 --- a/home-manager/modules/tofi.nix +++ b/home-manager/modules/tofi.nix @@ -1,15 +1,12 @@ -{ inputs, pkgs, ... }: -{ +{ inputs, pkgs, ... }: { # Install tofi home.packages = with pkgs; [ tofi (writeShellScriptBin "tofi-pass" '' - tofi --hide-input true --prompt-text 'Password: ' --require-match false --hidden-character '.' < /dev/null + tofi --hide-input true --prompt-text 'Password: ' --require-match false --hidden-character '.' < /dev/null '') ]; # Setup my config file - home.file = { - ".config/tofi/config".source = ./confs/tofi; - }; + home.file = { ".config/tofi/config".source = ./confs/tofi; }; } diff --git a/home-manager/modules/vkbasalt.nix b/home-manager/modules/vkbasalt.nix index 42f89e7..71f5aae 100644 --- a/home-manager/modules/vkbasalt.nix +++ b/home-manager/modules/vkbasalt.nix @@ -1,8 +1,5 @@ -{ inputs, pkgs, ... }: -{ - home.packages = with pkgs; [ - vkbasalt - ]; +{ inputs, pkgs, ... }: { + home.packages = with pkgs; [ vkbasalt ]; home.file = { ".config/vkBasalt/vkBasalt.conf".source = ./confs/vkBasalt.conf; diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 20eb588..727c9be 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -18,10 +18,10 @@ boot.kernelPackages = pkgs.linuxPackages; # Enable gsp -# boot.kernelParams = [ -# "nouveau.config=NvGspRM=1" -# "nouveau.debug=info,VBIOS=info,gsp=debug" -# ]; + # boot.kernelParams = [ + # "nouveau.config=NvGspRM=1" + # "nouveau.debug=info,VBIOS=info,gsp=debug" + # ]; # load amdgpu and nouveau at boot boot.initrd.kernelModules = [ "amdgpu" ]; diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix index 151c10b..c4fb0fa 100644 --- a/nixos/hardware-configuration.nix +++ b/nixos/hardware-configuration.nix @@ -4,24 +4,23 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ (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" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { device = "/dev/disk/by-uuid/35fda926-38bd-4da4-984e-054f768e2e95"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/35fda926-38bd-4da4-984e-054f768e2e95"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/7BBE-9699"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/7BBE-9699"; + fsType = "vfat"; + }; swapDevices = [ ]; @@ -34,5 +33,6 @@ # networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; - hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.amd.updateMicrocode = + lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/nixos/modules/disable-hibernation.nix b/nixos/modules/disable-hibernation.nix index 07e1595..834bea2 100644 --- a/nixos/modules/disable-hibernation.nix +++ b/nixos/modules/disable-hibernation.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{ ... }: { # Disable hibernation, sleep and other friends systemd.targets = { sleep = { diff --git a/nixos/modules/dns-over-https.nix b/nixos/modules/dns-over-https.nix index ec6d79b..0955c8b 100644 --- a/nixos/modules/dns-over-https.nix +++ b/nixos/modules/dns-over-https.nix @@ -1,5 +1,4 @@ -{ ... }: -{ +{ ... }: { ### --- Enabling DNS Over HTTPS --- ### # make network manager not set a default dns @@ -20,7 +19,8 @@ "https://download.dnscrypt.info/resolvers-list/v3/public-resolvers.md" ]; cache_file = "/var/lib/dnscrypt-proxy2/public-resolvers.md"; - minisign_key = "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; + minisign_key = + "RWQf6LRCGA9i53mlYecO4IzT51TGPpvWucNSCh1CBM0QTaLn73Y7GFO3"; }; # use mullvad dns server server_names = [ "mullvad-doh" ]; diff --git a/nixos/modules/nvidia.nix b/nixos/modules/nvidia.nix index befc6c6..b0d1579 100644 --- a/nixos/modules/nvidia.nix +++ b/nixos/modules/nvidia.nix @@ -1,5 +1,4 @@ -{ config, ... }: -{ +{ config, ... }: { services.xserver.videoDrivers = [ "nvidia" ]; # Nvidia settings diff --git a/nixos/modules/wifi-dongle.nix b/nixos/modules/wifi-dongle.nix index 1f71f7c..6262448 100644 --- a/nixos/modules/wifi-dongle.nix +++ b/nixos/modules/wifi-dongle.nix @@ -1,8 +1,5 @@ -{ config, ... }: -{ +{ config, ... }: { # Setup correct modules for tplink wifi dongle and disable builtin wifi card. boot.blacklistedKernelModules = [ "rtl8xxxu" "iwlwifi" ]; - boot.extraModulePackages = with config.boot.kernelPackages; [ - rtl8192eu - ]; + boot.extraModulePackages = with config.boot.kernelPackages; [ rtl8192eu ]; }