Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nix: add flake #54

Merged
merged 1 commit into from
Nov 21, 2024
Merged

nix: add flake #54

merged 1 commit into from
Nov 21, 2024

Conversation

andrevmatos
Copy link
Contributor

@andrevmatos andrevmatos commented Nov 6, 2024

  • add a flake.nix file to the repo
  • builds rustica package with rust tools from nix
  • will allow running rustica with nix run github:obelisk/rustica
  • provides a devShell with nix with build tools and rustica itself
  • provides an overlay to add rustica to the system packages
  • provides a home-manager module, to enable rustica-agent user service in linux/systemd systems

home-manager module can be used in a flake like this:

{
  inputs.rustica.url = "github:obelisk/rustica";
  outputs = {self, nixpkgs, rustica, ...}: {
    home-manager.users.user = {pkgs, ...}: {
      imports = [rustica.hmModules.rustica-agent];
      services.rustica-agent = {
        enable = true;
        environment = "prod";
      };
    };
  };
}

Unit.Description = "Rustica-Agent SSH service";
Install.WantedBy = ["default.target"];
Service = {
ExecStartPre = "${pkgs.coreutils}/bin/rm -vf ${cfg.socket}";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed due to #55

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try to address this in the next version

@obelisk obelisk merged commit 6a9dc76 into obelisk:develop Nov 21, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants