summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorIlan Joselevich <personal@ilanjoselevich.com>2023-05-07 22:29:02 +0300
committerGitHub <noreply@github.com>2023-05-07 22:29:02 +0300
commit6a751fe806098228663473e08620f60cb7edd635 (patch)
treee146c32ea4f8aa76798e0d722c7c03839c318018 /nixos/modules/programs
parentc9851ec8d74df013eff905a0aa8e13c64eb5649e (diff)
parent4b8e0601672d7a9b4ae70d99e1eac1587a22f217 (diff)
Merge pull request #227765 from zhaofengli/darling
darling: init at unstable-2023-05-02
Diffstat (limited to 'nixos/modules/programs')
-rw-r--r--nixos/modules/programs/darling.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/nixos/modules/programs/darling.nix b/nixos/modules/programs/darling.nix
new file mode 100644
index 0000000000000..c4e1c73b5c29a
--- /dev/null
+++ b/nixos/modules/programs/darling.nix
@@ -0,0 +1,21 @@
+{ config, lib, pkgs, ... }:
+
+let
+  cfg = config.programs.darling;
+in {
+  options = {
+    programs.darling = {
+      enable = lib.mkEnableOption (lib.mdDoc "Darling, a Darwin/macOS compatibility layer for Linux");
+      package = lib.mkPackageOptionMD pkgs "darling" {};
+    };
+  };
+
+  config = lib.mkIf cfg.enable {
+    security.wrappers.darling = {
+      source = lib.getExe cfg.package;
+      owner = "root";
+      group = "root";
+      setuid = true;
+    };
+  };
+}