Installation
Prerequisites
- Nix with flakes enabled
- Lix has flakes enabled by default.
- The Determinate installer also works and can uninstall cleanly.
- Rust 1.83+ (if building from source)
Shell hook
Optional. See flk hook.
From source
git clone https://gitlab.com/pixel-racks/flk.git
cd flk
cargo build --release
sudo cp target/release/flk /usr/local/bin/
From Cargo (crates.io)
cargo install flk
From release binaries
- Go to https://gitlab.com/pixel-racks/flk/-/releases
- Download the archive for your platform (Linux x86_64, macOS Intel, macOS ARM).
- Unpack it and put
flkon yourPATH.
Nix (with Cachix binaries)
Prebuilt binaries are on Cachix.
- Install Cachix (once):
nix profile install nixpkgs#cachix
- Trust the cache:
cachix use flk-cache
or add the cache to nix.conf:
substituters = https://flk-cache.cachix.org ...
trusted-public-keys = flk-cache.cachix.org-1:6xobbpP9iIK5sIH/75DQrsJYKN/61nTOChcH9MJnBR0= ...
- Use the flake:
- Run (no install):
nix run gitlab:pixel-racks/flk#flk - Install to your profile:
nix profile install gitlab:pixel-racks/flk#flk
Nix flake input
Use the package directly or through the overlay.
Direct (no overlay):
{
description = "My NixOS config with flk";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flk.url = "gitlab:pixel-racks/flk";
};
outputs = { self, nixpkgs, flk, ... }:
let
system = "x86_64-linux"; # set per host
pkgs = import nixpkgs { inherit system; };
in {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{
environment.systemPackages = [
flk.packages.${system}.flk
];
}
];
};
};
}
With overlay (exposes pkgs.flk):
{
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
inputs.flk.url = "gitlab:pixel-racks/flk";
outputs = { self, nixpkgs, flk, ... }:
let
system = "x86_64-linux"; # set per host
pkgs = import nixpkgs {
inherit system;
overlays = [ flk.overlay ];
};
in {
nixosConfigurations.myhost = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
{ environment.systemPackages = [ pkgs.flk ]; }
];
};
};
}
Home Manager example (per-user install via flake):
{
inputs.flk.url = "gitlab:pixel-racks/flk";
outputs = { self, flk, ... }: {
homeConfigurations.myhost = {
# ...
home.packages = [ flk.packages.${system}.flk ];
};
};
}
Architectures covered by the cache
- x86_64-linux
- x86_64-darwin
- aarch64-darwin
- aarch64-linux (built with qemu in CI, so occasionally missing)
Other systems build from source.
Next: Getting Started.