snowfallorg / snowfallorg/lib

`snowfallorg.users.*.admin` exists on NixOS but doesn't exist on Mac

Open
#180 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Nix
Stars
628
Forks
64
PR merge metrics
No merged PRs in 30d

Description

Current situation

The option snowfallorg.users.*.admin exists on NixOS

https://github.com/snowfallorg/lib/blob/02d941739f98a09e81f3d2d9b3ab08918958beac/modules/nixos/user/default.nix#L58

But doesn't exist on Mac
https://github.com/snowfallorg/lib/blob/02d941739f98a09e81f3d2d9b3ab08918958beac/modules/darwin/user/default.nix#L43

Problem

This makes more difficult to reuse the same config across machines

Expected

I would like to have an option on both OS

Fallback

If admin option is not doable on Mac, i would prefer this option exists :

  1. noop : does nothing whatever given value
  2. assert : warn and explain the situation to the user that the value should be false

I can do a PR if you need with your preferred solution

Current workaround

  snowfallorg = lib.mkIf pkgs.stdenv.hostPlatform.isLinux {
    users.pinage404.admin = true;
  };

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Compare the user option definitions in modules/nixos/user/default.nix and modules/darwin/user/default.nix, starting with how the NixOS admin option is declared. Determine whether Darwin can support the same option or needs the proposed noop or assertion behavior. Done means shared configuration can set snowfallorg.users.*.admin on both platforms with behavior that is explicit and consistent.

Written by the indexing model from the issue text.

Assessment

Domain
operating-systems
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.