update syncthing id

This commit is contained in:
Kopatz
2024-06-24 10:01:15 +02:00
parent ec28c29b9f
commit 3d7b43c583
8 changed files with 76 additions and 20 deletions

View File

@@ -4,6 +4,7 @@
./packages-list.nix
./backup.nix
./btrfs.nix
./firejail.nix
./cli-tools.nix
./docker.nix
./nftables.nix

28
modules/misc/firejail.nix Normal file
View 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; };
}