-
-
Notifications
You must be signed in to change notification settings - Fork 16.5k
nixos/alist: init #355716
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
base: master
Are you sure you want to change the base?
nixos/alist: init #355716
Conversation
011d2ab
to
78c989d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Many descriptions do not end with a period, and some are not capitalized correctly. Please fix this.
I believe null
would be more appropriate for the logic that disables http_port
and https_port
. However, you might need to change these null
values to -1
specifically for the genJqSecretsReplacementSnippet
context.
Additionally, you need to add a new module in the NixOS 24.11 release notes in alphabetical order.
00fab24
to
d1e8f96
Compare
d1e8f96
to
e824133
Compare
e824133
to
26cc9f5
Compare
26cc9f5
to
8b13b02
Compare
8b13b02
to
4ec1a01
Compare
486161e
to
c447faa
Compare
c447faa
to
95c8e06
Compare
bb40541
to
5113c9a
Compare
|
||
user = lib.mkOption { | ||
type = lib.types.nullOr lib.types.str; | ||
default = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default = null; | |
default = "alist"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I followed @pluiedev's suggestion for setting the user in this module — setting the default to null and creating the user only when it's not null. I’ve been using this pattern in all my modules where DynamicUser isn’t an option. Just wondering, is there a specific reason we shouldn’t do it this way?
|
||
group = lib.mkOption { | ||
type = lib.types.nullOr lib.types.str; | ||
default = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default = null; | |
default = "alist"; |
User = if cfg.user == null then "alist" else cfg.user; | ||
Group = if cfg.group == null then "alist" else cfg.group; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
User = if cfg.user == null then "alist" else cfg.user; | |
Group = if cfg.group == null then "alist" else cfg.group; | |
User = cfg.user; | |
Group = cfg.group; |
machine.succeed(""" | ||
echo '{"scheme": {"force_https": true}}' > /var/lib/alist/config.json | ||
""") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't this be placed with systemd-tmpfiles?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please provide some explanation? I'm not quite sure how systemd-tmpfiles
is related here.
The reason we're writing to /var/lib/alist/config.json
is to forcibly overwrite the previously generated config file and set a specific option in it. This is to test whether, with mutableConfig
enabled, the script in preStart
can make the previous settings persist.
result = json.loads(machine.succeed("cat /var/lib/alist/config.json")) | ||
assert result['scheme']['force_https'] is True |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this be overwriten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still not sure I understand what you mean. Could you explain it in more detail?
563ef3d
to
170162e
Compare
170162e
to
901dda4
Compare
93861e8
to
e51fc71
Compare
DLGM. |
34fa937
to
3f01166
Compare
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.