1 # Global configuration for spacefm.
3 { config, lib, pkgs, ... }:
7 let cfg = config.programs.spacefm;
20 description = lib.mdDoc ''
21 Whether to install SpaceFM and create {file}`/etc/spacefm/spacefm.conf`.
29 terminal_su = "${pkgs.sudo}/bin/sudo";
31 defaultText = literalExpression ''
34 terminal_su = "''${pkgs.sudo}/bin/sudo";
37 description = lib.mdDoc ''
38 The system-wide spacefm configuration.
39 Parameters to be written to {file}`/etc/spacefm/spacefm.conf`.
40 Refer to the [relevant entry](https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc) in the SpaceFM manual.
49 config = mkIf cfg.enable {
50 environment.systemPackages = [ pkgs.spaceFM ];
52 environment.etc."spacefm/spacefm.conf".text =
53 concatStrings (mapAttrsToList (n: v: "${n}=${toString v}\n") cfg.settings);