From 2a1ba18c099060613079a87b9d2cbfd43953d886 Mon Sep 17 00:00:00 2001 From: pagedmov Date: Sat, 9 Nov 2024 16:20:27 -0500 Subject: [PATCH] formatted all files with nixfmt, added env variable to hold secrets --- .gitignore | 3 +- flake.nix | 20 +- hosts/desktop/config.nix | 25 +- hosts/desktop/hardware.nix | 28 +- hosts/installer/default.nix | 209 +++---- hosts/installer/disko-ext4-singledisk.nix | 10 +- hosts/laptop/config.nix | 32 +- hosts/laptop/hardware.nix | 28 +- hosts/server/config.nix | 20 +- hosts/server/hardware.nix | 44 +- modules/home/default.nix | 18 +- modules/home/environment/default.nix | 12 +- modules/home/environment/gtk.nix | 24 +- modules/home/environment/hyprland.nix | 33 +- modules/home/environment/spicetify.nix | 12 +- modules/home/environment/starship.nix | 13 +- modules/home/environment/stylix.nix | 16 +- modules/home/environment/swaync.nix | 7 +- modules/home/environment/userpkgs.nix | 61 +- modules/home/environment/waybar.nix | 579 ++++++++---------- modules/home/environment/zshell.nix | 10 +- modules/home/files.nix | 38 +- modules/home/programs/autojump.nix | 5 +- modules/home/programs/bat.nix | 9 +- modules/home/programs/btop.nix | 7 +- modules/home/programs/cava.nix | 9 +- modules/home/programs/default.nix | 34 +- modules/home/programs/eza.nix | 7 +- modules/home/programs/firefox.nix | 8 +- modules/home/programs/fuzzel.nix | 5 +- modules/home/programs/fzf.nix | 5 +- modules/home/programs/git.nix | 5 +- modules/home/programs/kitty.nix | 5 +- modules/home/programs/nixvim/autocmd.nix | 31 +- modules/home/programs/nixvim/default.nix | 15 +- modules/home/programs/nixvim/options.nix | 11 +- .../home/programs/nixvim/plugins/barbar.nix | 4 +- modules/home/programs/nixvim/plugins/cmp.nix | 7 +- modules/home/programs/nixvim/plugins/coq.nix | 4 +- .../home/programs/nixvim/plugins/default.nix | 2 +- .../programs/nixvim/plugins/extra_plugins.nix | 2 +- .../home/programs/nixvim/plugins/fidget.nix | 4 +- .../home/programs/nixvim/plugins/haskell.nix | 6 +- modules/home/programs/nixvim/plugins/lsp.nix | 146 ++--- .../home/programs/nixvim/plugins/lualine.nix | 24 +- .../home/programs/nixvim/plugins/neocord.nix | 3 +- .../nixvim/plugins/nvim-lightbulb.nix | 4 +- .../home/programs/nixvim/plugins/scratch.nix | 1 + .../programs/nixvim/plugins/telescope.nix | 8 +- .../programs/nixvim/plugins/vim-matchup.nix | 4 +- modules/home/programs/password-store.nix | 11 +- modules/home/programs/yazi.nix | 5 +- modules/home/scripts/commands/icanhazip.nix | 7 +- modules/home/scripts/commands/invoke.nix | 4 +- modules/home/scripts/commands/runbg.nix | 10 +- modules/home/scripts/commands/splash.nix | 10 +- modules/home/scripts/commands/toolbelt.nix | 2 +- modules/home/scripts/commands/viconf.nix | 9 +- modules/home/scripts/commands/vipkg.nix | 10 +- modules/home/scripts/default.nix | 160 ++--- modules/home/scripts/nix/fetchfromgh.nix | 50 +- modules/home/scripts/nix/garbage-collect.nix | 4 +- modules/home/scripts/nix/nsp.nix | 4 +- modules/home/scripts/nix/rebuild.nix | 6 +- modules/home/scripts/wm-controls/chpaper.nix | 10 +- modules/home/scripts/wm-controls/chscheme.nix | 5 +- modules/home/scripts/wm-controls/keyring.nix | 4 +- .../scripts/wm-controls/mkscreenshots.nix | 10 +- .../home/scripts/wm-controls/moveonscreen.nix | 9 +- modules/home/scripts/wm-controls/s_check.nix | 4 +- .../home/scripts/wm-controls/switchmon.nix | 4 +- modules/home/servermodule.nix | 11 +- modules/server/cdn/jellyfin.nix | 3 +- modules/server/default.nix | 5 +- modules/server/glasshaus/caddy.nix | 3 +- modules/sys/default.nix | 17 +- modules/sys/environment/default.nix | 18 +- modules/sys/environment/issue.nix | 5 +- modules/sys/environment/nix.nix | 9 +- modules/sys/environment/sddm.nix | 27 +- modules/sys/environment/stylix.nix | 22 +- modules/sys/hardware/bootloader.nix | 5 +- modules/sys/hardware/default.nix | 17 +- modules/sys/hardware/network.nix | 12 +- modules/sys/hardware/powerprofiles.nix | 5 +- modules/sys/software/default.nix | 19 +- modules/sys/software/gaming/default.nix | 6 +- modules/sys/software/gaming/gaming_pkgs.nix | 27 +- modules/sys/software/gaming/steam.nix | 5 +- modules/sys/software/packages.nix | 5 +- modules/sys/software/programs.nix | 10 +- modules/sys/software/services.nix | 11 +- modules/sys/software/virtualization.nix | 5 +- 93 files changed, 948 insertions(+), 1254 deletions(-) create mode 100644 modules/home/programs/nixvim/plugins/scratch.nix diff --git a/.gitignore b/.gitignore index e720625..49400f4 100755 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ - -secrets.nix +env.nix result hardware.nix diff --git a/flake.nix b/flake.nix index 78be7a0..78490bf 100755 --- a/flake.nix +++ b/flake.nix @@ -30,18 +30,19 @@ }; }; - outputs = { self, home-manager, nixpkgs, nur, nixvim, stylix, ... } @ inputs: + outputs = { self, home-manager, nixpkgs, nur, nixvim, stylix, ... }@inputs: let system = "x86_64-linux"; pkgs = import nixpkgs { inherit system; }; username = "pagedmov"; + env = import ./env.nix; in { homeConfigurations = { oganessonHome = home-manager.lib.homeManagerConfiguration { inherit pkgs; extraSpecialArgs = { host = "oganesson"; - inherit self username inputs; + inherit self username env inputs; }; modules = [ @@ -57,7 +58,7 @@ inherit pkgs; extraSpecialArgs = { host = "oganesson"; - inherit self username inputs; + inherit self env username inputs; }; modules = [ @@ -73,7 +74,7 @@ inherit pkgs; extraSpecialArgs = { host = "oganesson"; - inherit self username inputs; + inherit self env username inputs; }; modules = [ @@ -88,7 +89,7 @@ oganesson = nixpkgs.lib.nixosSystem { specialArgs = { host = "oganesson"; - inherit self inputs username; + inherit self inputs env username; }; inherit system; modules = [ @@ -102,7 +103,7 @@ mercury = nixpkgs.lib.nixosSystem { specialArgs = { host = "mercury"; - inherit self inputs username; + inherit self inputs env username; }; inherit system; modules = [ @@ -116,7 +117,7 @@ xenon = nixpkgs.lib.nixosSystem { specialArgs = { host = "xenon"; - inherit self inputs username; + inherit self inputs env username; }; inherit system; modules = [ @@ -134,10 +135,7 @@ inherit self inputs; }; inherit system; - modules = [ - ./hosts/installer - nixvim.nixosModules.nixvim - ]; + modules = [ ./hosts/installer nixvim.nixosModules.nixvim ]; }; }; }; diff --git a/hosts/desktop/config.nix b/hosts/desktop/config.nix index d2593a4..1cc88a9 100755 --- a/hosts/desktop/config.nix +++ b/hosts/desktop/config.nix @@ -1,7 +1,5 @@ -{pkgs, username, ...}: { - imports = [ - ./hardware.nix - ]; +{ pkgs, username, ... }: { + imports = [ ./hardware.nix ]; # My module options movOpts = { @@ -28,8 +26,8 @@ nix = { settings = { auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; - substituters = ["https://nix-gaming.cachix.org"]; + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ "https://nix-gaming.cachix.org" ]; }; gc = { automatic = true; @@ -39,31 +37,26 @@ }; environment = { - variables = { - PATH = "${pkgs.clang-tools}/bin:$PATH"; - }; - shells = with pkgs; [ - zsh - bash - ]; + variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; }; + shells = with pkgs; [ zsh bash ]; }; users = { - groups.persist = {}; + groups.persist = { }; users = { root.initialPassword = "1234"; ${username} = { isNormalUser = true; initialPassword = "1234"; shell = pkgs.zsh; - extraGroups = ["wheel" "persist" "libvirtd"]; + extraGroups = [ "wheel" "persist" "libvirtd" ]; }; }; }; security.sudo.extraConfig = '' ${username} ALL=(ALL) NOPASSWD: /etc/profiles/per-user/${username}/bin/rebuild ''; - nix.settings.allowed-users = ["${username}"]; + nix.settings.allowed-users = [ "${username}" ]; time.timeZone = "America/New_York"; i18n.defaultLocale = "en_US.UTF-8"; diff --git a/hosts/desktop/hardware.nix b/hosts/desktop/hardware.nix index 1c21635..54d39f9 100755 --- a/hosts/desktop/hardware.nix +++ b/hosts/desktop/hardware.nix @@ -1,21 +1,14 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + 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-partlabel/disk-main-root"; @@ -30,7 +23,7 @@ fileSystems."/boot" = { device = "/dev/disk/by-partlabel/disk-main-ESP"; fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; + options = [ "fmask=0077" "dmask=0077" ]; }; fileSystems."/home" = { @@ -38,7 +31,7 @@ fsType = "ext4"; }; - swapDevices = []; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -49,5 +42,6 @@ # networking.interfaces.wlp15s0.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/hosts/installer/default.nix b/hosts/installer/default.nix index 3cf350b..e732b69 100755 --- a/hosts/installer/default.nix +++ b/hosts/installer/default.nix @@ -1,10 +1,5 @@ -{ - lib, - pkgs, - modulesPath, - inputs, - ... -}: let +{ lib, pkgs, modulesPath, inputs, ... }: +let extraFigletFonts = pkgs.fetchFromGitHub { owner = "xero"; repo = "figlet-fonts"; @@ -12,7 +7,7 @@ sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; }; toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { - buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; + buildInputs = oldAttrs.buildInputs or [ ] ++ [ extraFigletFonts ]; installPhase = '' make install PREFIX=$out @@ -28,11 +23,7 @@ in { ]; nixpkgs.hostPlatform = "x86_64-linux"; system.stateVersion = "24.05"; - nix = { - settings = { - experimental-features = ["nix-command" "flakes"]; - }; - }; + nix = { settings = { experimental-features = [ "nix-command" "flakes" ]; }; }; networking = { wireless.enable = false; @@ -65,11 +56,9 @@ in { home-manager = { users.root = { programs.home-manager.enable = true; - home= { + home = { stateVersion = "24.05"; - file = { - "disko.nix".source = ./disko-ext4-singledisk.nix; - }; + file = { "disko.nix".source = ./disko-ext4-singledisk.nix; }; }; }; }; @@ -81,106 +70,106 @@ in { programs = { zsh = { - enable = true; - - ohMyZsh = { enable = true; - plugins = ["git" "fzf"]; - }; - enableCompletion = true; + ohMyZsh = { + enable = true; + plugins = [ "git" "fzf" ]; + }; - histFile = "$HOME/.zsh_history"; - histSize = 10000; + enableCompletion = true; - autosuggestions = { - enable = true; - highlightStyle = "fg=#4C566A,underline"; - }; + histFile = "$HOME/.zsh_history"; + histSize = 10000; - shellAliases = { - grep = "grep --color=auto"; - vi = "nvim"; - mv = "mv -v"; - cp = "cp -vr"; - ".." = "cd .."; - psg = "ps aux | grep -v grep | grep -i -e VSZ -e"; - mkdir = "mkdir -p"; - pk = "pkill -9 -f"; - svc = "sudo systemctl"; - }; - promptInit = '' - bindkey -v - type starship_zle-keymap-select >/dev/null || \ - { - eval "$(starship init zsh)" - } - ''; - setOptions = [ - "APPEND_HISTORY" - "INC_APPEND_HISTORY" - "SHARE_HISTORY" - "CORRECT" - "NO_NOMATCH" - "LIST_PACKED" - "ALWAYS_TO_END" - "GLOB_COMPLETE" - "COMPLETE_ALIASES" - "COMPLETE_IN_WORD" - "AUTO_CD" - "AUTO_CONTINUE" - "LONG_LIST_JOBS" - "HIST_VERIFY" - "SHARE_HISTORY" - "HIST_IGNORE_SPACE" - "HIST_SAVE_NO_DUPS" - "HIST_IGNORE_ALL_DUPS" - "EXTENDED_GLOB" - "TRANSIENT_RPROMPT" - "INTERACTIVE_COMMENTS" - ]; - shellInit = '' - export EDITOR="nvim" - export SUDO_EDITOR="nvim" - export VISUAL="nvim" - export LANG="en_US.UTF-8" + autosuggestions = { + enable = true; + highlightStyle = "fg=#4C566A,underline"; + }; - unalias ls - ls() { - eza -1 --group-directories-first --icons "$@" - } + shellAliases = { + grep = "grep --color=auto"; + vi = "nvim"; + mv = "mv -v"; + cp = "cp -vr"; + ".." = "cd .."; + psg = "ps aux | grep -v grep | grep -i -e VSZ -e"; + mkdir = "mkdir -p"; + pk = "pkill -9 -f"; + svc = "sudo systemctl"; + }; + promptInit = '' + bindkey -v + type starship_zle-keymap-select >/dev/null || \ + { + eval "$(starship init zsh)" + } + ''; + setOptions = [ + "APPEND_HISTORY" + "INC_APPEND_HISTORY" + "SHARE_HISTORY" + "CORRECT" + "NO_NOMATCH" + "LIST_PACKED" + "ALWAYS_TO_END" + "GLOB_COMPLETE" + "COMPLETE_ALIASES" + "COMPLETE_IN_WORD" + "AUTO_CD" + "AUTO_CONTINUE" + "LONG_LIST_JOBS" + "HIST_VERIFY" + "SHARE_HISTORY" + "HIST_IGNORE_SPACE" + "HIST_SAVE_NO_DUPS" + "HIST_IGNORE_ALL_DUPS" + "EXTENDED_GLOB" + "TRANSIENT_RPROMPT" + "INTERACTIVE_COMMENTS" + ]; + shellInit = '' + export EDITOR="nvim" + export SUDO_EDITOR="nvim" + export VISUAL="nvim" + export LANG="en_US.UTF-8" - y() { - local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" - yazi "$@" --cwd-file="$tmp" - if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then - builtin cd -- "$cwd" - fi - rm -f -- "$tmp" - } + unalias ls + ls() { + eza -1 --group-directories-first --icons "$@" + } - cd() { - export SOUNDS_ENABLED=0 - eza -1 --group-directories-first --icons "$@" - builtin cd "$@" || exit - export SOUNDS_ENABLED=1 - } - if [ ! -e $HOME/.zsh_history ]; then - touch $HOME/.zsh_history - chmod 600 $HOME/.zsh_history - fi + y() { + local tmp="$(mktemp -t "yazi-cwd.XXXXXX")" + yazi "$@" --cwd-file="$tmp" + if cwd="$(command cat -- "$tmp")" && [ -n "$cwd" ] && [ "$cwd" != "$PWD" ]; then + builtin cd -- "$cwd" + fi + rm -f -- "$tmp" + } - autoload -U compinit # completion - autoload -U terminfo # terminfo keys - zmodload -i zsh/complist # menu completion - autoload -U promptinit # prompt + cd() { + export SOUNDS_ENABLED=0 + eza -1 --group-directories-first --icons "$@" + builtin cd "$@" || exit + export SOUNDS_ENABLED=1 + } + if [ ! -e $HOME/.zsh_history ]; then + touch $HOME/.zsh_history + chmod 600 $HOME/.zsh_history + fi - autoload -U up-line-or-beginning-search; zle -N up-line-or-beginning-search - autoload -U down-line-or-beginning-search; zle -N down-line-or-beginning-search + autoload -U compinit # completion + autoload -U terminfo # terminfo keys + zmodload -i zsh/complist # menu completion + autoload -U promptinit # prompt - unalias ls - clear - ''; + autoload -U up-line-or-beginning-search; zle -N up-line-or-beginning-search + autoload -U down-line-or-beginning-search; zle -N down-line-or-beginning-search + + unalias ls + clear + ''; }; starship = { enable = true; @@ -201,7 +190,9 @@ in { format = "[$user]($style)"; }; directory = { - format = "\n[$path](bold cyan)[/](bold green) "; + format = '' + + [$path](bold cyan)[/](bold green) ''; style = "bold #b4befe"; }; @@ -220,7 +211,9 @@ in { }; git_branch = { - format = "\non [$symbol$branch](bold purple)"; + format = '' + + on [$symbol$branch](bold purple)''; symbol = " "; truncation_length = 15; style = "bold purple"; diff --git a/hosts/installer/disko-ext4-singledisk.nix b/hosts/installer/disko-ext4-singledisk.nix index 7a96497..a84914e 100755 --- a/hosts/installer/disko-ext4-singledisk.nix +++ b/hosts/installer/disko-ext4-singledisk.nix @@ -1,11 +1,7 @@ # USAGE in your configuration.nix. # Update devices to match your hardware. -{ - device ? throw "Set this to your disk device, e.g. /dev/sda", - root_size, - nix_size, - ... -}: { +{ device ? throw "Set this to your disk device, e.g. /dev/sda", root_size +, nix_size, ... }: { disko.devices = { disk = { main = { @@ -25,7 +21,7 @@ type = "filesystem"; format = "vfat"; mountpoint = "/boot"; - mountOptions = ["umask=0077"]; + mountOptions = [ "umask=0077" ]; }; }; nix = { diff --git a/hosts/laptop/config.nix b/hosts/laptop/config.nix index 528bdba..c47a57b 100755 --- a/hosts/laptop/config.nix +++ b/hosts/laptop/config.nix @@ -1,18 +1,11 @@ -{pkgs, config, ...}: { - imports = [ - ./hardware.nix - ./home.nix - ]; +{ pkgs, config, ... }: { + imports = [ ./hardware.nix ./home.nix ]; powerProfiles.enable = true; boot = { - kernelModules = ["acpi_call"]; + kernelModules = [ "acpi_call" ]; extraModulePackages = with config.boot.kernelPackages; - [ - acpi_call - cpupower - ] - ++ [pkgs.cpupower-gui]; + [ acpi_call cpupower ] ++ [ pkgs.cpupower-gui ]; }; networkModule.enable = true; @@ -26,20 +19,9 @@ sysServices.enable = true; environment = { - variables = { - PATH = "${pkgs.clang-tools}/bin:$PATH"; - }; - shells = with pkgs; [ - zsh - bash - ]; - systemPackages = with pkgs; [ - acpi - brightnessctl - cpupower-gui - powertop - ]; + variables = { PATH = "${pkgs.clang-tools}/bin:$PATH"; }; + shells = with pkgs; [ zsh bash ]; + systemPackages = with pkgs; [ acpi brightnessctl cpupower-gui powertop ]; }; - } diff --git a/hosts/laptop/hardware.nix b/hosts/laptop/hardware.nix index 4fec50b..5736813 100755 --- a/hosts/laptop/hardware.nix +++ b/hosts/laptop/hardware.nix @@ -1,21 +1,14 @@ # Do not modify this file! It was generated by ‘nixos-generate-config’ # and may be overwritten by future invocations. Please make changes # to /etc/nixos/configuration.nix instead. -{ - config, - lib, - pkgs, - modulesPath, - ... -}: { - imports = [ - (modulesPath + "/installer/scan/not-detected.nix") - ]; +{ config, lib, pkgs, modulesPath, ... }: { + imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-amd"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; fileSystems."/" = { device = "/dev/sda4"; @@ -30,7 +23,7 @@ fileSystems."/boot" = { device = "/dev/sda2"; fsType = "vfat"; - options = ["fmask=0077" "dmask=0077"]; + options = [ "fmask=0077" "dmask=0077" ]; }; fileSystems."/home" = { @@ -38,7 +31,7 @@ fsType = "ext4"; }; - swapDevices = []; + swapDevices = [ ]; # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's @@ -49,5 +42,6 @@ # networking.interfaces.wlp15s0.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/hosts/server/config.nix b/hosts/server/config.nix index 0a3302b..153b671 100755 --- a/hosts/server/config.nix +++ b/hosts/server/config.nix @@ -1,12 +1,5 @@ -{ - pkgs, - username, - ... -}: { - imports = [ - ./hardware.nix - ./home.nix - ]; +{ pkgs, username, ... }: { + imports = [ ./hardware.nix ./home.nix ]; movOpts = { nixSettings.enable = true; networkModule.enable = true; @@ -18,9 +11,7 @@ jellyfinConfig.enable = true; caddyConfig.enable = true; }; - networking.firewall = { - allowedTCPPorts = [ 443 8920 ]; - }; + networking.firewall = { allowedTCPPorts = [ 443 8920 ]; }; environment = { etc."tmpfiles.d/home-permissions.conf".text = '' d /home/pagedmov 0750 pagedmov users - @@ -29,9 +20,6 @@ PATH = "${pkgs.clang-tools}/bin:$PATH"; TERM = "kitty"; }; - shells = with pkgs; [ - zsh - bash - ]; + shells = with pkgs; [ zsh bash ]; }; } diff --git a/hosts/server/hardware.nix b/hosts/server/hardware.nix index 3426c2f..6c25253 100755 --- a/hosts/server/hardware.nix +++ b/hosts/server/hardware.nix @@ -4,35 +4,34 @@ { 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/c40b3b09-688d-4fe3-96f9-8e3d75b0a7b7"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/c40b3b09-688d-4fe3-96f9-8e3d75b0a7b7"; + fsType = "ext4"; + }; - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/1048d206-0a27-4e4e-b9a4-4f068bab5439"; - fsType = "ext4"; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/1048d206-0a27-4e4e-b9a4-4f068bab5439"; + fsType = "ext4"; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/357E-BCCD"; - fsType = "vfat"; - options = [ "fmask=0077" "dmask=0077" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/357E-BCCD"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/b53ab583-f32e-4144-a2ee-f341e54f8233"; - fsType = "ext4"; - }; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/b53ab583-f32e-4144-a2ee-f341e54f8233"; + fsType = "ext4"; + }; swapDevices = [ ]; @@ -45,5 +44,6 @@ # networking.interfaces.wlp11s0.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/modules/home/default.nix b/modules/home/default.nix index 58b6929..b213758 100755 --- a/modules/home/default.nix +++ b/modules/home/default.nix @@ -1,17 +1,3 @@ -{ - inputs, - nixpkgs, - config, - self, - username, - host, - lib, - ... -}: { - imports = [ - ./programs - ./environment - ./scripts - ./files.nix - ]; +{ env, inputs, nixpkgs, config, self, username, host, lib, ... }: { + imports = [ ./programs ./environment ./scripts ./files.nix ]; } diff --git a/modules/home/environment/default.nix b/modules/home/environment/default.nix index eb808dc..44c5e87 100755 --- a/modules/home/environment/default.nix +++ b/modules/home/environment/default.nix @@ -1,14 +1,4 @@ -{ - host, - nur, - nixvim, - self, - inputs, - username, - config, - home-manager, - ... -}: { +{ host, nur, nixvim, self, inputs, username, config, home-manager, ... }: { imports = [ ./gtk.nix ./spicetify.nix diff --git a/modules/home/environment/gtk.nix b/modules/home/environment/gtk.nix index c9fb00b..e2bde35 100755 --- a/modules/home/environment/gtk.nix +++ b/modules/home/environment/gtk.nix @@ -1,26 +1,22 @@ -{lib, config, pkgs, ... }: { +{ lib, config, pkgs, ... }: { options = { - movOpts.envConfig.gtkConfig.enable = lib.mkEnableOption "enable my gtk options"; + movOpts.envConfig.gtkConfig.enable = + lib.mkEnableOption "enable my gtk options"; }; config = lib.mkIf config.movOpts.envConfig.gtkConfig.enable { fonts.fontconfig.enable = true; - home.packages = with pkgs; [ - (nerdfonts.override { - fonts = [ - "JetBrainsMono" - "CascadiaCode" - "NerdFontsSymbolsOnly" - ]; - }) - ]; + home.packages = with pkgs; + [ + (nerdfonts.override { + fonts = [ "JetBrainsMono" "CascadiaCode" "NerdFontsSymbolsOnly" ]; + }) + ]; gtk = { enable = true; iconTheme = { name = "Papirus-Dark"; - package = pkgs.papirus-nord.override { - accent = "frostblue4"; - }; + package = pkgs.papirus-nord.override { accent = "frostblue4"; }; }; #cursorTheme = { # name = "Bibata-Modern-Ice"; diff --git a/modules/home/environment/hyprland.nix b/modules/home/environment/hyprland.nix index 3af3170..e3a0720 100755 --- a/modules/home/environment/hyprland.nix +++ b/modules/home/environment/hyprland.nix @@ -68,27 +68,30 @@ in { "aplay ${self}/assets/sound/login.wav &" ]; - workspace = - if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then [ + workspace = if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "dualmonitor") then [ "1,persistent=true,monitor:${builtins.elemAt mons 0}" "2,persistent=true,monitor:${builtins.elemAt mons 0}" "3,persistent=true,monitor:${builtins.elemAt mons 0}" "4,persistent=true,monitor:${builtins.elemAt mons 1}" "5,persistent=true,monitor:${builtins.elemAt mons 1}" "6,persistent=true,monitor:${builtins.elemAt mons 1}" - ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then [ - "1,persistent=true,monitor:${builtins.elemAt mons 0} " - "2,persistent=true,monitor:${builtins.elemAt mons 0}" - "3,persistent=true,monitor:${builtins.elemAt mons 0}" - "4,persistent=true,monitor:${builtins.elemAt mons 0}" - ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then [ - "1,persistent=true,monitor:${builtins.elemAt mons 2}" - "2,persistent=true,monitor:${builtins.elemAt mons 2}" - "3,persistent=true,monitor:${builtins.elemAt mons 1}" - "4,persistent=true,monitor:${builtins.elemAt mons 1}" - "5,persistent=true,monitor:${builtins.elemAt mons 0}" - "6,persistent=true,monitor:${builtins.elemAt mons 0}" - ] else []; + ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "singlemonitor") then [ + "1,persistent=true,monitor:${builtins.elemAt mons 0} " + "2,persistent=true,monitor:${builtins.elemAt mons 0}" + "3,persistent=true,monitor:${builtins.elemAt mons 0}" + "4,persistent=true,monitor:${builtins.elemAt mons 0}" + ] else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "trimonitor") then [ + "1,persistent=true,monitor:${builtins.elemAt mons 2}" + "2,persistent=true,monitor:${builtins.elemAt mons 2}" + "3,persistent=true,monitor:${builtins.elemAt mons 1}" + "4,persistent=true,monitor:${builtins.elemAt mons 1}" + "5,persistent=true,monitor:${builtins.elemAt mons 0}" + "6,persistent=true,monitor:${builtins.elemAt mons 0}" + ] else + [ ]; env = [ "XDG_CONFIG_HOME,$HOME/.config" diff --git a/modules/home/environment/spicetify.nix b/modules/home/environment/spicetify.nix index fece939..20f1048 100755 --- a/modules/home/environment/spicetify.nix +++ b/modules/home/environment/spicetify.nix @@ -1,16 +1,16 @@ -{lib, config, pkgs, inputs, ... }: let +{ lib, config, pkgs, inputs, ... }: +let spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system}; scheme = config.lib.stylix.colors; in { - imports = [inputs.spicetify-nix.homeManagerModules.default]; + imports = [ inputs.spicetify-nix.homeManagerModules.default ]; options = { - movOpts.envConfig.spicetifyConfig.enable = lib.mkEnableOption "enable my spicetify options"; + movOpts.envConfig.spicetifyConfig.enable = + lib.mkEnableOption "enable my spicetify options"; }; config = lib.mkIf config.movOpts.envConfig.spicetifyConfig.enable { nixpkgs.config.allowUnfreePredicate = pkg: - builtins.elem (lib.getName pkg) [ - "spotify" - ]; + builtins.elem (lib.getName pkg) [ "spotify" ]; programs.spicetify = { enable = true; diff --git a/modules/home/environment/starship.nix b/modules/home/environment/starship.nix index f34e556..63fbfe0 100755 --- a/modules/home/environment/starship.nix +++ b/modules/home/environment/starship.nix @@ -1,6 +1,7 @@ -{config, lib, inputs, ... }: { +{ config, lib, inputs, ... }: { options = { - movOpts.envConfig.starshipConfig.enable = lib.mkEnableOption "enables my starship configuration"; + movOpts.envConfig.starshipConfig.enable = + lib.mkEnableOption "enables my starship configuration"; }; config = lib.mkIf config.movOpts.envConfig.starshipConfig.enable { programs.starship = { @@ -23,7 +24,9 @@ format = "[$user]($style)"; }; directory = { - format = "\n[$path](bold cyan)[/](bold green) "; + format = '' + + [$path](bold cyan)[/](bold green) ''; style = "bold #b4befe"; }; @@ -42,7 +45,9 @@ }; git_branch = { - format = "\non [$symbol$branch](bold purple)"; + format = '' + + on [$symbol$branch](bold purple)''; symbol = " "; truncation_length = 15; style = "bold purple"; diff --git a/modules/home/environment/stylix.nix b/modules/home/environment/stylix.nix index bc5cc9a..b4fd4d1 100755 --- a/modules/home/environment/stylix.nix +++ b/modules/home/environment/stylix.nix @@ -1,12 +1,12 @@ -{lib, self, config, pkgs, ... }: +{ lib, self, config, pkgs, ... }: let scheme = "tokyo-night-dark"; wallpaper = "${self}/assets/wallpapers/dark-waves.jpg"; -in -{ +in { options = { - movOpts.envConfig.stylixHomeConfig.enable = lib.mkEnableOption "enables my stylix Home-Manager options"; + movOpts.envConfig.stylixHomeConfig.enable = + lib.mkEnableOption "enables my stylix Home-Manager options"; }; config = lib.mkIf config.movOpts.envConfig.stylixHomeConfig.enable { stylix = { @@ -15,7 +15,7 @@ in image = wallpaper; polarity = "dark"; autoEnable = true; - opacity.terminal = 0.50; + opacity.terminal = 0.5; targets = { waybar.enable = false; btop.enable = false; @@ -26,15 +26,15 @@ in }; fonts = { monospace = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; sansSerif = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; serif = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; sizes = { diff --git a/modules/home/environment/swaync.nix b/modules/home/environment/swaync.nix index 4b19a81..68e7355 100755 --- a/modules/home/environment/swaync.nix +++ b/modules/home/environment/swaync.nix @@ -1,9 +1,10 @@ -{lib, config, pkgs, ...}: { +{ lib, config, pkgs, ... }: { options = { - movOpts.envConfig.swayncConfig.enable = lib.mkEnableOption "enables my swaync configuration"; + movOpts.envConfig.swayncConfig.enable = + lib.mkEnableOption "enables my swaync configuration"; }; config = lib.mkIf config.movOpts.envConfig.swayncConfig.enable { - home.packages = with pkgs; [swaynotificationcenter]; + home.packages = with pkgs; [ swaynotificationcenter ]; xdg.configFile."swaync/style.css".text = '' @define-color shadow rgba(0, 0, 0, 0.25); /* diff --git a/modules/home/environment/userpkgs.nix b/modules/home/environment/userpkgs.nix index d646bd9..02cebb7 100755 --- a/modules/home/environment/userpkgs.nix +++ b/modules/home/environment/userpkgs.nix @@ -1,4 +1,4 @@ -{lib, config, pkgs, self, ... }: +{ lib, config, pkgs, self, ... }: let extraFigletFonts = pkgs.fetchFromGitHub { @@ -8,7 +8,7 @@ let sha256 = "sha256-dAs7N66D2Fpy4/UB5Za1r2qb1iSAJR6TMmau1asxgtY="; }; toilet-extrafonts = pkgs.toilet.overrideAttrs (oldAttrs: { - buildInputs = oldAttrs.buildInputs or [] ++ [extraFigletFonts]; + buildInputs = oldAttrs.buildInputs or [ ] ++ [ extraFigletFonts ]; installPhase = '' make install PREFIX=$out @@ -16,36 +16,35 @@ let cp -r ${extraFigletFonts}/* $out/share/figlet ''; }); -in -{ +in { options = { - movOpts.envConfig.userPkgs.enable = lib.mkEnableOption "enables my default user packages"; + movOpts.envConfig.userPkgs.enable = + lib.mkEnableOption "enables my default user packages"; }; config = lib.mkIf config.movOpts.envConfig.userPkgs.enable { - home.packages = with pkgs; - [ - nemo - gtk3 - sqlite - gimp - imagemagick - vlc - lolcat - vesktop - qbittorrent - neovide - zsh - zsh-syntax-highlighting - zsh-history-substring-search - zsh-autosuggestions - audacity - rustup - libreoffice - gtrash - ripgrep - toilet-extrafonts - python3 - chafa - ]; - }; + home.packages = with pkgs; [ + nemo + gtk3 + sqlite + gimp + imagemagick + vlc + lolcat + vesktop + qbittorrent + neovide + zsh + zsh-syntax-highlighting + zsh-history-substring-search + zsh-autosuggestions + audacity + rustup + libreoffice + gtrash + ripgrep + toilet-extrafonts + python3 + chafa + ]; + }; } diff --git a/modules/home/environment/waybar.nix b/modules/home/environment/waybar.nix index 81d6276..01d1ba7 100755 --- a/modules/home/environment/waybar.nix +++ b/modules/home/environment/waybar.nix @@ -1,4 +1,4 @@ -{pkgs, host, lib, config, ...}: +{ pkgs, host, lib, config, ... }: let desktop = host == "oganesson"; @@ -13,16 +13,20 @@ let "6" = "六"; }; persistent-workspaces = - if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "singlemonitor") then { - "${builtins.elemAt monitors 0}" = [ 1 2 3 4 ]; - } else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "dualmonitor") then { - "${builtins.elemAt monitors 0}" = [ 1 2 3 ]; - "${builtins.elemAt monitors 1}" = [ 4 5 6 ]; - } else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout == "trimonitor") then { - "${builtins.elemAt monitors 2}" = [ 1 2 ]; - "${builtins.elemAt monitors 1}" = [ 3 4 ]; - "${builtins.elemAt monitors 0}" = [ 5 6 ]; - } else {}; + if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "singlemonitor") then { + "${builtins.elemAt monitors 0}" = [ 1 2 3 4 ]; + } else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "dualmonitor") then { + "${builtins.elemAt monitors 0}" = [ 1 2 3 ]; + "${builtins.elemAt monitors 1}" = [ 4 5 6 ]; + } else if (config.movOpts.envConfig.hyprlandConfig.workspaceLayout + == "trimonitor") then { + "${builtins.elemAt monitors 2}" = [ 1 2 ]; + "${builtins.elemAt monitors 1}" = [ 3 4 ]; + "${builtins.elemAt monitors 0}" = [ 5 6 ]; + } else + { }; }; @@ -52,14 +56,15 @@ let monitors = config.movOpts.envConfig.hyprlandConfig.monitorNames; in { options = { - movOpts.envConfig.waybarConfig.enable = lib.mkEnableOption "enables my waybar configuration"; + movOpts.envConfig.waybarConfig.enable = + lib.mkEnableOption "enables my waybar configuration"; }; config = { programs.waybar = { enable = true; package = pkgs.waybar.overrideAttrs (oa: { - mesonFlags = (oa.mesonFlags or []) ++ ["-Dexperimental=true"]; - }); + mesonFlags = (oa.mesonFlags or [ ]) ++ [ "-Dexperimental=true" ]; + }); settings = { mainBar = { layer = "bottom"; @@ -68,25 +73,13 @@ in { name = "mainBar"; margin-left = 8; margin-top = 5; - margin-right = - if desktop - then 8 - else 5; + margin-right = if desktop then 8 else 5; mode = "dock"; "gtk-layer-shell" = true; - modules-left = [ - "hyprland/workspaces" - "cava" - ]; - modules-center = [ - "hyprland/window" - ]; - modules-right = [ - "group/hardware" - "clock" - "group/powerbtns" - ]; + modules-left = [ "hyprland/workspaces" "cava" ]; + modules-center = [ "hyprland/window" ]; + modules-right = [ "group/hardware" "clock" "group/powerbtns" ]; "hyprland/workspaces" = workspaces; @@ -107,16 +100,12 @@ in { waves = false; noise_reduction = 0.77; input_delay = 1; - format-icons = ["▁" "▂" "▃" "▄" "▅" "▆" "▇" "█"]; + format-icons = [ "▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" ]; }; "group/hardware" = { orientation = "inherit"; - modules = [ - "custom/disk-icon" - "memory" - "cpu" - ]; + modules = [ "custom/disk-icon" "memory" "cpu" ]; }; "custom/disk-icon" = { @@ -146,34 +135,14 @@ in { return-type = "json"; rotate = 270; format = "{icon}"; - format-icons = [ - "󰝦" - "󰪞" - "󰪟" - "󰪠" - "󰪡" - "󰪢" - "󰪣" - "󰪤" - "󰪥" - ]; + format-icons = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ]; }; memory = { interval = 1; rotate = 270; format = "{icon}"; - format-icons = [ - "󰝦" - "󰪞" - "󰪟" - "󰪠" - "󰪡" - "󰪢" - "󰪣" - "󰪤" - "󰪥" - ]; + format-icons = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ]; max-length = 10; tooltip-format = "RAM: {used:0.1f} GB / {total:0.1f} GB"; }; @@ -182,17 +151,7 @@ in { interval = 1; rotate = 270; format = "{icon}"; - format-icons = [ - "󰝦" - "󰪞" - "󰪟" - "󰪠" - "󰪡" - "󰪢" - "󰪣" - "󰪤" - "󰪥" - ]; + format-icons = [ "󰝦" "󰪞" "󰪟" "󰪠" "󰪡" "󰪢" "󰪣" "󰪤" "󰪥" ]; tooltip-format = "CPU: {usage:0.1f}%"; }; @@ -221,11 +180,7 @@ in { children-class = "power-drawer"; transition-left-to-right = false; }; - modules = [ - "custom/power" - "custom/logout" - "custom/reboot" - ]; + modules = [ "custom/power" "custom/logout" "custom/reboot" ]; }; clock = { @@ -234,292 +189,268 @@ in { }; }; sideBar = { - layer = "bottom"; - output = - if desktop - then builtins.elemAt monitors 0 - else builtins.elemAt monitors 1; - position = "right"; - margin-top = 8; - margin-right = 5; - margin-bottom = 8; - name = "sideBar"; - mode = "dock"; - "gtk-layer-shell" = true; + layer = "bottom"; + output = if desktop then + builtins.elemAt monitors 0 + else + builtins.elemAt monitors 1; + position = "right"; + margin-top = 8; + margin-right = 5; + margin-bottom = 8; + name = "sideBar"; + mode = "dock"; + "gtk-layer-shell" = true; - modules-left = - if desktop - then [ - "hyprland/workspaces" - ] - else [ - "group/brightness" - "battery" - ]; - modules-center = [ - ]; - modules-right = [ - "network" - "group/audio" - ]; + modules-left = if desktop then + [ "hyprland/workspaces" ] + else [ + "group/brightness" + "battery" + ]; + modules-center = [ ]; + modules-right = [ "network" "group/audio" ]; - "hyprland/workspaces" = workspaces; + "hyprland/workspaces" = workspaces; - "pulseaudio/slider" = { - orientation = "vertical"; - }; + "pulseaudio/slider" = { orientation = "vertical"; }; - "group/audio" = { - orientation = "vertical"; - modules = [ - "pulseaudio/slider" - "pulseaudio" - ]; - }; + "group/audio" = { + orientation = "vertical"; + modules = [ "pulseaudio/slider" "pulseaudio" ]; + }; - pulseaudio = { - format = "{icon}"; - format-muted = " "; - format-icons = { - default = [ - " " - " " - ]; - }; - on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; - on-click-right = "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'"; - }; + pulseaudio = { + format = "{icon}"; + format-muted = " "; + format-icons = { default = [ " " " " ]; }; + on-click = "pactl set-sink-mute @DEFAULT_SINK@ toggle"; + on-click-right = + "hyprctl dispatch exec '[float;size 40% 55%] pavucontrol'"; + }; - network = { - interval = 30; - format-wifi = "󰖩 "; - tooltip-format-wifi = "{essid} ({signalStrength}%)"; - format-ethernet = " "; - tooltip-format-ethernet = "{ifname}"; - format-disconnected = "󰖪 "; - tooltip-format-disconnected = "Disconnected"; - on-click = "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'"; - }; + network = { + interval = 30; + format-wifi = "󰖩 "; + tooltip-format-wifi = "{essid} ({signalStrength}%)"; + format-ethernet = " "; + tooltip-format-ethernet = "{ifname}"; + format-disconnected = "󰖪 "; + tooltip-format-disconnected = "Disconnected"; + on-click = + "hyprctl dispatch exec '[float;size 40% 55%] kitty nmtui'"; + }; - battery = { - bat = "BAT1"; - interval = 1; - tooltip-format = "{capacity}%\nTil empty: {time}"; - tooltip-format-charging = "{capacity}%\nTil full: {time}"; - format = "{icon}"; - format-icons = [ - "󰁺" - "󰁻" - "󰁽" - "󰁾" - "󰁿" - "󰂀" - "󰂁" - "󰂂" - "󰁹" - ]; - format-charging = "󰂄"; - }; + battery = { + bat = "BAT1"; + interval = 1; + tooltip-format = '' + {capacity}% + Til empty: {time}''; + tooltip-format-charging = '' + {capacity}% + Til full: {time}''; + format = "{icon}"; + format-icons = [ "󰁺" "󰁻" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹" ]; + format-charging = "󰂄"; + }; - "group/brightness" = { - orientation = "vertical"; - modules = [ - "backlight" - "backlight/slider" - ]; - }; - backlight = { - format = "󰃠"; - tooltip = "{percentage}%"; - }; - "backlight/slider" = { - min = 10; - max = 100; - orientation = "vertical"; - rotate = 180; - }; + "group/brightness" = { + orientation = "vertical"; + modules = [ "backlight" "backlight/slider" ]; + }; + backlight = { + format = "󰃠"; + tooltip = "{percentage}%"; + }; + "backlight/slider" = { + min = 10; + max = 100; + orientation = "vertical"; + rotate = 180; + }; }; }; style = '' - * { - border: none; - border-radius: 0; - font-size: 16px; - font-family: "JetBrains Mono Nerd Font"; - } + * { + border: none; + border-radius: 0; + font-size: 16px; + font-family: "JetBrains Mono Nerd Font"; + } - window#waybar { - border-radius: 10px; - border: 3px solid #${fg.light}; - background: rgba(23,29,35,0.50); - margin: 20px; - } - window#waybar.empty #window { - background: none; - border: none; - } + window#waybar { + border-radius: 10px; + border: 3px solid #${fg.light}; + background: rgba(23,29,35,0.50); + margin: 20px; + } + window#waybar.empty #window { + background: none; + border: none; + } - #workspaces { - margin: 3px; - background: #${bg.darker}; - border: 3px solid #${bg.dark}; - border-radius: 8px; - } + #workspaces { + margin: 3px; + background: #${bg.darker}; + border: 3px solid #${bg.dark}; + border-radius: 8px; + } - #workspaces button:hover { - border-radius: 8px; - } + #workspaces button:hover { + border-radius: 8px; + } - #workspaces button.active { - background: #${fg.lightester}; - border-radius: 8px; - color: #${bg.darkest}; - } + #workspaces button.active { + background: #${fg.lightester}; + border-radius: 8px; + color: #${bg.darkest}; + } - #cava { - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px 3px 3px 6px; - padding: 0px 15px 0px 15px; - color: #${colors.color6}; - } + #cava { + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px 3px 3px 6px; + padding: 0px 15px 0px 15px; + color: #${colors.color6}; + } - #window { - margin: 3px; - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - padding: 0 15px 0 15px; - font-weight: bold; - } + #window { + margin: 3px; + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + padding: 0 15px 0 15px; + font-weight: bold; + } - #hardware { - margin: 3px; - padding: 0 10px 0 10px; - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - } + #hardware { + margin: 3px; + padding: 0 10px 0 10px; + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + } - #custom-disk-icon, #cpu, #memory { - margin-bottom: 4px; - font-size: 20px; - font-weight: bold; - } + #custom-disk-icon, #cpu, #memory { + margin-bottom: 4px; + font-size: 20px; + font-weight: bold; + } - #custom-disk-icon { - color: #${colors.color4}; - } + #custom-disk-icon { + color: #${colors.color4}; + } - #memory { - color: #${colors.color1}; - } + #memory { + color: #${colors.color1}; + } - #cpu { - color: #${colors.color3}; - } + #cpu { + color: #${colors.color3}; + } - #clock { - font-weight: bold; - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px; - padding: 0 10px 0 10px; - font-size: 18px; - } + #clock { + font-weight: bold; + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px; + padding: 0 10px 0 10px; + font-size: 18px; + } - #powerbtns { - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px; - padding: 0 5px 0 10px; - } + #powerbtns { + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px; + padding: 0 5px 0 10px; + } - #custom-power { - color: #${colors.color2}; - font-size: 18px; - } + #custom-power { + color: #${colors.color2}; + font-size: 18px; + } - #custom-logout { - color: #${colors.color4}; - font-size: 18px; - } + #custom-logout { + color: #${colors.color4}; + font-size: 18px; + } - #custom-reboot { - color: #${colors.color0}; - font-size: 18px; - } + #custom-reboot { + color: #${colors.color0}; + font-size: 18px; + } - #audio { - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px; - padding: 5px 0 10px 0; - } + #audio { + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px; + padding: 5px 0 10px 0; + } - #pulseaudio { - color: #${colors.color1}; - font-size: 18px; - } + #pulseaudio { + color: #${colors.color1}; + font-size: 18px; + } - #backlight-slider slider, - #pulseaudio-slider slider { - background: #${colors.color4}; - background-color: transparent; - box-shadow: none; - } + #backlight-slider slider, + #pulseaudio-slider slider { + background: #${colors.color4}; + background-color: transparent; + box-shadow: none; + } - #backlight-slider trough, - #pulseaudio-slider trough { - min-width: 9px; - min-height: 90px; - border-radius: 8px; - background: #121212; - } + #backlight-slider trough, + #pulseaudio-slider trough { + min-width: 9px; + min-height: 90px; + border-radius: 8px; + background: #121212; + } - #backlight-slider highlight, - #pulseaudio-slider highlight { - border-radius: 8px; - background-color: #${colors.color4}; - } + #backlight-slider highlight, + #pulseaudio-slider highlight { + border-radius: 8px; + background-color: #${colors.color4}; + } - #network { - color: #${colors.color1}; - font-size: 20px; - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px; - padding: 5px 0 5px 6px; - } + #network { + color: #${colors.color1}; + font-size: 20px; + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px; + padding: 5px 0 5px 6px; + } - #brightness { - background: #${bg.darker}; - border-radius: 8px; - border: 3px solid #${bg.dark}; - margin: 3px; - padding: 10px 0px 5px 0; - } + #brightness { + background: #${bg.darker}; + border-radius: 8px; + border: 3px solid #${bg.dark}; + margin: 3px; + padding: 10px 0px 5px 0; + } - #backlight { - color: #${colors.color4}; - font-size: 18px; - padding: 0 4px 0 0; - } + #backlight { + color: #${colors.color4}; + font-size: 18px; + padding: 0 4px 0 0; + } - #battery { - color: #${colors.color4}; - font-size: 20px; - background: #${bg.darker}; - border: 3px solid #${bg.dark}; - border-radius: 8px; - margin: 3px; - padding: 5px 0 5px 0px; - } + #battery { + color: #${colors.color4}; + font-size: 20px; + background: #${bg.darker}; + border: 3px solid #${bg.dark}; + border-radius: 8px; + margin: 3px; + padding: 5px 0 5px 0px; + } ''; }; }; diff --git a/modules/home/environment/zshell.nix b/modules/home/environment/zshell.nix index 3460908..69a519f 100755 --- a/modules/home/environment/zshell.nix +++ b/modules/home/environment/zshell.nix @@ -1,6 +1,7 @@ -{lib, config, self, ...}: { +{ lib, config, self, ... }: { options = { - movOpts.envConfig.zshConfig.enable = lib.mkEnableOption "enables my zsh configuration"; + movOpts.envConfig.zshConfig.enable = + lib.mkEnableOption "enables my zsh configuration"; }; config = lib.mkIf config.movOpts.envConfig.zshConfig.enable { programs.zoxide = { @@ -28,7 +29,8 @@ svc = "sudo systemctl"; viflake = "nvim flake.nix"; iv = "invoke"; - cfgfilecount = "find $FLAKEPATH -name \"*.nix\" | wc -l | toilet -f 3d | lolcat"; + cfgfilecount = + ''find $FLAKEPATH -name "*.nix" | wc -l | toilet -f 3d | lolcat''; #git "ga" = "playshellsound ${self}/assets/sound/gitadd.wav; git add"; @@ -52,7 +54,7 @@ oh-my-zsh = { enable = true; - plugins = ["git" "fzf"]; + plugins = [ "git" "fzf" ]; }; enableCompletion = true; diff --git a/modules/home/files.nix b/modules/home/files.nix index cd82118..3c7bf73 100755 --- a/modules/home/files.nix +++ b/modules/home/files.nix @@ -1,4 +1,4 @@ -{pkgs, lib, self, config, ... }: +{ pkgs, lib, self, config, ... }: # This folder is for programs that do not have existing configuration modules in NixOS. # Basically a to-do list for stuff I need to write my own modules for. @@ -10,25 +10,25 @@ let scheme_path = "${pkgs.base16-schemes}/share/themes/${ssh_base16}.yaml"; scheme_string = builtins.readFile scheme_path; scheme_list = lib.splitString "\n" "${scheme_string}"; - colors = lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) scheme_list; - ssh_scheme = - lib.lists.foldl' ( - acc: line: let - splitLine = lib.splitString ": " line; - key = builtins.elemAt splitLine 0; - value = builtins.elemAt splitLine 1; - trimmedKey = lib.trim key; - cleanValue_step1 = lib.splitString " " value; - cleanValue_step2 = builtins.elemAt cleanValue_step1 0; - cleanValue_final = builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) cleanValue_step2; - in - acc // {"${trimmedKey}" = cleanValue_final;} - ) {} - colors; -in -{ + colors = + lib.filter (line: builtins.match "^ *base[0-9A-F]{2}: .*" line != null) + scheme_list; + ssh_scheme = lib.lists.foldl' (acc: line: + let + splitLine = lib.splitString ": " line; + key = builtins.elemAt splitLine 0; + value = builtins.elemAt splitLine 1; + trimmedKey = lib.trim key; + cleanValue_step1 = lib.splitString " " value; + cleanValue_step2 = builtins.elemAt cleanValue_step1 0; + cleanValue_final = + builtins.substring 1 (builtins.stringLength cleanValue_step2 - 2) + cleanValue_step2; + in acc // { "${trimmedKey}" = cleanValue_final; }) { } colors; +in { options = { - movOpts.homeFiles.enable = lib.mkEnableOption "enables declared custom files"; + movOpts.homeFiles.enable = + lib.mkEnableOption "enables declared custom files"; }; config = { home.file = { diff --git a/modules/home/programs/autojump.nix b/modules/home/programs/autojump.nix index 37bee07..7885bc7 100755 --- a/modules/home/programs/autojump.nix +++ b/modules/home/programs/autojump.nix @@ -1,6 +1,7 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.programConfigs.autojumpConfig.enable = lib.mkEnableOption "enables my autojump options"; + movOpts.programConfigs.autojumpConfig.enable = + lib.mkEnableOption "enables my autojump options"; }; config = lib.mkIf config.movOpts.programConfigs.autojumpConfig.enable { programs.autojump = { diff --git a/modules/home/programs/bat.nix b/modules/home/programs/bat.nix index aa168ad..f4ec83c 100755 --- a/modules/home/programs/bat.nix +++ b/modules/home/programs/bat.nix @@ -1,13 +1,12 @@ -{lib, config, inputs, ...}: { +{ lib, config, inputs, ... }: { options = { - movOpts.programConfigs.batConfig.enable = lib.mkEnableOption "enables my bat options"; + movOpts.programConfigs.batConfig.enable = + lib.mkEnableOption "enables my bat options"; }; config = lib.mkIf config.movOpts.programConfigs.batConfig.enable { programs.bat = { enable = true; - config = { - pager = "less -FR"; - }; + config = { pager = "less -FR"; }; }; }; } diff --git a/modules/home/programs/btop.nix b/modules/home/programs/btop.nix index e1045cc..2f7eee3 100755 --- a/modules/home/programs/btop.nix +++ b/modules/home/programs/btop.nix @@ -1,6 +1,7 @@ -{lib, config, pkgs, ...}: { +{ lib, config, pkgs, ... }: { options = { - movOpts.programConfigs.btopConfig.enable = lib.mkEnableOption "enables my btop config"; + movOpts.programConfigs.btopConfig.enable = + lib.mkEnableOption "enables my btop config"; }; config = lib.mkIf config.movOpts.programConfigs.btopConfig.enable { programs.btop = { @@ -19,6 +20,6 @@ }; }; - home.packages = with pkgs; [nvtopPackages.intel]; + home.packages = with pkgs; [ nvtopPackages.intel ]; }; } diff --git a/modules/home/programs/cava.nix b/modules/home/programs/cava.nix index 4ebb4df..a198197 100755 --- a/modules/home/programs/cava.nix +++ b/modules/home/programs/cava.nix @@ -1,10 +1,9 @@ -{lib, config, inputs, pkgs, ... }: { +{ lib, config, inputs, pkgs, ... }: { options = { - movOpts.programConfigs.cavaConfig.enable = lib.mkEnableOption "enables my cava settings"; + movOpts.programConfigs.cavaConfig.enable = + lib.mkEnableOption "enables my cava settings"; }; config = lib.mkIf config.movOpts.programConfigs.cavaConfig.enable { - programs.cava = { - enable = true; - }; + programs.cava = { enable = true; }; }; } diff --git a/modules/home/programs/default.nix b/modules/home/programs/default.nix index 2a76a48..c08bc2b 100755 --- a/modules/home/programs/default.nix +++ b/modules/home/programs/default.nix @@ -1,27 +1,9 @@ -{ - host, - nur, - nixvim, - self, - inputs, - username, - config, - home-manager, - ... -}: -{ - imports = - [(import ./btop.nix)] - ++ [(import ./yazi.nix)] - ++ [(import ./kitty.nix)] - ++ [(import ./fuzzel.nix)] - ++ [(import ./eza.nix)] - ++ [(import ./cava.nix)] - ++ [(import ./bat.nix)] - ++ [(import ./fzf.nix)] - ++ [(import ./git.nix)] - ++ [(import ./password-store.nix)] - ++ [(import ./autojump.nix)] - ++ [(import ./firefox.nix)] - ++ [(import ./nixvim)]; +{ env, host, nur, nixvim, self, inputs, username, config, home-manager, ... }: { + imports = [ (import ./btop.nix) ] ++ [ (import ./yazi.nix) ] + ++ [ (import ./kitty.nix) ] ++ [ (import ./fuzzel.nix) ] + ++ [ (import ./eza.nix) ] ++ [ (import ./cava.nix) ] + ++ [ (import ./bat.nix) ] ++ [ (import ./fzf.nix) ] + ++ [ (import ./git.nix) ] ++ [ (import ./password-store.nix) ] + ++ [ (import ./autojump.nix) ] ++ [ (import ./firefox.nix) ] + ++ [ (import ./nixvim) ]; } diff --git a/modules/home/programs/eza.nix b/modules/home/programs/eza.nix index 55c1e5f..b532fcd 100755 --- a/modules/home/programs/eza.nix +++ b/modules/home/programs/eza.nix @@ -1,12 +1,13 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.programConfigs.ezaConfig.enable = lib.mkEnableOption "enables my eza options"; + movOpts.programConfigs.ezaConfig.enable = + lib.mkEnableOption "enables my eza options"; }; config = lib.mkIf config.movOpts.programConfigs.ezaConfig.enable { programs.eza = { enable = true; enableZshIntegration = false; - extraOptions = ["-1" "-h" "--group-directories-first"]; + extraOptions = [ "-1" "-h" "--group-directories-first" ]; icons = "auto"; git = true; }; diff --git a/modules/home/programs/firefox.nix b/modules/home/programs/firefox.nix index 3ba25fd..f759743 100755 --- a/modules/home/programs/firefox.nix +++ b/modules/home/programs/firefox.nix @@ -1,6 +1,7 @@ -{lib, config, nur, username, self, pkgs, ... }: { +{ lib, config, nur, username, self, pkgs, ... }: { options = { - movOpts.programConfigs.firefoxConfig.enable = lib.mkEnableOption "enables my firefox configuration"; + movOpts.programConfigs.firefoxConfig.enable = + lib.mkEnableOption "enables my firefox configuration"; }; config = lib.mkIf config.movOpts.programConfigs.firefoxConfig.enable { programs.firefox = { @@ -22,7 +23,8 @@ OverridePostUpdatePage = ""; DontCheckDefaultBrowser = true; DisplayBookmarksToolbar = "always"; # alternatives: "always" or "newtab" - DisplayMenuBar = "default-off"; # alternatives: "always", "never" or "default-on" + DisplayMenuBar = + "default-off"; # alternatives: "always", "never" or "default-on" SearchBar = "unified"; # alternative: "separate" isDefault = true; }; profiles.${username} = { diff --git a/modules/home/programs/fuzzel.nix b/modules/home/programs/fuzzel.nix index 2f9f8f6..c4589b1 100755 --- a/modules/home/programs/fuzzel.nix +++ b/modules/home/programs/fuzzel.nix @@ -1,6 +1,7 @@ -{config, lib, ...}: { +{ config, lib, ... }: { options = { - movOpts.programConfigs.fuzzelConfig.enable = lib.mkEnableOption "enables my fuzzel configuration"; + movOpts.programConfigs.fuzzelConfig.enable = + lib.mkEnableOption "enables my fuzzel configuration"; }; config = lib.mkIf config.movOpts.programConfigs.fuzzelConfig.enable { programs.fuzzel = { diff --git a/modules/home/programs/fzf.nix b/modules/home/programs/fzf.nix index c7bde64..2c30cb1 100755 --- a/modules/home/programs/fzf.nix +++ b/modules/home/programs/fzf.nix @@ -1,6 +1,7 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.programConfigs.fzfConfig.enable = lib.mkEnableOption "enables my fzf options"; + movOpts.programConfigs.fzfConfig.enable = + lib.mkEnableOption "enables my fzf options"; }; config = lib.mkIf config.movOpts.programConfigs.fzfConfig.enable { programs.fzf = { diff --git a/modules/home/programs/git.nix b/modules/home/programs/git.nix index 9ce8633..a46ef69 100755 --- a/modules/home/programs/git.nix +++ b/modules/home/programs/git.nix @@ -1,6 +1,7 @@ -{lib, config, username, ...}: { +{ lib, config, username, ... }: { options = { - movOpts.programConfigs.gitConfig.enable = lib.mkEnableOption "enables my git configuration"; + movOpts.programConfigs.gitConfig.enable = + lib.mkEnableOption "enables my git configuration"; }; config = lib.mkIf config.movOpts.programConfigs.gitConfig.enable { programs.git = { diff --git a/modules/home/programs/kitty.nix b/modules/home/programs/kitty.nix index 896896d..99c956f 100755 --- a/modules/home/programs/kitty.nix +++ b/modules/home/programs/kitty.nix @@ -1,6 +1,7 @@ -{lib, config, pkgs, ... }: { +{ lib, config, pkgs, ... }: { options = { - movOpts.programConfigs.kittyConfig.enable = lib.mkEnableOption "enables my kitty configuration"; + movOpts.programConfigs.kittyConfig.enable = + lib.mkEnableOption "enables my kitty configuration"; }; config = lib.mkIf config.movOpts.programConfigs.kittyConfig.enable { programs.kitty = { diff --git a/modules/home/programs/nixvim/autocmd.nix b/modules/home/programs/nixvim/autocmd.nix index 26c892a..04e90fa 100755 --- a/modules/home/programs/nixvim/autocmd.nix +++ b/modules/home/programs/nixvim/autocmd.nix @@ -1,34 +1,37 @@ -{...}: { +{ ... }: { programs.nixvim = { autoCmd = [ { - command = "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd= --titleposition=left zsh"; - event = ["VimEnter"]; - pattern = ["*"]; + command = + "FloatermNew --wintype=float --name=shadeterm --position=topright --autoclose=0 --silent --cwd= --titleposition=left zsh"; + event = [ "VimEnter" ]; + pattern = [ "*" ]; desc = "Create a floating terminal, placed in the top right"; } { command = "silent! mkview"; - event = ["BufWinLeave"]; - pattern = ["*"]; - desc = "Save session window settings to be loaded next time the file is opened"; + event = [ "BufWinLeave" ]; + pattern = [ "*" ]; + desc = + "Save session window settings to be loaded next time the file is opened"; } { command = "silent! !aplay ~/sound/sys/cd.wav > /dev/null 2>&1 &"; - event = ["BufWinLeave"]; - pattern = ["*"]; + event = [ "BufWinLeave" ]; + pattern = [ "*" ]; desc = "Play a neat little sound effect when you close neovim"; } { command = "silent! loadview"; - event = ["BufWinEnter"]; - pattern = ["*"]; - desc = "Load previous session window settings for the opened file (folds, cursor pos, etc)"; + event = [ "BufWinEnter" ]; + pattern = [ "*" ]; + desc = + "Load previous session window settings for the opened file (folds, cursor pos, etc)"; } { command = "setlocal textwidth=135"; - event = ["BufWinEnter" "BufEnter"]; - pattern = ["*.md" "*.wiki" "*.txt"]; + event = [ "BufWinEnter" "BufEnter" ]; + pattern = [ "*.md" "*.wiki" "*.txt" ]; desc = "Set automatic linebreaks in plain text file formats"; } ]; diff --git a/modules/home/programs/nixvim/default.nix b/modules/home/programs/nixvim/default.nix index a2978fc..bb7d224 100755 --- a/modules/home/programs/nixvim/default.nix +++ b/modules/home/programs/nixvim/default.nix @@ -1,14 +1,3 @@ -{ - config, - pkgs, - host, - self, - ... -}: { - imports = [ - ./plugins - ./options.nix - ./keymaps.nix - ./autocmd.nix - ]; +{ env, config, pkgs, host, self, ... }: { + imports = [ ./plugins ./options.nix ./keymaps.nix ./autocmd.nix ]; } diff --git a/modules/home/programs/nixvim/options.nix b/modules/home/programs/nixvim/options.nix index c2d4f99..b9e7835 100755 --- a/modules/home/programs/nixvim/options.nix +++ b/modules/home/programs/nixvim/options.nix @@ -1,12 +1,7 @@ -{ - config, - ... -}: +{ config, ... }: -let - scheme = config.lib.stylix.colors; -in -{ +let scheme = config.lib.stylix.colors; +in { programs.nixvim = { colorschemes.base16 = { enable = true; diff --git a/modules/home/programs/nixvim/plugins/barbar.nix b/modules/home/programs/nixvim/plugins/barbar.nix index 215f6d6..663ff37 100755 --- a/modules/home/programs/nixvim/plugins/barbar.nix +++ b/modules/home/programs/nixvim/plugins/barbar.nix @@ -2,9 +2,7 @@ programs.nixvim = { plugins.barbar = { enable = false; - settings = { - auto_hide = 1; - }; + settings = { auto_hide = 1; }; }; }; } diff --git a/modules/home/programs/nixvim/plugins/cmp.nix b/modules/home/programs/nixvim/plugins/cmp.nix index d92b91f..540b3d5 100755 --- a/modules/home/programs/nixvim/plugins/cmp.nix +++ b/modules/home/programs/nixvim/plugins/cmp.nix @@ -2,11 +2,8 @@ programs.nixvim = { plugins.cmp = { autoEnableSources = true; - settings.sources = [ - {name = "nvim_lsp";} - {name = "path";} - {name = "buffer";} - ]; + settings.sources = + [ { name = "nvim_lsp"; } { name = "path"; } { name = "buffer"; } ]; }; plugins.cmp-nvim-lsp.enable = true; plugins.cmp-nvim-lsp-document-symbol.enable = true; diff --git a/modules/home/programs/nixvim/plugins/coq.nix b/modules/home/programs/nixvim/plugins/coq.nix index 64b8a8f..37a41fd 100755 --- a/modules/home/programs/nixvim/plugins/coq.nix +++ b/modules/home/programs/nixvim/plugins/coq.nix @@ -2,9 +2,7 @@ programs.nixvim = { plugins.coq-nvim = { enable = true; - settings = { - auto_start = false; - }; + settings = { auto_start = false; }; }; }; } diff --git a/modules/home/programs/nixvim/plugins/default.nix b/modules/home/programs/nixvim/plugins/default.nix index 3c4aabc..2d2335e 100755 --- a/modules/home/programs/nixvim/plugins/default.nix +++ b/modules/home/programs/nixvim/plugins/default.nix @@ -1,4 +1,4 @@ -{ host, self, pkgs, ... }: +{ host, self, pkgs, env, ... }: { imports = [ diff --git a/modules/home/programs/nixvim/plugins/extra_plugins.nix b/modules/home/programs/nixvim/plugins/extra_plugins.nix index fe87f74..77072f6 100755 --- a/modules/home/programs/nixvim/plugins/extra_plugins.nix +++ b/modules/home/programs/nixvim/plugins/extra_plugins.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.nixvim = { extraPlugins = [ (pkgs.vimUtils.buildVimPlugin { diff --git a/modules/home/programs/nixvim/plugins/fidget.nix b/modules/home/programs/nixvim/plugins/fidget.nix index f4f2783..e2be32d 100644 --- a/modules/home/programs/nixvim/plugins/fidget.nix +++ b/modules/home/programs/nixvim/plugins/fidget.nix @@ -3,9 +3,7 @@ enable = true; notification = { overrideVimNotify = true; - window = { - border = "rounded"; - }; + window = { border = "rounded"; }; }; }; } diff --git a/modules/home/programs/nixvim/plugins/haskell.nix b/modules/home/programs/nixvim/plugins/haskell.nix index 8b8c687..d908557 100755 --- a/modules/home/programs/nixvim/plugins/haskell.nix +++ b/modules/home/programs/nixvim/plugins/haskell.nix @@ -1,4 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: { programs.nixvim = { extraPlugins = [ (pkgs.vimUtils.buildVimPlugin { @@ -11,8 +11,6 @@ }; }) ]; - plugins = { - haskell-scope-highlighting.enable = true; - }; + plugins = { haskell-scope-highlighting.enable = true; }; }; } diff --git a/modules/home/programs/nixvim/plugins/lsp.nix b/modules/home/programs/nixvim/plugins/lsp.nix index 0587e64..ba848e1 100755 --- a/modules/home/programs/nixvim/plugins/lsp.nix +++ b/modules/home/programs/nixvim/plugins/lsp.nix @@ -1,81 +1,81 @@ - { - programs.nixvim = { - plugins = { - cmp-snippy.enable = true; - cmp = { - enable = true; - settings = { - mapping = { - __raw = '' - cmp.mapping.preset.insert({ - [''] = cmp.mapping.close_docs(), - [''] = cmp.mapping.open_docs(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = function(fallback) - if cmp.visible() then - cmp.confirm() - else - fallback() - end - end, -- Added a comma here - [''] = function(fallback) - if cmp.visible() then - cmp.select_next_item() - else - fallback() - end - end, -- Added a comma here - [''] = function(fallback) - if cmp.visible() then - cmp.select_prev_item() - else - fallback() - end - end -- No comma needed for the last item - }) - ''; - }; - window = { - completion.border = "rounded"; - }; +{ + programs.nixvim = { + plugins = { + cmp-snippy.enable = true; + cmp = { + enable = true; + settings = { + mapping = { + __raw = '' + cmp.mapping.preset.insert({ + [''] = cmp.mapping.close_docs(), + [''] = cmp.mapping.open_docs(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = function(fallback) + if cmp.visible() then + cmp.confirm() + else + fallback() + end + end, -- Added a comma here + [''] = function(fallback) + if cmp.visible() then + cmp.select_next_item() + else + fallback() + end + end, -- Added a comma here + [''] = function(fallback) + if cmp.visible() then + cmp.select_prev_item() + else + fallback() + end + end -- No comma needed for the last item + }) + ''; }; + window = { completion.border = "rounded"; }; }; - lsp = { - enable = true; - servers = { - bashls.enable = true; - ccls.enable = true; - clangd.enable = true; - cmake.enable = true; - html.enable = true; - jsonls.enable = true; - lua_ls.enable = true; - marksman.enable = true; - nixd = { - enable = true; - settings = { - nixd = { - nixpkgs.expr = "import { }"; - formatting.command = "nixfmt"; - }; - options = { - # uses Xenon config because it has every option exposed to it - nixos.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").nixosConfigurations.xenon.options"; - home.expr = "(builtins.getFlake \"github:pagedMov/nixos-config\").homeConfigurations.xenonHome.options"; - }; + }; + lsp = { + enable = true; + servers = { + bashls.enable = true; + ccls.enable = true; + clangd.enable = true; + cmake.enable = true; + html.enable = true; + jsonls.enable = true; + lua_ls.enable = true; + marksman.enable = true; + nixd = { + enable = true; + settings = { + nixd = { + nixpkgs.expr = "import { }"; + formatting.command = "nixfmt"; + }; + options = { + # uses Xenon config because it has every option exposed to it + nixos.expr = '' + (builtins.getFlake "github:pagedMov/nixos-config").nixosConfigurations.xenon.options''; + home.expr = '' + (builtins.getFlake "github:pagedMov/nixos-config").homeConfigurations.xenonHome.options''; }; }; - pyright.enable = true; - sqls.enable = true; - hls = { - enable = true; - installGhc = true; - }; + }; + pyright.enable = true; + sqls.enable = true; + hls = { + enable = true; + installGhc = true; }; }; }; }; - } + }; +} diff --git a/modules/home/programs/nixvim/plugins/lualine.nix b/modules/home/programs/nixvim/plugins/lualine.nix index 336b4c3..507c768 100755 --- a/modules/home/programs/nixvim/plugins/lualine.nix +++ b/modules/home/programs/nixvim/plugins/lualine.nix @@ -23,20 +23,20 @@ }; }; sections = { - lualine_a = ["mode"]; - lualine_b = ["buffers"]; - lualine_c = []; - lualine_x = ["searchcount" "fileformat" "filetype"]; - lualine_y = ["branch" "diff" "diagnostics"]; - lualine_z = ["location"]; + lualine_a = [ "mode" ]; + lualine_b = [ "buffers" ]; + lualine_c = [ ]; + lualine_x = [ "searchcount" "fileformat" "filetype" ]; + lualine_y = [ "branch" "diff" "diagnostics" ]; + lualine_z = [ "location" ]; }; inactive_sections = { - lualine_a = []; - lualine_b = []; - lualine_c = ["filename"]; - lualine_x = ["location"]; - lualine_y = []; - lualine_z = []; + lualine_a = [ ]; + lualine_b = [ ]; + lualine_c = [ "filename" ]; + lualine_x = [ "location" ]; + lualine_y = [ ]; + lualine_z = [ ]; }; }; }; diff --git a/modules/home/programs/nixvim/plugins/neocord.nix b/modules/home/programs/nixvim/plugins/neocord.nix index 222243f..0433148 100644 --- a/modules/home/programs/nixvim/plugins/neocord.nix +++ b/modules/home/programs/nixvim/plugins/neocord.nix @@ -2,7 +2,8 @@ programs.nixvim.plugins.neocord = { enable = true; settings = { - logo = "https://styles.redditmedia.com/t5_30kix/styles/communityIcon_n2hvyn96zwk81.png"; + logo = + "https://styles.redditmedia.com/t5_30kix/styles/communityIcon_n2hvyn96zwk81.png"; logo_tooltip = "Neovim"; buttons = [ { diff --git a/modules/home/programs/nixvim/plugins/nvim-lightbulb.nix b/modules/home/programs/nixvim/plugins/nvim-lightbulb.nix index 9c597c3..0ac66d9 100644 --- a/modules/home/programs/nixvim/plugins/nvim-lightbulb.nix +++ b/modules/home/programs/nixvim/plugins/nvim-lightbulb.nix @@ -2,9 +2,7 @@ programs.nixvim.plugins.nvim-lightbulb = { enable = true; settings = { - virtual_text = { - enable = true; - }; + virtual_text = { enable = true; }; autocmd.enabled = true; }; }; diff --git a/modules/home/programs/nixvim/plugins/scratch.nix b/modules/home/programs/nixvim/plugins/scratch.nix new file mode 100644 index 0000000..f08f559 --- /dev/null +++ b/modules/home/programs/nixvim/plugins/scratch.nix @@ -0,0 +1 @@ +{ programs.nixvim.plugins.chatgpt = { enable = true; }; } diff --git a/modules/home/programs/nixvim/plugins/telescope.nix b/modules/home/programs/nixvim/plugins/telescope.nix index a3e9e04..6e955b2 100755 --- a/modules/home/programs/nixvim/plugins/telescope.nix +++ b/modules/home/programs/nixvim/plugins/telescope.nix @@ -2,13 +2,7 @@ programs.nixvim = { plugins.telescope = { enable = true; - settings = { - pickers = { - find_files = { - hidden = true; - }; - }; - }; + settings = { pickers = { find_files = { hidden = true; }; }; }; }; }; } diff --git a/modules/home/programs/nixvim/plugins/vim-matchup.nix b/modules/home/programs/nixvim/plugins/vim-matchup.nix index ac569fd..3070626 100755 --- a/modules/home/programs/nixvim/plugins/vim-matchup.nix +++ b/modules/home/programs/nixvim/plugins/vim-matchup.nix @@ -10,9 +10,7 @@ }; matchParen = { hiSurroundAlways = true; - offscreen = { - method = "popup"; - }; + offscreen = { method = "popup"; }; }; treesitterIntegration = { enable = true; diff --git a/modules/home/programs/password-store.nix b/modules/home/programs/password-store.nix index 6efc254..3f7117a 100755 --- a/modules/home/programs/password-store.nix +++ b/modules/home/programs/password-store.nix @@ -1,15 +1,14 @@ -{lib, config, username, ...}: let - home = "/home/${username}"; +{ lib, config, username, ... }: +let home = "/home/${username}"; in { options = { - movOpts.programConfigs.passConfig.enable = lib.mkEnableOption "enables my pass config"; + movOpts.programConfigs.passConfig.enable = + lib.mkEnableOption "enables my pass config"; }; config = lib.mkIf config.movOpts.programConfigs.passConfig.enable { programs.password-store = { enable = true; - settings = { - PASSWORD_STORE_DIR = "${home}/.password-store"; - }; + settings = { PASSWORD_STORE_DIR = "${home}/.password-store"; }; }; }; } diff --git a/modules/home/programs/yazi.nix b/modules/home/programs/yazi.nix index 52b4e8c..8798114 100755 --- a/modules/home/programs/yazi.nix +++ b/modules/home/programs/yazi.nix @@ -1,6 +1,7 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.programConfigs.yaziConfig.enable = lib.mkEnableOption "enables my yazi config"; + movOpts.programConfigs.yaziConfig.enable = + lib.mkEnableOption "enables my yazi config"; }; config = lib.mkIf config.movOpts.programConfigs.yaziConfig.enable { programs.yazi = { diff --git a/modules/home/scripts/commands/icanhazip.nix b/modules/home/scripts/commands/icanhazip.nix index ec5d536..18d9401 100644 --- a/modules/home/scripts/commands/icanhazip.nix +++ b/modules/home/scripts/commands/icanhazip.nix @@ -2,12 +2,7 @@ pkgs.writeShellApplication { name = "icanhazip"; - runtimeInputs = with pkgs; [ - iproute2 - curl - gawk - coreutils - ]; + runtimeInputs = with pkgs; [ iproute2 curl gawk coreutils ]; text = '' if [ $# -eq 0 ]; then echo "Public IP: $(curl -s icanhazip.com -4)" diff --git a/modules/home/scripts/commands/invoke.nix b/modules/home/scripts/commands/invoke.nix index 7febc0c..7aabfcd 100755 --- a/modules/home/scripts/commands/invoke.nix +++ b/modules/home/scripts/commands/invoke.nix @@ -1,6 +1,4 @@ -{ - pkgs -}: +{ pkgs }: pkgs.writeShellApplication { name = "invoke"; text = '' diff --git a/modules/home/scripts/commands/runbg.nix b/modules/home/scripts/commands/runbg.nix index 54cc5b7..16f7c3e 100755 --- a/modules/home/scripts/commands/runbg.nix +++ b/modules/home/scripts/commands/runbg.nix @@ -1,12 +1,10 @@ -{ - pkgs, -}: +{ pkgs, }: pkgs.writeShellApplication { name = "runbg"; runtimeInputs = with pkgs; [ - coreutils # Provides `basename`, `which`, etc. - bash # Provides the Bash shell - util-linux # Provides `tty` + coreutils # Provides `basename`, `which`, etc. + bash # Provides the Bash shell + util-linux # Provides `tty` ]; text = '' #!/usr/bin/env bash diff --git a/modules/home/scripts/commands/splash.nix b/modules/home/scripts/commands/splash.nix index 7b15b5d..43b4638 100755 --- a/modules/home/scripts/commands/splash.nix +++ b/modules/home/scripts/commands/splash.nix @@ -1,13 +1,7 @@ -{ - pkgs -}: +{ pkgs }: pkgs.writeShellApplication { name = "splash"; - runtimeInputs = with pkgs; [ - lolcat - toilet - coreutils - ]; + runtimeInputs = with pkgs; [ lolcat toilet coreutils ]; text = '' echo "NixOS kernel ver. $(uname -a | awk '{print $3}') x86_64 GNU/Linux" date +"%A %B %-d %Y" diff --git a/modules/home/scripts/commands/toolbelt.nix b/modules/home/scripts/commands/toolbelt.nix index 37dcc43..257e331 100755 --- a/modules/home/scripts/commands/toolbelt.nix +++ b/modules/home/scripts/commands/toolbelt.nix @@ -1,4 +1,4 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellApplication { name = "toolbelt"; runtimeInputs = with pkgs; [ diff --git a/modules/home/scripts/commands/viconf.nix b/modules/home/scripts/commands/viconf.nix index c1bd8a9..c309e8e 100755 --- a/modules/home/scripts/commands/viconf.nix +++ b/modules/home/scripts/commands/viconf.nix @@ -1,12 +1,7 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellApplication { name = "viconf"; - runtimeInputs = with pkgs; [ - coreutils - fd - ripgrep - fzf - ]; + runtimeInputs = with pkgs; [ coreutils fd ripgrep fzf ]; text = '' #!/usr/bin/env bash diff --git a/modules/home/scripts/commands/vipkg.nix b/modules/home/scripts/commands/vipkg.nix index 39d5526..65aa006 100644 --- a/modules/home/scripts/commands/vipkg.nix +++ b/modules/home/scripts/commands/vipkg.nix @@ -6,15 +6,9 @@ let rev = "63dacb46bf939521bdc93981b4cbb7ecb58427a0"; hash = "sha256-vboIEwIQojofItm2xGCdZCzW96U85l9nDW3ifMuAIdM="; }; -in -pkgs.writeShellApplication { +in pkgs.writeShellApplication { name = "vipkg"; - runtimeInputs = with pkgs; [ - coreutils - fd - ripgrep - fzf - ]; + runtimeInputs = with pkgs; [ coreutils fd ripgrep fzf ]; text = '' [ ! $# -eq 1 ] && echo "Usage: vipkg " && exit 1 diff --git a/modules/home/scripts/default.nix b/modules/home/scripts/default.nix index 39134df..5288f63 100755 --- a/modules/home/scripts/default.nix +++ b/modules/home/scripts/default.nix @@ -1,40 +1,32 @@ -{ - host, - lib, - config, - self, - pkgs, - ... -}: let +{ host, lib, config, self, pkgs, ... }: +let fetchfromgh = import ./nix/fetchfromgh.nix { inherit pkgs; }; vipkg = import ./commands/vipkg.nix { inherit pkgs; }; - keyring = import ./wm-controls/keyring.nix { inherit pkgs; }; - invoke = import ./commands/invoke.nix { inherit pkgs; }; - splash = import ./commands/splash.nix { inherit pkgs; }; - runbg = import ./commands/runbg.nix { inherit pkgs; }; - icanhazip = import ./commands/icanhazip.nix { inherit pkgs; }; + keyring = import ./wm-controls/keyring.nix { inherit pkgs; }; + invoke = import ./commands/invoke.nix { inherit pkgs; }; + splash = import ./commands/splash.nix { inherit pkgs; }; + runbg = import ./commands/runbg.nix { inherit pkgs; }; + icanhazip = import ./commands/icanhazip.nix { inherit pkgs; }; garbage-collect = import ./nix/garbage-collect.nix { inherit pkgs; }; - nsp = import ./nix/nsp.nix { inherit pkgs; }; - scheck = import ./wm-controls/s_check.nix { inherit pkgs; }; - switchmon = import ./wm-controls/switchmon.nix { inherit pkgs; }; - rebuild = import ./nix/rebuild.nix { inherit host self pkgs; }; - moveonscreen = import ./wm-controls/moveonscreen.nix { inherit pkgs; }; - toolbelt = import ./commands/toolbelt.nix { inherit pkgs; }; - viconf = import ./commands/viconf.nix { inherit pkgs; }; - chscheme = import ./wm-controls/chscheme.nix { inherit pkgs; }; - chpaper = import ./wm-controls/chpaper.nix { inherit pkgs; }; - mkscreenshots = import ./wm-controls/mkscreenshots.nix { inherit pkgs; }; - scriptOverride = - doc: - group: - name: - lib.mkEnableOption - "${doc}" // { - default = config.movOpts.movScripts.enable && config.movOpts.movScripts.${group}.enable; + nsp = import ./nix/nsp.nix { inherit pkgs; }; + scheck = import ./wm-controls/s_check.nix { inherit pkgs; }; + switchmon = import ./wm-controls/switchmon.nix { inherit pkgs; }; + rebuild = import ./nix/rebuild.nix { inherit host self pkgs; }; + moveonscreen = import ./wm-controls/moveonscreen.nix { inherit pkgs; }; + toolbelt = import ./commands/toolbelt.nix { inherit pkgs; }; + viconf = import ./commands/viconf.nix { inherit pkgs; }; + chscheme = import ./wm-controls/chscheme.nix { inherit pkgs; }; + chpaper = import ./wm-controls/chpaper.nix { inherit pkgs; }; + mkscreenshots = import ./wm-controls/mkscreenshots.nix { inherit pkgs; }; + scriptOverride = doc: group: name: + lib.mkEnableOption "${doc}" // { + default = config.movOpts.movScripts.enable + && config.movOpts.movScripts.${group}.enable; }; in { options = { - movOpts.movScripts.enable = lib.mkEnableOption "Enables all pagedmov's scripts"; + movOpts.movScripts.enable = + lib.mkEnableOption "Enables all pagedmov's scripts"; # Enable or disable by group movOpts.movScripts.commandScripts.enable = @@ -45,16 +37,20 @@ in { lib.mkEnableOption "Enables all Nix shortcut scripts"; # Command Scripts - movOpts.movScripts.commandScripts.vipkg.enable = - scriptOverride "Search through the nixpkgs/pkgs directory for a package derivation. Useful for overrides." "commandScripts" "vipkg"; + movOpts.movScripts.commandScripts.vipkg.enable = scriptOverride + "Search through the nixpkgs/pkgs directory for a package derivation. Useful for overrides." + "commandScripts" "vipkg"; movOpts.movScripts.commandScripts.icanhazip.enable = - scriptOverride "Enables the icanhazip command" "commandScripts" "icanhazip"; + scriptOverride "Enables the icanhazip command" "commandScripts" + "icanhazip"; movOpts.movScripts.commandScripts.invoke.enable = scriptOverride "Enables the invoke command" "commandScripts" "invoke"; movOpts.movScripts.commandScripts.runbg.enable = - scriptOverride "Enables the runbg command - written by FrostPhoenix" "commandScripts" "runbg"; + scriptOverride "Enables the runbg command - written by FrostPhoenix" + "commandScripts" "runbg"; movOpts.movScripts.commandScripts.splash.enable = - scriptOverride "Enables the splash screen when opening a terminal" "commandScripts" "splash"; + scriptOverride "Enables the splash screen when opening a terminal" + "commandScripts" "splash"; movOpts.movScripts.commandScripts.toolbelt.enable = scriptOverride "Enables the toolbelt command" "commandScripts" "toolbelt"; movOpts.movScripts.commandScripts.viconf.enable = @@ -66,52 +62,78 @@ in { movOpts.movScripts.hyprlandControls.scheck.enable = scriptOverride "Enables the scheck command" "hyprlandControls" "scheck"; movOpts.movScripts.hyprlandControls.chscheme.enable = - scriptOverride "Enables the chscheme command" "hyprlandControls" "chscheme"; + scriptOverride "Enables the chscheme command" "hyprlandControls" + "chscheme"; movOpts.movScripts.hyprlandControls.keyring.enable = scriptOverride "Enables the keyring command" "hyprlandControls" "keyring"; movOpts.movScripts.hyprlandControls.moveonscreen.enable = - scriptOverride "Ensures floating windows remain on screen" "hyprlandControls" "moveonscreen"; + scriptOverride "Ensures floating windows remain on screen" + "hyprlandControls" "moveonscreen"; movOpts.movScripts.hyprlandControls.switchmon.enable = - scriptOverride "Moves cursor to the center of the second monitor" "hyprlandControls" "switchmon"; - movOpts.movScripts.hyprlandControls.mkscreenshots.enable = - scriptOverride "Generates screenshots, and updates the README.md with the current rev hash" "hyprlandControls" "switchmon"; - + scriptOverride "Moves cursor to the center of the second monitor" + "hyprlandControls" "switchmon"; + movOpts.movScripts.hyprlandControls.mkscreenshots.enable = scriptOverride + "Generates screenshots, and updates the README.md with the current rev hash" + "hyprlandControls" "switchmon"; # Nix Shortcuts - movOpts.movScripts.nixShortcuts.fetchfromgh.enable = - scriptOverride "Provides a full pkgs.fetchFromGitHub call from a repository url" "nixShortcuts" "fetchfromgh"; + movOpts.movScripts.nixShortcuts.fetchfromgh.enable = scriptOverride + "Provides a full pkgs.fetchFromGitHub call from a repository url" + "nixShortcuts" "fetchfromgh"; movOpts.movScripts.nixShortcuts.garbage-collect.enable = - scriptOverride "Enables the garbage-collect script" "nixShortcuts" "garbage-collect"; + scriptOverride "Enables the garbage-collect script" "nixShortcuts" + "garbage-collect"; movOpts.movScripts.nixShortcuts.nsp.enable = - scriptOverride "Enables nsp as an alias for 'nix-shell -p'" "nixShortcuts" "nsp"; - movOpts.movScripts.nixShortcuts.rebuild.enable = - scriptOverride "Enables rebuild as an alias for 'sudo nixos-rebuild switch'" "nixShortcuts" "rebuild"; + scriptOverride "Enables nsp as an alias for 'nix-shell -p'" "nixShortcuts" + "nsp"; + movOpts.movScripts.nixShortcuts.rebuild.enable = scriptOverride + "Enables rebuild as an alias for 'sudo nixos-rebuild switch'" + "nixShortcuts" "rebuild"; }; config = lib.mkIf config.movOpts.movScripts.enable { home.packages = - lib.optionals config.movOpts.movScripts.commandScripts.invoke.enable [ invoke ] - # Command Scripts Overrides - ++ lib.optionals config.movOpts.movScripts.commandScripts.vipkg.enable [ vipkg ] - ++ lib.optionals config.movOpts.movScripts.commandScripts.runbg.enable [ runbg ] - ++ lib.optionals config.movOpts.movScripts.commandScripts.icanhazip.enable [ icanhazip ] - ++ lib.optionals config.movOpts.movScripts.commandScripts.splash.enable [ splash ] - ++ lib.optionals config.movOpts.movScripts.commandScripts.toolbelt.enable [ toolbelt ] - ++ lib.optionals config.movOpts.movScripts.commandScripts.viconf.enable [ viconf ] + lib.optionals config.movOpts.movScripts.commandScripts.invoke.enable [ + invoke + ] + # Command Scripts Overrides + ++ lib.optionals config.movOpts.movScripts.commandScripts.vipkg.enable + [ vipkg ] + ++ lib.optionals config.movOpts.movScripts.commandScripts.runbg.enable + [ runbg ] + ++ lib.optionals config.movOpts.movScripts.commandScripts.icanhazip.enable + [ icanhazip ] + ++ lib.optionals config.movOpts.movScripts.commandScripts.splash.enable + [ splash ] + ++ lib.optionals config.movOpts.movScripts.commandScripts.toolbelt.enable + [ toolbelt ] + ++ lib.optionals config.movOpts.movScripts.commandScripts.viconf.enable [ + viconf + ] - # Hyprland Controls Overrides - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.chpaper.enable [ chpaper ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.scheck.enable [ scheck ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.chscheme.enable [ chscheme ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.keyring.enable [ keyring ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.moveonscreen.enable [ moveonscreen ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.switchmon.enable [ switchmon ] - ++ lib.optionals config.movOpts.movScripts.hyprlandControls.mkscreenshots.enable [ mkscreenshots ] + # Hyprland Controls Overrides + ++ lib.optionals config.movOpts.movScripts.hyprlandControls.chpaper.enable + [ chpaper ] + ++ lib.optionals config.movOpts.movScripts.hyprlandControls.scheck.enable + [ scheck ] ++ lib.optionals + config.movOpts.movScripts.hyprlandControls.chscheme.enable [ chscheme ] + ++ lib.optionals config.movOpts.movScripts.hyprlandControls.keyring.enable + [ keyring ] ++ lib.optionals + config.movOpts.movScripts.hyprlandControls.moveonscreen.enable + [ moveonscreen ] ++ lib.optionals + config.movOpts.movScripts.hyprlandControls.switchmon.enable [ switchmon ] + ++ lib.optionals + config.movOpts.movScripts.hyprlandControls.mkscreenshots.enable [ + mkscreenshots + ] - # Nix Shortcuts Overrides - ++ lib.optionals config.movOpts.movScripts.nixShortcuts.fetchfromgh.enable [ fetchfromgh ] - ++ lib.optionals config.movOpts.movScripts.nixShortcuts.garbage-collect.enable [ garbage-collect ] - ++ lib.optionals config.movOpts.movScripts.nixShortcuts.nsp.enable [ nsp ] - ++ lib.optionals config.movOpts.movScripts.nixShortcuts.rebuild.enable [ rebuild ]; + # Nix Shortcuts Overrides + ++ lib.optionals config.movOpts.movScripts.nixShortcuts.fetchfromgh.enable + [ fetchfromgh ] ++ lib.optionals + config.movOpts.movScripts.nixShortcuts.garbage-collect.enable + [ garbage-collect ] + ++ lib.optionals config.movOpts.movScripts.nixShortcuts.nsp.enable [ nsp ] + ++ lib.optionals config.movOpts.movScripts.nixShortcuts.rebuild.enable + [ rebuild ]; }; } diff --git a/modules/home/scripts/nix/fetchfromgh.nix b/modules/home/scripts/nix/fetchfromgh.nix index 82d0550..5d6c25d 100644 --- a/modules/home/scripts/nix/fetchfromgh.nix +++ b/modules/home/scripts/nix/fetchfromgh.nix @@ -2,37 +2,35 @@ pkgs.writeShellApplication { name = "fetchfromgh"; - runtimeInputs = [ - pkgs.nix-prefetch-scripts - ]; + runtimeInputs = [ pkgs.nix-prefetch-scripts ]; text = '' - if [ $# -ne 1 ] || ! echo "$1" | grep -qE "[A-Za-z0-9_-]+/[A-Za-z0-9_-]+"; then - echo "Usage: fetchfromgh someuser/somerepo" - echo " - i.e. fetchfromgh pagedMov/nixos-config" + if [ $# -ne 1 ] || ! echo "$1" | grep -qE "[A-Za-z0-9_-]+/[A-Za-z0-9_-]+"; then + echo "Usage: fetchfromgh someuser/somerepo" + echo " - i.e. fetchfromgh pagedMov/nixos-config" + exit 1 + fi + + if ! curl -s -o /dev/null -w "%{http_code}" "https://github.com/$1" | grep -q "200"; then + echo "Couldn't find that repository, curl returned 404." exit 1 fi - if ! curl -s -o /dev/null -w "%{http_code}" "https://github.com/$1" | grep -q "200"; then - echo "Couldn't find that repository, curl returned 404." - exit 1 - fi + json=$(nix-prefetch-git --quiet "https://github.com/$1") - json=$(nix-prefetch-git --quiet "https://github.com/$1") + url=$(echo "$json" | jq '.url' | tr -d '"') + owner=$(echo "$url" | awk -F'/' '{print $(NF-1)}') + repo=$(echo "$url" | awk -F'/' '{print $NF}') + rev=$(echo "$json" | jq '.rev' | tr -d '"') + hash=$(echo "$json" | jq '.hash' | tr -d '"') - url=$(echo "$json" | jq '.url' | tr -d '"') - owner=$(echo "$url" | awk -F'/' '{print $(NF-1)}') - repo=$(echo "$url" | awk -F'/' '{print $NF}') - rev=$(echo "$json" | jq '.rev' | tr -d '"') - hash=$(echo "$json" | jq '.hash' | tr -d '"') - - output="\ - src = pkgs.fetchFromGitHub { - owner = \"$owner\"; - repo = \"$repo\"; - rev = \"$rev\"; - hash = \"$hash\"; - }; - " - echo "$output" + output="\ + src = pkgs.fetchFromGitHub { + owner = \"$owner\"; + repo = \"$repo\"; + rev = \"$rev\"; + hash = \"$hash\"; + }; + " + echo "$output" ''; } diff --git a/modules/home/scripts/nix/garbage-collect.nix b/modules/home/scripts/nix/garbage-collect.nix index 7b09257..526d482 100755 --- a/modules/home/scripts/nix/garbage-collect.nix +++ b/modules/home/scripts/nix/garbage-collect.nix @@ -1,6 +1,4 @@ -{ - pkgs -}: +{ pkgs }: pkgs.writeShellApplication { name = "garbage-collect"; runtimeInputs = with pkgs; [ diff --git a/modules/home/scripts/nix/nsp.nix b/modules/home/scripts/nix/nsp.nix index d514247..9affeb2 100755 --- a/modules/home/scripts/nix/nsp.nix +++ b/modules/home/scripts/nix/nsp.nix @@ -1,6 +1,4 @@ -{ - pkgs -}: +{ pkgs }: pkgs.writeShellApplication { name = "nsp"; text = '' diff --git a/modules/home/scripts/nix/rebuild.nix b/modules/home/scripts/nix/rebuild.nix index 9426056..a208693 100755 --- a/modules/home/scripts/nix/rebuild.nix +++ b/modules/home/scripts/nix/rebuild.nix @@ -1,8 +1,4 @@ -{ - host, - self, - pkgs, -}: +{ host, self, pkgs, }: pkgs.writeShellApplication { name = "rebuild"; text = '' diff --git a/modules/home/scripts/wm-controls/chpaper.nix b/modules/home/scripts/wm-controls/chpaper.nix index 1188f66..4a4f9a7 100755 --- a/modules/home/scripts/wm-controls/chpaper.nix +++ b/modules/home/scripts/wm-controls/chpaper.nix @@ -1,13 +1,7 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellApplication { name = "chpaper"; - runtimeInputs = with pkgs; [ - chafa - fzf - ripgrep - findutils - coreutils - ]; + runtimeInputs = with pkgs; [ chafa fzf ripgrep findutils coreutils ]; text = '' paper="$\{self}/assets/wallpapers/$(find "$FLAKEPATH"/assets/wallpapers -exec basename {} \; | rg "\.\w+$" | fzf --preview "chafa -s 30x40 $FLAKEPATH/assets/wallpapers/{}")" [ "$paper" = "$\{self}/assets/wallpapers/" ] && echo "Cancelling wallpaper change" && exit 1 diff --git a/modules/home/scripts/wm-controls/chscheme.nix b/modules/home/scripts/wm-controls/chscheme.nix index e3219a5..9109f58 100755 --- a/modules/home/scripts/wm-controls/chscheme.nix +++ b/modules/home/scripts/wm-controls/chscheme.nix @@ -1,10 +1,7 @@ { pkgs }: pkgs.writeShellApplication { name = "chscheme"; - runtimeInputs = with pkgs; [ - fzf - coreutils - ]; + runtimeInputs = with pkgs; [ fzf coreutils ]; text = '' selected_scheme=$(/usr/bin/env ls "$(nix-build '' -A base16-schemes)"/share/themes | \ sed 's/\.yaml//g' | \ diff --git a/modules/home/scripts/wm-controls/keyring.nix b/modules/home/scripts/wm-controls/keyring.nix index 1965fd3..a1a9cc4 100755 --- a/modules/home/scripts/wm-controls/keyring.nix +++ b/modules/home/scripts/wm-controls/keyring.nix @@ -1,6 +1,4 @@ -{ - pkgs -}: +{ pkgs }: pkgs.writeShellApplication { name = "keyring"; runtimeInputs = with pkgs; [ diff --git a/modules/home/scripts/wm-controls/mkscreenshots.nix b/modules/home/scripts/wm-controls/mkscreenshots.nix index 190fc71..831b5b1 100644 --- a/modules/home/scripts/wm-controls/mkscreenshots.nix +++ b/modules/home/scripts/wm-controls/mkscreenshots.nix @@ -2,15 +2,7 @@ pkgs.writeShellApplication { name = "mkscreenshots"; - runtimeInputs = with pkgs; [ - jq - neofetch - kitty - coreutils - nemo - grimblast - git - ]; + runtimeInputs = with pkgs; [ jq neofetch kitty coreutils nemo grimblast git ]; text = '' if [ -n "$(hyprctl clients -j | jq -r '.[] | select(.workspace.name == "4")')" ]; then echo "There are windows in workspace 4. This script uses workspace 4, so move those windows and run it again." diff --git a/modules/home/scripts/wm-controls/moveonscreen.nix b/modules/home/scripts/wm-controls/moveonscreen.nix index fc4a810..8714d08 100755 --- a/modules/home/scripts/wm-controls/moveonscreen.nix +++ b/modules/home/scripts/wm-controls/moveonscreen.nix @@ -1,12 +1,7 @@ -{pkgs}: +{ pkgs }: pkgs.writeShellApplication { name = "moveonscreen"; - runtimeInputs = with pkgs; [ - hyprland - jq - coreutils - gawk - ]; + runtimeInputs = with pkgs; [ hyprland jq coreutils gawk ]; text = '' center_window=false if [[ ! $# -eq 0 ]] && [[ $1 == "--center" ]]; then diff --git a/modules/home/scripts/wm-controls/s_check.nix b/modules/home/scripts/wm-controls/s_check.nix index 27a2864..d1f8240 100755 --- a/modules/home/scripts/wm-controls/s_check.nix +++ b/modules/home/scripts/wm-controls/s_check.nix @@ -1,6 +1,4 @@ -{ - pkgs, -}: +{ pkgs, }: pkgs.writeShellApplication { name = "scheck"; text = '' diff --git a/modules/home/scripts/wm-controls/switchmon.nix b/modules/home/scripts/wm-controls/switchmon.nix index 80d7591..808e0d3 100755 --- a/modules/home/scripts/wm-controls/switchmon.nix +++ b/modules/home/scripts/wm-controls/switchmon.nix @@ -1,6 +1,4 @@ -{ - pkgs, -}: +{ pkgs, }: pkgs.writeShellApplication { name = "switchmon"; text = '' diff --git a/modules/home/servermodule.nix b/modules/home/servermodule.nix index 1f1273d..ba0eab4 100644 --- a/modules/home/servermodule.nix +++ b/modules/home/servermodule.nix @@ -1,13 +1,4 @@ -{ - inputs, - nixpkgs, - config, - self, - username, - host, - lib, - ... -}: { +{ inputs, nixpkgs, config, self, username, host, lib, ... }: { imports = [ ./environment/starship.nix ./environment/userpkgs.nix diff --git a/modules/server/cdn/jellyfin.nix b/modules/server/cdn/jellyfin.nix index e760921..9f59725 100755 --- a/modules/server/cdn/jellyfin.nix +++ b/modules/server/cdn/jellyfin.nix @@ -2,7 +2,8 @@ { options = { - movOpts.jellyfinConfig.enable = lib.mkEnableOption "Enables the server's jellyfin config"; + movOpts.jellyfinConfig.enable = + lib.mkEnableOption "Enables the server's jellyfin config"; }; config = lib.mkIf config.movOpts.jellyfinConfig.enable { services.jellyfin = { diff --git a/modules/server/default.nix b/modules/server/default.nix index 8ba279c..9cf285c 100755 --- a/modules/server/default.nix +++ b/modules/server/default.nix @@ -1,10 +1,7 @@ { pkgs, lib, ... }: { - imports = [ - ./cdn - ./glasshaus - ]; + imports = [ ./cdn ./glasshaus ]; movOpts = { jellyfinConfig.enable = lib.mkDefault false; caddyConfig.enable = lib.mkDefault false; diff --git a/modules/server/glasshaus/caddy.nix b/modules/server/glasshaus/caddy.nix index 2c3eab1..bb4fcf0 100755 --- a/modules/server/glasshaus/caddy.nix +++ b/modules/server/glasshaus/caddy.nix @@ -2,7 +2,8 @@ { options = { - movOpts.caddyConfig.enable = lib.mkEnableOption "Enable my caddy config for the glasshaus.info domain name"; + movOpts.caddyConfig.enable = lib.mkEnableOption + "Enable my caddy config for the glasshaus.info domain name"; }; config = lib.mkIf config.movOpts.caddyConfig.enable { services.caddy = { diff --git a/modules/sys/default.nix b/modules/sys/default.nix index 9c346f0..71d5376 100755 --- a/modules/sys/default.nix +++ b/modules/sys/default.nix @@ -1,16 +1,3 @@ -{ - inputs, - nixpkgs, - config, - self, - username, - host, - lib, - ... -}: { - imports = [ - ./hardware - ./software - ./environment - ]; +{ inputs, nixpkgs, config, self, username, host, lib, ... }: { + imports = [ ./hardware ./software ./environment ]; } diff --git a/modules/sys/environment/default.nix b/modules/sys/environment/default.nix index 0447f39..34471ab 100755 --- a/modules/sys/environment/default.nix +++ b/modules/sys/environment/default.nix @@ -1,16 +1,4 @@ -{ - inputs, - nixpkgs, - nixvim, - config, - self, - username, - host, - ... -}: { - imports = - [(import ./sddm.nix)] - ++ [(import ./issue.nix)] - ++ [(import ./nix.nix)] - ++ [(import ./stylix.nix)]; +{ inputs, nixpkgs, nixvim, config, self, username, host, ... }: { + imports = [ (import ./sddm.nix) ] ++ [ (import ./issue.nix) ] + ++ [ (import ./nix.nix) ] ++ [ (import ./stylix.nix) ]; } diff --git a/modules/sys/environment/issue.nix b/modules/sys/environment/issue.nix index d0551b0..394b12f 100755 --- a/modules/sys/environment/issue.nix +++ b/modules/sys/environment/issue.nix @@ -1,6 +1,7 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.sysEnv.issue.enable = lib.mkEnableOption "enables custom /etc/issue splash screen for the tty"; + movOpts.sysEnv.issue.enable = + lib.mkEnableOption "enables custom /etc/issue splash screen for the tty"; }; config = lib.mkIf config.movOpts.sysEnv.issue.enable { environment.etc."issue".text = '' diff --git a/modules/sys/environment/nix.nix b/modules/sys/environment/nix.nix index e48ec5f..0f8e059 100755 --- a/modules/sys/environment/nix.nix +++ b/modules/sys/environment/nix.nix @@ -1,6 +1,7 @@ -{lib, config, ... }: { +{ lib, config, ... }: { options = { - movOpts.sysEnv.nixSettings.enable = lib.mkEnableOption "enables my nixos settings"; + movOpts.sysEnv.nixSettings.enable = + lib.mkEnableOption "enables my nixos settings"; }; config = lib.mkIf config.movOpts.sysEnv.nixSettings.enable { system.stateVersion = "24.05"; @@ -8,8 +9,8 @@ nix = { settings = { auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; - substituters = ["https://nix-gaming.cachix.org"]; + experimental-features = [ "nix-command" "flakes" ]; + substituters = [ "https://nix-gaming.cachix.org" ]; }; gc = { automatic = true; diff --git a/modules/sys/environment/sddm.nix b/modules/sys/environment/sddm.nix index 5273dd9..76253b5 100755 --- a/modules/sys/environment/sddm.nix +++ b/modules/sys/environment/sddm.nix @@ -1,24 +1,17 @@ -{ - pkgs, - self, - lib, - config, - ... -}: { +{ pkgs, self, lib, config, ... }: { options = { - movOpts.sysEnv.sddmConfig.enable = lib.mkEnableOption "enables custom sddm configuration"; + movOpts.sysEnv.sddmConfig.enable = + lib.mkEnableOption "enables custom sddm configuration"; }; config = lib.mkIf config.movOpts.sysEnv.sddmConfig.enable { environment.systemPackages = [ - ( - pkgs.catppuccin-sddm.override { - flavor = "mocha"; - font = "JetBrains Mono Nerd Font"; - fontSize = "14"; - loginBackground = true; - background = "${self}/assets/wallpapers/dark-waves.jpg"; - } - ) + (pkgs.catppuccin-sddm.override { + flavor = "mocha"; + font = "JetBrains Mono Nerd Font"; + fontSize = "14"; + loginBackground = true; + background = "${self}/assets/wallpapers/dark-waves.jpg"; + }) ]; services.displayManager.sddm = { enable = true; diff --git a/modules/sys/environment/stylix.nix b/modules/sys/environment/stylix.nix index c4010fa..8db93bb 100755 --- a/modules/sys/environment/stylix.nix +++ b/modules/sys/environment/stylix.nix @@ -1,18 +1,12 @@ -{ - pkgs, - self, - lib, - config, - ... -}: +{ pkgs, self, lib, config, ... }: let scheme = "tokyo-night-dark"; wallpaper = "${self}/assets/wallpapers/dark-waves.jpg"; -in -{ +in { options = { - movOpts.sysEnv.stylixConfig.enable = lib.mkEnableOption "enables custom stylix options"; + movOpts.sysEnv.stylixConfig.enable = + lib.mkEnableOption "enables custom stylix options"; }; config = lib.mkIf config.movOpts.sysEnv.stylixConfig.enable { stylix = { @@ -25,7 +19,7 @@ in }; polarity = "dark"; autoEnable = true; - opacity.terminal = 0.50; + opacity.terminal = 0.5; targets = { console.enable = true; feh.enable = true; @@ -39,15 +33,15 @@ in }; fonts = { monospace = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; sansSerif = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; serif = { - package = pkgs.nerdfonts.override {fonts = ["JetBrainsMono"];}; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; name = "JetBrains Mono Nerd Font"; }; sizes = { diff --git a/modules/sys/hardware/bootloader.nix b/modules/sys/hardware/bootloader.nix index fcbd656..7b02bb3 100755 --- a/modules/sys/hardware/bootloader.nix +++ b/modules/sys/hardware/bootloader.nix @@ -1,6 +1,7 @@ -{pkgs, lib, config, ...}: { +{ pkgs, lib, config, ... }: { options = { - movOpts.hardwareCfg.bootLoader.enable = lib.mkEnableOption "enables bootloader config"; + movOpts.hardwareCfg.bootLoader.enable = + lib.mkEnableOption "enables bootloader config"; }; config = lib.mkIf config.movOpts.hardwareCfg.bootLoader.enable { boot = { diff --git a/modules/sys/hardware/default.nix b/modules/sys/hardware/default.nix index c2d7219..e8c4bcc 100755 --- a/modules/sys/hardware/default.nix +++ b/modules/sys/hardware/default.nix @@ -1,15 +1,4 @@ -{ - inputs, - nixpkgs, - nixvim, - config, - self, - username, - host, - ... -}: { - imports = - [(import ./bootloader.nix)] - ++ [(import ./network.nix)] - ++ [(import ./powerprofiles.nix)]; +{ inputs, nixpkgs, nixvim, config, self, username, host, ... }: { + imports = [ (import ./bootloader.nix) ] ++ [ (import ./network.nix) ] + ++ [ (import ./powerprofiles.nix) ]; } diff --git a/modules/sys/hardware/network.nix b/modules/sys/hardware/network.nix index ac554b4..6b901a7 100755 --- a/modules/sys/hardware/network.nix +++ b/modules/sys/hardware/network.nix @@ -1,16 +1,16 @@ -{host, lib, config, ...}: -{ +{ host, lib, config, ... }: { options = { - movOpts.hardwareCfg.networkModule.enable = lib.mkEnableOption "enables network configuration"; + movOpts.hardwareCfg.networkModule.enable = + lib.mkEnableOption "enables network configuration"; }; config = lib.mkIf config.movOpts.hardwareCfg.networkModule.enable { networking = { networkmanager.enable = true; hostName = "${host}"; hosts = { - "192.168.1.200" = ["xenon"]; - "192.168.1.201" = ["oganesson"]; - "192.168.1.202" = ["mercury"]; + "192.168.1.200" = [ "xenon" ]; + "192.168.1.201" = [ "oganesson" ]; + "192.168.1.202" = [ "mercury" ]; }; firewall = { enable = true; diff --git a/modules/sys/hardware/powerprofiles.nix b/modules/sys/hardware/powerprofiles.nix index 00920dc..48ad41e 100755 --- a/modules/sys/hardware/powerprofiles.nix +++ b/modules/sys/hardware/powerprofiles.nix @@ -1,6 +1,7 @@ -{lib, config, ... }: { +{ lib, config, ... }: { options = { - movOpts.hardwareCfg.powerProfiles.enable = lib.mkEnableOption "enables power profiles"; + movOpts.hardwareCfg.powerProfiles.enable = + lib.mkEnableOption "enables power profiles"; }; config = lib.mkIf config.movOpts.hardwareCfg.powerProfiles.enable { services = { diff --git a/modules/sys/software/default.nix b/modules/sys/software/default.nix index d6c276a..6b7172a 100755 --- a/modules/sys/software/default.nix +++ b/modules/sys/software/default.nix @@ -1,16 +1,5 @@ -{ - inputs, - nixpkgs, - config, - self, - username, - host, - ... -}: { - imports = - [(import ./packages.nix)] - ++ [(import ./programs.nix)] - ++ [(import ./services.nix)] - ++ [(import ./virtualization.nix)] - ++ [(import ./gaming)]; +{ inputs, nixpkgs, config, self, username, host, ... }: { + imports = [ (import ./packages.nix) ] ++ [ (import ./programs.nix) ] + ++ [ (import ./services.nix) ] ++ [ (import ./virtualization.nix) ] + ++ [ (import ./gaming) ]; } diff --git a/modules/sys/software/gaming/default.nix b/modules/sys/software/gaming/default.nix index 0b11b5c..6b1c76a 100755 --- a/modules/sys/software/gaming/default.nix +++ b/modules/sys/software/gaming/default.nix @@ -1,5 +1,3 @@ -{...}: { - imports = - [(import ./steam.nix)] - ++ [(import ./gaming_pkgs.nix)]; +{ ... }: { + imports = [ (import ./steam.nix) ] ++ [ (import ./gaming_pkgs.nix) ]; } diff --git a/modules/sys/software/gaming/gaming_pkgs.nix b/modules/sys/software/gaming/gaming_pkgs.nix index 78ecfb1..3b13e6b 100755 --- a/modules/sys/software/gaming/gaming_pkgs.nix +++ b/modules/sys/software/gaming/gaming_pkgs.nix @@ -1,23 +1,20 @@ -{lib, config, pkgs, ...}: +{ lib, config, pkgs, ... }: let cust-openrct2 = pkgs.openrct2.overrideAttrs (oldAttrs: { - cmakeFlags = [ - "-DDOWNLOAD_OBJECTS=ON" - "-DDOWNLOAD_OPENMSX=ON" - "-DDOWNLOAD_OPENSFX=ON" - "-DDOWNLOAD_TITLE_SEQUENCES=ON" - ]; - }); -in -{ + cmakeFlags = [ + "-DDOWNLOAD_OBJECTS=ON" + "-DDOWNLOAD_OPENMSX=ON" + "-DDOWNLOAD_OPENSFX=ON" + "-DDOWNLOAD_TITLE_SEQUENCES=ON" + ]; + }); +in { options = { - movOpts.softwareCfg.gamingPkgs.enable = lib.mkEnableOption "enables gaming packages"; + movOpts.softwareCfg.gamingPkgs.enable = + lib.mkEnableOption "enables gaming packages"; }; config = lib.mkIf config.movOpts.softwareCfg.gamingPkgs.enable { - environment.systemPackages = with pkgs; [ - snes9x-gtk - cust-openrct2 - ]; + environment.systemPackages = with pkgs; [ snes9x-gtk cust-openrct2 ]; }; } diff --git a/modules/sys/software/gaming/steam.nix b/modules/sys/software/gaming/steam.nix index 74a7583..5404ca7 100755 --- a/modules/sys/software/gaming/steam.nix +++ b/modules/sys/software/gaming/steam.nix @@ -1,6 +1,7 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.softwareCfg.steamConfig.enable = lib.mkEnableOption "enables steam configuration"; + movOpts.softwareCfg.steamConfig.enable = + lib.mkEnableOption "enables steam configuration"; }; config = lib.mkIf config.movOpts.softwareCfg.steamConfig.enable { programs.steam = { diff --git a/modules/sys/software/packages.nix b/modules/sys/software/packages.nix index 81e264e..d21e003 100755 --- a/modules/sys/software/packages.nix +++ b/modules/sys/software/packages.nix @@ -1,6 +1,7 @@ -{lib, config, pkgs, inputs, ... }: { +{ lib, config, pkgs, inputs, ... }: { options = { - movOpts.softwareCfg.sysPkgs.enable = lib.mkEnableOption "enables default system packages"; + movOpts.softwareCfg.sysPkgs.enable = + lib.mkEnableOption "enables default system packages"; }; config = lib.mkIf config.movOpts.softwareCfg.sysPkgs.enable { environment.systemPackages = with pkgs; [ diff --git a/modules/sys/software/programs.nix b/modules/sys/software/programs.nix index 12893b8..0231ffe 100755 --- a/modules/sys/software/programs.nix +++ b/modules/sys/software/programs.nix @@ -1,6 +1,7 @@ -{lib, config, pkgs, ...}: { +{ lib, config, pkgs, ... }: { options = { - movOpts.softwareCfg.sysProgs.enable = lib.mkEnableOption "enables default system programs"; + movOpts.softwareCfg.sysProgs.enable = + lib.mkEnableOption "enables default system programs"; }; config = lib.mkIf config.movOpts.softwareCfg.sysProgs.enable { programs = { @@ -8,10 +9,7 @@ zsh.enable = lib.mkDefault true; nix-ld = { enable = lib.mkDefault true; - libraries = with pkgs; [ - stdenv.cc.cc - ffmpeg-full - ]; + libraries = with pkgs; [ stdenv.cc.cc ffmpeg-full ]; }; gnupg.agent = { enable = lib.mkDefault true; diff --git a/modules/sys/software/services.nix b/modules/sys/software/services.nix index d3aef9a..29f79ec 100755 --- a/modules/sys/software/services.nix +++ b/modules/sys/software/services.nix @@ -1,16 +1,15 @@ -{lib, config, ...}: { +{ lib, config, ... }: { options = { - movOpts.softwareCfg.sysServices.enable = lib.mkEnableOption "enables default system services"; + movOpts.softwareCfg.sysServices.enable = + lib.mkEnableOption "enables default system services"; }; config = lib.mkIf config.movOpts.softwareCfg.sysServices.enable { services = { keyd = { enable = true; keyboards.default = { - ids = ["*"]; - settings.main = { - capslock = "esc"; - }; + ids = [ "*" ]; + settings.main = { capslock = "esc"; }; }; }; pipewire = { diff --git a/modules/sys/software/virtualization.nix b/modules/sys/software/virtualization.nix index 7925e63..2634d70 100755 --- a/modules/sys/software/virtualization.nix +++ b/modules/sys/software/virtualization.nix @@ -1,6 +1,7 @@ -{lib, config, username, ...}: { +{ lib, config, username, ... }: { options = { - movOpts.softwareCfg.virtConfig.enable = lib.mkEnableOption "enables virtualization"; + movOpts.softwareCfg.virtConfig.enable = + lib.mkEnableOption "enables virtualization"; }; config = lib.mkIf config.movOpts.softwareCfg.virtConfig.enable { virtualisation.libvirtd.enable = true;