Nix-disk, formerly called Nix Disk Manager, lets you mount a secondary disk (a second SSD, a storage drive, an external drive that stays plugged in): you choose a folder, the disk becomes accessible there, and it is then mounted automatically at every startup. Nix-disk can also remove a mount point and format a blank disk. For a network share, see Nix Samba or Mounting a CIFS network share (in French) instead.
Note
Nix-disk's interface is displayed in French, even on a system set to English. This guide quotes each label exactly as it appears on screen, followed by its translation in parentheses.
Note
A mount point is a folder that gives access to the contents of a disk, for example
/media/Jeux.
Nix-disk comes preinstalled on every edition of GLF OS. In the applications menu, open the GLF Apps folder (the GLF Apps submenu on KDE Plasma) and click Nix-disk. Depending on the KDE launcher settings, the name Disk Manager may appear instead.
No password is requested at launch: you will be asked for it in a terminal, when a change is applied.
Nix-disk shows one card per disk, with:
/dev/sdb (500G);sdb1 (ext4), followed by Non montée (not mounted) or ⚠️ Déjà montée: /media/Jeux (already mounted: /media/Jeux);
System partitions and swap space are hidden, so the disk where GLF OS is installed usually does not appear. If there is no other disk, Nix-disk shows Aucun disque gérable disponible (no manageable disk available).
Note
Déjà montée means that a mount point is declared in the system configuration, not that the disk is currently in use. A USB stick opened from the file manager therefore shows as Non montée.
/media/, type only the folder name in the field nom_du_dossier (ex: data) (folder_name, e.g. data): Jeux gives /media/Jeux.
The card then shows ⚠️ Déjà montée: /media/Jeux. Since the configuration is applied immediately, the disk should be accessible in the chosen folder without a restart; if it is not, restart your computer. From then on, it is mounted at every startup and, on GNOME, appears in the sidebar of Files. If the disk is missing at startup, GLF OS still boots.
Tip
Choose a simple folder name with no spaces, accents or quotation marks, for example
JeuxorDonnees: Nix-disk does not check the characters you type.
Important
Nix-disk only sets write permissions for a disk it has formatted. On an existing ext4 disk, give yourself the permissions once the disk is mounted:
sudo chown "$USER": /media/Jeux. An NTFS disk is normally assigned to the first account created; an exFAT or FAT partition may remain read-only for your account.
Warning
Do not mount a Btrfs partition with Nix-disk: it would then refuse to open, and you could no longer remove that mount with it. Use the personal configuration described below instead.
No data is erased: the disk is simply no longer mounted. Nix-disk cannot edit a mount point: to change the folder, add the new one, then remove the old one.
Caution
Formatting permanently erases the entire contents of the disk. Disque vierge only means that no usable partition was detected: the disk is not necessarily empty. Only one confirmation is requested, and pressing Enter in the name field also starts formatting. Check the disk and its size before continuing.
/dev/sdb (500 GB).The disk gets a single ext4 partition owned by your account. No mount point is created: next, click Gérer and follow the steps in "Mounting a disk".
When it starts, Nix-disk examines the system's storage configuration. If it finds a layout it cannot change safely, it shows Modification désactivée par sécurité (editing disabled for safety) along with the detected items, for example Btrfs (subvolumes) or LUKS (chiffrement) (LUKS encryption). The Fermer (Close) button quits the application: no feature is available.
This lock protects your system. It applies to:
The message suggests editing /etc/nixos/hardware-configuration.nix by hand: do not do it. Declare the mount in your personal configuration instead.
The mount is declared in /etc/nixos/customConfig/default.nix, which you open and save with administrator rights as explained in How to add your own programs.
Find the disk and its identifier:
lsblk -f
Identify the partition using the NAME, FSTYPE and MOUNTPOINTS columns, then note its UUID value.
Below the # Add your custom configuration here ↓ comment, add:
fileSystems."/media/Donnees" = {
device = "/dev/disk/by-uuid/remplacez-par-l-uuid";
fsType = "ext4";
options = [ "nofail" ];
};
remplacez-par-l-uuid with the UUID you noted.fsType must match the FSTYPE column.nofail prevents a missing disk from blocking startup.Save, apply with glf-update, then restart. glf-switch applies the change without restarting. See GLF commands.
For an ext4 disk, give yourself write permissions once the disk is mounted:
sudo chown "$USER": /media/Donnees
To remove this mount, delete the block and apply again.
Warning
Do not declare the same mount point both in
customConfigand with Nix-disk. Nix-disk does not see mounts fromcustomConfig: the partition shows as Non montée there, and adding a mount on the same folder would create a duplicate declaration.
customConfig./home partition (manual installation): it appears as an ordinary partition. Never remove its mount point.Nix-disk saves mount points in /etc/nixos/hardware-configuration.nix, then rebuilds the system.
Warning
Never edit
hardware-configuration.nixby hand, norconfiguration.nix,flake.nix,flake.lockorcustomized.nix. Your own mounts belong only incustomConfig.