Clone the repository:
$ git clone git@git.sr.ht:~sirn/dotfiles ~/.dotfilesInstall Nix:
$ sh <(curl -L https://nixos.org/nix/install) --daemonConfigure nix, edit ~/.config/nix/nix.conf:
experimental-features = nix-command flakesSetup home directory with Home Manager:
$ HM_PROFILE=$(hostname -s)
$ nix build --no-link .#homeConfigurations.$HM_PROFILE.activationPackage
$ $(nix path-info .#homeConfigurations.$HM_PROFILE.activationPackage)/activateOn subsequent updates, use:
$ home-manager switch --flake path:.#$HM_PROFILEThis repository also provides a module to be used with Home Manager NixOS Module:
modules = [
inputs.home-manager.nixosModules.home-manager
inputs.dotfiles.nixosModules.${hostname}
];To test building locally, use:
$ HM_PROFILE=$(hostname -s)
$ nix build ".#homeConfigurations.$HM_PROFILE.activationPackage"Create a file named local.nix to have a machine-specific configuration that is not committed a machine profile.
{
import = [
./config/programs/bitwarden.nix
./config/services/languagetool.nix
];
# When running on a non-NixOS
targets.genericLinux.enable = true;
}For NixOS, this needs to be done as part of NixOS configuration.nix:
{
# ...
home-manager.users.sirn = {
imports = [
"${dotfiles}/config/programs/bitwarden.nix"
"${dotfiles}/config/programs/languagetool.nix"
];
};
}Application launchers are automatically generated for each Firefox profile defined in programs.firefox.profiles.
macOS: Proper .app bundles are created for each profile (e.g., "Firefox (main).app") and copied to ~/Applications/Home Manager Apps/. These appear in Spotlight, Dock, and LaunchServices. Raycast scripts are also generated as a secondary option (see Raycast section).
Linux: An XDG desktop entry named "Firefox (profile)" is automatically generated.
Generated scripts are stored at ~/.local/libexec/raycast.
To use Raycast script commands:
- Apply configuration:
home-manager switch --flake .#$HM_PROFILE - Open Raycast Preferences (⌘ + ,)
- Go to Extensions → Script Commands
- Click "Add Directories" and add
~/.local/libexec/raycast - Search "Firefox" in Raycast to launch profiles