mirror of
https://github.com/lopsided98/nix-ros-overlay.git
synced 2025-07-14 06:00:38 +03:00
Add basic ROS2 support to the NixOS modules.
This commit is contained in:
parent
c0077930c0
commit
6c39cd534e
7 changed files with 295 additions and 17 deletions
27
modules/common.nix
Normal file
27
modules/common.nix
Normal file
|
@ -0,0 +1,27 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
ros1Cfg = config.services.ros;
|
||||
ros2Cfg = config.services.ros2;
|
||||
in {
|
||||
# Interface
|
||||
|
||||
# Implementation
|
||||
|
||||
config = mkIf (ros1Cfg.enable || ros2Cfg.enable) {
|
||||
environment.etc."ros/rosdep/sources.list.d/20-default.list".source = pkgs.fetchurl {
|
||||
url = "https://raw.githubusercontent.com/ros/rosdistro/225c14be89fdf7ecf028b4cf85fa82032f7728e1/rosdep/sources.list.d/20-default.list";
|
||||
sha256 = "0kxknc42y01pci8fxzhg84ybhgqyxqimycck27vb4b282lqfkzj7";
|
||||
};
|
||||
|
||||
users = {
|
||||
users.ros = {
|
||||
group = "ros";
|
||||
isSystemUser = true;
|
||||
};
|
||||
groups.ros = { };
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue