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
pihole-ftl: init at 5.8.1 #108055
pihole-ftl: init at 5.8.1 #108055
Conversation
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 1 package failed to build and are new build failure:
|
This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or pytorch) Result of 1 package blacklisted:
1 package built:
|
I will mark this package as linux only. Fixes for mac should be made upstream. |
23b5611
to
bdf09cc
Compare
@SuperSandro2000 Ready for re-review |
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 look forward to getting this into Nixpkgs so I can ditch my old Pi that's showing its age :)
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.
LGTM, haven't tested this though.
@cole-h I think this iteration is ready for review. |
Great! Unfortunately, I'm a bit swamped at the moment... I'll be able to take a look Monday at the earliest. Sorry for the inconvenience. |
Not a problem. I know the feeling 😅. This PR has been open for a while, so there's no rush! |
assertions = [ | ||
{ | ||
assertion = !config.services.dnsmasq.enable; | ||
message = "pihole-ftl conflicts with dnsmasq"; |
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.
message = "pihole-ftl conflicts with dnsmasq"; | |
message = "pihole-ftl conflicts with dnsmasq. Please disable one of them."; |
let | ||
|
||
cfg = config.services.pihole-ftl; | ||
stateDir = "/etc/pihole"; |
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.
🚨
When we start calling variables that point to /etc
by stateDir
in NixOS the red alert sirens start up. Generally people in the NixOS community aren't a fan of using configuration directories for state.
You have a problem, though. It appears this software is very stubborn when it comes to doing almost everything NixOS doesn't want software to do. Just take a look at this.
Can we use RootDirectory to shoehorn this service into its own space?
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.
It is pretty common to edit the config values for pihole over the web interface. That wouldn't really work on nixos.
Also it regularly updates blocklists which need to go there.
systemd.tmpfiles.rules = [ | ||
"d ${stateDir} 0700 pihole pihole - -" | ||
"L+ ${confFile} - - - - ${confText}" | ||
"f ${logFile} 0700 pihole pihole - -" |
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.
Will this grow indefinitely until the system it runs on comes to a crash from lack of disk space?
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.
It will keep 24h I think https://docs.pi-hole.net/ftldns/configfile/#maxlogage
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 saw a number of mentions about log rotation, so maybe the old files need to be deleted. NixOS has a module for that, if needed.
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.
Diff LGTM, but I'm gonna try and run it to make sure everything looks good before giving the green checkmark.
owner = "pi-hole"; | ||
repo = "FTL"; | ||
rev = "v${version}"; | ||
sha512 = "1ybf71jwr781c7q3xvjla2vhnarba6dpp94ghzd31vhdc038g36f0ad2xp3hh8bk1hmlwzzqpcd5pl23w0f4b19kgms4cbk8rh6nvpr"; |
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.
Any reason why you chose sha512
? Nixpkgs usually defaults to sha256
.
It doesn't matter (I don't think); just curious.
substituteInPlace src/version.h.in \ | ||
--replace "@GIT_VERSION@" "v${version}" \ | ||
--replace "@GIT_DATE@" "1970-01-01" \ | ||
--replace "@GIT_BRANCH@" "master" \ |
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'd also change this to v${version}
.
Any updates on the current state of this PR? |
@Kranzes I haven't had a chance to work on this PR recently. I think it is relatively close, so feel free to pick up the remaining work to get it merged. |
I would really like to get pihole into nixpkgs but I think it won't be easy and almost not feasible because it assumes almost everywhere writable FHS directories like https://github.com/pi-hole/pi-hole/blob/master/advanced/Scripts/piholeLogFlush.sh |
Closing this PR as I don't intend to continue with it. I'll leave the branch around if anyone wants to pick up where I left off. |
For those who may be interested, I'm currently picking up this work. For now it lives in my personal Flake. |
Motivation for this change
The first part of a trio of PRs (to be followed by pihole and pihole-admin). Based on the work of @nuxeh and the
pi-hole-ftl
Arch Linux package#61617
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)