spacefm: sudo and gksu fixes #15758 and license update
This commit is contained in:
parent
1c0af40757
commit
1bbcd91b2e
@ -76,6 +76,7 @@
|
|||||||
./programs/screen.nix
|
./programs/screen.nix
|
||||||
./programs/shadow.nix
|
./programs/shadow.nix
|
||||||
./programs/shell.nix
|
./programs/shell.nix
|
||||||
|
./programs/spacefm.nix
|
||||||
./programs/ssh.nix
|
./programs/ssh.nix
|
||||||
./programs/ssmtp.nix
|
./programs/ssmtp.nix
|
||||||
./programs/tmux.nix
|
./programs/tmux.nix
|
||||||
|
55
nixos/modules/programs/spacefm.nix
Normal file
55
nixos/modules/programs/spacefm.nix
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
# 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);
|
||||||
|
};
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
{ pkgs, fetchFromGitHub, stdenv, gtk3, udev, desktop_file_utils, shared_mime_info
|
{ pkgs, fetchFromGitHub, stdenv, gtk3, udev, desktop_file_utils
|
||||||
, intltool, pkgconfig, wrapGAppsHook, ffmpegthumbnailer, jmtpfs, ifuse, lsof, udisks
|
, shared_mime_info, intltool, pkgconfig, wrapGAppsHook, ffmpegthumbnailer
|
||||||
, hicolor_icon_theme, adwaita-icon-theme }:
|
, jmtpfs, ifuse, lsof, udisks, hicolor_icon_theme, adwaita-icon-theme }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "spacefm-${version}";
|
name = "spacefm-${version}";
|
||||||
@ -15,14 +15,21 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
configureFlags = [
|
configureFlags = [
|
||||||
"--with-bash-path=${pkgs.bash}/bin/bash"
|
"--with-bash-path=${pkgs.bash}/bin/bash"
|
||||||
"--with-preferable-sudo=${pkgs.sudo}/bin/sudo"
|
|
||||||
];
|
];
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
configureFlags="$configureFlags --sysconfdir=$out/etc"
|
configureFlags="$configureFlags --sysconfdir=$out/etc"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
buildInputs = [ gtk3 udev desktop_file_utils shared_mime_info intltool pkgconfig wrapGAppsHook ffmpegthumbnailer jmtpfs ifuse lsof udisks ];
|
postInstall = ''
|
||||||
|
rm -f $out/etc/spacefm/spacefm.conf
|
||||||
|
ln -s /etc/spacefm/spacefm.conf $out/etc/spacefm/spacefm.conf
|
||||||
|
'';
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
gtk3 udev desktop_file_utils shared_mime_info intltool pkgconfig
|
||||||
|
wrapGAppsHook ffmpegthumbnailer jmtpfs ifuse lsof udisks
|
||||||
|
];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A multi-panel tabbed file manager";
|
description = "A multi-panel tabbed file manager";
|
||||||
@ -33,7 +40,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
homepage = http://ignorantguru.github.io/spacefm/;
|
homepage = http://ignorantguru.github.io/spacefm/;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
license = licenses.gpl3;
|
license = licenses.gpl3Plus;
|
||||||
maintainers = with maintainers; [ jagajaga obadz ];
|
maintainers = with maintainers; [ jagajaga obadz ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user