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

20.09: loaOf in users.users and users.groups makes nixcloud-webservices throw an error #70

Closed
fgaz opened this issue Oct 29, 2020 · 2 comments · Fixed by #73
Closed

Comments

@fgaz
Copy link
Collaborator

fgaz commented Oct 29, 2020

In 20.03 it just gave a warning:

trace: warning: In file /nix/store/kqx95nfx4wafnzxkiyjnr6xdj9mfpsdn-nixos-20.03.tar.gz/nixos/modules/config/users-groups.nix
a list is being assigned to the option config.users.users.                                                                              
This will soon be an error as type loaOf is deprecated.                                                                                 
See https://github.com/NixOS/nixpkgs/pull/63103 for more information.                                                                   
Do                                                                                                                                      
  users.users =                                                                                                                         
    { reverse-proxy = {...}; }                                                                                                          
instead of                                                                                                                              
  users.users =                                                                                                                         
    [ { name = "reverse-proxy"; ...} ]                                                                                                  
                                                                                                                                        
trace: warning: In file /nix/store/kqx95nfx4wafnzxkiyjnr6xdj9mfpsdn-nixos-20.03.tar.gz/nixos/modules/config/users-groups.nix
a list is being assigned to the option config.users.groups.                                                                             
This will soon be an error as type loaOf is deprecated.                                                                                 
See https://github.com/NixOS/nixpkgs/pull/63103 for more information.                                                                   
Do                                                                                                                                      
  users.groups =                                                                                                                        
    { reverse-proxy = {...}; }                                                                                                          
instead of                                                                                                                              
  users.groups =                                                                                                                        
    [ { name = "reverse-proxy"; ...} ] 

But in 20.09 the old type was removed and this results in an error.

To reproduce, set nixcloud.reverse-proxy.enable = true

edit: same error in other places later in the evaluation

@fgaz
Copy link
Collaborator Author

fgaz commented Oct 29, 2020

Found two of them:

users.extraUsers = (singleton
{ name = "${user}";
group = "${group}";
});
users.extraGroups = (singleton
{ name = "${user}";
});

Now looking for the others. I'll open a pr with the fixes.

I wish we had static typing. It would make everything much easier

@fgaz
Copy link
Collaborator Author

fgaz commented Nov 5, 2020

#73

@fgaz fgaz changed the title loaOf in users.users and users.groups makes nixcloud-webservices throw an error in 20.09 20.09: loaOf in users.users and users.groups makes nixcloud-webservices throw an error Nov 5, 2020
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

Successfully merging a pull request may close this issue.

1 participant