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/gogs: fixed user creation if non-default user #30020

Merged
merged 1 commit into from Oct 2, 2017
Merged

nixos/gogs: fixed user creation if non-default user #30020

merged 1 commit into from Oct 2, 2017

Conversation

The-M1k3y
Copy link

@The-M1k3y The-M1k3y commented Oct 2, 2017

Motivation for this change

fix for #29922

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • [ X] NixOS
    • macOS
    • Linux
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested with the following configuration:
{ config, pkgs, ... }:

{
	services.gogs = {
		enable = true;

		user = "git";
		group = "git";

		domain ="git.example.com";
		rootUrl = "https://git.example.com/";

		database.path = "/data/git/data/gogs.db";
		repositoryRoot = "/data/git/repositories";
		stateDir = "/data/git/";
	};

	users.users.git = {
		isSystemUser = true;
		group = "git";
		shell = pkgs.bash;
		home = "/data/git";
	};
	users.groups.git = {};
}

Edit: fixed typo in example configuration

@orivej
Copy link
Contributor

orivej commented Oct 2, 2017

This configuration does not parse, users.users.git. = { is not valid.

Copy link
Contributor

@orivej orivej left a comment

Choose a reason for hiding this comment

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

The fix seems reasonable.

@The-M1k3y
Copy link
Author

Whups, the config I used should of course have users.users.git = {
I just minimized the config and missed that dot.

@orivej orivej merged commit 9085850 into NixOS:master Oct 2, 2017
@orivej
Copy link
Contributor

orivej commented Oct 2, 2017

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants