niksos/hosts/common/optional/gns3.nix
jacekpoz 23f5aaaf45
huge options refactor
due to being on a wifi and my sim card not being able to do its job
properly this might have some errors

`nix flake check` gave me none for the current host but tbh who knows

this commit moves everything from `options` to `hosts/common` and
modifies the `createHost` function to import part of the files under
that directory by default

there's also a `hosts/common/optional` which is still being imported in
`profile.nix` but now in a better way using `lib.path.append` in tandem
with `lib.lists.map`
2024-09-01 20:31:24 +02:00

41 lines
818 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (config.poz.other.system) username;
inherit (lib.attrsets) attrValues;
inherit (lib.meta) getExe;
in {
environment.systemPackages = attrValues {
inherit (pkgs)
gns3-gui
gns3-server
dynamips
xterm
inetutils
vpcs
;
};
users.users.${username} = {
extraGroups = [ "ubridge" ];
};
# services.gns3-server = {
# enable = true;
# ubridge.enable = true;
# };
users.groups.ubridge = {};
security.wrappers.ubridge = {
source = getExe pkgs.ubridge;
capabilities = "cap_net_admin,cap_net_raw=ep";
owner = "root";
group = "ubridge";
permissions = "u=rwx,g=rx,o=rx";
};
}