This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
hi everyone! I'm completely new to nix and nixos, and i'm struggling to figure a few things out! I beg for patience with my ignorance. I've been trying to install a package, in this instance polybar, with a custom argument.
Reading the polybar nix-expression it seems i should be able to pass an argument i3GapsSupport
with a boolean value, and that it defaults to false
. now, I cant for the life of me figure out how to actually do that in the nix language!
my first instinct was to just add the arguments to what i had assumed was a function call:
environment.systempackages = with pkgs; [
. . .
(polybar {i3GapsSupport = true;})
. . .
but when trying to build, that turned out to be an attempt to call something which is not a function but a set
having read (and apparently missunderstood) thenixos guide i also tried the path of declaring a variable and use overrideAttrs
, basically doing polybarWithI3Gaps = . . .
and that same but prefixed with let
, but I get an error telling me either how the option polybarWithI3Gaps does not exist, or how there was an unexpected LET on row such and such.
at this point I'm feeling a little more than confused, how do I pass an argument to a nix statement? is it possible to declare new variables or anything remotely equivalent in nix? if so, how? from the nixpills lessons I have done (the first 5) I get the impresssion that it could be done, but all they tell me as to how is that I should :
Note: ignore the foo = "strval" assignment, special syntax in nix repl
very grateful for any help, and once again, excuse my ignorance, i'm not only new to nix but also to functional languages in general, lots of new concepts to take in!
thanks!
Subreddit
Post Details
- Posted
- 5 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Nixon/comme...