diff --git a/flake.nix b/flake.nix index 6beabed..da64885 100644 --- a/flake.nix +++ b/flake.nix @@ -9,32 +9,28 @@ inputs.nixpkgs.follows = "nixpkgs"; }; - alejandra = { - url = "github:kamadorueda/alejandra/3.0.0"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - rose-pine.url = "git+https://git.punkfairie.net/punkfairie/rose-pine-nix"; }; - outputs = { - nixpkgs, - home-manager, - ... - } @ inputs: { - homeConfigurations."marley" = let - system = "x86_64-linux"; - pkgs = nixpkgs.legacyPackages.${system}; - in - home-manager.lib.homeManagerConfiguration { - inherit pkgs; + outputs = + { + nixpkgs, + home-manager, + ... + }@inputs: + { + homeConfigurations."marley" = + let + system = "x86_64-linux"; + pkgs = nixpkgs.legacyPackages.${system}; + in + home-manager.lib.homeManagerConfiguration { + inherit pkgs; - extraSpecialArgs = {inherit system inputs;}; - - modules = [ - ./home - inputs.rose-pine.homeManagerModules.rose-pine - ]; - }; - }; + modules = [ + ./home + inputs.rose-pine.homeManagerModules.rose-pine + ]; + }; + }; } diff --git a/home/bat/default.nix b/home/bat/default.nix index 16641be..9213c93 100644 --- a/home/bat/default.nix +++ b/home/bat/default.nix @@ -3,7 +3,8 @@ config, lib, ... -}: { +}: +{ programs.bat = { enable = true; @@ -27,12 +28,14 @@ functions = { cat = { wraps = "bat"; - body = "bat $argv"; + body = # fish + "bat $argv"; }; cath = { wraps = "bat"; - body = "bat --plain --language=help $argv"; + body = # fish + "bat --plain --language=help $argv"; }; }; @@ -40,22 +43,26 @@ B = { position = "anywhere"; setCursor = true; - expansion = "% | bat"; + expansion = # fish + "% | bat"; }; "-h" = { position = "anywhere"; - expansion = "-h | cath"; + expansion = # fish + "-h | cath"; }; "--help" = { position = "anywhere"; - expansion = "--help | cath"; + expansion = # fish + "--help | cath"; }; help = { position = "anywhere"; - expansion = "help | cath"; + expansion = # fish + "help | cath"; }; }; }; diff --git a/home/btop/default.nix b/home/btop/default.nix index 5c9d822..10706b9 100644 --- a/home/btop/default.nix +++ b/home/btop/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.btop = { enable = true; diff --git a/home/cava/default.nix b/home/cava/default.nix index 1bcca1d..6336496 100644 --- a/home/cava/default.nix +++ b/home/cava/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.cava = { enable = true; diff --git a/home/curl/default.nix b/home/curl/default.nix index 5bf08f1..4884495 100644 --- a/home/curl/default.nix +++ b/home/curl/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ curl ]; diff --git a/home/default.nix b/home/default.nix index 3ffd107..3aca6e1 100644 --- a/home/default.nix +++ b/home/default.nix @@ -1,9 +1,8 @@ { - system, pkgs, - inputs, ... -}: { +}: +{ home.username = "marley"; home.homeDirectory = "/home/marley"; @@ -13,7 +12,10 @@ nix.package = pkgs.nix; # Enable flakes. - nix.settings.experimental-features = ["nix-command" "flakes"]; + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; targets.genericLinux.enable = true; @@ -21,7 +23,7 @@ systemd.user.startServices = true; home.packages = with pkgs; [ - inputs.alejandra.defaultPackage.${system} + nixfmt-rfc-style nil just maple-mono-NF diff --git a/home/eza/default.nix b/home/eza/default.nix index 91ea352..a35d549 100644 --- a/home/eza/default.nix +++ b/home/eza/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.eza = { enable = true; diff --git a/home/fish/default.nix b/home/fish/default.nix index 2ab5ef6..7b506b6 100644 --- a/home/fish/default.nix +++ b/home/fish/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.packages = with pkgs; [ babelfish ]; diff --git a/home/gh/default.nix b/home/gh/default.nix index b19ea95..a94ff10 100644 --- a/home/gh/default.nix +++ b/home/gh/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.gh = { enable = true; gitCredentialHelper.enable = true; diff --git a/home/hyfetch/default.nix b/home/hyfetch/default.nix index e60a42c..0dd0612 100644 --- a/home/hyfetch/default.nix +++ b/home/hyfetch/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ # TODO: Switch to fastfetch home.packages = with pkgs; [ neofetch @@ -19,13 +20,13 @@ lightness = 0.7; color_align = { mode = "horizontal"; - custom_colors = []; + custom_colors = [ ]; fore_back = null; }; backend = "neofetch"; args = null; distro = null; - pride_month_shown = []; + pride_month_shown = [ ]; pride_month_disable = false; }; }; diff --git a/home/lazygit/default.nix b/home/lazygit/default.nix index 08fb816..ba851c8 100644 --- a/home/lazygit/default.nix +++ b/home/lazygit/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.lazygit = { enable = true; diff --git a/home/less/default.nix b/home/less/default.nix index 3761235..dc93ccb 100644 --- a/home/less/default.nix +++ b/home/less/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.less.enable = true; home.sessionVariables = { diff --git a/home/man/default.nix b/home/man/default.nix index 54e6fbc..9be3a67 100644 --- a/home/man/default.nix +++ b/home/man/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.man.enable = true; home.sessionVariables = { diff --git a/home/ncmpcpp/default.nix b/home/ncmpcpp/default.nix index 2d7956f..d8a4a2b 100644 --- a/home/ncmpcpp/default.nix +++ b/home/ncmpcpp/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ nixpkgs.overlays = [ (final: prev: { ncmpcpp = prev.ncmpcpp.override { diff --git a/home/syncthing/default.nix b/home/syncthing/default.nix index 733a32e..b0843c9 100644 --- a/home/syncthing/default.nix +++ b/home/syncthing/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.syncthing = { enable = true; diff --git a/home/tmux/default.nix b/home/tmux/default.nix index e246143..7077243 100644 --- a/home/tmux/default.nix +++ b/home/tmux/default.nix @@ -2,16 +2,18 @@ pkgs, config, ... -}: { +}: +{ programs.tmux = { enable = true; rose-pine = { enable = true; - extraConfig = '' - set -g @rose_pine_host 'on' - set -g @rose_pine_directory 'on' - ''; + extraConfig = # tmux + '' + set -g @rose_pine_host 'on' + set -g @rose_pine_directory 'on' + ''; }; escapeTime = 0; @@ -33,27 +35,30 @@ plugins = with pkgs.tmuxPlugins; [ { plugin = resurrect; - extraConfig = '' - set -g @resurrect-capture-pane-contents 'on' - ''; + extraConfig = # tmux + '' + set -g @resurrect-capture-pane-contents 'on' + ''; } { plugin = continuum; - extraConfig = '' - set -g @continuum-restore 'on' - ''; + extraConfig = # tmux + '' + set -g @continuum-restore 'on' + ''; } { plugin = tilish; - extraConfig = '' - # Don't enforce the layout. - set -g @tilish-enforce 'none' + extraConfig = # tmux + '' + # Don't enforce the layout. + set -g @tilish-enforce 'none' - set -g @tilish-project "$HOME/hackin" - set -g @tilish-navigator 'on' - ''; + set -g @tilish-project "$HOME/hackin" + set -g @tilish-navigator 'on' + ''; } { @@ -64,74 +69,78 @@ { plugin = jump; - extraConfig = '' - set -g @jump-key 's' - ''; + extraConfig = # tmux + '' + set -g @jump-key 's' + ''; } { plugin = fingers; - extraConfig = '' - set -g @fingers-jump-key 's' - ''; + extraConfig = # tmux + '' + set -g @fingers-jump-key 's' + ''; } { plugin = tmux-floax; - extraConfig = '' - set -g @floax-bind 'i' - ''; + extraConfig = # tmux + '' + set -g @floax-bind 'i' + ''; } ]; - extraConfig = '' - # Set repeat timeout so keys can be repeated without the prefix. - set -g repeat-time 1000 + extraConfig = # tmux + '' + # Set repeat timeout so keys can be repeated without the prefix. + set -g repeat-time 1000 - # Auto-renumber windows when one is deleted. - set -g renumber-windows 'on' + # Auto-renumber windows when one is deleted. + set -g renumber-windows 'on' - set -ag terminal-overrides ",*:RGB" + set -ag terminal-overrides ",*:RGB" - set -g status-position 'top' + set -g status-position 'top' - ### Keybindings ### + ### Keybindings ### - # Easy reload config. - bind r source-file ${config.xdg.configHome}/tmux/tmux.conf \; display-message "Reloaded config" + # Easy reload config. + bind r source-file ${config.xdg.configHome}/tmux/tmux.conf \; display-message "Reloaded config" - # Better split commands. - bind -N 'vsplit' | split-window -h -c "#{pane_current_path}" - bind -N 'vsplit' \\ split-window -h -c "#{pane_current_path}" - bind -N 'hsplit' - split-window -v -c "#{pane_current_path}" - unbind '"' - unbind % + # Better split commands. + bind -N 'vsplit' | split-window -h -c "#{pane_current_path}" + bind -N 'vsplit' \\ split-window -h -c "#{pane_current_path}" + bind -N 'hsplit' - split-window -v -c "#{pane_current_path}" + unbind '"' + unbind % - # Vi-like resizing. - bind -r -N 'Resize pane (left)' M-h resize-pane -L 5 - bind -r -N 'Resize pane (down)' M-j resize-pane -D 5 - bind -r -N 'Resize pane (up)' M-k resize-pane -U 5 - bind -r -N 'Resize pane (right)' M-l resize-pane -R 5 + # Vi-like resizing. + bind -r -N 'Resize pane (left)' M-h resize-pane -L 5 + bind -r -N 'Resize pane (down)' M-j resize-pane -D 5 + bind -r -N 'Resize pane (up)' M-k resize-pane -U 5 + bind -r -N 'Resize pane (right)' M-l resize-pane -R 5 - # Even out panes. - bind -N 'Evenly distribute panes' = select-layout -E + # Even out panes. + bind -N 'Evenly distribute panes' = select-layout -E - # Swap panes. - bind -r -N 'Swap current pane with the next' H swap-pane -U - bind -r -N 'Swap current pane with the previous' L swap-pane -D + # Swap panes. + bind -r -N 'Swap current pane with the next' H swap-pane -U + bind -r -N 'Swap current pane with the previous' L swap-pane -D - # Window switching. - bind -N 'Previous window' Left previous-window - bind -N 'Next window' Right next-window + # Window switching. + bind -N 'Previous window' Left previous-window + bind -N 'Next window' Right next-window - # Vi copy mode. - unbind [ - bind -N 'Enter normal (copy) mode' Escape copy-mode + # Vi copy mode. + unbind [ + bind -N 'Enter normal (copy) mode' Escape copy-mode - bind -T copy-mode-vi ? command-prompt -p '?' 'send -X search-backward %1' - bind -T copy-mode-vi / command-prompt -p '/' 'send -X search-forward %1' - bind -T copy-mode-vi q send -X cancel - bind -T copy-mode-vi Escape if-shell -F '#{selection_present}' 'send -X clear-selection' 'send -X cancel' - ''; + bind -T copy-mode-vi ? command-prompt -p '?' 'send -X search-backward %1' + bind -T copy-mode-vi / command-prompt -p '/' 'send -X search-forward %1' + bind -T copy-mode-vi q send -X cancel + bind -T copy-mode-vi Escape if-shell -F '#{selection_present}' 'send -X clear-selection' 'send -X cancel' + ''; }; } diff --git a/home/topgrade/default.nix b/home/topgrade/default.nix index d891d5d..b3cf0ee 100644 --- a/home/topgrade/default.nix +++ b/home/topgrade/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.topgrade = { enable = true; diff --git a/home/wget/default.nix b/home/wget/default.nix index 7898c32..fbe06e7 100644 --- a/home/wget/default.nix +++ b/home/wget/default.nix @@ -3,7 +3,8 @@ lib, config, ... -}: { +}: +{ home.packages = with pkgs; [ wget ]; diff --git a/home/xdg/default.nix b/home/xdg/default.nix index 4a608ab..a6750ed 100644 --- a/home/xdg/default.nix +++ b/home/xdg/default.nix @@ -1,27 +1,30 @@ -{config, ...}: { +{ config, ... }: +{ home.preferXdgDirectories = true; - xdg = let - homeDir = config.home.homeDirectory; - in { - enable = true; - - cacheHome = "${homeDir}/.cache"; - configHome = "${homeDir}/.config"; - dataHome = "${homeDir}/.local/share"; - stateHome = "${homeDir}/.local/state"; - - userDirs = { + xdg = + let + homeDir = config.home.homeDirectory; + in + { enable = true; - createDirectories = true; - desktop = "${homeDir}/desktop"; - documents = null; - download = "${homeDir}/downloads"; - music = null; - pictures = "${homeDir}/pictures"; - templates = null; - videos = "${homeDir}/videos"; + cacheHome = "${homeDir}/.cache"; + configHome = "${homeDir}/.config"; + dataHome = "${homeDir}/.local/share"; + stateHome = "${homeDir}/.local/state"; + + userDirs = { + enable = true; + createDirectories = true; + + desktop = "${homeDir}/desktop"; + documents = null; + download = "${homeDir}/downloads"; + music = null; + pictures = "${homeDir}/pictures"; + templates = null; + videos = "${homeDir}/videos"; + }; }; - }; } diff --git a/home/xsession/default.nix b/home/xsession/default.nix index 67eae0c..2f4dbc1 100644 --- a/home/xsession/default.nix +++ b/home/xsession/default.nix @@ -1,17 +1,19 @@ -{...}: { - home.keyboard.options = ["apple:alupckeys"]; +{ ... }: +{ + home.keyboard.options = [ "apple:alupckeys" ]; xsession = { enable = true; numlock.enable = true; # TODO: Switch to autorandr - profileExtra = '' - sudo mount -a - "$HOME/.config/xrandr/desktop.sh" - copyq & - mpd & - pidgin & - ''; + profileExtra = # sh + '' + sudo mount -a + "$HOME/.config/xrandr/desktop.sh" + copyq & + mpd & + pidgin & + ''; }; } diff --git a/home/zathura/default.nix b/home/zathura/default.nix index 3424f0f..eac2dfe 100644 --- a/home/zathura/default.nix +++ b/home/zathura/default.nix @@ -1,4 +1,5 @@ -{...}: { +{ ... }: +{ programs.zathura = { enable = true; diff --git a/home/zoxide/default.nix b/home/zoxide/default.nix index 6f80af8..648cf49 100644 --- a/home/zoxide/default.nix +++ b/home/zoxide/default.nix @@ -1,7 +1,8 @@ -{...}: { +{ ... }: +{ programs.zoxide = { enable = true; - options = ["--cmd cd"]; + options = [ "--cmd cd" ]; }; }