Skip to content

Commit

Permalink
nixos/gns3-server: disable SystemD DisableUser
Browse files Browse the repository at this point in the history
Usage of DynamicUser is compatible with SUID wrappers.
GNS3 needs to call ubridge via its SUID Wrapper to work.
  • Loading branch information
anthonyroussel committed Sep 22, 2024
1 parent 389164f commit 760ba64
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion nixos/modules/services/networking/gns3-server.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,15 @@ in {
}
];

users.groups.gns3 = { };

users.groups.ubridge = lib.mkIf cfg.ubridge.enable { };

users.users.gns3 = {
group = "gns3";
isSystemUser = true;
};

security.wrappers.ubridge = lib.mkIf cfg.ubridge.enable {
capabilities = "cap_net_raw,cap_net_admin=eip";
group = "ubridge";
Expand Down Expand Up @@ -206,7 +213,6 @@ in {
serviceConfig = {
ConfigurationDirectory = "gns3";
ConfigurationDirectoryMode = "0750";
DynamicUser = true;
Environment = "HOME=%S/gns3";
ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID";
ExecStart = "${lib.getExe cfg.package} ${commandArgs}";
Expand Down

0 comments on commit 760ba64

Please sign in to comment.