Swif.ai supports NixOS as part of its Linux MDM platform, enabling centralized device management, policy enforcement, and compliance monitoring.
1. Prerequisites
A supported NixOS installation.
Admin/root privileges on the device.
2. Enrollment Methods
You can integrate Swif.ai with NixOS using either:
Default NixOS Configuration
Flake-based Configuration
3. Default NixOS Configuration
Install by URL
Configure 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 switchReboot system
Check if
swif-agent.serviceis running$ sudo systemctl status swif-agent.serviceImport local generated files in
/etc/nixos/configurations.nix{
imports = [
(import "${swifteamTarball}")
./swifteam
]
}Rebuild NixOS again
$ sudo nixos-rebuild switch
Install by local path
Download
swifteam.tar.gz$ curl -OL https://cdn.swifteam.com/st-agent-linux/<version>/nixos/swifteam.tar.gzCreate directory
$ sudo mkdir /etc/nixos/swifteamExtract
swifteam.tar.gz$ sudo tar -xzvf swifteam.tar.gz -C /etc/nixos/swifteamConfigure swifteam settings in
/etc/nixos/configurations.nix{ config, pkgs, lib, ... }:
{
imports = [
./swifteam
];
# 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 switchReboot system
Check if
swif-agent.serviceis running$ sudo systemctl status swif-agent.service
4. Flake-based Configuration
Install by URL
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 = "{teamId}";
name = "{name}";
surname = "{surname}";
email = "{email}";
nixRootPath = "{nixRootPath}";
};
})
];
};
};
}Rebuild flake environment
$ sudo nixos-rebuild switch --flake <nixRootPath>#<flakeHostname>Reboot system
Check if
swif-agent.serviceis running$ sudo systemctl status swif-agent.serviceImport local generated files in
flake.nix{
outputs = { self, nixpkgs, swifteamTarball, ... }@inputs: {
nixosConfigurations.swifteamHostname = nixpkgs.lib.nixosSystem {
modules = [
(import "${swifteamTarball}")
({ ... }: {
services.swifteam = {
enable = true;
teamId = "{teamId}";
name = "{name}";
surname = "{surname}";
email = "{email}";
nixRootPath = "{nixRootPath}";
};
})
./swifteam
];
};
};
}Rebuild flake environment again
$ sudo nixos-rebuild switch --flake <nixRootPath>#<flakeHostname>
Install by local path
Download
swifteam.tar.gz$ curl -OL https://cdn.swifteam.com/st-agent-linux/<version>/nixos/swifteam.tar.gzCreate directory
$ mkdir <nixRootPath>/swifteamExtract
swifteam.tar.gz$ sudo tar -xzvf swifteam.tar.gz -C <nixRootPath>/swifteamConfigure swifteam settings in
flake.nix{
outputs = { self, nixpkgs, swifteamTarball, ... }@inputs: {
nixosConfigurations.swifteamHostname = nixpkgs.lib.nixosSystem {
modules = [
./swifteam
{
services.swifteam = {
enable = true;
teamId = "{teamId}";
name = "{name}";
surname = "{surname}";
email = "{email}";
nixRootPath = "{nixRootPath}";
};
}
];
};
};
}Rebuild flake system
$ sudo nixos-rebuild switch --flake <nixRootPath>#<flakeHostname>Reboot system
Check if
swif-agent.serviceis running$ sudo systemctl status swif-agent.service
5. 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.
6. Post-Enrollment Steps
Apply Policies: Security, compliance, or configuration policies can now be applied from the Swif console.
Remote Management: Use Swif’s features to lock, restart, shut down, or even erase a device if needed.
Software & OS Patch Management: Automate package updates on your Linux endpoints from one central location.
Summary of the NixOS support features:
Script Installer —Flake-based Configuration: Install by URL or by local path
Desktop App
Disk Health
Device Specifications
Accounts
Commands
Applications
Certificate
Live terminal
Package manager
Password Policy
Screensaver Policy
Change Password
Reboot
Shutdown
Device Lock
Soft Wipe
Remove Swif Agent
Swif's Desktop app compatibility: Used for in-app notification and compliance display
| x86_64 | arm_64 |
Ubuntu | √ | √ |
Fedora | √ | √ |
NixOS | √ | X |
Here is the notice that will be added to the help article, based on Jira issues ST-5966 and ST-5878, and referencing the work by Yoge Chou:
Notice: How the NixOS Rebuild Notification Works
When using Swif.ai MDM on NixOS devices, you may receive an in-app notification prompting you to run the nixos-rebuild command. This notification is designed to help you keep your device up to date with the latest configurations and security policies managed by your organization.
You will receive an email notification.
The in-app notification will appear in the desktop app, similar to update prompts you may have seen in other applications (e.g., Zoom).
You will be given a clear call-to-action (CTA) to run the rebuild command. There is also an option to “Skip for now” if you are not ready to proceed.
If you choose to skip, you can continue using your device as usual, but it is recommended to complete the rebuild at your earliest convenience to ensure compliance and security.
ARM support for NixOS is currently not available, but updates are being tracked.
This notice will be appended to the help article:
If you need any changes or a different format, let me know! 1
Sources
7. Troubleshooting
Check system logs for
swifteamservice errors:journalctl -u swifteam
Re-run
nixos-rebuildif configuration changes are made.
