diff options
author | David Morgan <djm_uk@protonmail.com> | 2024-09-03 15:53:47 +0100 |
---|---|---|
committer | David Morgan <djm_uk@protonmail.com> | 2024-09-03 15:53:47 +0100 |
commit | b21c0581c2a15da0f67b7b738c86f7e89ad1b3b9 (patch) | |
tree | da2707e6b65493d65569e2ac3744ed844a0a14a2 /nix-conf/home | |
parent | bf2fc0f49f887fccbd37e8e6cf2a620da052ae32 (diff) | |
download | dotfiles-b21c0581c2a15da0f67b7b738c86f7e89ad1b3b9.tar.gz |
Format home include files with nixfmt
Diffstat (limited to 'nix-conf/home')
-rw-r--r-- | nix-conf/home/includes/clojure.nix | 19 | ||||
-rw-r--r-- | nix-conf/home/includes/common.nix | 110 | ||||
-rw-r--r-- | nix-conf/home/includes/darwin.nix | 10 | ||||
-rw-r--r-- | nix-conf/home/includes/dev-common.nix | 79 | ||||
-rw-r--r-- | nix-conf/home/includes/irssi.nix | 14 | ||||
-rw-r--r-- | nix-conf/home/includes/linux-dev.nix | 9 | ||||
-rw-r--r-- | nix-conf/home/includes/linux-server.nix | 7 |
7 files changed, 111 insertions, 137 deletions
diff --git a/nix-conf/home/includes/clojure.nix b/nix-conf/home/includes/clojure.nix index f3534c6..e362fd0 100644 --- a/nix-conf/home/includes/clojure.nix +++ b/nix-conf/home/includes/clojure.nix @@ -1,17 +1,8 @@ { config, pkgs, lib, ... }: -let - inherit (lib) optionals; -in -{ - home.packages = with pkgs; [ - babashka - clj-kondo - clojure - clojure-lsp - jet - maven - neil - ] - ++ optionals stdenv.isLinux [ leiningen ]; +let inherit (lib) optionals; +in { + home.packages = with pkgs; + [ babashka clj-kondo clojure clojure-lsp jet maven neil ] + ++ optionals stdenv.isLinux [ leiningen ]; } diff --git a/nix-conf/home/includes/common.nix b/nix-conf/home/includes/common.nix index ce320a5..9ae2151 100644 --- a/nix-conf/home/includes/common.nix +++ b/nix-conf/home/includes/common.nix @@ -1,18 +1,16 @@ { config, lib, pkgs, ... }: let - hcr = pkgs.callPackage ./scripts/hm-changes-report.nix { inherit config pkgs; }; - scr = pkgs.callPackage ./scripts/system-changes-report.nix { inherit config pkgs; }; + hcr = + pkgs.callPackage ./scripts/hm-changes-report.nix { inherit config pkgs; }; + scr = pkgs.callPackage ./scripts/system-changes-report.nix { + inherit config pkgs; + }; unstable = import <unstable> { }; -in -{ - imports = [ - ./zsh.nix - <sops-nix/modules/home-manager/sops.nix> - ]; +in { + imports = [ ./zsh.nix <sops-nix/modules/home-manager/sops.nix> ]; - nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ - "aspell-dict-en-science" - ]; + nixpkgs.config.allowUnfreePredicate = pkg: + builtins.elem (lib.getName pkg) [ "aspell-dict-en-science" ]; sops = { age.keyFile = "${config.xdg.configHome}/sops/age/keys.txt"; @@ -92,15 +90,13 @@ in config = { style = "full"; pager = "less -RXF"; - map-syntax = [".ignore:.gitignore" "*.jenkinsfile:Groovy"]; + map-syntax = [ ".ignore:.gitignore" "*.jenkinsfile:Groovy" ]; }; }; nix = { package = pkgs.nix; - settings = { - extra-experimental-features = [ "nix-command" "flakes" ]; - }; + settings = { extra-experimental-features = [ "nix-command" "flakes" ]; }; }; programs.gpg.enable = true; @@ -123,19 +119,20 @@ in nmap <silent> <F3> :silent nohlsearch<CR> imap <silent> <F3> <C-o>:silent nohlsearch<CR> ''; - plugins = [ pkgs.vimPlugins.sensible - pkgs.vimPlugins.auto-pairs - pkgs.vimPlugins.ctrlp - pkgs.vimPlugins.editorconfig-vim - pkgs.vimPlugins.inkpot - pkgs.vimPlugins.molokai - pkgs.vimPlugins.surround - pkgs.vimPlugins.vim-lastplace - pkgs.vimPlugins.vim-nix - pkgs.vimPlugins.vim-pasta - pkgs.vimPlugins.vim-repeat - pkgs.vimPlugins.vim-sexp-mappings-for-regular-people - pkgs.vimPlugins.vim-sleuth + plugins = [ + pkgs.vimPlugins.sensible + pkgs.vimPlugins.auto-pairs + pkgs.vimPlugins.ctrlp + pkgs.vimPlugins.editorconfig-vim + pkgs.vimPlugins.inkpot + pkgs.vimPlugins.molokai + pkgs.vimPlugins.surround + pkgs.vimPlugins.vim-lastplace + pkgs.vimPlugins.vim-nix + pkgs.vimPlugins.vim-pasta + pkgs.vimPlugins.vim-repeat + pkgs.vimPlugins.vim-sexp-mappings-for-regular-people + pkgs.vimPlugins.vim-sleuth ]; settings = { background = "dark"; @@ -158,16 +155,17 @@ in UseKeychain yes User djm ''; - includes = [ "~/.ssh/config_local" config.sops.secrets."ssh_config/oci".path ]; + includes = + [ "~/.ssh/config_local" config.sops.secrets."ssh_config/oci".path ]; matchBlocks = { "djm.ovh" = { hostname = "v.djm.ovh"; port = 2222; }; "devio" = { - hostname = "devio.us"; - user = "deejayem"; - port = 2222; + hostname = "devio.us"; + user = "deejayem"; + port = 2222; }; "sdf" = { hostname = "sdf.org"; @@ -182,21 +180,13 @@ in user = "deejayem"; }; "blinkenshell" = { - hostname = "ssh.blinkenshell.org"; - port = 2222; - }; - "hashbang" = { - hostname = "de1.hashbang.sh"; - }; - "tilde.institute" = { - hostname = "tilde.institute"; - }; - "tilde.team" = { - hostname = "tilde.team"; - }; - "ctrl-c.club" = { - hostname = "ctrl-c.club"; + hostname = "ssh.blinkenshell.org"; + port = 2222; }; + "hashbang" = { hostname = "de1.hashbang.sh"; }; + "tilde.institute" = { hostname = "tilde.institute"; }; + "tilde.team" = { hostname = "tilde.team"; }; + "ctrl-c.club" = { hostname = "ctrl-c.club"; }; "github.com" = { hostname = "github.com"; user = "git"; @@ -209,14 +199,18 @@ in programs.git = { enable = true; userName = "David Morgan"; - includes = [ { path = config.sops.secrets."git_email_config/default".path; } ]; + includes = + [{ path = config.sops.secrets."git_email_config/default".path; }]; aliases = { # difftastic - logt = "!sh -c 'GIT_EXTERNAL_DIFF=\"difft --background=dark\" git log -p --ext-diff'"; - showt = "!show() { GIT_EXTERNAL_DIFF=difft git show \${1} --ext-diff; }; show"; + logt = + "!sh -c 'GIT_EXTERNAL_DIFF=\"difft --background=dark\" git log -p --ext-diff'"; + showt = + "!show() { GIT_EXTERNAL_DIFF=difft git show \${1} --ext-diff; }; show"; difft = "difftool"; # "raw" output - rlog = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less log"; # usually used with -p + rlog = + "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less log"; # usually used with -p rshow = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less show"; rdiff = "!git -c delta.raw=true -c core.pager=${pkgs.less}/bin/less diff"; # copiable output (without line numbers or +/- indicators) @@ -224,18 +218,16 @@ in cshow = "!git -c delta.line-numbers=false show"; cdiff = "!git -c delta.line-numbers=false diff"; # diff-so-fancy - flog = "!git -c core.pager=\"diff-so-fancy | less\" log"; # usually used with -p - fshow = "!git -c core.pager=\"diff-so-fancy | less\" show"; - fdiff = "!git -c core.pager=\"diff-so-fancy | less\" diff"; + flog = '' + !git -c core.pager="diff-so-fancy | less" log''; # usually used with -p + fshow = ''!git -c core.pager="diff-so-fancy | less" show''; + fdiff = ''!git -c core.pager="diff-so-fancy | less" diff''; upstream = "!git push -u origin HEAD"; update-master = "!git fetch origin master:master"; update-main = "!git fetch origin main:main"; }; - attributes = [ - "*.el diff=elisp" - "*.clj diff=clojure" - ]; + attributes = [ "*.el diff=elisp" "*.clj diff=clojure" ]; extraConfig = { core.editor = "vim"; diff = { @@ -253,9 +245,7 @@ in rebase = false; }; push.autoSetupRemote = true; - rebase = { - autostash = true; - }; + rebase = { autostash = true; }; }; delta = { enable = true; diff --git a/nix-conf/home/includes/darwin.nix b/nix-conf/home/includes/darwin.nix index 340243d..4001348 100644 --- a/nix-conf/home/includes/darwin.nix +++ b/nix-conf/home/includes/darwin.nix @@ -21,11 +21,8 @@ let --prefix PYTHONPATH : $out/${pkgs.mopidyPackages.python.sitePackages} ''; }; -in -{ - imports = [ - ./dev-common.nix - ]; +in { + imports = [ ./dev-common.nix ]; home.packages = with pkgs; [ awscli2 @@ -33,7 +30,8 @@ in coreutils curl diffutils - ((emacsPackagesFor emacs29-macport).emacsWithPackages(ps: [ ps.vterm ps.multi-vterm ])) + ((emacsPackagesFor emacs29-macport).emacsWithPackages + (ps: [ ps.vterm ps.multi-vterm ])) findutils gh gh-dash diff --git a/nix-conf/home/includes/dev-common.nix b/nix-conf/home/includes/dev-common.nix index 6cf12ba..97fb3a6 100644 --- a/nix-conf/home/includes/dev-common.nix +++ b/nix-conf/home/includes/dev-common.nix @@ -1,24 +1,17 @@ { config, pkgs, lib, ... }: -let - inherit (lib) optionals; -in -{ - imports = [ - ./common.nix - ./clojure.nix - ]; +let inherit (lib) optionals; +in { + imports = [ ./common.nix ./clojure.nix ]; - home.packages = with pkgs; [ - docker - docker-compose - docker-credential-helpers - gopass-jsonapi - multimarkdown - neovim - ] ++ optionals (!stdenv.isDarwin) [ - ffmpeg - mpv - ]; + home.packages = with pkgs; + [ + docker + docker-compose + docker-credential-helpers + gopass-jsonapi + multimarkdown + neovim + ] ++ optionals (!stdenv.isDarwin) [ ffmpeg mpv ]; programs.tmux = { enable = true; @@ -44,32 +37,42 @@ in set -g @thumbs-unique enabled set -g @thumbs-position right set -g @thumbs-contrast 1 - #${lib.optionalString pkgs.stdenv.isLinux "set -g @thumbs-upcase-command 'xargs xdg-open {}'"} - #${lib.optionalString pkgs.stdenv.isDarwin "set -g @thumbs-upcase-command 'xargs open {}'"} + #${ + lib.optionalString pkgs.stdenv.isLinux + "set -g @thumbs-upcase-command 'xargs xdg-open {}'" + } + #${ + lib.optionalString pkgs.stdenv.isDarwin + "set -g @thumbs-upcase-command 'xargs open {}'" + } ''; } ]; extraConfig = '' - unbind-key R - bind-key R run-shell ' \ - tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \ - tmux display-message "Sourced .config/tmux/tmux.conf!"' + unbind-key R + bind-key R run-shell ' \ + tmux source-file ~/.config/tmux/tmux.conf > /dev/null; \ + tmux display-message "Sourced .config/tmux/tmux.conf!"' - bind-key £ split-window -h + bind-key £ split-window -h - set-option -g status-bg '#666666' - set-option -g status-fg '#aaaaaa' - set-option -g status-left-length 50 - set-option -g status-right " %a, %b %d - %H:%M " + set-option -g status-bg '#666666' + set-option -g status-fg '#aaaaaa' + set-option -g status-left-length 50 + set-option -g status-right " %a, %b %d - %H:%M " - ${lib.optionalString pkgs.stdenv.isLinux '' - bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" - bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer" - ''} - ${lib.optionalString pkgs.stdenv.isDarwin '' - bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" - bind-key C-y run "reattach-to-user-namespace pbpaste | tmux load-buffer - ; tmux paste-buffer" - ''} + ${ + lib.optionalString pkgs.stdenv.isLinux '' + bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "xsel -i -p && xsel -o -p | xsel -i -b" + bind-key C-y run "xsel -o | tmux load-buffer - ; tmux paste-buffer" + '' + } + ${ + lib.optionalString pkgs.stdenv.isDarwin '' + bind-key -T copy-mode y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" + bind-key C-y run "reattach-to-user-namespace pbpaste | tmux load-buffer - ; tmux paste-buffer" + '' + } ''; }; diff --git a/nix-conf/home/includes/irssi.nix b/nix-conf/home/includes/irssi.nix index b3d1ed7..1c43867 100644 --- a/nix-conf/home/includes/irssi.nix +++ b/nix-conf/home/includes/irssi.nix @@ -141,9 +141,7 @@ certificateFile = "${config.home.homeDirectory}/.irssi/oftc.pem"; }; }; - channels = { - home-manager.autoJoin = true; - }; + channels = { home-manager.autoJoin = true; }; }; blinkenirc = { nick = "djm"; @@ -160,7 +158,8 @@ ssl = { enable = true; verify = true; - certificateFile = "${config.home.homeDirectory}/.irssi/blinkenirc.pem"; + certificateFile = + "${config.home.homeDirectory}/.irssi/blinkenirc.pem"; }; }; channels = { @@ -179,12 +178,11 @@ ssl = { enable = true; verify = true; - certificateFile = "${config.home.homeDirectory}/.irssi/hashbang.pem"; + certificateFile = + "${config.home.homeDirectory}/.irssi/hashbang.pem"; }; }; - channels = { - "#!".autoJoin = true; - }; + channels = { "#!".autoJoin = true; }; }; }; }; diff --git a/nix-conf/home/includes/linux-dev.nix b/nix-conf/home/includes/linux-dev.nix index b6c6d19..ddccc25 100644 --- a/nix-conf/home/includes/linux-dev.nix +++ b/nix-conf/home/includes/linux-dev.nix @@ -1,13 +1,10 @@ -{ config, pkgs, ... }: -{ - imports = [ - ./dev-common.nix - ]; +{ config, pkgs, ... }: { + imports = [ ./dev-common.nix ]; programs.emacs = { enable = true; package = pkgs.emacs29; - extraPackages = (epkgs: [ epkgs.vterm epkgs.multi-vterm ] ); + extraPackages = (epkgs: [ epkgs.vterm epkgs.multi-vterm ]); }; home.packages = with pkgs; [ diff --git a/nix-conf/home/includes/linux-server.nix b/nix-conf/home/includes/linux-server.nix index c2630cc..fc3a2f7 100644 --- a/nix-conf/home/includes/linux-server.nix +++ b/nix-conf/home/includes/linux-server.nix @@ -1,8 +1,5 @@ -{ config, pkgs, ... }: -{ - imports = [ - ./common.nix - ]; +{ config, pkgs, ... }: { + imports = [ ./common.nix ]; home.packages = with pkgs; [ emacs-nox |