Prerequisites
- use flake
- nix-commandand- flakeexperimental feature enabled.
- inputsor- selfas one of- specialArgsfor- nixosSystem
- systemd.sysusersor- services.userbornoption enabled (means you need NixOS 24.11 or newer)
enable
nix-commandflakesfeatures
Which almost user done.
Vaultix depends on flake and nix apps perform basic function.
nix.settings = {
  experimental-features = [
    "nix-command"
    "flakes"
  ];
}
inputsorselfas one ofspecialArgsfornixosSystem
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.sysusersorservices.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.