diff --git a/flake.nix b/flake.nix index 5bb758d..5001044 100644 --- a/flake.nix +++ b/flake.nix @@ -10,42 +10,31 @@ # opdavies-nvim.url = "path:/home/opdavies/Code/github.com/opdavies/opdavies.nvim"; }; - outputs = inputs @ { - flake-parts, - self, - ... - }: let - username = "opdavies"; + outputs = inputs@{ flake-parts, self, ... }: + let + username = "opdavies"; - mkNixos = import ./lib/nixos {inherit inputs self username;}; - mkWsl = import ./lib/wsl2 {inherit inputs self username;}; - in - flake-parts.lib.mkFlake {inherit inputs;} { - systems = ["x86_64-linux"]; + mkNixos = import ./lib/nixos { inherit inputs self username; }; + mkWsl = import ./lib/wsl2 { inherit inputs self username; }; + in flake-parts.lib.mkFlake { inherit inputs; } { + systems = [ "x86_64-linux" ]; - perSystem = { - pkgs, - self', - ... - }: { - packages.default = pkgs.mkShell { - nativeBuildInputs = [pkgs.just]; - }; + perSystem = { pkgs, self', ... }: { + packages.default = + pkgs.mkShell { nativeBuildInputs = [ pkgs.nixfmt pkgs.just ]; }; - formatter = pkgs.alejandra; + formatter = pkgs.nixfmt; }; flake = { - lib = import ./lib {inherit inputs;}; + lib = import ./lib { inherit inputs; }; nixosConfigurations = { - apollo = mkNixos {desktop = true;}; - nixedo = mkNixos {desktop = true;}; + apollo = mkNixos { desktop = true; }; + nixedo = mkNixos { desktop = true; }; }; - homeConfigurations = { - wsl2 = mkWsl; - }; + homeConfigurations = { wsl2 = mkWsl; }; }; }; } diff --git a/lib/nixos/configuration.nix b/lib/nixos/configuration.nix index dbe15b9..9adf02e 100644 --- a/lib/nixos/configuration.nix +++ b/lib/nixos/configuration.nix @@ -1,8 +1,6 @@ -{ - inputs, - desktop ? false, - self, -}: {pkgs, ...}: let +{ inputs, desktop ? false, self, }: +{ pkgs, ... }: +let configure-gtk = pkgs.writeTextFile { name = "configure-gtk"; destination = "/bin/configure-gtk"; @@ -17,7 +15,7 @@ ''; }; - theme = import "${self}/lib/theme" {inherit pkgs;}; + theme = import "${self}/lib/theme" { inherit pkgs; }; username = "opdavies"; in { @@ -76,7 +74,7 @@ in { windowManager.i3 = { enable = true; - extraPackages = with pkgs; [i3status i3lock i3blocks]; + extraPackages = with pkgs; [ i3status i3lock i3blocks ]; }; }; @@ -111,8 +109,8 @@ in { users.users.${username} = { isNormalUser = true; description = "Oliver Davies"; - extraGroups = ["docker" "networkmanager" "wheel"]; - packages = with pkgs; []; + extraGroups = [ "docker" "networkmanager" "wheel" ]; + packages = with pkgs; [ ]; }; security.sudo.wheelNeedsPassword = false; @@ -128,8 +126,7 @@ in { xfce.thunar xfce.thunar-volman xfce.tumbler - ] - ++ pkgs.lib.optionals desktop [ + ] ++ pkgs.lib.optionals desktop [ acpi arandr dunst @@ -190,9 +187,7 @@ in { fonts = { fontconfig = { enable = true; - defaultFonts = { - monospace = ["JetBrainsMono Nerd Font Mono"]; - }; + defaultFonts = { monospace = [ "JetBrainsMono Nerd Font Mono" ]; }; }; packages = with pkgs; @@ -207,10 +202,7 @@ in { "JetBrainsMono" ]; }) - ] - ++ [ - theme.fonts.monospace.package - ]; + ] ++ [ theme.fonts.monospace.package ]; }; zramSwap.enable = true; @@ -226,7 +218,7 @@ in { settings = { auto-optimise-store = true; - experimental-features = ["nix-command" "flakes"]; + experimental-features = [ "nix-command" "flakes" ]; warn-dirty = false; }; }; @@ -241,7 +233,8 @@ in { ''; in { enable = true; - plugins = pkgs.lib.mkForce [pkgs.interception-tools-plugins.dual-function-keys]; + plugins = + pkgs.lib.mkForce [ pkgs.interception-tools-plugins.dual-function-keys ]; udevmonConfig = '' - JOB: "${pkgs.interception-tools}/bin/intercept -g $DEVNODE | ${pkgs.interception-tools-plugins.dual-function-keys}/bin/dual-function-keys -c ${dfkConfig} | ${pkgs.interception-tools}/bin/uinput -d $DEVNODE" DEVICE: @@ -274,7 +267,7 @@ in { programs.firefox = { enable = true; - languagePacks = ["en-GB"]; + languagePacks = [ "en-GB" ]; preferences = { "intl.accept_languages" = "en-GB, en"; "intl.regional_prefs.use_os_locales" = true; @@ -286,9 +279,8 @@ in { services.cron = { enable = true; - systemCronJobs = [ - "* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh" - ]; + systemCronJobs = + [ "* * * * * opdavies /home/opdavies/.config/bin/notify-battery.sh" ]; }; services.auto-cpufreq.enable = true; diff --git a/lib/nixos/default.nix b/lib/nixos/default.nix index 27a2b4b..bd9a32b 100644 --- a/lib/nixos/default.nix +++ b/lib/nixos/default.nix @@ -1,26 +1,21 @@ -{ - inputs, - self, - username, -}: { - desktop ? false, -}: let - configuration = import ./configuration.nix {inherit desktop inputs self;}; +{ inputs, self, username, }: +{ desktop ? false, }: +let + configuration = import ./configuration.nix { inherit desktop inputs self; }; hardwareConfiguration = import ./hardware-configuration.nix; -in - inputs.nixpkgs.lib.nixosSystem { - modules = [ - inputs.home-manager.nixosModules.home-manager - { - home-manager = { - extraSpecialArgs = {inherit inputs desktop self username;}; - useGlobalPkgs = true; - useUserPackages = true; - users."${username}" = import ./home-manager; - }; - } +in inputs.nixpkgs.lib.nixosSystem { + modules = [ + inputs.home-manager.nixosModules.home-manager + { + home-manager = { + extraSpecialArgs = { inherit inputs desktop self username; }; + useGlobalPkgs = true; + useUserPackages = true; + users."${username}" = import ./home-manager; + }; + } - configuration - hardwareConfiguration - ]; - } + configuration + hardwareConfiguration + ]; +} diff --git a/lib/nixos/hardware-configuration.nix b/lib/nixos/hardware-configuration.nix index b819f28..69d1e45 100644 --- a/lib/nixos/hardware-configuration.nix +++ b/lib/nixos/hardware-configuration.nix @@ -1,17 +1,12 @@ -{ - 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 = ["xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod"]; - boot.initrd.kernelModules = []; - boot.kernelModules = ["kvm-intel"]; - boot.kernelParams = ["i8042.reset"]; - boot.extraModulePackages = []; + boot.initrd.availableKernelModules = + [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-intel" ]; + boot.kernelParams = [ "i8042.reset" ]; + boot.extraModulePackages = [ ]; boot.kernelPackages = pkgs.linuxPackages_latest; hardware.enableAllFirmware = true; @@ -26,7 +21,7 @@ fsType = "vfat"; }; - swapDevices = [{device = "/dev/disk/by-label/swap";}]; + swapDevices = [{ device = "/dev/disk/by-label/swap"; }]; # 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 diff --git a/lib/nixos/home-manager/default.nix b/lib/nixos/home-manager/default.nix index 0044ae4..4741464 100644 --- a/lib/nixos/home-manager/default.nix +++ b/lib/nixos/home-manager/default.nix @@ -1,44 +1,38 @@ -{ - config, - desktop, - inputs, - pkgs, - self, - username, - ... -}: let - desktop-config = import ./desktop.nix {inherit config inputs pkgs username;}; - shared-config = import "${self}/lib/shared/home-manager.nix" {inherit inputs pkgs self username;}; - shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {inherit inputs pkgs;}; +{ config, desktop, inputs, pkgs, self, username, ... }: +let + desktop-config = + import ./desktop.nix { inherit config inputs pkgs username; }; + shared-config = import "${self}/lib/shared/home-manager.nix" { + inherit inputs pkgs self username; + }; + shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { + inherit inputs pkgs; + }; pkgs-2311 = inputs.nixpkgs-2311.legacyPackages.${pkgs.system}; in { imports = - if desktop - then [desktop-config shared-config] - else [shared-config]; + if desktop then [ desktop-config shared-config ] else [ shared-config ]; - home.packages = - shared-packages - ++ pkgs.lib.optionals desktop [ - pkgs.discord - pkgs.gimp - pkgs.gscan2pdf - pkgs-2311.kdenlive - pkgs.meslo-lg - pkgs.obs-studio - pkgs.okular - pkgs.pamixer - pkgs.pass - pkgs.pavucontrol - pkgs.pinentry - pkgs.slack - pkgs.via - pkgs.vlc - pkgs.xsel - pkgs.xcape - pkgs.zoom-us - ]; + home.packages = shared-packages ++ pkgs.lib.optionals desktop [ + pkgs.discord + pkgs.gimp + pkgs.gscan2pdf + pkgs-2311.kdenlive + pkgs.meslo-lg + pkgs.obs-studio + pkgs.okular + pkgs.pamixer + pkgs.pass + pkgs.pavucontrol + pkgs.pinentry + pkgs.slack + pkgs.via + pkgs.vlc + pkgs.xsel + pkgs.xcape + pkgs.zoom-us + ]; home.sessionVariables = { EDITOR = "nvim"; diff --git a/lib/nixos/home-manager/desktop.nix b/lib/nixos/home-manager/desktop.nix index 63d5efb..ee9b642 100644 --- a/lib/nixos/home-manager/desktop.nix +++ b/lib/nixos/home-manager/desktop.nix @@ -1,9 +1,4 @@ -{ - config, - inputs, - pkgs, - username, -}: { +{ config, inputs, pkgs, username, }: { imports = [ ./modules/alacritty.nix ./modules/autorandr.nix diff --git a/lib/nixos/home-manager/modules/alacritty.nix b/lib/nixos/home-manager/modules/alacritty.nix index 914429d..488f618 100644 --- a/lib/nixos/home-manager/modules/alacritty.nix +++ b/lib/nixos/home-manager/modules/alacritty.nix @@ -1,13 +1,9 @@ -{ - lib, - pkgs, - self, - ... -}: let +{ lib, pkgs, self, ... }: +let inherit (lib) strings; inherit (strings) toInt; - theme = import "${self}/lib/theme" {inherit pkgs;}; + theme = import "${self}/lib/theme" { inherit pkgs; }; in { programs.alacritty = { enable = true; @@ -30,7 +26,7 @@ in { glyph_offset.y = 6; }; - shell = {program = "zsh";}; + shell = { program = "zsh"; }; }; }; } diff --git a/lib/nixos/home-manager/modules/autorandr.nix b/lib/nixos/home-manager/modules/autorandr.nix index c10a747..7045fb9 100644 --- a/lib/nixos/home-manager/modules/autorandr.nix +++ b/lib/nixos/home-manager/modules/autorandr.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ username, ... }: { services.autorandr.enable = true; xdg.configFile."autorandr/postswitch" = { @@ -14,8 +14,10 @@ enable = true; profiles = let - laptop = "00ffffffffffff000daef21400000000161c0104a51f117802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820402e1e240035ad10000018000000fe004e3134304843472d4751320a20000000fe00434d4e0a202020202020202020000000fe004e3134304843472d4751320a2000bb"; - monitor = "00ffffffffffff004c2d1710424e58432b1f0103803f24782ac8b5ad50449e250f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a0078682100001e000000fd00324b1e873c000a202020202020000000fc004c5532385235350a2020202020000000ff0048345a524130303132380a20200183020335f04961120313041f10605f2309070783010000e305c0006b030c002000b83c2000200167d85dc401788003e20f81e3060501023a801871382d40582c450078682100001e023a80d072382d40102c458078682100001e04740030f2705a80b0588a0078682100001e565e00a0a0a029503020350078682100001a000049"; + laptop = + "00ffffffffffff000daef21400000000161c0104a51f117802ee95a3544c99260f505400000001010101010101010101010101010101363680a0703820402e1e240035ad10000018000000fe004e3134304843472d4751320a20000000fe00434d4e0a202020202020202020000000fe004e3134304843472d4751320a2000bb"; + monitor = + "00ffffffffffff004c2d1710424e58432b1f0103803f24782ac8b5ad50449e250f5054bfef80714f810081c081809500a9c0b300010108e80030f2705a80b0588a0078682100001e000000fd00324b1e873c000a202020202020000000fc004c5532385235350a2020202020000000ff0048345a524130303132380a20200183020335f04961120313041f10605f2309070783010000e305c0006b030c002000b83c2000200167d85dc401788003e20f81e3060501023a801871382d40582c450078682100001e023a80d072382d40102c458078682100001e04740030f2705a80b0588a0078682100001e565e00a0a0a029503020350078682100001a000049"; in { laptop = { config.eDP-1 = { diff --git a/lib/nixos/home-manager/modules/copyq.nix b/lib/nixos/home-manager/modules/copyq.nix index cb19784..6735c70 100644 --- a/lib/nixos/home-manager/modules/copyq.nix +++ b/lib/nixos/home-manager/modules/copyq.nix @@ -1,3 +1 @@ -{ - services.copyq.enable = true; -} +{ services.copyq.enable = true; } diff --git a/lib/nixos/home-manager/modules/dunst.nix b/lib/nixos/home-manager/modules/dunst.nix index 27792de..12b394e 100644 --- a/lib/nixos/home-manager/modules/dunst.nix +++ b/lib/nixos/home-manager/modules/dunst.nix @@ -2,10 +2,6 @@ services.dunst = { enable = true; - settings = { - global = { - follow = "keyboard"; - }; - }; + settings = { global = { follow = "keyboard"; }; }; }; } diff --git a/lib/nixos/home-manager/modules/espanso.nix b/lib/nixos/home-manager/modules/espanso.nix index 0c5607e..e8b27cd 100644 --- a/lib/nixos/home-manager/modules/espanso.nix +++ b/lib/nixos/home-manager/modules/espanso.nix @@ -1,14 +1,9 @@ -let - baseUrl = "https://www.oliverdavies.uk"; +let baseUrl = "https://www.oliverdavies.uk"; in { services.espanso = { enable = true; - configs = { - default = { - show_notifications = false; - }; - }; + configs = { default = { show_notifications = false; }; }; matches = { base = { diff --git a/lib/nixos/home-manager/modules/feh.nix b/lib/nixos/home-manager/modules/feh.nix index 3191f65..2175933 100644 --- a/lib/nixos/home-manager/modules/feh.nix +++ b/lib/nixos/home-manager/modules/feh.nix @@ -1,3 +1 @@ -{ - programs.feh.enable = true; -} +{ programs.feh.enable = true; } diff --git a/lib/nixos/home-manager/modules/flameshot.nix b/lib/nixos/home-manager/modules/flameshot.nix index 8507ec3..04f9fe4 100644 --- a/lib/nixos/home-manager/modules/flameshot.nix +++ b/lib/nixos/home-manager/modules/flameshot.nix @@ -1,4 +1,4 @@ -{username, ...}: { +{ username, ... }: { services.flameshot = { enable = true; diff --git a/lib/nixos/home-manager/modules/i3.nix b/lib/nixos/home-manager/modules/i3.nix index 21537bb..32bab53 100644 --- a/lib/nixos/home-manager/modules/i3.nix +++ b/lib/nixos/home-manager/modules/i3.nix @@ -1,11 +1,7 @@ -{ - config, - inputs, - self, - username, - pkgs, - ... -}: let +{ config, inputs, pkgs, self, username, ... }: +let + theme = import "${self}/lib/theme" { inherit pkgs; }; + modifier = "Mod4"; in { xsession.windowManager.i3 = { @@ -13,12 +9,9 @@ in { config = { assigns = { - "7" = [{class = "vlc";}]; - "8" = [{class = "0ad";}]; - "9" = [ - {class = "Slack";} - {class = "discord";} - ]; + "7" = [{ class = "vlc"; }]; + "8" = [{ class = "0ad"; }]; + "9" = [ { class = "Slack"; } { class = "discord"; } ]; }; defaultWorkspace = "workspace number 1"; @@ -52,10 +45,13 @@ in { "XF86AudioRaiseVolume" = "exec pamixer -ui 2 && pamixer --get-volume"; "XF86AudioLowerVolume" = "exec pamixer -ud 2 && pamixer --get-volume"; - "XF86AudioMute" = "exec pamixer --toggle-mute && ( [ \"$(pamixer --get-mute)\" = \"true\" ] && echo 0"; + "XF86AudioMute" = '' + exec pamixer --toggle-mute && ( [ "$(pamixer --get-mute)" = "true" ] && echo 0''; - "XF86MonBrightnessDown" = "exec brightnessctl set 5%- | sed -En 's/.*\(([0-9]+)%\).*/\1/p'"; - "XF86MonBrightnessUp" = "exec brightnessctl set +5% | sed -En 's/.*\(([0-9]+)%\).*/\1/p'"; + "XF86MonBrightnessDown" = + "exec brightnessctl set 5%- | sed -En 's/.*(([0-9]+)%).*/1/p'"; + "XF86MonBrightnessUp" = + "exec brightnessctl set +5% | sed -En 's/.*(([0-9]+)%).*/1/p'"; }; terminal = "alacritty"; @@ -80,14 +76,12 @@ in { ''; config = { - bars = [ - { - position = "bottom"; - statusCommand = "${pkgs.i3status}/bin/i3status"; - } - ]; + bars = [{ + position = "bottom"; + statusCommand = "${pkgs.i3status}/bin/i3status"; + }]; - fonts.names = ["GeistMono"]; + fonts.names = [ "${theme.fonts.monospace.name}" ]; gaps = { smartBorders = "on"; diff --git a/lib/nixos/home-manager/modules/rofi.nix b/lib/nixos/home-manager/modules/rofi.nix index 214fcff..dd34f5e 100644 --- a/lib/nixos/home-manager/modules/rofi.nix +++ b/lib/nixos/home-manager/modules/rofi.nix @@ -1,3 +1 @@ -{ - programs.rofi.enable = true; -} +{ programs.rofi.enable = true; } diff --git a/lib/shared/home-manager-packages.nix b/lib/shared/home-manager-packages.nix index 37aeb2a..c7eb52e 100644 --- a/lib/shared/home-manager-packages.nix +++ b/lib/shared/home-manager-packages.nix @@ -1,8 +1,4 @@ -{ - inputs, - pkgs, - ... -}: +{ inputs, pkgs, ... }: with pkgs; [ awscli2 bitwarden-cli diff --git a/lib/shared/home-manager.nix b/lib/shared/home-manager.nix index 1c38e78..82bba67 100644 --- a/lib/shared/home-manager.nix +++ b/lib/shared/home-manager.nix @@ -1,9 +1,4 @@ -{ - inputs, - pkgs, - username, - self, -}: { +{ inputs, pkgs, username, self, }: { home.username = "${username}"; home.homeDirectory = "/home/${username}"; @@ -12,7 +7,7 @@ programs.home-manager.enable = true; imports = [ - (import ./modules/neovim.nix {inherit inputs;}) + (import ./modules/neovim.nix { inherit inputs; }) ./modules/bat.nix ./modules/bin.nix ./modules/direnv.nix diff --git a/lib/shared/modules/bat.nix b/lib/shared/modules/bat.nix index 79ffa2d..119d47f 100644 --- a/lib/shared/modules/bat.nix +++ b/lib/shared/modules/bat.nix @@ -1,3 +1 @@ -{ - programs.bat.enable = true; -} +{ programs.bat.enable = true; } diff --git a/lib/shared/modules/bin.nix b/lib/shared/modules/bin.nix index eb784e8..3048523 100644 --- a/lib/shared/modules/bin.nix +++ b/lib/shared/modules/bin.nix @@ -1,5 +1,5 @@ -{self, ...}: { - home.sessionPath = ["$HOME/.config/bin"]; +{ self, ... }: { + home.sessionPath = [ "$HOME/.config/bin" ]; xdg.configFile.bin = { source = "${self}/bin"; diff --git a/lib/shared/modules/git.nix b/lib/shared/modules/git.nix index dcf84ff..6521e8d 100644 --- a/lib/shared/modules/git.nix +++ b/lib/shared/modules/git.nix @@ -54,10 +54,12 @@ current-branch = "rev-parse --abbrev-ref HEAD"; dc = "diff --color --word-diff --cached"; df = "diff --color --word-diff"; - dup = "!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -"; + dup = + "!git checkout develop && git fetch origin && echo && git sl develop..origin/develop && echo && git pull --quiet && git checkout -"; fixup = "commit --fixup"; issues = "!gh issue list --web"; - mup = "!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -"; + mup = + "!git master-to-main-wrapper checkout %BRANCH% && git fetch origin && echo && git sl %BRANCH%..origin/%BRANCH% && echo && git pull --quiet && git checkout -"; no-ff = "merge --no-ff"; pl = "pull"; prune = "remote prune origin"; @@ -69,10 +71,12 @@ repush = "!git pull --rebase && git push"; ri = "rebase --interactive"; rid = "!git rebase -i $(git merge-base develop HEAD)"; - rim = "!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)"; + rim = + "!git rebase -i $(git master-to-main-wrapper merge-base %BRANCH% HEAD)"; rip = "!git rebase -i $(git merge-base production HEAD)"; ris = "!git rebase -i $(git merge-base staging HEAD)"; - riu = "!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})"; + riu = + "!git rebase -i $(git rev-parse --abbrev-ref --symbolic-full-name @{u})"; rmup = "!git mup && git master-to-main-wrapper rebase %BRANCH%"; sl = "log --oneline --decorate -20"; sla = "log --oneline --decorate --graph --all -20"; @@ -97,7 +101,7 @@ checkout.defaultRemote = "origin"; color.ui = true; column.ui = "auto"; - commit = {template = "~/.gitmessage";}; + commit = { template = "~/.gitmessage"; }; core = { editor = "nvim"; excludesFile = "~/.config/git/ignore"; diff --git a/lib/shared/modules/lsd.nix b/lib/shared/modules/lsd.nix index 9d0488e..b630e54 100644 --- a/lib/shared/modules/lsd.nix +++ b/lib/shared/modules/lsd.nix @@ -1,3 +1 @@ -{ - programs.lsd.enable = true; -} +{ programs.lsd.enable = true; } diff --git a/lib/shared/modules/neovim.nix b/lib/shared/modules/neovim.nix index 93ff5b2..28bf5c4 100644 --- a/lib/shared/modules/neovim.nix +++ b/lib/shared/modules/neovim.nix @@ -1,7 +1,8 @@ -{inputs}: {pkgs, ...}: let - system = pkgs.system; +{ inputs }: +{ pkgs, ... }: +let system = pkgs.system; in { - programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager {inherit system;}; + programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager { inherit system; }; home.file.".markdownlint.yaml".text = '' default: true diff --git a/lib/shared/modules/nnn.nix b/lib/shared/modules/nnn.nix index 003bc18..40b7f5c 100644 --- a/lib/shared/modules/nnn.nix +++ b/lib/shared/modules/nnn.nix @@ -1,3 +1 @@ -{ - programs.nnn.enable = true; -} +{ programs.nnn.enable = true; } diff --git a/lib/shared/modules/phpactor.nix b/lib/shared/modules/phpactor.nix index edbb246..1237023 100644 --- a/lib/shared/modules/phpactor.nix +++ b/lib/shared/modules/phpactor.nix @@ -1,4 +1,4 @@ -{self, ...}: { +{ self, ... }: { xdg.configFile.phpactor = { source = "${self}/config/phpactor"; recursive = true; diff --git a/lib/shared/modules/ripgrep.nix b/lib/shared/modules/ripgrep.nix index c739b71..e817c77 100644 --- a/lib/shared/modules/ripgrep.nix +++ b/lib/shared/modules/ripgrep.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: { - home.packages = with pkgs; [ripgrep]; +{ pkgs, ... }: { + home.packages = with pkgs; [ ripgrep ]; xdg.configFile."ripgrep/config".text = '' --follow diff --git a/lib/shared/modules/starship.nix b/lib/shared/modules/starship.nix index 796f0ea..88660a4 100644 --- a/lib/shared/modules/starship.nix +++ b/lib/shared/modules/starship.nix @@ -1,3 +1 @@ -{ - programs.starship.enable = true; -} +{ programs.starship.enable = true; } diff --git a/lib/shared/modules/tmux.nix b/lib/shared/modules/tmux.nix index bbc2c87..6d5e0e7 100644 --- a/lib/shared/modules/tmux.nix +++ b/lib/shared/modules/tmux.nix @@ -1,5 +1,5 @@ -{pkgs, ...}: let - inherit (pkgs) tmuxPlugins; +{ pkgs, ... }: +let inherit (pkgs) tmuxPlugins; in { programs.tmux = { enable = true; @@ -102,10 +102,7 @@ in { set -g @resurrect-strategy-nvim 'session' ''; - plugins = [ - tmuxPlugins.resurrect - tmuxPlugins.vim-tmux-navigator - tmuxPlugins.yank - ]; + plugins = + [ tmuxPlugins.resurrect tmuxPlugins.vim-tmux-navigator tmuxPlugins.yank ]; }; } diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix index 8c26354..6bd0e8e 100644 --- a/lib/shared/modules/zsh.nix +++ b/lib/shared/modules/zsh.nix @@ -200,19 +200,19 @@ plugins = [ { name = "themes/robbyrussell"; - tags = ["from:oh-my-zsh" "as:theme"]; + tags = [ "from:oh-my-zsh" "as:theme" ]; } { name = "plugin/git"; - tags = ["from:oh-my-zsh"]; + tags = [ "from:oh-my-zsh" ]; } { name = "plugin/vi-mode"; - tags = ["from:oh-my-zsh"]; + tags = [ "from:oh-my-zsh" ]; } - {name = "mollifier/cd-gitroot";} - {name = "zsh-users/zsh-completions";} - {name = "zsh-users/zsh-syntax-highlighting";} + { name = "mollifier/cd-gitroot"; } + { name = "zsh-users/zsh-completions"; } + { name = "zsh-users/zsh-syntax-highlighting"; } ]; }; }; diff --git a/lib/theme/default.nix b/lib/theme/default.nix index f99d2a5..e20f893 100644 --- a/lib/theme/default.nix +++ b/lib/theme/default.nix @@ -1,11 +1,11 @@ -{pkgs, ...}: { +{ pkgs, ... }: { fonts = { monospace = { - name = "MesloLGSDZ Nerd Font Mono"; + name = "JetBrainsMono Nerd Font Mono"; # fc-list : family | sort | grep "Nerd Font" - package = pkgs.nerdfonts.override {fonts = ["Meslo"];}; - size = "10"; + package = pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }; + size = "8"; }; }; } diff --git a/lib/wsl2/default.nix b/lib/wsl2/default.nix index 7ff4e9e..49e029b 100644 --- a/lib/wsl2/default.nix +++ b/lib/wsl2/default.nix @@ -1,29 +1,26 @@ -{ - inputs, - self, - system, - username, -}: let +{ inputs, self, system, username, }: +let pkgs = inputs.nixpkgs.legacyPackages.${system}; - shared-config = import "${self}/lib/shared/home-manager.nix" {inherit inputs pkgs self username;}; - shared-packages = import "${self}/lib/shared/home-manager-packages.nix" {inherit inputs pkgs;}; -in - inputs.home-manager.lib.homeManagerConfiguration { - inherit pkgs; + shared-config = import "${self}/lib/shared/home-manager.nix" { + inherit inputs pkgs self username; + }; + shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { + inherit inputs pkgs; + }; +in inputs.home-manager.lib.homeManagerConfiguration { + inherit pkgs; - modules = [ - { - imports = [shared-config]; + modules = [{ + imports = [ shared-config ]; - home.packages = shared-packages; + home.packages = shared-packages; - home.sessionVariables = { - EDITOR = "nvim"; - PATH = "$PATH:./vendor/bin:./node_modules/.bin"; - PULUMI_SKIP_UPDATE_CHECK = "true"; - RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; - }; - } - ]; - } + home.sessionVariables = { + EDITOR = "nvim"; + PATH = "$PATH:./vendor/bin:./node_modules/.bin"; + PULUMI_SKIP_UPDATE_CHECK = "true"; + RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; + }; + }]; +}