diff --git a/flake.nix b/flake.nix index e886599..53b7496 100644 --- a/flake.nix +++ b/flake.nix @@ -15,7 +15,8 @@ # build-configs.url = "github:OliverDaviesLtd/build-configs"; }; - outputs = { nixpkgs, self, ... }@inputs: + outputs = + { nixpkgs, self, ... }@inputs: let system = "x86_64-linux"; pkgs = nixpkgs.legacyPackages.${system}; @@ -26,11 +27,11 @@ mkWsl = import ./lib/wsl2 { inherit inputs self username; }; inherit (pkgs) mkShell; - in { - packages.${system}.default = - mkShell { buildInputs = with pkgs; [ just ]; }; + in + { + packages.${system}.default = mkShell { buildInputs = with pkgs; [ just ]; }; - formatter.${system} = pkgs.nixfmt-classic; + formatter.${system} = pkgs.nixfmt-rfc-style; nixosConfigurations = { apollo = mkNixos { @@ -44,6 +45,8 @@ }; }; - homeConfigurations = { wsl2 = mkWsl { system = "x86_64-linux"; }; }; + homeConfigurations = { + wsl2 = mkWsl { system = "x86_64-linux"; }; + }; }; } diff --git a/justfile b/justfile index 01b200b..86c5bd4 100644 --- a/justfile +++ b/justfile @@ -4,6 +4,9 @@ _default: check: nix flake check +fmt: + nix fmt flake.nix lib + nixos-build *args: sudo nixos-rebuild build --flake . {{ args }} diff --git a/lib/nixos/configuration.nix b/lib/nixos/configuration.nix index d233a59..bb9a303 100644 --- a/lib/nixos/configuration.nix +++ b/lib/nixos/configuration.nix @@ -1,24 +1,32 @@ -{ inputs, desktop ? false, hostname, self }: +{ + inputs, + desktop ? false, + hostname, + self, +}: { pkgs, ... }: let configure-gtk = pkgs.writeTextFile { name = "configure-gtk"; destination = "/bin/configure-gtk"; executable = true; - text = let - schema = pkgs.gsettings-desktop-schemas; - datadir = "${schema}/share/gsettings-schemas/${schema.name}"; - in '' - export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS - gnome_schema=org.gnome.desktop.interface - gsettings set $gnome_schema gtk-theme 'Breeze Dark' - ''; + text = + let + schema = pkgs.gsettings-desktop-schemas; + datadir = "${schema}/share/gsettings-schemas/${schema.name}"; + in + '' + export XDG_DATA_DIRS=${datadir}:$XDG_DATA_DIRS + gnome_schema=org.gnome.desktop.interface + gsettings set $gnome_schema gtk-theme 'Breeze Dark' + ''; }; theme = import "${self}/lib/theme" { inherit pkgs; }; username = "opdavies"; -in { +in +{ nixpkgs.config.allowUnfree = true; # Bootloader. @@ -126,7 +134,11 @@ in { users.users.${username} = { isNormalUser = true; description = "Oliver Davies"; - extraGroups = [ "docker" "networkmanager" "wheel" ]; + extraGroups = [ + "docker" + "networkmanager" + "wheel" + ]; packages = with pkgs; [ ]; }; @@ -216,10 +228,13 @@ in { fonts = { fontconfig = { enable = true; - defaultFonts = { monospace = [ theme.fonts.monospace.name ]; }; + defaultFonts = { + monospace = [ theme.fonts.monospace.name ]; + }; }; - packages = with pkgs; + packages = + with pkgs; [ (nerdfonts.override { fonts = [ @@ -231,7 +246,8 @@ in { "JetBrainsMono" ]; }) - ] ++ [ theme.fonts.monospace.package ]; + ] + ++ [ theme.fonts.monospace.package ]; }; zramSwap.enable = true; @@ -247,31 +263,35 @@ in { settings = { auto-optimise-store = true; - experimental-features = [ "nix-command" "flakes" ]; + experimental-features = [ + "nix-command" + "flakes" + ]; warn-dirty = false; }; }; # Make Caps lock work as an Escape key on press and Ctrl on hold. - services.interception-tools = let - dfkConfig = pkgs.writeText "dual-function-keys.yaml" '' - MAPPINGS: - - KEY: KEY_CAPSLOCK - TAP: KEY_ESC - HOLD: KEY_LEFTCTRL - ''; - in { - enable = true; - 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: - NAME: "AT Translated Set 2 keyboard" - EVENTS: - EV_KEY: [[KEY_CAPSLOCK, KEY_ESC, KEY_LEFTCTRL]] - ''; - }; + services.interception-tools = + let + dfkConfig = pkgs.writeText "dual-function-keys.yaml" '' + MAPPINGS: + - KEY: KEY_CAPSLOCK + TAP: KEY_ESC + HOLD: KEY_LEFTCTRL + ''; + in + { + enable = true; + 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: + NAME: "AT Translated Set 2 keyboard" + EVENTS: + EV_KEY: [[KEY_CAPSLOCK, KEY_ESC, KEY_LEFTCTRL]] + ''; + }; system.autoUpgrade = { enable = true; @@ -308,8 +328,7 @@ 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 54fbec7..9c99442 100644 --- a/lib/nixos/default.nix +++ b/lib/nixos/default.nix @@ -1,15 +1,36 @@ -{ inputs, self, username }: -{ desktop ? false, hostname }: +{ + inputs, + self, + username, +}: +{ + desktop ? false, + hostname, +}: let - configuration = - import ./configuration.nix { inherit desktop hostname inputs self; }; + configuration = import ./configuration.nix { + inherit + desktop + hostname + inputs + self + ; + }; hardwareConfiguration = import ./hardware-configuration.nix; -in inputs.nixpkgs.lib.nixosSystem { +in +inputs.nixpkgs.lib.nixosSystem { modules = [ inputs.home-manager.nixosModules.home-manager { home-manager = { - extraSpecialArgs = { inherit inputs desktop self username; }; + extraSpecialArgs = { + inherit + inputs + desktop + self + username + ; + }; useGlobalPkgs = true; useUserPackages = true; users."${username}" = import ./home-manager; diff --git a/lib/nixos/hardware-configuration.nix b/lib/nixos/hardware-configuration.nix index e9fe2e5..fdc44ea 100644 --- a/lib/nixos/hardware-configuration.nix +++ b/lib/nixos/hardware-configuration.nix @@ -1,8 +1,20 @@ -{ config, lib, pkgs, modulesPath, ... }: { +{ + config, + lib, + pkgs, + modulesPath, + ... +}: +{ imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = - [ "xhci_pci" "thunderbolt" "nvme" "usb_storage" "sd_mod" ]; + boot.initrd.availableKernelModules = [ + "xhci_pci" + "thunderbolt" + "nvme" + "usb_storage" + "sd_mod" + ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-intel" ]; boot.kernelParams = [ @@ -28,7 +40,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 @@ -41,6 +53,5 @@ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; powerManagement.cpuFreqGovernor = lib.mkDefault "powersave"; hardware.bluetooth.enable = true; - hardware.cpu.intel.updateMicrocode = - lib.mkDefault config.hardware.enableRedistributableFirmware; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; } diff --git a/lib/nixos/home-manager/default.nix b/lib/nixos/home-manager/default.nix index 3fd3a42..e6d5c3d 100644 --- a/lib/nixos/home-manager/default.nix +++ b/lib/nixos/home-manager/default.nix @@ -1,34 +1,60 @@ -{ config, desktop, inputs, pkgs, self, username, ... }: +{ + config, + desktop, + inputs, + pkgs, + self, + username, + ... +}: let - desktop-config = - import ./desktop.nix { inherit config inputs pkgs username; }; + desktop-config = import ./desktop.nix { + inherit + config + inputs + pkgs + username + ; + }; shared-config = import "${self}/lib/shared/home-manager.nix" { - inherit inputs pkgs self username; + inherit + inputs + pkgs + self + username + ; }; - shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { - inherit inputs pkgs; - }; -in { + shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { inherit inputs pkgs; }; +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.kdenlive - pkgs.meslo-lg - pkgs.obs-studio - pkgs.okular - pkgs.pamixer - pkgs.pass - pkgs.pavucontrol - pkgs.pinentry - pkgs.via - pkgs.xsel - pkgs.xcape - pkgs.zoom-us - ]; + home.packages = + shared-packages + ++ pkgs.lib.optionals desktop [ + pkgs.discord + pkgs.gimp + pkgs.gscan2pdf + pkgs.kdenlive + pkgs.meslo-lg + pkgs.obs-studio + pkgs.okular + pkgs.pamixer + pkgs.pass + pkgs.pavucontrol + pkgs.pinentry + pkgs.via + 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 0c053f6..91d1927 100644 --- a/lib/nixos/home-manager/desktop.nix +++ b/lib/nixos/home-manager/desktop.nix @@ -1,4 +1,10 @@ -{ config, inputs, pkgs, username, }: { +{ + config, + inputs, + pkgs, + username, +}: +{ imports = [ ./modules/copyq.nix ./modules/dunst.nix diff --git a/lib/nixos/home-manager/modules/dunst.nix b/lib/nixos/home-manager/modules/dunst.nix index 12b394e..27792de 100644 --- a/lib/nixos/home-manager/modules/dunst.nix +++ b/lib/nixos/home-manager/modules/dunst.nix @@ -2,6 +2,10 @@ 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 e8b27cd..e27d696 100644 --- a/lib/nixos/home-manager/modules/espanso.nix +++ b/lib/nixos/home-manager/modules/espanso.nix @@ -1,9 +1,15 @@ -let baseUrl = "https://www.oliverdavies.uk"; -in { +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/flameshot.nix b/lib/nixos/home-manager/modules/flameshot.nix index 04f9fe4..c27e345 100644 --- a/lib/nixos/home-manager/modules/flameshot.nix +++ b/lib/nixos/home-manager/modules/flameshot.nix @@ -1,4 +1,5 @@ -{ username, ... }: { +{ username, ... }: +{ services.flameshot = { enable = true; diff --git a/lib/nixos/home-manager/modules/sway.nix b/lib/nixos/home-manager/modules/sway.nix index 9c6f67a..bf6ea6a 100644 --- a/lib/nixos/home-manager/modules/sway.nix +++ b/lib/nixos/home-manager/modules/sway.nix @@ -1,4 +1,9 @@ -{ config, inputs, pkgs, ... }: +{ + config, + inputs, + pkgs, + ... +}: { programs.i3status-rust = { @@ -64,18 +69,19 @@ xwayland = true; config = { - bars = [{ - colors.background = "#111111"; + bars = [ + { + colors.background = "#111111"; - fonts = { - names = [ "JetBrainsMono Nerd Font Mono" ]; - size = 12.0; - }; + fonts = { + names = [ "JetBrainsMono Nerd Font Mono" ]; + size = 12.0; + }; - statusCommand = - "i3status-rs ~/.config/i3status-rust/config-default.toml"; - trayPadding = 5; - }]; + statusCommand = "i3status-rs ~/.config/i3status-rust/config-default.toml"; + trayPadding = 5; + } + ]; defaultWorkspace = "workspace number 1"; @@ -85,7 +91,9 @@ }; input = { - "*" = { xkb_layout = "gb"; }; + "*" = { + xkb_layout = "gb"; + }; "type:touchpad" = { dwt = "enabled"; @@ -94,8 +102,10 @@ }; keybindings = - let modifier = config.wayland.windowManager.sway.config.modifier; - in inputs.nixpkgs.lib.mkOptionDefault { + let + modifier = config.wayland.windowManager.sway.config.modifier; + in + inputs.nixpkgs.lib.mkOptionDefault { "${modifier}+Escape" = "exec swaylock --daemonize"; "${modifier}+Shift+b" = "exec ${pkgs.firefox}/bin/firefox"; "${modifier}+Shift+f" = "exec ${pkgs.xfce.thunar}/bin/thunar"; @@ -112,7 +122,9 @@ # bg = "~/.config/wallpaper/wallpaper.jpg fill"; # }; - eDP-1 = { scale = "1.0"; }; + eDP-1 = { + scale = "1.0"; + }; }; terminal = "wezterm"; diff --git a/lib/nixos/modules/sway.nix b/lib/nixos/modules/sway.nix index 0e2d476..a3c6981 100644 --- a/lib/nixos/modules/sway.nix +++ b/lib/nixos/modules/sway.nix @@ -1,5 +1,6 @@ { inputs, username, ... }: -{ pkgs, ... }: { +{ pkgs, ... }: +{ services.displayManager.defaultSession = "sway"; programs.sway.enable = true; @@ -9,16 +10,24 @@ extraPortals = with pkgs; [ xdg-desktop-portal-wlr ]; }; - home-manager.users.${username} = { pkgs, ... }: { - home.sessionVariables = { - MOZ_ENABLE_WAYLAND = "1"; - MOZ_USE_XINPUT2 = "1"; - QT_QPA_PLATFORM = "wayland"; - SDL_VIDEODRIVER = "wayland"; - XDG_CURRENT_DESKTOP = "sway"; - XDG_SESSION_TYPE = "wayland"; - }; + home-manager.users.${username} = + { pkgs, ... }: + { + home.sessionVariables = { + MOZ_ENABLE_WAYLAND = "1"; + MOZ_USE_XINPUT2 = "1"; + QT_QPA_PLATFORM = "wayland"; + SDL_VIDEODRIVER = "wayland"; + XDG_CURRENT_DESKTOP = "sway"; + XDG_SESSION_TYPE = "wayland"; + }; - home.packages = with pkgs; [ i3status swaybg wdisplays wl-clipboard wofi ]; - }; + home.packages = with pkgs; [ + i3status + swaybg + wdisplays + wl-clipboard + wofi + ]; + }; } diff --git a/lib/shared/home-manager-packages.nix b/lib/shared/home-manager-packages.nix index d8af11d..952a0ea 100644 --- a/lib/shared/home-manager-packages.nix +++ b/lib/shared/home-manager-packages.nix @@ -2,7 +2,9 @@ let php = pkgs.php82; phpPackages = pkgs.php82Packages; -in with pkgs; [ +in +with pkgs; +[ inputs.build-configs.packages.${pkgs.system}.default awscli2 diff --git a/lib/shared/home-manager.nix b/lib/shared/home-manager.nix index ed9ba58..be14456 100644 --- a/lib/shared/home-manager.nix +++ b/lib/shared/home-manager.nix @@ -1,4 +1,10 @@ -{ inputs, pkgs, username, self, }: { +{ + inputs, + pkgs, + username, + self, +}: +{ home.username = "${username}"; home.homeDirectory = "/home/${username}"; diff --git a/lib/shared/modules/bin.nix b/lib/shared/modules/bin.nix index 99ce67e..bd4ed85 100644 --- a/lib/shared/modules/bin.nix +++ b/lib/shared/modules/bin.nix @@ -1,4 +1,5 @@ -{ self, ... }: { +{ self, ... }: +{ home.sessionPath = [ "$HOME/.local/bin" ]; home.file.".local/bin" = { diff --git a/lib/shared/modules/git.nix b/lib/shared/modules/git.nix index a5b6ff4..381dcf5 100644 --- a/lib/shared/modules/git.nix +++ b/lib/shared/modules/git.nix @@ -34,10 +34,12 @@ userName = "Oliver Davies"; userEmail = "oliver@oliverdavies.dev"; - includes = [{ - condition = "gitdir:~/Code/bitbucket.org/transportforwales/"; - contents.user.email = "oliver.davies@tfw.wales"; - }]; + includes = [ + { + condition = "gitdir:~/Code/bitbucket.org/transportforwales/"; + contents.user.email = "oliver.davies@tfw.wales"; + } + ]; aliases = { aa = "add --all"; @@ -54,12 +56,10 @@ 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"; @@ -71,12 +71,10 @@ 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"; @@ -87,8 +85,7 @@ unassume = "update-index --no-assume-unchanged"; uncommit = "reset --soft HEAD^"; unstage = "reset"; - update = - "!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat"; + update = "!git fetch --all --jobs=4 --prune --progress && git rebase --autostash --stat"; upstream = "rev-parse --abbrev-ref --symbolic-full-name @{u}"; ureset = "!git reset --hard $(git upstream)"; worktrees = "worktree list"; @@ -103,7 +100,9 @@ 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/neovim.nix b/lib/shared/modules/neovim.nix index 28bf5c4..2bd540e 100644 --- a/lib/shared/modules/neovim.nix +++ b/lib/shared/modules/neovim.nix @@ -1,7 +1,9 @@ { inputs }: { pkgs, ... }: -let system = pkgs.system; -in { +let + system = pkgs.system; +in +{ programs.neovim = inputs.opdavies-nvim.lib.mkHomeManager { inherit system; }; home.file.".markdownlint.yaml".text = '' diff --git a/lib/shared/modules/phpactor.nix b/lib/shared/modules/phpactor.nix index 1237023..ba4c1dd 100644 --- a/lib/shared/modules/phpactor.nix +++ b/lib/shared/modules/phpactor.nix @@ -1,4 +1,5 @@ -{ 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 e817c77..2d6aa72 100644 --- a/lib/shared/modules/ripgrep.nix +++ b/lib/shared/modules/ripgrep.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ ripgrep ]; xdg.configFile."ripgrep/config".text = '' diff --git a/lib/shared/modules/tmux.nix b/lib/shared/modules/tmux.nix index 9ed869b..cf86cbd 100644 --- a/lib/shared/modules/tmux.nix +++ b/lib/shared/modules/tmux.nix @@ -1,6 +1,8 @@ { pkgs, ... }: -let inherit (pkgs) tmuxPlugins; -in { +let + inherit (pkgs) tmuxPlugins; +in +{ programs.tmux = { enable = true; @@ -106,7 +108,10 @@ in { if-shell "[ -f ~/.tmux.conf.local ]" 'source ~/.tmux.conf.local' ''; - plugins = - [ tmuxPlugins.resurrect tmuxPlugins.vim-tmux-navigator tmuxPlugins.yank ]; + plugins = [ + tmuxPlugins.resurrect + tmuxPlugins.vim-tmux-navigator + tmuxPlugins.yank + ]; }; } diff --git a/lib/shared/modules/wezterm.nix b/lib/shared/modules/wezterm.nix index 028dd33..87324d5 100644 --- a/lib/shared/modules/wezterm.nix +++ b/lib/shared/modules/wezterm.nix @@ -1,7 +1,8 @@ { pkgs, self, ... }: let theme = import "${self}/lib/theme" { inherit pkgs; }; -in { +in +{ programs.wezterm = { enable = true; enableZshIntegration = true; diff --git a/lib/shared/modules/zsh.nix b/lib/shared/modules/zsh.nix index 069073c..7c1a8d0 100644 --- a/lib/shared/modules/zsh.nix +++ b/lib/shared/modules/zsh.nix @@ -15,7 +15,7 @@ ls = "lsd"; run = "./run"; s = "secrets"; - secrets = "doppler --project \"$(whoami)\" run"; + secrets = ''doppler --project "$(whoami)" run''; switch = "run nixos nixedo switch"; sz = "source ~/.config/zsh/.zshrc"; tag = "tag-release"; @@ -62,7 +62,7 @@ }; shellGlobalAliases = { - A1 = "| awk '{print \$1}'"; + A1 = "| awk '{print $1}'"; Fj = "| jq ."; Fy = "| yq ."; G = "| grep"; @@ -175,7 +175,10 @@ plugins = [ { name = "themes/robbyrussell"; - tags = [ "from:oh-my-zsh" "as:theme" ]; + tags = [ + "from:oh-my-zsh" + "as:theme" + ]; } { name = "plugin/git"; diff --git a/lib/theme/default.nix b/lib/theme/default.nix index da88d1b..bd1f376 100644 --- a/lib/theme/default.nix +++ b/lib/theme/default.nix @@ -1,4 +1,5 @@ -{ pkgs, ... }: { +{ pkgs, ... }: +{ fonts = { monospace = { name = "MesloLGSDZ Nerd Font Mono"; diff --git a/lib/wsl2/default.nix b/lib/wsl2/default.nix index 2f400a8..279788c 100644 --- a/lib/wsl2/default.nix +++ b/lib/wsl2/default.nix @@ -1,31 +1,43 @@ -{ inputs, self, username }: +{ + inputs, + self, + username, +}: { system }: let pkgs = inputs.nixpkgs.legacyPackages.${system}; shared-config = import "${self}/lib/shared/home-manager.nix" { - inherit inputs pkgs self username; + inherit + inputs + pkgs + self + username + ; }; - shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { - inherit inputs pkgs; - }; -in inputs.home-manager.lib.homeManagerConfiguration { + shared-packages = import "${self}/lib/shared/home-manager-packages.nix" { inherit inputs pkgs; }; +in +inputs.home-manager.lib.homeManagerConfiguration { inherit pkgs; - extraSpecialArgs = { inherit self; }; + extraSpecialArgs = { + inherit self; + }; - 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"; - REPOS = "$HOME/Code"; - RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; - }; - }]; + home.sessionVariables = { + EDITOR = "nvim"; + PATH = "$PATH:./vendor/bin:./node_modules/.bin"; + PULUMI_SKIP_UPDATE_CHECK = "true"; + REPOS = "$HOME/Code"; + RIPGREP_CONFIG_PATH = "$HOME/.config/ripgrep/config"; + }; + } + ]; }