Init at LinuxCNC 2.9-pre-f77537cd4d

This commit is contained in:
Matty Willoughby
2022-06-16 11:47:00 +08:00
commit 0f4aac93fa
19 changed files with 2154 additions and 0 deletions

21
modules/linuxcnc.nix Normal file
View File

@@ -0,0 +1,21 @@
{ config, lib, pkgs, ... }:
let
cfg = config.local.packages.linuxcnc;
inherit (builtins) filter map pathExists listToAttrs;
in {
options.local.packages.linuxcnc.enable = lib.mkEnableOption "Enable linuxcnc";
config = lib.mkIf cfg.enable {
environment.systemPackages = with pkgs; [ linuxcnc ];
security.wrappers = listToAttrs (map (f: {
name = f;
value = {
setuid = true;
owner = "root";
group = "root";
source = "${pkgs.linuxcnc}/bin/${f}-nosetuid";
};
}) (filter (f: pathExists "${pkgs.linuxcnc}/bin/${f}-nosetuid") pkgs.linuxcnc.setuidApps));
};
}