Compare commits
2 Commits
098edb7f44
...
96028c6cad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
96028c6cad | ||
|
|
177e96ad18 |
55
data/devenv/templates/ros/flake.nix
Normal file
55
data/devenv/templates/ros/flake.nix
Normal file
@@ -0,0 +1,55 @@
|
|||||||
|
{
|
||||||
|
description = "Development flake for this ROS project";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
|
|
||||||
|
ros-overlay.url = "github:lopsided98/nix-ros-overlay";
|
||||||
|
ros-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
outputs = { self, nixpkgs, flake-utils, ros-overlay }:
|
||||||
|
flake-utils.lib.eachDefaultSystem (system: let
|
||||||
|
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [ ros-overlay.overlays.default ];
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
nativeBuildInputs = with pkgs; [
|
||||||
|
# Non-ROS packages
|
||||||
|
] ++ (with rosPackages.humble; [
|
||||||
|
# ROS packages
|
||||||
|
(buildEnv {
|
||||||
|
paths = [
|
||||||
|
# Core
|
||||||
|
ros-environment
|
||||||
|
colcon
|
||||||
|
# Ros2
|
||||||
|
ros2run
|
||||||
|
ros2param
|
||||||
|
ros2topic
|
||||||
|
ros2node
|
||||||
|
ros2interface
|
||||||
|
ros2service
|
||||||
|
ros2action
|
||||||
|
ros2pkg
|
||||||
|
# RQT
|
||||||
|
rqt
|
||||||
|
rqt-msg
|
||||||
|
rqt-topic
|
||||||
|
rqt-action
|
||||||
|
rqt-service-caller
|
||||||
|
rqt-graph
|
||||||
|
# Extra
|
||||||
|
];
|
||||||
|
})
|
||||||
|
]);
|
||||||
|
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -15,6 +15,18 @@ in
|
|||||||
user.name = "marc";
|
user.name = "marc";
|
||||||
user.shell = pkgs.zsh;
|
user.shell = pkgs.zsh;
|
||||||
networking.hostName = "reykjavik";
|
networking.hostName = "reykjavik";
|
||||||
|
networking.firewall = {
|
||||||
|
enable = true;
|
||||||
|
allowedUDPPortRanges = [
|
||||||
|
# - ROS ------------------------------------
|
||||||
|
# Open ports for ROS 2 DDS
|
||||||
|
# See https://docs.ros.org/en/humble/Concepts/About-Domain-ID.html
|
||||||
|
# Multicast ports for DOMAIN_ID 13
|
||||||
|
{ from = 10650; to = 10651; }
|
||||||
|
# Unicast ports for DOMAIN_ID 13 and up to 120 particimants
|
||||||
|
{ from = 10660; to = 10890; }
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
# - Bootloader ---------------------------------
|
# - Bootloader ---------------------------------
|
||||||
|
|
||||||
@@ -53,6 +65,7 @@ in
|
|||||||
intelBusId = "PCI:0:2:0";
|
intelBusId = "PCI:0:2:0";
|
||||||
nvidiaBusId = "PCI:1:0:0";
|
nvidiaBusId = "PCI:1:0:0";
|
||||||
};
|
};
|
||||||
|
system.gpg.enable = true;
|
||||||
|
|
||||||
# - Desktop ----------------------------------
|
# - Desktop ----------------------------------
|
||||||
desktop = {
|
desktop = {
|
||||||
|
|||||||
16
modules/system/gpg.nix
Normal file
16
modules/system/gpg.nix
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{ config, lib, pkgs, self, ... }:
|
||||||
|
|
||||||
|
let
|
||||||
|
cfg = config.samfelag.modules.system.gpg;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
options.samfelag.modules.system.gpg = {
|
||||||
|
enable = lib.mkEnableOption "gpg";
|
||||||
|
};
|
||||||
|
config = lib.mkIf cfg.enable {
|
||||||
|
programs.gnupg.agent.enable = true;
|
||||||
|
# environment.systemPackages = with pkgs; [
|
||||||
|
# gnupg
|
||||||
|
# ];
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -9,7 +9,11 @@ in
|
|||||||
};
|
};
|
||||||
config = lib.mkIf cfg.enable {
|
config = lib.mkIf cfg.enable {
|
||||||
# See https://github.com/tailscale/tailscale/issues/4432
|
# See https://github.com/tailscale/tailscale/issues/4432
|
||||||
networking.firewall.checkReversePath = "loose";
|
networking = {
|
||||||
|
firewall.checkReversePath = "loose";
|
||||||
|
nameservers = [ "100.80.195.56" ];
|
||||||
|
networkmanager.dns = "none";
|
||||||
|
};
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user