Skip to content

frostplexx/nixkit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

73 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

nixkit

A collection of various nix utilities packaged as Nix flakes with configurable modules for NixOS, nix-darwin, and Home Manager.

πŸ“¦ Packages

Package Description Type
opsops SOPS but easy with 1Password integration Rust binary
ndcli Command line interface for DIM (DNS and IP Management) Python CLI
dimclient Python client for DIM (dependency of ndcli) Python package
defaultbrowser Utility to set the default browser on macOS C binary

πŸš€ Installation

Add it to your flake.nix inputs:

nixkit = {
    url = "github:frostplexx/nixkit";
    # or for local development:
    # url = "path:/path/to/nixkit";
};

Add the home manager module:

home-manager = {
    sharedModules = [
        inputs.nixkit.homeModules.default
    ];
};

Add the nix module:

On NixOS:

modules = [
    inputs.nixkit.nixosModules.default
];

On macOS:

modules = [
    inputs.nixkit.darwinModules.default
];

Using the Overlay

{
  nixpkgs.overlays = [ nixkit.overlays.default ];

  # Now packages are available as pkgs.opsops, pkgs.ndcli, etc.
  environment.systemPackages = with pkgs; [
    opsops
    ndcli
  ];
}

Direct Package Installation

# Install individual packages
nix profile install github:frostplexx/nixkit#opsops
nix profile install github:frostplexx/nixkit#ndcli

# Or run directly
nix run github:frostplexx/nixkit#opsops

πŸ”§ Module Configuration

Home Manager Modules

Set Default Browser

To set the default browser on macOS and Linux use the following:

# Enable and configure the default browser
programs.default-browser = {
    enable = true;
    browser = "firefox"; # Or any other browser name
};

Aerospace Swipe

A service that lets you swipe on your trackpad to move between aerosapce spaces

# Enable and configure the default browser
programs.aerospace-swipe = {
    enable = true;
    haptic = false;
    natural_swipe = false;
    wrap_around = true;
    skip_empty = true;
    fingers = 3;
};

ndcli - cli tool for Dim

{
  programs.ndcli = {
    enable = true;
    username = "johndoe"; # Your Dim username
  };
}

Source: https://github.com/ionos-cloud/dim/tree/master/ndcli

System Modules

Darwin

Custom Icons

You can configure custom icons on macOS using the following snippet:

 environment.customIcons = {
    enable = true;
    icons = [
      {
        path = "/Applications/Notion.app";
        icon = ./icons/notion.icns;
      }
    ];
  };

Source: https://github.com/ryanccn/nix-darwin-custom-icons

Shared

opsops

SOPS but easy and with 1Password integration:

  programs = {
    opsops.enable = true;
  };

Source: https://github.com/frostplexx/opsops

πŸ”§ Development

Development Environment

Enter the development shell with all necessary tools:

direnv allow

Building Packages

# Build individual packages
nix build .#opsops

# Test the built packages
./result/bin/opsops --help

Updating Packages

This repository uses nix-update for automated package updates:

# Update individual packages
nix-update opsops --build --commit (--version 1.2.3)
nix-update ndcli --build --commit

# Update all packages
./scripts/update.sh

Automated Updates:

  • GitHub Actions runs daily at 6 AM Berlin time
  • Creates individual PRs for each package update
  • Automatically builds and tests packages before creating PRs

Repository Structure

nixkit/
β”œβ”€β”€ packages/                    # Package definitions (nix-update compatible)
β”‚   β”œβ”€β”€ default.nix             # Package set entry point
β”‚   β”œβ”€β”€ opsops/
β”‚   β”œβ”€β”€ ndcli/
β”‚   β”œβ”€β”€ dimclient/
β”‚   └── defaultbrowser/
β”‚
β”œβ”€β”€ modules/
β”‚   β”œβ”€β”€ home/                    # Home Manager modules
β”‚   β”‚   β”œβ”€β”€ default-browser.nix
β”‚   β”‚   β”œβ”€β”€ ndcli.nix
β”‚   β”‚   └── default.nix
β”‚   β”œβ”€β”€ shared/                  # Shared NixOS/Darwin modules
β”‚   β”‚   β”œβ”€β”€ opsops.nix
β”‚   β”‚   └── default.nix
β”‚   β”œβ”€β”€ nixos/                   # NixOS-specific modules
β”‚   β”‚   └── default.nix
β”‚   └── darwin/                  # Darwin-specific modules
β”‚       └── default.nix
β”œβ”€β”€ flake.nix                    # Flake definition
β”œβ”€β”€ overlay.nix                  # Package overlay
β”œβ”€β”€ default.nix                  # Legacy Nix compatibility
└── update.sh                    # Package update script

πŸ“‹ Requirements

  • Nix with flakes enabled
  • For Home Manager modules: Home Manager
  • For NixOS modules: NixOS system
  • For Darwin modules: nix-darwin

πŸ€– Automated Updates

The repository includes automated package updates via GitHub Actions:

  • Schedule: Daily at 6 AM Berlin time
  • Process: Creates individual PRs for each package update
  • Safety: Builds and tests packages before creating PRs
  • Manual trigger: Available via GitHub Actions interface

πŸ“ License

Personal use repository.

🀝 Contributing

  1. Add new packages to packages/
  2. Create corresponding modules in modules/home/, modules/shared/, or platform-specific directories
  3. Update packages/default.nix and flake.nix
  4. Test with nix build .#package-name
  5. Verify nix-update package-name works for automated updates

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6