update syncthing id
This commit is contained in:
28
modules/misc/firejail.nix
Normal file
28
modules/misc/firejail.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ lib, config, pkgs, ... }:
|
||||
|
||||
let cfg = config.custom.misc.firejail;
|
||||
in {
|
||||
options.custom.misc.firejail = {
|
||||
enable = lib.mkEnableOption "Enables firejail";
|
||||
package = lib.mkOption {
|
||||
type = lib.types.package;
|
||||
default = pkgs.firejail;
|
||||
description = "Firejail package used";
|
||||
readOnly = true; # is a constant from the upstream NixOS module for now
|
||||
};
|
||||
mk = lib.mkOption {
|
||||
readOnly = true;
|
||||
description = "Utility function to make a wrappedBinaries entry";
|
||||
default = name:
|
||||
{ pkg, profile ? name, bin ? name }: {
|
||||
${bin} = {
|
||||
executable = "${lib.getBin pkg}/bin/${bin}";
|
||||
profile =
|
||||
"${config.custom.misc.firejail.package}/etc/firejail/${profile}.profile";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable { programs.firejail.enable = true; };
|
||||
}
|
||||
Reference in New Issue
Block a user