repositories

NixDaemon

NixOS pentest workstation as one flake — IceBreaker's successor

clonegit clone https://git.daemon-sec.xyz/NixDaemon.git
home.nixNix63 lines2.1 KiBraw download
# modules/hosts/generic/home.nix — the home for the generic host: the shared,
# self-contained home modules and nothing personal.
#
# The author's home (modules/home/default.nix) reads its zsh config, fonts and
# cursor from a private dotfiles checkout and its keys from sops. None of that
# exists on your machine, so this one turns on home-manager's own zsh instead
# and uses a font from nixpkgs.
{ self, ... }:
{
  flake.homeModules.generic =
    { user, lib, ... }:
    {
      imports = with self.homeModules; [
        terminal # kitty, Rosé Pine, ctrl+a tmux-style keys
        neovim # nvf: Neovim with a small Nix-built plugin set
        prompt # starship + fastfetch, Rosé Pine
        htb-shell # $TARGET in the prompt
        cheats # pentest-cheat, nix-cheat, niri-cheat
        yazi # file manager with previews
        nixmod # `nixmod NAME`: a new module for a program, every option listed and commented
      ];

      home = {
        username = user;
        homeDirectory = "/home/${user}";
        stateVersion = "26.05";
      };
      programs.home-manager.enable = true;

      xdg.enable = true;

      # zsh from home-manager, since there is no dotfiles ZDOTDIR here.
      programs.zsh = {
        enable = true;
        autosuggestion.enable = true;
        syntaxHighlighting.enable = true;
        history = {
          size = 50000;
          ignoreDups = true;
          share = true;
        };
      };
      programs.starship.enableZshIntegration = lib.mkForce true;
      programs.fzf = {
        enable = true;
        enableZshIntegration = true;
      };
      programs.zoxide = {
        enable = true;
        enableZshIntegration = true;
      };

      # terminal.nix names DMMono Nerd Font, which ships in the author's
      # dotfiles rather than nixpkgs. JetBrains Mono Nerd Font is installed by
      # the generic host (fonts.packages) and has real bold/italic faces.
      programs.kitty.font.name = lib.mkForce "JetBrainsMono Nerd Font";
      programs.kitty.settings = {
        bold_font = lib.mkForce "auto";
        italic_font = lib.mkForce "auto";
        bold_italic_font = lib.mkForce "auto";
      };
    };
}