Prerequisites
- use
flake
nix-command
andflake
experimental feature enabled.inputs
orself
as one ofspecialArgs
fornixosSystem
systemd.sysusers
orservices.userborn
option enabled (means you need NixOS 24.11 or newer)
enable
nix-command
flakes
features
Which almost user done.
Vaultix depends on flake and nix apps perform basic function.
nix.settings = {
experimental-features = [
"nix-command"
"flakes"
];
}
inputs
orself
as one ofspecialArgs
fornixosSystem
For passing top-level flake arguments to nixos module.
This requirement may change in the future, with backward compatiblility. Looking forward for a better implementation in nixpkgs that more gracefully to do so.
e.g.
{
description = "An Example";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
vaultix.url = "github:milieuim/vaultix";
};
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations.my-nixos = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
######################################
specialArgs = {
inherit self; # or inputs. You can inherit both as well.
};
######################################
modules = [
inputs.vaultix.nixosModules.default
./configuration.nix
];
# ...
};
# vaultix = ...
};
}
enable
systemd.sysusers
orservices.userborn
sysusers
was comes with Perlless Activation.
userborn
was introduced in Aug 30 2024
Both available in NixOS 24.11 or newer.
Vaultix using systemd instead of old perl script for activating on system startup or switch.