Comments (4)
A couple days ago I had a discussion with @Melkor333 on IRC regarding this: https://logs.nix.samueldr.com/nixos/2020-07-12#1594566523-1594572059; where I also suggested a non-optimal solution
The change in nixpkgs that introduced this problem is my PR NixOS/nixpkgs#75031. I don't think this is a problem with the PR though, because the problematic code in nixcloud-webservices at
nixcloud-webservices/modules/web/core/webserver.nix
Lines 64 to 66 in 3a0767f
After messing with it for a bit, here is how the same functionality can be achieved without relying on internals:
{
options.webserver.userOptions = lib.mkOption {
type = lib.types.submodule options.users.users.type.functor.wrapped.getSubModules;
default = {};
};
config.users.users.webserver = lib.modules.mkAliasAndWrapDefsWithPriority lib.id options.webserver.userOptions;
Also, make sure to not use //
for merging in the module system like in
nixcloud-webservices/modules/web/core/webserver.nix
Lines 120 to 122 in 3a0767f
mkMerge
instead. And to prevent attributes from being changed, a mkForce
is recommended. So in the end that part looks about like this:
{
users.${config.webserver.user} = lib.mkMerge [
(lib.mkForce { inherit (config.webserver) user group; })
(lib.modules.mkAliasAndWrapDefsWithPriority lib.id options.webserver.userOptions)
];
}
To prevent name
and group
from being changed you could set group
and name
with a mkForce
.
from nixcloud-webservices.
Oh wow thank you for taking another look at it!! 😯 I hope I’ll have time next weekend to run the tests with this code and create a PR...
from nixcloud-webservices.
There were some changes in modules related to nixcloud-webservices::
https://nixos.org/nixos/manual/release-notes.html#sec-release-19.09
from nixcloud-webservices.
This prevents nixcloud-webservices to work on the newly released 20.03
from nixcloud-webservices.
Related Issues (20)
- Configure addition reverse-proxy options with static-darkhttpd
- nixos-19.09: directories test fails
- nixos-19.09: containers test fails HOT 1
- nixcloud.TLS fails in nixos-19.09 HOT 2
- 20.09: loaOf in users.users and users.groups makes nixcloud-webservices throw an error HOT 2
- 20.09: missing /var/{cache,log}/nginx directories prevent nixcloud.reverse-proxy to start HOT 2
- 20.09: preliminary self-signed certificates fail to generate HOT 5
- documentation: add remote repo inclusion recipe (as preferred installation method?)
- webmail not working (on 20.09)
- rspamd not working (on 20.09) due to option users.users error HOT 1
- Infinite recursion on nixos 21.05 HOT 3
- NOTICE: nixcloud-webservices is unmaintained
- porting from 20.03 to 20.09: '_module' missing HOT 3
- porting from 20.03 to 20.09: The option `meta.description' defined in `nixcloud-webservices/modules/web/services/roundcube' does not exist. HOT 1
- porting from 20.03 to 20.09: The option value `users.users' in `/nix/store/ihx06ak2767z80ri7i5wamiacnd16asp-source/nixos/modules/services/mail/rspamd.nix' is not of type `attribute set of submodules' HOT 1
- port perl based tests to python HOT 3
- Update rspamd 2.2 to 2.5 HOT 1
- 20.09 required features list HOT 1
- nixcloud.directories fails to execute HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nixcloud-webservices.