From 0f37f09199e247fbea02fd9215ebd1f5eedc4343 Mon Sep 17 00:00:00 2001 From: LavaDesu Date: Thu, 15 Jul 2021 19:57:49 +0700 Subject: [PATCH] formatting goes brrr --- flake.nix | 34 ++++---- modules/system/gui.nix | 6 +- modules/system/hardware-configuration.nix | 98 +++++++++++------------ modules/system/kernel.nix | 2 +- modules/system/networking.nix | 2 +- modules/system/packages.nix | 24 +++--- modules/system/security.nix | 2 +- modules/user/xdg.nix | 10 ++- modules/user/zsh.nix | 2 +- overlays/mps-youtube.nix | 2 +- overlays/picom.nix | 2 +- overlays/transcrypt.nix | 2 +- overlays/winetricks.nix | 2 +- overlays/xinit.nix | 4 +- packages/linux-lava/default.nix | 11 ++- packages/wine-osu/default.nix | 15 ++-- users/rin.nix | 2 +- 17 files changed, 110 insertions(+), 110 deletions(-) diff --git a/flake.nix b/flake.nix index 164170e..cb2830b 100644 --- a/flake.nix +++ b/flake.nix @@ -24,24 +24,24 @@ (builtins.attrNames (builtins.readDir root)); # Reads root path modules = - let - getName = path: lib.removeSuffix ".nix" ( # Strip extension - lib.last ( # Gets the last part (filename) - lib.splitString "/" ( # Splits the path into components - builtins.toString path # Converts the path into a string + let + getName = path: lib.removeSuffix ".nix" ( # Strip extension + lib.last ( # Gets the last part (filename) + lib.splitString "/" ( # Splits the path into components + builtins.toString path # Converts the path into a string + ) ) - ) - ); - genModulePaths = basePath: builtins.listToAttrs ( - builtins.map (path: { - name = getName path; - value = path; - }) (getPaths basePath) - ); - in { - user = genModulePaths ./modules/user; - system = genModulePaths ./modules/system; - }; + ); + genModulePaths = basePath: builtins.listToAttrs ( + builtins.map (path: { + name = getName path; + value = path; + }) (getPaths basePath) + ); + in { + user = genModulePaths ./modules/user; + system = genModulePaths ./modules/system; + }; customPackages = pkgs: let diff --git a/modules/system/gui.nix b/modules/system/gui.nix index a95c5e7..151958f 100644 --- a/modules/system/gui.nix +++ b/modules/system/gui.nix @@ -3,9 +3,9 @@ enableDefaultFonts = true; fontconfig = { defaultFonts = { - serif = ["NotoSerif"]; - sansSerif = ["NotoSans"]; - monospace = ["CascadiaCode"]; + serif = [ "NotoSerif" ]; + sansSerif = [ "NotoSans" ]; + monospace = [ "CascadiaCode" ]; }; }; fonts = with pkgs; [ diff --git a/modules/system/hardware-configuration.nix b/modules/system/hardware-configuration.nix index faac99d..97ce11b 100644 --- a/modules/system/hardware-configuration.nix +++ b/modules/system/hardware-configuration.nix @@ -4,66 +4,66 @@ { config, lib, pkgs, modulesPath, ... }: { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + imports = [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; boot.initrd.availableKernelModules = [ "ehci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_pci" ]; - boot.initrd.kernelModules = [ ]; + boot.initrd.kernelModules = []; boot.kernelModules = [ "kvm-intel" ]; - boot.extraModulePackages = [ ]; + boot.extraModulePackages = []; - fileSystems."/" = - { device = "rootfs"; - fsType = "tmpfs"; - options = [ "defaults" "size=4G" "mode=755" ]; - }; + fileSystems."/" = { + device = "rootfs"; + fsType = "tmpfs"; + options = [ "defaults" "size=4G" "mode=755" ]; + }; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/E8E8-E570"; - fsType = "vfat"; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/E8E8-E570"; + fsType = "vfat"; + }; - fileSystems."/mnt/butter" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=5" ]; - }; + fileSystems."/mnt/butter" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=5" ]; + }; - fileSystems."/nix" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=258" ]; - }; + fileSystems."/nix" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=258" ]; + }; - fileSystems."/home" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=260" ]; - }; + fileSystems."/home" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=260" ]; + }; - fileSystems."/home/.snapshots" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=319" ]; - }; + fileSystems."/home/.snapshots" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=319" ]; + }; - fileSystems."/root" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=261" ]; - }; + fileSystems."/root" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=261" ]; + }; - fileSystems."/var" = - { device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; - fsType = "btrfs"; - options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=259" ]; - }; + fileSystems."/var" = { + device = "/dev/disk/by-uuid/8f0ba28e-5dff-4a4e-8db0-aa72cc90cb5d"; + fsType = "btrfs"; + options = [ "autodefrag" "compress=zstd:3" "nossd" "nossd_spread" "relatime" "subvolid=259" ]; + }; - fileSystems."/mnt/hdd" = - { device = "/dev/disk/by-uuid/d5e3cfe5-c73a-4695-b81b-fc0215d4cefe"; - fsType = "ext4"; - }; + fileSystems."/mnt/hdd" = { + device = "/dev/disk/by-uuid/d5e3cfe5-c73a-4695-b81b-fc0215d4cefe"; + fsType = "ext4"; + }; - swapDevices = [ ]; + swapDevices = []; } diff --git a/modules/system/kernel.nix b/modules/system/kernel.nix index 68f2cf6..04d5a4c 100644 --- a/modules/system/kernel.nix +++ b/modules/system/kernel.nix @@ -10,7 +10,7 @@ device = "nodev"; }; }; - blacklistedKernelModules = ["uvcvideo"]; + blacklistedKernelModules = [ "uvcvideo" ]; initrd = { includeDefaultModules = false; kernelModules = [ "i915" ]; diff --git a/modules/system/networking.nix b/modules/system/networking.nix index a504e73..b97a2cd 100644 --- a/modules/system/networking.nix +++ b/modules/system/networking.nix @@ -17,5 +17,5 @@ prefixLength = 24; }]; networking.defaultGateway = "192.168.100.1"; - networking.nameservers = ["192.168.100.11"]; + networking.nameservers = [ "192.168.100.11" ]; } diff --git a/modules/system/packages.nix b/modules/system/packages.nix index 6f7edc6..bc87f50 100644 --- a/modules/system/packages.nix +++ b/modules/system/packages.nix @@ -1,8 +1,7 @@ -{ config, pkgs, ...}: { +{ config, enableGUI, lib, pkgs, ... }: { environment.systemPackages = with pkgs; [ efibootmgr git - gparted htop libarchive lf @@ -11,23 +10,24 @@ neovim rsync wget - + ] ++ lib.optionals enableGUI [ + gparted gnome3.nautilus ]; environment.variables.EDITOR = "nvim"; - +} +// (if !enableGUI then {} else { hardware.opengl.extraPackages = with pkgs; [ - vaapiIntel - vaapiVdpau - libvdpau-va-gl - intel-ocl - rocm-opencl-icd - rocm-opencl-runtime + vaapiIntel + vaapiVdpau + libvdpau-va-gl + intel-ocl + rocm-opencl-icd + rocm-opencl-runtime ]; programs.light.enable = true; hardware.opentabletdriver.enable = true; programs.steam.enable = true; services.dbus.packages = [ pkgs.gnome3.dconf pkgs.gcr ]; services.gnome.sushi.enable = true; - # services.ipfs.enable = true; -} +}) diff --git a/modules/system/security.nix b/modules/system/security.nix index 0cfde8e..9b150f2 100644 --- a/modules/system/security.nix +++ b/modules/system/security.nix @@ -14,7 +14,7 @@ enable = true; extraRules = [ { - groups = ["wheel"]; + groups = [ "wheel" ]; keepEnv = true; persist = true; } diff --git a/modules/user/xdg.nix b/modules/user/xdg.nix index 2f14461..c85c624 100644 --- a/modules/user/xdg.nix +++ b/modules/user/xdg.nix @@ -1,9 +1,11 @@ { config, ... }: let - genMimes = mimeTypes: builtins.listToAttrs (builtins.map (mimeType: { - name = mimeType; - value = "brave-browser.desktop"; - }) mimeTypes); + genMimes = mimeTypes: builtins.listToAttrs ( + builtins.map (mimeType: { + name = mimeType; + value = "brave-browser.desktop"; + }) mimeTypes + ); mimes = genMimes [ "x-scheme-handler/http" diff --git a/modules/user/zsh.nix b/modules/user/zsh.nix index 996b996..8b0da73 100644 --- a/modules/user/zsh.nix +++ b/modules/user/zsh.nix @@ -125,7 +125,7 @@ in { localVariables = { KEYTIMEOUT = "1"; #PS1 = "%B%{$fg[red]%}[%{$fg[yellow]%}%n%{$fg[green]%}@%{$fg[blue]%}%M %{$fg[magenta]%}%~%{$fg[red]%}]%{$reset_color%}$%b "; - ZSH_AUTOSUGGEST_STRATEGY = ["completion"]; + ZSH_AUTOSUGGEST_STRATEGY = [ "completion" ]; ZSH_AUTOSUGGEST_USE_ASYNC = true; ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE = 40; }; diff --git a/overlays/mps-youtube.nix b/overlays/mps-youtube.nix index 1c78b38..c1e5f87 100644 --- a/overlays/mps-youtube.nix +++ b/overlays/mps-youtube.nix @@ -1,5 +1,5 @@ self: super: { - mps-youtube = super.mps-youtube.overrideAttrs(old: rec { + mps-youtube = super.mps-youtube.overrideAttrs (old: { src = super.fetchFromGitHub { owner = "louisabraham"; repo = "mps-youtube"; diff --git a/overlays/picom.nix b/overlays/picom.nix index 81e4c5f..8778aea 100644 --- a/overlays/picom.nix +++ b/overlays/picom.nix @@ -1,5 +1,5 @@ self: super: { - picom = super.picom.overrideAttrs(old: { + picom = super.picom.overrideAttrs (old: { src = super.fetchFromGitHub { repo = "picom"; diff --git a/overlays/transcrypt.nix b/overlays/transcrypt.nix index cce969a..ee1c4d6 100644 --- a/overlays/transcrypt.nix +++ b/overlays/transcrypt.nix @@ -1,5 +1,5 @@ self: super: { - transcrypt = super.transcrypt.overrideAttrs(o: rec { + transcrypt = super.transcrypt.overrideAttrs (old: rec { version = "2.1.0"; patches = [ ./patches/transcrypt.patch ]; diff --git a/overlays/winetricks.nix b/overlays/winetricks.nix index 861911a..b6dcefa 100644 --- a/overlays/winetricks.nix +++ b/overlays/winetricks.nix @@ -1,5 +1,5 @@ self: super: { - winetricks = super.winetricks.overrideAttrs(old: rec { + winetricks = super.winetricks.overrideAttrs (old: rec { name = "winetricks-20210528-073e2db"; src = super.fetchFromGitHub { repo = "winetricks"; diff --git a/overlays/xinit.nix b/overlays/xinit.nix index f9e13c7..df006f1 100644 --- a/overlays/xinit.nix +++ b/overlays/xinit.nix @@ -1,10 +1,10 @@ self: super: { xorg = super.xorg // { - xinit = super.xorg.xinit.overrideAttrs(o: { + xinit = super.xorg.xinit.overrideAttrs (old: { # Some info: # - Make startx use $XAUTHORITY as server auth files instead of .serverauth.$$ # - Make startx respect $XINITRC and $XSERVERRC - patches = o.patches ++ [ ./patches/startx.patch ]; + patches = old.patches ++ [ ./patches/startx.patch ]; }); }; } diff --git a/packages/linux-lava/default.nix b/packages/linux-lava/default.nix index 09777b1..2f310e8 100644 --- a/packages/linux-lava/default.nix +++ b/packages/linux-lava/default.nix @@ -1,9 +1,8 @@ -{ - buildLinux, - callPackage, - kernelPatches, - lib, - ... +{ buildLinux +, callPackage +, kernelPatches +, lib +, ... } @ args: let diff --git a/packages/wine-osu/default.nix b/packages/wine-osu/default.nix index 955fd00..016107b 100644 --- a/packages/wine-osu/default.nix +++ b/packages/wine-osu/default.nix @@ -1,13 +1,12 @@ -{ - getPaths, - winePackages, - wineUnstable, - wineStaging, - ... +{ getPaths +, winePackages +, wineUnstable +, wineStaging +, ... }: # TODO: Use winePackages.callPackage -(wineStaging.overrideDerivation(o: { - patches = (o.patches or []) ++ getPaths ./patches; +(wineStaging.overrideDerivation (old: { + patches = (old.patches or []) ++ getPaths ./patches; })).override { wineRelease = "staging"; wineBuild = "wineWow"; diff --git a/users/rin.nix b/users/rin.nix index 0dcce47..88c8471 100644 --- a/users/rin.nix +++ b/users/rin.nix @@ -57,7 +57,7 @@ GNUPGHOME = "${config.xdg.dataHome}/gnupg"; GTK2_RC_FILES = "${config.xdg.configHome}/gtk-2.0/gtkrc"; LESSHISTFILE = "-"; - NODE_REPL_HISTORY="${config.xdg.dataHome}/nodejs/repl_history"; + NODE_REPL_HISTORY = "${config.xdg.dataHome}/nodejs/repl_history"; NPM_CONFIG_USERCONFIG = "${config.xdg.configHome}/npm/npmrc"; PUB_CACHE = "${config.xdg.cacheHome}/dart"; WGETRC = "${config.xdg.configHome}/wgetrc";