forked from mirrors/nixpkgs
f8560212ca
Fixup regression introduced in commit 1bbcd91b2e
("spacefm: sudo and gksu fixes #15758 and license update").
A missing </filename> end tag caused this:
$ nixos-rebuild build
...
options-db.xml:4402: parser error : Opening and ending tag mismatch: filename line 4401 and para
</para><para><emphasis>Type:</emphasis> boolean</para><para><emphasis>Default:</
^
options-db.xml:4406: parser error : Opening and ending tag mismatch: filename line 4401 and listitem
</filename></member></simplelist></listitem></varlistentry><varliste
^
options-db.xml:4406: parser error : Opening and ending tag mismatch: para line 4401 and varlistentry
</filename></member></simplelist></listitem></varlistentry><varliste
^
options-db.xml:28430: parser error : Opening and ending tag mismatch: listitem line 4401 and variablelist
</filename></member></simplelist></listitem></varlistentry></variablelist
^
options-db.xml:28432: parser error : Premature end of data in tag varlistentry line 4401
56 lines
1.4 KiB
Nix
56 lines
1.4 KiB
Nix
# Global configuration for spacefm.
|
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
with lib;
|
|
|
|
let cfg = config.programs.spacefm;
|
|
|
|
in
|
|
{
|
|
###### interface
|
|
|
|
options = {
|
|
|
|
programs.spacefm = {
|
|
|
|
enable = mkOption {
|
|
type = types.bool;
|
|
default = false;
|
|
description = ''
|
|
Whether to install SpaceFM and create <filename>/etc/spacefm/spacefm.conf</filename>.
|
|
'';
|
|
};
|
|
|
|
settings = mkOption {
|
|
type = types.attrs;
|
|
default = {
|
|
tmp_dir = "/tmp";
|
|
terminal_su = "${pkgs.sudo}/bin/sudo";
|
|
graphical_su = "${pkgs.gksu}/bin/gksu";
|
|
};
|
|
example = literalExample ''{
|
|
tmp_dir = "/tmp";
|
|
terminal_su = "''${pkgs.sudo}/bin/sudo";
|
|
graphical_su = "''${pkgs.gksu}/bin/gksu";
|
|
}'';
|
|
description = ''
|
|
The system-wide spacefm configuration.
|
|
Parameters to be written to <filename>/etc/spacefm/spacefm.conf</filename>.
|
|
Refer to the <link xlink:href="https://ignorantguru.github.io/spacefm/spacefm-manual-en.html#programfiles-etc">relevant entry</link> in the SpaceFM manual.
|
|
'';
|
|
};
|
|
|
|
};
|
|
};
|
|
|
|
###### implementation
|
|
|
|
config = mkIf cfg.enable {
|
|
environment.systemPackages = [ pkgs.spaceFM ];
|
|
|
|
environment.etc."spacefm/spacefm.conf".text =
|
|
concatStrings (mapAttrsToList (n: v: "${n}=${toString v}\n") cfg.settings);
|
|
};
|
|
}
|