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

NixOS home-manager module documentation #333

Open
aciceri opened this issue Mar 26, 2023 · 0 comments
Open

NixOS home-manager module documentation #333

aciceri opened this issue Mar 26, 2023 · 0 comments

Comments

@aciceri
Copy link

aciceri commented Mar 26, 2023

I just submitted this PR that adds a new home-manager module to declaratively set workspaces and create systemd timers to update them.
As soon as it gets (hopefully) merged I think I can rewrite/expand the example in the README.

By the way I'm using this since yesterday and it works great, good job!
Here an example of how the module can be used:

{config, ...}: {
  programs.git-workspace.enable = true;
  services.git-workspace = {
    enable = true;
    frequency = "04:00:00";
    environmentFile = age.secrets.git-workspace-tokens.path; # I use agenix, but one can also directly provide a manually created file
    workspaces = {
      personal.provider = [
        {
          provider = "github";
          name = "aciceri";
          path = "${config.home.homeDirectory}/projects";
          skips_forks = false;
        }
        {
          provider = "github";
          name = "nix-community";
          path = "${config.home.homeDirectory}/nix-community";
        }
      ];
      work.provider = [
        {
          provider = "github";
          name = "company";
          path = "${config.home.homeDirectory}/work" ;
        } 
      ];
    };
  };
}

This generates 2 TOML files for two workspaces (the first one with two providers) and two systemd timers.
I hope I understood how git-workspace was meant to be used correctly and having integrated it well in home-manager but please tell me if I should change something.

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

No branches or pull requests

1 participant