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

Deprecate loaOf #1800

Closed
shlevy opened this issue Feb 20, 2014 · 10 comments
Closed

Deprecate loaOf #1800

shlevy opened this issue Feb 20, 2014 · 10 comments
Labels
0.kind: enhancement Add something new

Comments

@shlevy
Copy link
Member

shlevy commented Feb 20, 2014

types.loaOf only exists for backwards compatibility, and it's kind of a hack and doesn't merge well. We should fix all modules that set a list instead of an attribute set in nixpkgs, then once that's done add a trace message when a config is encountered that uses a list instead of a set.

@shlevy shlevy added this to the 14.02 milestone Feb 20, 2014
@shlevy shlevy self-assigned this Feb 20, 2014
@shlevy shlevy modified the milestones: 14.10, 14.04 Apr 5, 2014
@shlevy shlevy removed their assignment Aug 26, 2014
@shlevy shlevy removed this from the 14.10 milestone Aug 26, 2014
@Mathnerd314
Copy link
Contributor

Usages:
As type = types.loaOf types.optionSet:

nixos/modules/config/users-groups.nix: users.users, users.groups
nixos/modules/security/pam.nix: security.pam.services
nixos/modules/services/logging/logcheck.nix: ignore, ignoreCron
nixos/modules/services/networking/i2pd.nix: outTunnels, inTunnels
nixos/modules/services/networking/prosody.nix: virtualHosts
nixos/modules/services/networking/tinc.nix: networks
nixos/modules/services/web-servers/zope2.nix: services.zope2.instances
nixos/modules/system/etc/etc.nix: environment.etc
nixos/modules/system/upstart/upstart.nix: jobs
nixos/modules/tasks/filesystems.nix: fileSystems
nixos/modules/tasks/network-interfaces.nix: networking.interfaces
nixos/modules/virtualisation/containers.nix: bindMounts

Others:

nixos/modules/programs/ssh.nix: knownHosts
nixos/modules/services/networking/tinc.nix: hosts

@jagajaga
Copy link
Member

Is it still relevant?

@Mathnerd314
Copy link
Contributor

The file systems and users/groups are used in a lot of places in NixOS. It would be a lot of work to change them, but possible. Personally I like having the list / attribute set choice, and now we have loeOf as well, and maybe a loaoeOf is in the future.

I still wonder what @shlevy meant by "doesn't merge well", as that seems to be the key point.

@nbp
Copy link
Member

nbp commented Oct 31, 2016

I still wonder what @shlevy meant by "doesn't merge well", as that seems to be the key point.

The problem is that you cannot make list element modular. Using list in NixOS breaks the modularity.

@Ericson2314
Copy link
Member

This issue is still valid.

@Ericson2314 Ericson2314 changed the title deprecate loaOf Deprecate loaOf Oct 1, 2018
@Ericson2314
Copy link
Member

I still wonder what @shlevy meant by "doesn't merge well", as that seems to be the key point.

Uniqueness of names can be nicely enforced by the set too.

@joepie91
Copy link
Contributor

What would replace this type?

@Ericson2314
Copy link
Member

attrsOf

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jul 28, 2019

I have made PR #63103 that should safely deprecate loaOf but I need help with testing.
I'm trying to get attention and hopefully speeding this up because maintaining the branch up-to-date is getting complicated as time goes on.

@worldofpeace
Copy link
Contributor

#63103 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: enhancement Add something new
Projects
None yet
Development

No branches or pull requests

8 participants