My set of dotfiles and homelab configuration.
This project has been through quite a few iterations so some configs/settings may still be scattered.
My neovim configuration. Contains two packages with basic nvim config and one with language servers pre-configured.
Outputs:
packages.[neovim|neovimWithLangs]
– runnable package with all plugins baked into itnixosModules.vim
– simple module to configure neovim
Tmux configuration with a module and app to run it. Uses senchopens/base16.nix for theming.
Outputs:
apps.tmux
– runnable tmux with my confignixosModules.tmux
– installs tmux with custom config (wrapper aroundprograms.tmux.enable
)
Zsh configuration with all the bells and whistles.
Outputs:
nixosModules.zsh
– can be used to set a non-home-manager user's shell to zsh with my confighomeManagerModules.zsh
– can be used to set home-manager user's shell to zsh with my confignixosModules.zshHMCompanionModule
– for systems where home-manager module is used, zsh would need additional files to complete e.g. systemd commands. This module fixes it.
A set of helpers for hyprland:
hyprland-lang-notifier
– shows desktop notification on language changehyprland-maybe-restart-hyprland-session
– experimental helper for restarting systemd units when hyprland is quit and relaunchedhyprland-mode-notifier
– shows notification on hyprland mode changehyprland-switch-lang-on-xremap
– changes language on xremap device; used when locking the laptop to set the language to the one the password is in.hyprland-workspace-notifier
– displays a short notification every time workspace is switched
Contains my doom-emacs configuration. It is managed using doom emacs' own locking mechanism instead of nix-community/nix-doom-emacs
to prevent double-building.
Also includes kroki-cli
for rendering org-excalidraw
diagrams.
Contains aforementioned base16 + some semantic colors to help in styling various programs.
A DNS block list. This package builds a file that's included by unbound configuration.
I am using two flakes: this one, public) and data-flake
(private). Data-flake contains secrets and non-public settings. Public outputs from this flake should not depend on inputs from data-flake
which allows reusing this flake with overriding data-flake
to some sort of stub input.
In this flake I am declaring some reusable modules (see nix flake show
outoput) and using them in my configuration so I can construct one-off configurations and bring in parts of my config without too much hassle.
All NixOS and Home-manager configurations get self.nixosModules
, self.packages
and self.homeManagerModules
passed as special arguments. While not very elegant (extra parameters for module configuration passed in an awkward way) it works with the way Nix modules operate. Passing them through a special option would lead to inifinite recursions.
This flake takes heavy advantage of flake.parts
and, more, specifically, flake modules
. The latter allow keeping code that produces different flake outputs together.
Case in point – zsh config. I have three modules for zsh:
- NixOS module that can be imported on non-home-manager machines
- Home-manager module that can be used wherever home-manager is in use
- Home-manager helper NixOS module that brings in system-wide completions into the necessary scope
Rather than having three separate lines in flake.nix
and suffer through direnv constantly rebuilding the development shell when something changes, all that's needed is:
# flake.nix
# ...
{
outputs = inputs@{ flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs; }
({ flake-parts-lib, ... }:
let inherit (flake-parts-lib) importApply; in
{
# ...
imports = [
(importApply ./flake-modules/zsh { inherit self; })
];
})
}
# ...
And all additional modules can be imported in a similar fashion.