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 switch
Reboot system
Check if
swif-agent.service
is running$ sudo systemctl status swif-agent.service
Import 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.gz
Create directory
$ sudo mkdir /etc/nixos/swifteam
Extract
swifteam.tar.gz
$ sudo tar -xzvf swifteam.tar.gz -C /etc/nixos/swifteam
Configure 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 switch
Reboot system
Check if
swif-agent.service
is 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.service
is running$ sudo systemctl status swif-agent.service
Import 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.gz
Create directory
$ mkdir <nixRootPath>/swifteam
Extract
swifteam.tar.gz
$ sudo tar -xzvf swifteam.tar.gz -C <nixRootPath>/swifteam
Configure 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.service
is 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 |
7. Troubleshooting
Check system logs for
swifteam
service errors:journalctl -u swifteam
Re-run
nixos-rebuild
if configuration changes are made.