cd binarygoose.dev/content/projects/clrsync
cat install-on-nixos.md

Install on NixOS

Home Manager Module

  1. Add clrsync to your flake inputs
{
  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
    home-manager.url = "github:nix-community/home-manager";
    
    clrsync.url = "github:obsqrbtz/clrsync";
  };
}
  1. Add clrsync to flake outputs
outputs =
  {
    self,
    nixpkgs,
    home-manager,
    clrsync,
    ...
  }@inputs:
  let
    system = "x86_64-linux";
    pkgs = nixpkgs.legacyPackages.${system};
  in
  {
    # ...
    homeConfigurations.<Your user name> = home-manager.lib.homeManagerConfiguration {
      inherit pkgs;
      extraSpecialArgs = { inherit inputs; };
      modules = [
        ./home.nix
        clrsync.homeModules.default
      ];
    };
  };
  1. Configure in home manager
programs.clrsync = {
  package = inputs.clrsync.packages.x86_64-linux.default;  
  defaultTheme = "dark";
  palettesPath = "~/.config/clrsync/palettes";
  font = "JetBrainsMono Nerd Font Mono";
  fontSize = 14;
  applyTheme = true;

  templates = {
    kitty = {
      enabled = true;
      inputPath = "~/.config/clrsync/templates/kitty.conf";
      outputPath = "~/.config/kitty/clrsync.conf";
      reloadCmd = "pkill -SIGUSR1 kitty";
    };
    
    rofi = {
      enabled = true;
      inputPath = "~/.config/clrsync/templates/rofi.rasi";
      outputPath = "~/.config/rofi/clrsync.rasi";
    };
  };
};
  1. Rebuild
home-manager switch --flake .

Install standalone package

  1. Add clrsync to your flake inputs
{
  inputs = {
    clrsync.url = "github:obsqrbtz/clrsync";
  };
}
  1. Install the package
# In NixOS configuration.nix:
nixpkgs.overlays = [
  inputs.clrsync.overlays.default
];

environment.systemPackages = [
  clrsync
];

Or for home manager:

# flake.nix
pkgs = import nixpkgs {
  inherit system;
  overlays = [
    clrsync.overlays.default
  ];
};
# home.nix
home.packages = [
  clrsync
];
  1. Use the app manually
clrsync_gui

# or
clrsync_cli --apply --theme dark

Install to profile

nix profile add github:obsqrbtz/clrsync

Run without installing

nix run github:obsqrbtz/clrsync
nix run github:obsqrbtz/clrsync#clrsync-cli
exit