Skip to main content

How to Enroll NixOS Devices into Swif.ai MDM

Updated today

Swif.ai supports NixOS as part of its Linux MDM platform, enabling centralized device management, policy enforcement, and compliance monitoring.


Prerequisites

  • A supported NixOS installation.

  • Admin/root privileges on the device.


Enrollment Methods

You can integrate Swif.ai with NixOS using either:

  1. Default NixOS Configuration

  2. Flake-based Configuration


1. Default NixOS Configuration

  1. Download swifteam.zip from the Swif console.

  2. Extract the file and move the swifteam/ folder into /etc/nixos.

  3. Import the module in /etc/nixos/configuration.nix:

    {
    imports = [
    ...
    ./swifteam
    ];

    ...

    services.swifteam = {
    enable = true;
    teamId = "";
    name = "";
    surname = "";
    email = "";
    };
    }
  4. Rebuild NixOS:

    sudo nixos-rebuild switch

2. Flake-based Configuration

  1. Download swifteam.zip.

  2. Extract and place swifteam/ into your flake directory.

  3. Import the module in your nixosConfigurations modules list. Please note nixRootPath and flakeHostname is required:

    {
    ...

    outputs = {
    nixosConfigurations.swifteamHostname = nixpkgs.lib.nixosSystem = {
    modules = [
    ...
    ./swifteam
    {
    {
    enable = true;
    teamId = "";
    name = "";
    surname = "";
    email = "";
    nixRootPath = "/where/your/flake.nix/locate";
    flakeHostname = "swifteamHostname";
    };
    }
    ];
    };
    };
    }
  4. Rebuild the flake environment:

    sudo nixos-rebuild switch --flake <nixRootPath>#<flakeHostname>

Verification

After rebuilding:

  1. Run:

    sudo systemctl status swif-agent.service

    to verify the Swif agent installation.

  2. Check the device’s status in Swif Console → Device Inventory.


Troubleshooting

  • Check system logs for swifteam service errors:

    journalctl -u swifteam
  • Re-run nixos-rebuild if configuration changes are made.

Did this answer your question?