Nix Samba is a graphical application for mounting Samba (CIFS) network shares on GLF-OS without using the terminal. It automatically generates the NixOS configuration and rebuilds the system.

Launch the application

The application is accessible from:

Features

home

The main screen offers three actions:

Action Description
List shares View, edit or delete configured network shares
Add a share Configure a new Samba mount
Create a credentials file Generate a secure authentication file (required for some shares)

Add a network share

new_share

Click Add a share and fill in the fields:

Basic settings

Field Description Example
Bookmark A name to identify the share Office NAS
Mount path Local folder where the share will be accessible /media/office-nas
Remote address Server address in //host/share format //192.168.1.100/Documents
Filesystem type Protocol used (CIFS by default) cifs

Credentials

create_credentials

Field Description Example
Credentials file Path to the file containing login/password /home/user/.smb-credentials
User (UID) Local owner of mounted files user (1000)
Group (GID) Local group of mounted files users (100)

Info: The user and group are selected via dropdown menus that automatically list system accounts.

Systemd options

Option Description Default value
Mount behavior Mount at boot or on access Mount on access
Idle timeout Delay in seconds before automatic unmount 300 (5 min)
Device timeout Wait time for the network device 10s
Mount timeout Wait time for the mount operation 10s

Note: The "Mount on access" mode is recommended. The share will only be mounted when you access the folder, and will be automatically unmounted after the idle timeout. This is ideal if the server is not always powered on.

Create a credentials file

If your Samba share requires authentication, you must create a credentials file before adding the share.

Click Create a credentials file and fill in:

Field Description Example
File path Where to save the file /home/user/.smb-credentials
Username Samba share login myuser
Password Samba share password mypassword

The generated file is automatically protected (permissions 600: only the owner can read it).

Important: Create the credentials file first, then add the share by referencing this file in the "Credentials file" field.

Manage existing shares

liste_share

Click List shares to see all your configured shares. From this list, you can:

Save and apply

Once your shares are configured:

  1. Click the Save on disk button (floppy disk icon at the top right)
  2. A terminal opens and automatically runs sudo nixos-rebuild switch
  3. Enter your password if prompted
  4. Wait for the rebuild to complete
  5. Close the terminal

Warning: The save button is only active when changes have been made. If you close the application without saving, a warning will ask for confirmation.

How it works

The application generates a file /etc/nixos/customConfig/samba.nix containing the NixOS configuration for your Samba mounts.

Example of a generated file:

{
  fileSystems."/media/office-nas" = {
    device = "//192.168.1.100/Documents";
    fsType = "cifs";
    options = [
      "credentials=/home/user/.smb-credentials"
      "x-systemd.automount"
      "x-systemd.idle-timeout=300"
      "x-systemd.device-timeout=10s"
      "x-systemd.mount-timeout=10s"
      "uid=1000"
      "gid=100"
      "_netdev"
      "file_mode=0775"
      "dir_mode=0775"
      "nofail"
      "x-gvfs-hide"
    ];
  };
}

On first launch, if the NixOS configuration does not yet import samba.nix, the application will offer to automatically fix the /etc/nixos/customConfig/default.nix file (an administrator password is required).

Typical use cases

Home NAS

Automatically mount a shared folder from your NAS to access it like a local folder.

Sharing between machines

Share files between multiple computers on your local network.

File server

Access a Windows or Samba file server from GLF-OS.


🌐 www.gaminglinux.frDiscord-Symbol-Blurple Discord GLF


© 2026 GLF