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

realmd: init at 0.17.0 #128464

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

realmd: init at 0.17.0 #128464

wants to merge 1 commit into from

Conversation

eliasp
Copy link
Member

@eliasp eliasp commented Jun 27, 2021

Motivation for this change

To make it easier to join NixOS systems to ActiveDirectory, I want to make use of realmd.
It consists of the CLI tool realm and the D-Bus activated systemd service realmd.

This PR is still a WIP and so far only provides the package, but no module to configure the service yet.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • 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 nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • 21.11 Release Notes (or backporting 21.05 Relase notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

@eliasp eliasp force-pushed the init-realmd branch 3 times, most recently from 2e287f4 to 51d8481 Compare July 9, 2021 23:22
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@wucke13
Copy link
Contributor

wucke13 commented Dec 24, 2021

What is required to have this merged? I'm also interested in using it.

@eliasp
Copy link
Member Author

eliasp commented Dec 28, 2021

The pkg itself builds just fine, but it's pretty useless without the whole service, so it all comes down to being made useful through a corresponding module which configures + enables the service.

Haven't gotten around to take care of this yet, feel free to pick up where I left off…

@wucke13
Copy link
Contributor

wucke13 commented Dec 28, 2021

Ah ok :) I'm just wondering, whether a module really is necessary. Naive me would think that it is sufficient to put the package into services.dbus.packages - since this service is only DBUS activated?

Edit:

Most likely, the following is required to use realmd:

{
  services.dbus.packages = [ realmd ];                                                                                
  systemd.packages = [ realmd ];                                                                                      
  environment.systemPackages = [ realmd ];
}

However, this fails on launching the realmd.service with the following error:

systemd[1]: Starting Realm and Domain Configuration...
realmd[224560]: couldn't load distro configuration file: /nix/store/idzzb0lmi9czm4q3l4jbzmam75m9qlk5-realmd-0.17.0/lib/realmd/realmd-distro.conf: No such file or directory
realmd[224560]: couldn't load distro configuration file: /nix/store/idzzb0lmi9czm4q3l4jbzmam75m9qlk5-realmd-0.17.0/lib/realmd/realmd-distro.conf: No such file or directory
systemd[1]: realmd.service: Main process exited, code=dumped, status=5/TRAP
systemd[1]: realmd.service: Failed with result 'core-dump'.
systemd[1]: Failed to start Realm and Domain Configuration.

Upon closer inspection, I believe it would be better not to remove the realmd-distro.conf, but rather to just touch it. All relevant settings are then set via environment.etc."realmd.conf".text = '' ... ''? From the manual:

Only specify the settings you wish to override in the /etc/realmd.conf file. Settings not specified will be loaded from their packaged defaults which can be found in /usr/lib/realmd/realmd-defaults.conf and /usr/lib/realmd/realmd-distro.conf.

Tricky is that we have neither adcli nor ipa-client packaged.

If we would modify the configure script to set privatedir to add this to configureFlags --with-privatedir=/etc/realmd for example, we could avoid all the override stuff and just have no whatever.conf in the package itself. This is not viable, the install script would try to copy stuff to /etc

@s1341
Copy link
Contributor

s1341 commented Jul 7, 2022

Anyone get this working?

, systemd
, xmlto
}:
# doc-related (--disable-doc): docbook_xml_dtd_412 docbook_xml_dtd_42 docbook_xml_dtd_43 docbook_xsl libxslt xmlto
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure what that comment is supposed to tell me

Copy link
Member Author

Choose a reason for hiding this comment

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

This was basically just WIP, as building the docs pulled in a huge amount of dependencies and I thought about disabling docs later using --disable-doc.

SohamG added a commit to SohamG/nixpkgs that referenced this pull request Jul 19, 2022
Update to newer version, Thanks @eliasp NixOS#128464

Begin work on nixos module for realmd

Add realmd.service

realmd: begin work on conf file

Finish work on conf file

Expose realmd.conf in nixos modules
SohamG added a commit to SohamG/nixpkgs that referenced this pull request Jul 6, 2023
Update to newer version, Thanks @eliasp NixOS#128464

Begin work on nixos module for realmd

Add realmd.service

realmd: begin work on conf file

Finish work on conf file

Expose realmd.conf in nixos modules
@wegank wegank added 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 2.status: merge conflict labels Mar 19, 2024
@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Mar 20, 2024
This was referenced Apr 6, 2024
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

5 participants