Partial split into module files
This commit is contained in:
11
flake.nix
11
flake.nix
@@ -42,15 +42,16 @@
|
|||||||
in home-manager.lib.homeManagerConfiguration {
|
in home-manager.lib.homeManagerConfiguration {
|
||||||
inherit pkgs;
|
inherit pkgs;
|
||||||
|
|
||||||
modules = [
|
modules =
|
||||||
"${modules}/home.nix"
|
(pkgs.lib.filter
|
||||||
{
|
(n: pkgs.lib.strings.hasSuffix ".nix" n)
|
||||||
|
(pkgs.lib.filesystem.listFilesRecursive modules)) ++
|
||||||
|
[{
|
||||||
home.stateVersion = "22.05";
|
home.stateVersion = "22.05";
|
||||||
home.username = "jfrikker";
|
home.username = "jfrikker";
|
||||||
home.homeDirectory = "/Users/jfrikker";
|
home.homeDirectory = "/Users/jfrikker";
|
||||||
home.packages = [ pkgs.pinentry_mac ];
|
home.packages = [ pkgs.pinentry_mac ];
|
||||||
}
|
}];
|
||||||
];
|
|
||||||
|
|
||||||
extraSpecialArgs = { kube = kube.packages.aarch64-darwin.default; };
|
extraSpecialArgs = { kube = kube.packages.aarch64-darwin.default; };
|
||||||
};
|
};
|
||||||
|
|||||||
316
home.org
316
home.org
@@ -28,10 +28,6 @@ This is the basic structure of the home.nix file. Individual sections are define
|
|||||||
}
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Packages
|
* Packages
|
||||||
:PROPERTIES:
|
|
||||||
:header-args: :noweb-ref packages
|
|
||||||
:END:
|
|
||||||
|
|
||||||
Home-manager "packages" are simply binaries that are placed on the path, without any attached
|
Home-manager "packages" are simply binaries that are placed on the path, without any attached
|
||||||
configuration. The code blocks in this section contain package lists that go under the packages
|
configuration. The code blocks in this section contain package lists that go under the packages
|
||||||
section above.
|
section above.
|
||||||
@@ -42,7 +38,10 @@ in a ~nix~ devshell I think I'd also like to use it for scripting / exploratory
|
|||||||
so I'm installing it globally with a useful set of libraries. I should curate this somewhat
|
so I'm installing it globally with a useful set of libraries. I should curate this somewhat
|
||||||
carefully so it doesn't get carried away...
|
carefully so it doesn't get carried away...
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/common-lisp.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
rlwrap
|
rlwrap
|
||||||
(sbcl.withPackages (ps: with ps; [
|
(sbcl.withPackages (ps: with ps; [
|
||||||
alexandria
|
alexandria
|
||||||
@@ -78,6 +77,8 @@ carefully so it doesn't get carried away...
|
|||||||
trivial-timeout
|
trivial-timeout
|
||||||
uuid
|
uuid
|
||||||
]))
|
]))
|
||||||
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
[[https://github.com/str4d/rage][~rage~]] is a rust implementation of [[https://pkg.go.dev/filippo.io/age][~age~]]. It implements a simple system for generating public /
|
[[https://github.com/str4d/rage][~rage~]] is a rust implementation of [[https://pkg.go.dev/filippo.io/age][~age~]]. It implements a simple system for generating public /
|
||||||
@@ -86,9 +87,15 @@ the name implies, allows generating and storing ~age~ keys on a Yubikey. ~rage~
|
|||||||
~age~ when using ~age.el~, because it supports ~pinentry~. That allows it to prompt for yubikey pins
|
~age~ when using ~age.el~, because it supports ~pinentry~. That allows it to prompt for yubikey pins
|
||||||
using a dialog, rather than a command line prompt.
|
using a dialog, rather than a command line prompt.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/crypto.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
rage
|
rage
|
||||||
age-plugin-yubikey
|
age-plugin-yubikey
|
||||||
|
yubikey-manager
|
||||||
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
~dust~, ~fd~, ~ripgrep~, and ~xh~ are rust re-implementations of a few longtime Linux command-line
|
~dust~, ~fd~, ~ripgrep~, and ~xh~ are rust re-implementations of a few longtime Linux command-line
|
||||||
@@ -100,37 +107,60 @@ tools. They boost better speed, or simply more streamlined features.
|
|||||||
| ~ripgrep~ | ~grep~ |
|
| ~ripgrep~ | ~grep~ |
|
||||||
| ~xh~ | ~curl~ |
|
| ~xh~ | ~curl~ |
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/rust-reimpls.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
dust
|
dust
|
||||||
fd
|
fd
|
||||||
ripgrep
|
ripgrep
|
||||||
xh
|
xh
|
||||||
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
[[https://ledger-cli.org/][~ledger~]] is how I manage my budget. It's a plain-text accounting tool that's really awesome.
|
[[https://ledger-cli.org/][~ledger~]] is how I manage my budget. It's a plain-text accounting tool that's really awesome.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/ledger.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
ledger
|
ledger
|
||||||
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
~nil~ is an LSP server for nix files.
|
~nil~ is an LSP server for nix files.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/nil.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
nil
|
nil
|
||||||
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
[[https://github.com/magic-wormhole/magic-wormhole][Magic Wormhole]] is a quick-and-easy way to securely transfer a file or directory between any two
|
[[https://github.com/magic-wormhole/magic-wormhole][Magic Wormhole]] is a quick-and-easy way to securely transfer a file or directory between any two
|
||||||
computers in the world, assuming that you have an out-of-band way to communicate a passphrase
|
computers in the world, assuming that you have an out-of-band way to communicate a passphrase
|
||||||
between them. Once installed, the actual command is ~wormhole~.
|
between them. Once installed, the actual command is ~wormhole~.
|
||||||
|
|
||||||
#+begin_src nix
|
#+begin_src nix :tangle target/magic-wormhole.nix
|
||||||
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
magic-wormhole
|
magic-wormhole
|
||||||
|
];
|
||||||
|
}
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
These are the other programs I have installed globally. A few (like ~awscli~, ~mysql-client~, etc.)
|
These are the other programs I have installed globally. A few (like ~awscli~, ~mysql-client~, etc.)
|
||||||
are still Shibumi-specific; ideally I'd find another way to install them.
|
are still Shibumi-specific; ideally I'd find another way to install them.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/other-packages.nix
|
||||||
|
{pkgs, kube, ...}:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
aws-iam-authenticator
|
aws-iam-authenticator
|
||||||
awscli2
|
awscli2
|
||||||
iosevka
|
iosevka
|
||||||
@@ -140,14 +170,11 @@ are still Shibumi-specific; ideally I'd find another way to install them.
|
|||||||
nerd-fonts.jetbrains-mono
|
nerd-fonts.jetbrains-mono
|
||||||
openssh
|
openssh
|
||||||
tokei
|
tokei
|
||||||
yubikey-manager
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Program Configurations
|
* Program Configurations
|
||||||
:PROPERTIES:
|
|
||||||
:header-args:nix: :noweb-ref programs :noweb no-export
|
|
||||||
:END:
|
|
||||||
|
|
||||||
This section contains applications whose config files will be generated by Home Manager. Home
|
This section contains applications whose config files will be generated by Home Manager. Home
|
||||||
Manager calls these "programs" (as opposed to "packages", which are just binaries to put on the
|
Manager calls these "programs" (as opposed to "packages", which are just binaries to put on the
|
||||||
path).
|
path).
|
||||||
@@ -158,13 +185,17 @@ Although Home-Manager generates config files for these programs, they don't need
|
|||||||
configuration. I'm not sure what benefit there is to enabling ~jq~ as a Home Manager program, rather
|
configuration. I'm not sure what benefit there is to enabling ~jq~ as a Home Manager program, rather
|
||||||
than just as an available package, but there doesn't seem to be a downside.
|
than just as an available package, but there doesn't seem to be a downside.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/simple-programs.nix
|
||||||
|
{
|
||||||
|
programs = {
|
||||||
bash.enable = true;
|
bash.enable = true;
|
||||||
gh.enable = true;
|
gh.enable = true;
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
jq.enable = true;
|
jq.enable = true;
|
||||||
lazygit.enable = true;
|
lazygit.enable = true;
|
||||||
zoxide.enable = true;
|
zoxide.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Bat
|
** Bat
|
||||||
@@ -173,9 +204,13 @@ than just as an available package, but there doesn't seem to be a downside.
|
|||||||
provides syntax-highlighting versions of a few other commands. It's honestly not incredibly useful,
|
provides syntax-highlighting versions of a few other commands. It's honestly not incredibly useful,
|
||||||
but still nice to have.
|
but still nice to have.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/bat.nix
|
||||||
bat.enable = true;
|
{
|
||||||
bat.config.style = "numbers";
|
programs.bat = {
|
||||||
|
enable = true;
|
||||||
|
config.style = "numbers";
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Direnv
|
** Direnv
|
||||||
@@ -183,20 +218,28 @@ but still nice to have.
|
|||||||
~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I
|
~direnv~ allows loading per-project paths as I navigate to their directories on the command line. I
|
||||||
leverage this with the emacs ~envrc~ package.
|
leverage this with the emacs ~envrc~ package.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/direnv.nix
|
||||||
direnv.enable = true;
|
{
|
||||||
direnv.nix-direnv.enable = true;
|
programs.direnv = {
|
||||||
|
enable = true;
|
||||||
|
nix-direnv.enable = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Eza
|
** Eza
|
||||||
|
|
||||||
~eza~ is an ~ls~ replacement that offers icons, colors, and some easier command-line options.
|
~eza~ is an ~ls~ replacement that offers icons, colors, and some easier command-line options.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/eza.nix
|
||||||
eza.enable = true;
|
{
|
||||||
eza.enableBashIntegration = true;
|
programs.eza = {
|
||||||
eza.enableZshIntegration = true;
|
enable = true;
|
||||||
eza.icons = "auto";
|
enableBashIntegration = true;
|
||||||
|
enableZshIntegration = true;
|
||||||
|
icons = "auto";
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Fzf
|
** Fzf
|
||||||
@@ -204,35 +247,48 @@ leverage this with the emacs ~envrc~ package.
|
|||||||
~fzf~ offers a variety of fuzzy finders right from the shell. I haven't been using this, so I'll
|
~fzf~ offers a variety of fuzzy finders right from the shell. I haven't been using this, so I'll
|
||||||
turn it off for now.
|
turn it off for now.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/fzf.nix
|
||||||
fzf.defaultCommand = "fd --type f";
|
{
|
||||||
fzf.fileWidgetCommand = "fd --type f";
|
programs.fzf = {
|
||||||
fzf.fileWidgetOptions = ["--preview" "'bat --color=always --style=numbers --line-range=:500 {}'"];
|
defaultCommand = "fd --type f";
|
||||||
fzf.changeDirWidgetCommand = "fd --type d";
|
fileWidgetCommand = "fd --type f";
|
||||||
fzf.tmux.enableShellIntegration = true;
|
fileWidgetOptions = ["--preview" "'bat --color=always --style=numbers --line-range=:500 {}'"];
|
||||||
|
changeDirWidgetCommand = "fd --type d";
|
||||||
|
tmux.enableShellIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Git
|
** Git
|
||||||
|
|
||||||
We all know what ~git~ does.
|
We all know what ~git~ does.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/git.nix
|
||||||
git.enable = true;
|
{
|
||||||
git.settings.user.name = "Joe Frikker";
|
programs.git = {
|
||||||
git.settings.user.email = "joe.frikker@shibumi.com";
|
enable = true;
|
||||||
delta.enable = true;
|
settings.user.name = "Joe Frikker";
|
||||||
delta.enableGitIntegration = true;
|
settings.user.email = "joe.frikker@shibumi.com";
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.delta = {
|
||||||
|
enable = true;
|
||||||
|
enableGitIntegration = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Helix
|
** Helix
|
||||||
|
|
||||||
The best text editor ever? Heresy!
|
The best text editor ever? Heresy!
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/helix.nix
|
||||||
helix.enable = true;
|
{
|
||||||
helix.defaultEditor = true;
|
programs.helix = {
|
||||||
|
enable = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
|
||||||
helix.settings.editor = {
|
settings.editor = {
|
||||||
auto-format = false;
|
auto-format = false;
|
||||||
auto-pairs = false;
|
auto-pairs = false;
|
||||||
auto-save.after-delay.enable = true;
|
auto-save.after-delay.enable = true;
|
||||||
@@ -247,14 +303,14 @@ The best text editor ever? Heresy!
|
|||||||
whitespace.render.newline = "all";
|
whitespace.render.newline = "all";
|
||||||
};
|
};
|
||||||
|
|
||||||
helix.settings.keys.normal.space = {
|
settings.keys.normal.space = {
|
||||||
space = "file_picker";
|
space = "file_picker";
|
||||||
"," = "buffer_picker";
|
"," = "buffer_picker";
|
||||||
# b = "@:sh wezterm cli spawn --cwd . -- tig blame <C-r>%<ret>";
|
# b = "@:sh wezterm cli spawn --cwd . -- tig blame <C-r>%<ret>";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
helix.languages.language-server.eslint = {
|
languages.language-server.eslint = {
|
||||||
args = ["--stdio"];
|
args = ["--stdio"];
|
||||||
command = "vscode-eslint-language-server";
|
command = "vscode-eslint-language-server";
|
||||||
config.nodePath = "";
|
config.nodePath = "";
|
||||||
@@ -268,15 +324,15 @@ The best text editor ever? Heresy!
|
|||||||
config.problems.shortenToSingleLine = false;
|
config.problems.shortenToSingleLine = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
helix.languages.language-server.jdtls.config.java = {
|
languages.language-server.jdtls.config.java = {
|
||||||
autobuild.enabled = true;
|
autobuild.enabled = true;
|
||||||
completion.maxResults = 1000;
|
completion.maxResults = 1000;
|
||||||
format.settings.url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml";
|
format.settings.url = "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml";
|
||||||
};
|
};
|
||||||
|
|
||||||
helix.languages.language-server.rust-analyzer.config.files.watcher = "client";
|
languages.language-server.rust-analyzer.config.files.watcher = "client";
|
||||||
|
|
||||||
helix.languages.language = [
|
languages.language = [
|
||||||
{
|
{
|
||||||
name = "typescript";
|
name = "typescript";
|
||||||
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
|
language-servers = [ "typescript-language-server" "vscode-eslint-language-server" ];
|
||||||
@@ -295,6 +351,8 @@ The best text editor ever? Heresy!
|
|||||||
indent.unit = " ";
|
indent.unit = " ";
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Starship
|
** Starship
|
||||||
@@ -302,9 +360,11 @@ The best text editor ever? Heresy!
|
|||||||
~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have
|
~starship~ gives me a nice shell prompt, mostly showing the versions of relevant software I have
|
||||||
installed. It's shell-agnostic, so it works with both bash and zsh.
|
installed. It's shell-agnostic, so it works with both bash and zsh.
|
||||||
|
|
||||||
#+BEGIN_SRC nix :noweb no-export
|
#+BEGIN_SRC nix :tangle target/starship.nix
|
||||||
starship.enable = true;
|
{
|
||||||
starship.settings = {
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
add_newline = false;
|
add_newline = false;
|
||||||
container.disabled = true;
|
container.disabled = true;
|
||||||
git_branch.symbol = " ";
|
git_branch.symbol = " ";
|
||||||
@@ -323,9 +383,9 @@ installed. It's shell-agnostic, so it works with both bash and zsh.
|
|||||||
rust.symbol = " ";
|
rust.symbol = " ";
|
||||||
docker_context.disabled = true;
|
docker_context.disabled = true;
|
||||||
shell.disabled = false;
|
shell.disabled = false;
|
||||||
} //
|
};
|
||||||
<<starship_colors>>
|
};
|
||||||
;
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Tmux
|
** Tmux
|
||||||
@@ -333,27 +393,32 @@ installed. It's shell-agnostic, so it works with both bash and zsh.
|
|||||||
I'm using ~wezterm~ instead of ~tmux~ for now, so this is disabled, but I'm keeping the config here
|
I'm using ~wezterm~ instead of ~tmux~ for now, so this is disabled, but I'm keeping the config here
|
||||||
in case I need it later.
|
in case I need it later.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/tmux.nix
|
||||||
tmux.baseIndex = 1;
|
{pkgs, ...}:
|
||||||
tmux.clock24 = true;
|
{
|
||||||
tmux.customPaneNavigationAndResize = true;
|
programs.tmux = {
|
||||||
tmux.historyLimit = 50000;
|
baseIndex = 1;
|
||||||
tmux.enable = true;
|
clock24 = true;
|
||||||
tmux.escapeTime = 0;
|
customPaneNavigationAndResize = true;
|
||||||
tmux.keyMode = "vi";
|
historyLimit = 50000;
|
||||||
tmux.mouse = true;
|
enable = true;
|
||||||
tmux.shell = pkgs.zsh + "/bin/zsh";
|
escapeTime = 0;
|
||||||
tmux.shortcut = "Space";
|
keyMode = "vi";
|
||||||
tmux.tmuxinator.enable = true;
|
mouse = true;
|
||||||
tmux.terminal = "xterm-256color";
|
shell = pkgs.zsh + "/bin/zsh";
|
||||||
tmux.extraConfig = ''
|
shortcut = "Space";
|
||||||
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
tmuxinator.enable = true;
|
||||||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
terminal = "xterm-256color";
|
||||||
|
extraConfig = ''
|
||||||
|
bind-key -T copy-mode-vi 'v' send -X begin-selection
|
||||||
|
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel
|
||||||
|
|
||||||
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
|
bind-key -T launcher g popup -h 100% -w 100% -E lazygit
|
||||||
bind-key g switch-client -Tlauncher
|
bind-key g switch-client -Tlauncher
|
||||||
set -g default-command ""
|
set -g default-command ""
|
||||||
'';
|
'';
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** Wezterm
|
** Wezterm
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
@@ -363,9 +428,13 @@ set -g default-command ""
|
|||||||
~wezterm~ is a fast terminal emulator and multiplexer. It is configured using lua. We'll define its
|
~wezterm~ is a fast terminal emulator and multiplexer. It is configured using lua. We'll define its
|
||||||
config in two blocks, so we can get lua syntax highlighting in org. First, the nix configuration:
|
config in two blocks, so we can get lua syntax highlighting in org. First, the nix configuration:
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/wezterm.nix
|
||||||
wezterm.enable = true;
|
{
|
||||||
wezterm.extraConfig = builtins.readFile ./wezterm.lua;
|
programs.wezterm = {
|
||||||
|
enable = true;
|
||||||
|
extraConfig = builtins.readFile ./wezterm.lua;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Then the real lua config:
|
Then the real lua config:
|
||||||
@@ -565,20 +634,26 @@ Now we'll set up some keybindings:
|
|||||||
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
|
This is my default shell for now. Unfortunately, nix requires a posix-compliant shell, so bash or
|
||||||
zsh it is.
|
zsh it is.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/zsh.nix
|
||||||
zsh.enable = true;
|
{
|
||||||
zsh.oh-my-zsh.enable = true;
|
programs.zsh = {
|
||||||
zsh.syntaxHighlighting.enable = true;
|
enable = true;
|
||||||
zsh.autosuggestion.enable = true;
|
oh-my-zsh.enable = true;
|
||||||
zsh.historySubstringSearch.enable = true;
|
syntaxHighlighting.enable = true;
|
||||||
zsh.history.share = false;
|
autosuggestion.enable = true;
|
||||||
zsh.cdpath = ["~/source"];
|
historySubstringSearch.enable = true;
|
||||||
|
history.share = false;
|
||||||
|
cdpath = ["~/source"];
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
Actually, nix *really* requires ~bash~. This is a plugin that allows using zsh from nix-shell.
|
Actually, nix *really* requires ~bash~. This is a plugin that allows using zsh from nix-shell.
|
||||||
|
|
||||||
#+BEGIN_SRC nix
|
#+BEGIN_SRC nix :tangle target/zsh-nix-shell.nix
|
||||||
zsh.plugins = [
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
programs.zsh.plugins = [
|
||||||
{
|
{
|
||||||
name = "zsh-nix-shell";
|
name = "zsh-nix-shell";
|
||||||
file = "nix-shell.plugin.zsh";
|
file = "nix-shell.plugin.zsh";
|
||||||
@@ -590,6 +665,7 @@ Actually, nix *really* requires ~bash~. This is a plugin that allows using zsh f
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Emacs
|
* Emacs
|
||||||
@@ -603,12 +679,16 @@ breaking it out into its own top-level section. Many of the sections here have t
|
|||||||
nix code block listing the emacs packages to include, and an elisp code block to configure them in
|
nix code block listing the emacs packages to include, and an elisp code block to configure them in
|
||||||
emacs.
|
emacs.
|
||||||
|
|
||||||
#+BEGIN_SRC nix :noweb-ref programs
|
#+BEGIN_SRC nix :tangle target/emacs.nix :noweb-ref
|
||||||
emacs.enable = true;
|
{
|
||||||
emacs.extraPackages = epkgs: with epkgs; [
|
programs.emacs = {
|
||||||
|
enable = true;
|
||||||
|
extraPackages = epkgs: with epkgs; [
|
||||||
<<emacs_packages>>
|
<<emacs_packages>>
|
||||||
];
|
];
|
||||||
emacs.extraConfig = builtins.readFile ./emacs.el;
|
extraConfig = builtins.readFile ./emacs.el;
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
We'll put the actual emacs config into a separate file, rather than into a nix string literal. This
|
We'll put the actual emacs config into a separate file, rather than into a nix string literal. This
|
||||||
@@ -1635,14 +1715,15 @@ age
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* Theme
|
* Theme
|
||||||
|
|
||||||
I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
||||||
|
|
||||||
** Bat
|
** Bat
|
||||||
|
#+BEGIN_SRC nix :tangle target/bat-theme.nix
|
||||||
#+BEGIN_SRC nix :noweb-ref programs
|
{pkgs, ...}:
|
||||||
bat.config.theme = "catppuccin-frappe";
|
{
|
||||||
bat.themes = {
|
programs.bat = {
|
||||||
|
config.theme = "catppuccin-frappe";
|
||||||
|
themes = {
|
||||||
catppuccin-frappe = {
|
catppuccin-frappe = {
|
||||||
src = pkgs.fetchFromGitHub {
|
src = pkgs.fetchFromGitHub {
|
||||||
owner = "catppuccin";
|
owner = "catppuccin";
|
||||||
@@ -1653,18 +1734,22 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
|||||||
file = "Frappe.tmTheme";
|
file = "Frappe.tmTheme";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Helix
|
** Helix
|
||||||
|
#+BEGIN_SRC nix :tangle target/helix-theme.nix
|
||||||
#+BEGIN_SRC nix :noweb-ref programs
|
{
|
||||||
helix.settings.theme = "catppuccin_frappe";
|
programs.helix.settings.theme = "catppuccin_frappe";
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Tmux
|
** Tmux
|
||||||
|
#+BEGIN_SRC nix :tangle target/tmux-theme.nix
|
||||||
#+BEGIN_SRC nix :noweb-ref programs
|
{pkgs, ...}:
|
||||||
tmux.plugins = [
|
{
|
||||||
|
programs.tmux.plugins = [
|
||||||
{
|
{
|
||||||
plugin = pkgs.tmuxPlugins.catppuccin;
|
plugin = pkgs.tmuxPlugins.catppuccin;
|
||||||
extraConfig = ''set -g @catppuccin_window_tabs_enabled on
|
extraConfig = ''set -g @catppuccin_window_tabs_enabled on
|
||||||
@@ -1672,11 +1757,15 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
|||||||
set -g @catppuccin_window_current_text "#W"'';
|
set -g @catppuccin_window_current_text "#W"'';
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Lazygit
|
** Lazygit
|
||||||
|
#+BEGIN_SRC nix :tangle target/lazygit.nix
|
||||||
#+BEGIN_SRC nix :noweb-ref extra_xdg
|
{pkgs, ...}:
|
||||||
|
{
|
||||||
|
xdg = {
|
||||||
|
enable = true;
|
||||||
configFile."lazygit/config.yml" = {
|
configFile."lazygit/config.yml" = {
|
||||||
enable = true;
|
enable = true;
|
||||||
source = pkgs.fetchFromGitHub
|
source = pkgs.fetchFromGitHub
|
||||||
@@ -1687,25 +1776,27 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
|||||||
sha256 = "9BBmWRcjNaJE9T0RKVEJaSnkrbMom0CLYE8PzAT6yFw=";
|
sha256 = "9BBmWRcjNaJE9T0RKVEJaSnkrbMom0CLYE8PzAT6yFw=";
|
||||||
} + /themes/frappe.yml;
|
} + /themes/frappe.yml;
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Starship
|
** Starship
|
||||||
|
#+BEGIN_SRC nix :tangle target/starship_colors.nix
|
||||||
#+NAME: starship_colors
|
{pkgs, ...}:
|
||||||
#+BEGIN_SRC nix
|
{
|
||||||
builtins.fromTOML (builtins.readFile
|
programs.starship.settings = builtins.fromTOML (builtins.readFile
|
||||||
(pkgs.fetchFromGitHub
|
(pkgs.fetchFromGitHub
|
||||||
{
|
{
|
||||||
owner = "catppuccin";
|
owner = "catppuccin";
|
||||||
repo = "starship";
|
repo = "starship
|
||||||
|
";
|
||||||
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc"; # Replace with the latest commit hash
|
rev = "3e3e54410c3189053f4da7a7043261361a1ed1bc"; # Replace with the latest commit hash
|
||||||
sha256 = "soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
sha256 = "soEBVlq3ULeiZFAdQYMRFuswIIhI9bclIU8WXjxd7oY=";
|
||||||
} + /palettes/frappe.toml))
|
} + /palettes/frappe.toml));
|
||||||
|
}
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Wezterm
|
** Wezterm
|
||||||
|
|
||||||
#+NAME: wezterm_colors
|
|
||||||
#+BEGIN_SRC lua :tangle target/wezterm.lua
|
#+BEGIN_SRC lua :tangle target/wezterm.lua
|
||||||
config.color_scheme = 'Catppuccin Frappe'
|
config.color_scheme = 'Catppuccin Frappe'
|
||||||
|
|
||||||
@@ -1713,7 +1804,6 @@ I like Catppuccin Frappe as my theme. Let's use it in as many places as we can.
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
** Emacs
|
** Emacs
|
||||||
|
|
||||||
#+BEGIN_SRC nix :noweb-ref "emacs_packages"
|
#+BEGIN_SRC nix :noweb-ref "emacs_packages"
|
||||||
catppuccin-theme
|
catppuccin-theme
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|||||||
Reference in New Issue
Block a user