From 46dd5c41f78c9ef79fabb993bc2c6af3c0b86164 Mon Sep 17 00:00:00 2001 From: Pedro Rey Anca Date: Tue, 12 Aug 2025 16:10:51 +0200 Subject: [PATCH] Add pedro user and use mycellium instead of zerotier --- clan.nix | 58 +++++++++++++++++++++++++------------------------------- 1 file changed, 26 insertions(+), 32 deletions(-) diff --git a/clan.nix b/clan.nix index af40284..97f17e3 100644 --- a/clan.nix +++ b/clan.nix @@ -1,5 +1,4 @@ { - # Ensure this is unique among all clans you want to use. meta.name = "frues-clan"; inventory.machines = { @@ -9,42 +8,37 @@ # Docs: See https://docs.clan.lol/reference/clanServices inventory.instances = { - - # Docs: https://docs.clan.lol/reference/clanServices/admin/ - # Admin service for managing machines - # This service adds a root password and SSH access. admin = { - roles.default.tags.all = { }; + roles.default.tags.all = {}; roles.default.settings.allowedKeys = { - # Insert the public key that you want to use for SSH access. - # All keys will have ssh access to all machines ("tags.all" means 'all machines'). - # Alternatively set 'users.users.root.openssh.authorizedKeys.keys' in each machine - "admin-machine-1" = "__YOUR_PUBLIC_KEY__"; + "pedro" = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJji4h4bgzgmp7YoRX/8ePN0TcCYRfI2wlrEeZkBQ/y2 personal@peprolinbot.com"; }; }; - # Docs: https://docs.clan.lol/reference/clanServices/zerotier/ - # The lines below will define a zerotier network and add all machines as 'peer' to it. - # !!! Manual steps required: - # - Define a controller machine for the zerotier network. - # - Deploy the controller machine first to initilize the network. - zerotier = { - # Replace with the name (string) of your machine that you will use as zerotier-controller - # See: https://docs.zerotier.com/controller/ - # Deploy this machine first to create the network secrets - roles.controller.machines."__YOUR_CONTROLLER__" = { }; - # Peers of the network - # tags.all means 'all machines' will joined - roles.peer.tags.all = { }; + pedro-user = { + module.name = "users"; + + roles.default.tags.all = {}; + + roles.default.settings = { + user = "pedro"; + groups = [ + "wheel" + "networkmanager" + "video" + "input" + "libvirtd" + "adbusers" + "dialout" + ]; + }; + + roles.default.extraModules = [./users/pedro/home.nix]; + }; + + # Docs: https://docs.clan.lol/reference/clanServices/mycelium/ + mycelium = { + roles.peer.tags.all = {}; }; }; - - # Additional NixOS configuration can be added here. - # machines/jon/configuration.nix will be automatically imported. - # See: https://docs.clan.lol/guides/more-machines/#automatic-registration - machines = { - # jon = { config, ... }: { - # environment.systemPackages = [ pkgs.asciinema ]; - # }; - }; }