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:
Default NixOS Configuration
Flake-based Configuration
1. Default NixOS Configuration
Download
swifteam.zip
from the Swif console.Extract the file and move the
swifteam/
folder into/etc/nixos
.Configure the swifteam settings in
/etc/nixos/configuration.nix
{ config, pkgs, lib, ... }:
let
swifteamTarball = builtins.fetchTarball {
url = "https://cdn.swifteam.com/st-agent-linux/{version}/nixos/swifteam.tar.gz";
sha256 = "sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
};
in
{
imports = [
(import "${swifteamTarball}")
];
# Please fill in the required information in the configuration.
services.swifteam = {
enable = true;
teamId = "{teamId}";
name = "{name}";
surname = "{surname}";
email = "{email}";
};
}Rebuild NixOS
$ sudo nixos-rebuild switch
Reboot system
Check if
swif-agent.service
is running$ sudo systemctl status swif-agent.service
2. Flake-based Configuration
Download
swifteam.zip
.Extract and place
swifteam/
into your flake directory.Configure swifteam settings in
flake.nix
{
inputs = {
swifteamTarball = {
url = "https://cdn.swifteam.com/st-agent-linux/{version}/nixos/swifteam.tar.gz";
flake = false;
};
};
outputs = { self, nixpkgs, swifteamTarball, ... }@inputs: {
nixosConfigurations.swifteamHostname = nixpkgs.lib.nixosSystem {
modules = [
(import "${swifteamTarball}")
({ ... }: {
services.swifteam = {
enable = true;
teamId = "";
name = "";
surname = "";
email = "";
};
})
];
};
};
}Rebuild the flake environment:
$ sudo nixos-rebuild switch --flake <nixRootPath>#<flakeHostname>
Reboot system
Check if
swif-agent.service
is running$ sudo systemctl status swif-agent.service
Verification
After rebuilding:
Run to verify the Swif agent installation.
$sudo systemctl status swif-agent.service
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.