<notgne2>
chances are if `nix-env` made it work, putting it in systemPackages (or `home.packages` if you have home-manager) would work too
<Jonathan74>
Your configuration file where you enabled pantheon is one way to install a package (decoratively).
<pushqrdx>
huh, i found the background downloaded in ~/.nix-profile/share/backgrounds
<Jonathan74>
notgne2: I would think so too.
<clever>
pushqrdx: nix-env adds things to ~/.nix-profile/
<pushqrdx>
but iam pretty sure during my initial nixos install i saw elementary-wallpapers downloading
<clever>
pushqrdx: systemPackages would put it instead in /run/current-system/sw/
<Jonathan74>
nix-env is a package manager much like any other distribution's package manager.
<Jonathan74>
It was downloaded.
<pushqrdx>
so something must have missed it up, but my config is just the vanilla config with only the panteon edit
<notgne2>
`env | rg -i '\\.nix-profile' | rg -v '/run/current-system'` gives me nothing, so I don't think there's anything that looks in `~/.nix-profile` but not `/run/current-system` unless something is wrong
pushqrdx has quit [Remote host closed the connection]
<jdnixx[m]>
I'm looking at an old forum thread & these posts made a lot of sense
<jdnixx[m]>
`What the fuck was wrong that they couldn't just go with something like nix-env install, nix-env search, nix-env uninstall?`
<jdnixx[m]>
`Because you shouldn't be "installing" and "uninstalling" from the CLI anyway. Declare your packages in your configuration.nix (or Home Manager home.nix) so that you can actually reproduce on other machines etc. The "imperative" nix-env interface is the shitty legacy way.`
<jdnixx[m]>
`honestly they should just automate that
<jdnixx[m]>
it's just listing the package name in a predefined place`
<jdnixx[m]>
^that is very freakin true lol has there been any talk about that before?
<jdnixx[m]>
also what is the `nix something` equivalent of `nix-env -iA`
<{^_^}>
[nixpkgs] @thoughtpolice pushed 2 commits to master: https://git.io/JTQeK
<bqv>
hmph.
<jdnixx[m]>
<supersandro2000 "jdnixx: probably time. if we foc"> yeah true. I'm not really aware of what all the day to day efforts look like for the maintainers so if it's kind of a clusterfook already then I get that
<pushqrdx>
given that nix-env fixed the wallpaper issue is there a way to bake that into a new generation (and get rid of the ad-hoc .nix-profile)
MmeQuignon has quit [Ping timeout: 264 seconds]
<jdnixx[m]>
I kind of want to contribute some of that stuff though since I have the time, & probably not the competence to do any actually useful stuff at the top level lol
alexherbo2 has joined #nixos
<supersandro2000>
jdnixx[m]: I am packaging something for mac since at least a week cause it is 60 or so modules
<supersandro2000>
jdnixx[m]: just start somewhere with a easy and little task and go from there
<nicolas[m]>
bqv: because tryEval does not catch everything
<supersandro2000>
or just use nixos from day to day and if you notice something off try to fix it
<bqv>
nicolas[m]: i figured. is there a way i can catch that?
<jdnixx[m]>
yeah true. idk honestly I haven't really contributed much to any opensource projects before at all so I figure I'd have to learn the ropes a bit in general. & if stuff like that would be seen as not really a priority anyway then idk
<supersandro2000>
just replace the download, name, version and you should be good to go
<gchristensen>
then add it to hardware.firmware = [ yourpackage ]
<supersandro2000>
or maybe there is an option to add those files which I am not aware of
<gchristensen>
you could make this really trivial by making ./myfirmware/lib/firmware/yourfirmware.bin and doing: hardware.firmware = [ ./myfirmware ];
<gchristensen>
I think, anyway
<supersandro2000>
pyobjc walks the file system and checks if all files are installed correctly... good damn it why?!
<pushqrdx>
where i add that default.nix file though
<pushqrdx>
gchristensenand if i go with that, where should that directly go
<gchristensen>
the hardware.fir.... bit goes in to your configuration.nix
<gchristensen>
and ./myfirmware is in the same directory as your configuration.nix
<cap_sensitive>
Hi. How'd I install a font in steam's FHS environment? I tried to `(steam.override { extraPkgs = pkgs: [ wqy_microhei ]; }).run` but when I run `fc-list` I don't see the font
<bqv>
tbh, i don't even understand what the runners are meant to do. gonna ignore them.
<cap_sensitive>
But when I use `steam-run bash`, then `ls /usr/share/fonts`, I see `truetype wqy-microhei.ttc` so it is there in the FHS, just not registered
vonfry has joined #nixos
Acou_Bass has joined #nixos
<pushqrdx>
gchristensen it says `the option is not of type `package'.`
<pushqrdx>
what i did was create new folder called ca0132 next to configuration.nix
<samueldr>
that same folder, put the firmware files in a sub-directory so you have them in ca0132/lib/firmware/; but still refer to ./ca0132 in your config
<samueldr>
that's assuming the kernel looks at the root of the firmware folder
ddellacosta has joined #nixos
eoli3n has quit [Ping timeout: 240 seconds]
<samueldr>
(or rather, has been asked look at the root of the firmware folder)
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/JTQLJ
<siraben>
It failed to find the main module `go: cannot find main module; see 'go help modules'` despite the repo having a `main.go` file
<V>
maybe because it's not a module
<V>
there is no go.mod there
<V>
it's an oldschool go package
<pushqrdx>
samueldr idk what i am doing wrong but now i have ca0132/lib/firmware/files then in my configuration.nix i have `hardware.firmware = [ ./ca0132 ];` but still it throws same error
<V>
siraben:
<siraben>
Oh I see
<V>
it uses a makefile to build
<siraben>
yeah but it seems like it's possible to do without the makefile
<siraben>
the Makefile just has some convenience subcommands
<V>
(and maybe post an issue asking for it to be converted to a module?)
<samueldr>
ah, I was going on under the assumption that it would work that way, I see it needs to be either a derivation or a store path; which requires a tiny bit more work I think
<V>
I'd make the changes myself if I had a remarkable
m0rphism has quit [Ping timeout: 272 seconds]
<supersandro2000>
^ I am on the search for reviewers for that 176 commit PR
* samueldr
digs for a trivial pattern to follow
<supersandro2000>
(and me reading the issue about it that I shouldn#t have fetched every single module)
<supersandro2000>
but well it is what it is now
whatisRT has joined #nixos
Acou_Bass has quit [Ping timeout: 240 seconds]
hmpffff has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<samueldr>
hm, I don't have it on hand, but something like (pkgs.runCommandNoCC "ca0132-firmware" {} ''mkdir -vp $out/lib/firmware; cp -vr ${./ca0132}/* $out/lib/firmware''
<samueldr>
oh, and a closing parens
Acou_Bass has joined #nixos
<pushqrdx>
samueldr where should this go
tenniscp25 has joined #nixos
<siraben>
supersandro2000: ooh, will this PR also fix pyobjc on Darwin?
<supersandro2000>
siraben: It basically redoes it from scratch
<supersandro2000>
It is almost 10.15 compatible but would require some dependency adding
<supersandro2000>
and I fix a dozen missing Frameworks depedencies
<supersandro2000>
so to answer your question: yes it does
<samueldr>
pushqrdx: as an element of the list for hardware.firmware
<supersandro2000>
and after it is in I fix all python modules which require it
<samueldr>
so remove what you had before, and it would be hardware.firmware = [ (/*...*/) ]
tenniscp25 has quit [Ping timeout: 268 seconds]
<siraben>
supersandro2000: that sounds great, didn't know the process was that involved
<bqv>
it's upsetting that system.activationScripts is a one-way trip
<bqv>
wait, i can just redefine it
pr06lefs has quit [Ping timeout: 260 seconds]
pr06lefs has joined #nixos
<matthewcroughan_>
cole-h: You around? :D
<matthewcroughan_>
I gots questions.
<matthewcroughan_>
So, you don't install i3 with home-manager. How do you install it?
<matthewcroughan_>
Is i3 a good thing to install with home-manager? Should I? If not, why not. I can imagine why not, but you might have a different answer.
Chiliparrot has quit [Ping timeout: 268 seconds]
<supersandro2000>
siraben: I could probably have used the repo and iterate over all modules to reduce the time
<supersandro2000>
but the dependencies still would have to be done and the frameworks fixed
<bqv>
matthewcroughan_: you can also use the nixos modules for it
<matthewcroughan_>
bqv: What do you mean?
<matthewcroughan_>
What is the difference between nixos modules and home-manager modules.
<matthewcroughan_>
Why would one not simply use one or the other, why a combination?
Chiliparrot has joined #nixos
<supersandro2000>
nixos modules are global
<bqv>
i honestly don't know though, in the space of time i've been using nixos, i've used exwm (which nixos doesn't really even support properly) and velox (which is a wayland compositor so isn't supported by anything)
<supersandro2000>
home-manager are per user
<bqv>
matthewcroughan_: if you have one, you do not need the other
<matthewcroughan_>
Right, so what is it that one should do with home-manager and not with nixos modules, and vice versa?
<matthewcroughan_>
I see indeed that cole-h has his wayland apps configured here in home-manager for example, which includes sway.
<bqv>
e.g. you could have config.programs.emacs.enable = true, or config.home-manager.users.yourname.programs.enable = true. the end result would be, when logged in as yourname, you would have emacs, but you'd have it as root as well only if you did the first
<bqv>
in the context of window managers, it's more of a clusterfuck
<supersandro2000>
bqv: if you have a multi user system than you could use both
<bqv>
that's mainly because the nixpkgs code for window managers is generally just a clusterfuck
<matthewcroughan_>
Well actually, my aim is to have matthew and matthew-work
<matthewcroughan_>
I want a separate user profile for work, basically
<bqv>
supersandro2000: sure you could, but it seems kinda pointless
<samueldr>
that's a strong assertion bqv
<bqv>
it would make more sense to either have multiple home-manager profiles or use the nixos one
<bqv>
samueldr: if you want to disagree, go ahead, i'm way too tired to argue so i'll just concede
<matthewcroughan_>
can I make a template and have my users just append to that template?
<supersandro2000>
home-manager works on WSL
<bqv>
you've probably seen examples of that, yeah
<matthewcroughan_>
bqv: I need confirmation that this is an example of that
<pushqrdx>
so i built a derivation for my driver and it outputted that it's now stored in nix-store
<pushqrdx>
but i can't rebuild my config using it
<bqv>
...well fsck, i've just bumped into the issue with using my pc remotely. if i click on links, they open on the main machine :D one sec
ris has quit [Ping timeout: 240 seconds]
<matthewcroughan_>
lmao what
<matthewcroughan_>
x11 forwarding are you?
<matthewcroughan_>
who uses x11 in 2020?
<bqv>
nope, using emacsclient remotely
<pushqrdx>
i am on elementary which is X11 in 2020
<matthewcroughan_>
That's even more disgusting than my accusation.
<bqv>
to some :p
<matthewcroughan_>
I for one think you should be banned/
<matthewcroughan_>
:P
<pushqrdx>
so i suppose you're on wayland on nixos?
<pushqrdx>
if so mind sharing configz
<matthewcroughan_>
My goal is to not use x11 on my new laptop.
emmanuel_erc has quit [Ping timeout: 264 seconds]
<matthewcroughan_>
I've not used nixos full time on any system yet, and I don't want to screw it up, so have invested a lot of time learning by reading prior to diving completely in.
<bqv>
matthewcroughan_: hmm, i think cm's config might be a bad example
vonfry has quit [Remote host closed the connection]
<bqv>
pushqrdx: you almost certainly don't want my config for that
<matthewcroughan_>
This is my current configuration
<bqv>
i use velox/swc, which aren't even in nixpkgs, and aren't "technically" entirely functional
<pushqrdx>
it's so hard for some reason to install 2 firmware files
h0m1 has quit [Ping timeout: 240 seconds]
<bqv>
matthewcroughan_: i'm gonna toot my own horn and just say look at mine for this one, cause i don't think this part is too much of a mess. check out https://rc.fron.io/users/
emmanuel_erc has joined #nixos
<bqv>
pushqrdx: likewise, if you're really curious, you'll also find velox configs somewhere in that directory, and the packages somewhere in ../pkgs
<matthewcroughan_>
bqv: "delete this repo" hmmm
<bqv>
but i wouldn't really reccomend it, i'm just a masochist
<bqv>
matthewcroughan_: do it, i dare you
h0m1 has joined #nixos
<matthewcroughan_>
meh, I tried, and failed.
<nicolas[m]>
Gladly!
<bqv>
security by inobscurity
<bqv>
i've forgotten what i came here for
<bqv>
probably to do with my coming up to 40 hours now
<matthewcroughan_>
bqv: I don't like it for one reason..
<matthewcroughan_>
I have to define the structure.
<matthewcroughan_>
What decides what a service is? I know it's arbitrary, but isn't this already done in nixpkgs by the package maintainers?
<bqv>
you do whatever structure you want, i was just giving that as an example of how you can have plug-and-play users
<energizer>
i'm having trouble getting my other monitor to turn on. it seems to randomly decide to appear under `xrandr` or not
<energizer>
is there a trick to this?
<energizer>
is there a trick to this?
<energizer>
oops
<matthewcroughan_>
bqv: So, in your case, I do not see a flake. Where is the flake?
<bqv>
rc.fron.io
<matthewcroughan_>
I see no flake.nix.
<bqv>
rc.fron.io/flake.nix
<matthewcroughan_>
If you have named it something different, what is it?
<matthewcroughan_>
Oh, so what was the thing you linked me?
<bqv>
the users subdirectory
<matthewcroughan_>
so the top level nix files in that directory are the users?
<bqv>
leaf is my user for embeddeds (rpi), root is root, bao is me on my desktop and server, and aion is me on this tiny chromebook i'm typing on
<matthewcroughan_>
So when you want to add a new user, do you literally just make a new nix file and copy paste from one of the other users and you're done?
<pushqrdx>
or at least install my own driver
<bqv>
the subdirs are stuff i mix and match for every user
<bqv>
yes
<bqv>
anyway i gotta brb
ilmu has quit [Ping timeout: 240 seconds]
jmeredith has quit [Quit: Connection closed for inactivity]
<matthewcroughan_>
V: So, you've got a custom build of the nix cli? You're completely forked?
<V>
at the point where it turned into me also ripping out nix-env I realised I was maybe spending a bit much time on it and stopped
<matthewcroughan_>
That's forked up.
<V>
matthewcroughan_: I'm not currently using said fork, but yes
<samueldr>
,callpackage Dotz0cat
<{^_^}>
Dotz0cat: If you're updating a file in nixpkgs that starts with something like `{ stdenv, cmake }:`, use `nix-build -A` in the nixpkgs root with the corresponding package attribute to build it. If it's not in nixpkgs, try `nix-build -E 'with import <nixpkgs> {}; callPackage ./file.nix { }'. The mapping from package attributes to package files is in pkgs/top-level/all-packages.nix.
<V>
callpackage is evil
<samueldr>
V: too bad the reality is it's in use
<V>
it is :(
<V>
I literally got bitten by a scoping bug yesterday
<V>
tried to add a configuration argument to a package called 'colors'
<V>
and it turns out there's a package called that
<colemickens>
bqv: if I squint, I can imagine the future of a Nickel based nix/nixos
<V>
while we're on the subject of this, ... is also evil
<bqv>
Why?
<V>
it doesn't fail noisily
<bqv>
At a skim it sounds interesting
<bqv>
Oh
<V>
again, much time spent wasted on debugging
<bqv>
Man, I still like infinisil's idea of just sellotaping ghc to nix
<bqv>
Who needs nix when you have the entirety of Hask
<bqv>
NixMonad™
<bqv>
Why do I always go from having 0 projects on the go, to 4 at once
<matthewcroughan_>
colemickens: have you got any examples/templates of a nix project using sops?
<colemickens>
matthewcroughan_: my repo uses it
<colemickens>
matthewcroughan_: look at <root>/mixins/cachix.nix and <root>/secrets
<colemickens>
for an example
<matthewcroughan_>
what is mixins supposed to mean btw?
<matthewcroughan_>
is this your stdlib essentially?
Acou_Bass has joined #nixos
<bqv>
It means colemickens is a web dev :p
<colemickens>
nah
<colemickens>
matthewcroughan_: it's just random tidbits that might get included anywhere. A lot of times, my hosts/<foo> include a profile/<gui/interactive/core>.nix which then include mixins.
<nicolas[m]>
`builtins` does not have a `filterAttrs` :(
<colemickens>
matthewcroughan_: but then I only enable docker on certain hosts, so that one gets pulled directly into a hosts/somemachine/configuration.nix
<colemickens>
matthewcroughan_: so it's just... "scenario-specific" nix files that might configure a nixos module, a home-manager module, or *both*.
<bqv>
nicolas[m]: limiting yourself to builtins is a recipe for pain
<colemickens>
matthewcroughan_: so you'll note, my config repo is NOT setup to be multi-user or used with multiple h-m personas, as again, the nixos+hm configs are mixed together.
<bqv>
From experience
<matthewcroughan_>
colemickens: so you actually upload your encrypted secrets publicly to github for everyone to attempt to crack?
<tenniscp25>
is it an antipattern to provide public/private keys in configuration.nix?
<bqv>
Yeah, for me I just put them in a nix file and shove them in /secrets
<bqv>
strings are just nix, after all, so can be nix files
<colemickens>
matthewcroughan_: it's actually the same secret re-encrypted like 6 times
mzcore_ has quit [Ping timeout: 240 seconds]
<colemickens>
matthewcroughan_: but the keys are located offline, so I am not worried about someone cracking them.
<matthewcroughan_>
colemickens: can you tell me exactly your process for building this system then?
<colemickens>
matthewcroughan_: sure, this is what I meant when I said "there's room for improvement". Go read up on mozilla/sops, to understand what it does. And then mic92/sops-nix to understand how we automate using sops via a nixos module.
<colemickens>
And then it's all just there in my config, the <root>/secrets dir has a ./util.sh script that scripts the `sops` tool (this should be unnecessary and `sops` should juts be better, but apparently they're remaining backward compatible with a busted CLI...so...)
<matthewcroughan_>
Wouldn't you just be better off mentally if you kept your secrets on a thumb drive encrypted, and decrypting them manually with a single script that requires your password, and providing this to the install medium? lol
<matthewcroughan_>
All these dependencies on schemes.
<colemickens>
matthewcroughan_: so what happens when I add a service and password on my machine and deploy my config to my 5 remote hosts?
<bqv>
Nix secrets are not an easy problem :/
<matthewcroughan_>
Your use case is far different from mine colemickens
<matthewcroughan_>
I primarily want it for a laptop. Not much else.
<matthewcroughan_>
Maybe two laptops. Maybe I'll become crazy like you though.
<colemickens>
matthewcroughan_: you're of course welcome to sync secrets however
<colemickens>
matthewcroughan_: at the end, you just wind up shoving some path into a config file :)
jess is now known as j
<matthewcroughan_>
I'm happy with it not being automated if it makes my mental reliance on schemes like sops less.
<colemickens>
idk, it's nice that I can rotate my spotify password because it was compromised and spotifyd keeps working everywhere :)
<colemickens>
that's reasonable
Baughn has joined #nixos
<matthewcroughan_>
It certainly sounds like it is, but I have to learn so much more.
<matthewcroughan_>
I barely understand how to make my nix repo.
<colemickens>
it's fair, I waited a long time ... years... to try to tackle this problem.
<colemickens>
anyway, it's Overwatch time, cheers!
<matthewcroughan_>
wait!
<matthewcroughan_>
Wtf is that nixup.oil in your repo
<matthewcroughan_>
nixos-rebuild switch --upgrade doesn't tell you that you have no channels set up.
<bqv>
in it's glorious entirety
<matthewcroughan_>
Not bad!
<matthewcroughan_>
It's all shell!
<bqv>
interesting, it does have an --update-input now
<bqv>
either way, i would avoid, if you feel you can
<matthewcroughan_>
Lol
<matthewcroughan_>
if you supply no argument to --update-input it just exits with newline
<bqv>
you'll learn things faster if you learn how to do it directly *wiggles eyebrows*
<matthewcroughan_>
So, in a basic, almost default flakes setup, you would ideally just run `nixos-rebuild switch --update-input` right?
<matthewcroughan_>
This seems now to be exactly what it has done.
<matthewcroughan_>
This has "Updated my system" right?
<matthewcroughan_>
My inputs has `nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";`, I therefore ran `sudo nixos-rebuild switch --update-input nixpkgs`, it returned `* Updated 'nixpkgs': 'github:nixos/nixpkgs/007126eef72271480cb7670e19e501a1ad2c1ff2' -> 'github:nixos/nixpkgs/1dc37370c489b610f8b91d7fdd40633163ffbafd'`
<bqv>
in fact, you can do it in one. a normal flakes build, just do "nix shell '.#nixosConfigurations.hostname.config.system.build.toplevel' -c switch-to-configuration switch"
<matthewcroughan_>
nix shell?
<bqv>
but more explicitly, `nix build '.#nixosConfig.blah.toplevel'`, then ./result/bin/switch-to-configuration switch
hjarvard has joined #nixos
<bqv>
you don't need 500 lines of bash for this my friend
<matthewcroughan_>
bqv: does this update all my inputs?
<matthewcroughan_>
I don't think it did
Acou_Bass has quit [Ping timeout: 240 seconds]
<bqv>
do you seriously want to update all your inputs every build
<matthewcroughan_>
ya
<bqv>
trust me, that will get fscking annoying and tiring
<matthewcroughan_>
I just wanna update everything, like on Arch
<matthewcroughan_>
I wanna be on latest all the time erryday
<bqv>
how many packages do you have installed, and how many inputs?
<matthewcroughan_>
hold on, why is this even slightly an issue?
<bqv>
at a guess
<matthewcroughan_>
it's called a comma separated list :D
<matthewcroughan_>
why would this be annoying?
<matthewcroughan_>
Can't I just do this: `sudo nixos-rebuild switch --update-input nixpkgs nixpkgs-wayland home-manager` ?
<matthewcroughan_>
this should update those 3 inputs, right?
<matthewcroughan_>
oh man, no, there is no array
<bqv>
because take my setup for example. if i updated all my inputs even twice in the same day, that would basically queue up two sets of 4000 nix derivations to build, and around 20k to be fetched. first builds would almost always fail, so i'd have to iterate two or three times, and in total updating to latest would take me about half a day.
mauli has joined #nixos
<bqv>
that's one of the reasons i only do it every other week
<bqv>
it's a collossal waste of time
<bqv>
you get minimal benefit for wasting your own time
<matthewcroughan_>
So how do I replicate my desires?
<matthewcroughan_>
Arch, rolling release, latest everything
<bqv>
you do have rolling release everything :|
<bqv>
you always have nixpkgs
<matthewcroughan_>
So when do I want to update my inputs?
<bqv>
you just don't have to rebuild your whole goddamn system every 3 hours
<bqv>
if you want something new, build it on it's own and use it, otherwise, update your system every week or something like a sensible person
<matthewcroughan_>
I'm happy with every week, that's what I meant.
<bqv>
you will get 0 (zero) benefit from updating all your inputs twice in the space of one week
CyberManifest has quit [Remote host closed the connection]
<matthewcroughan_>
I'm only asking how you update more than one input
<matthewcroughan_>
which I still don't know how to do :P
<bqv>
you can specify --update-input <input> more than once, or use --recreate-lock-file
spacefrogg has quit [Quit: Gone.]
aw has quit [Quit: Quitting.]
aw has joined #nixos
<bqv>
if you have lots of inputs, --recreate-lock-file will trigger github's ratelimit unless you login, and even then sometimes
<matthewcroughan_>
So you can't update more than one input at once.
<matthewcroughan_>
This is a flakes flaw today?
<bqv>
"you can specify --update-input <input> more than once"
<matthewcroughan_>
That's not optimizing anything though is it?
spacefrogg has joined #nixos
<matthewcroughan_>
That's like you said, inefficient?
<bqv>
in what sense?
<bqv>
what's the alternative, i mean?
<matthewcroughan_>
What is happening when I update?
<matthewcroughan_>
I'm not compiling anything, you said I'm rebuilding my system?
CyberManifest has joined #nixos
<matthewcroughan_>
I'm not submitting anything to github atomically.
<matthewcroughan_>
my flake file may be changed 3 times, but what setup do you have where this is automatically submitted to github?
<matthewcroughan_>
what even is --recreate-lock-file for?
<bqv>
when you run `nix flake update`, nix will check your flake.lock and make sure it evals and fits your flake.nix. when you add --update-input <input1> --update-input <input2>, it will also in that process fetch new versions of your inputs and replace them in your flake.lock. if one of those is nixpkgs for example, that could trigger hundreds of rebuilds. if you add --recreate-lock-file, you might as
<bqv>
well think of it as nix deletes the flake.lock and recreates it from scratch, fetching you the newest version of every input
<bqv>
--recreate is a bit wasteful because it will refetch even ones that haven't been updated
<bqv>
hence the api issues
Acou_Bass has joined #nixos
<matthewcroughan_>
what on earth is the point of recreating the lock file?
<bqv>
think of it as just `--update-input *`
<matthewcroughan_>
oooh okay
<matthewcroughan_>
but there's no way to do that without recreating the lock file?
<matthewcroughan_>
so if I want to rebuild my entire system with no "cache" for lack of a better term, what do I do?
<bqv>
in fact, feck it, just use that. you'll learn faster the hard way
<bqv>
in that scenario you'd always specify --recreate-lock-file when you nix build '.#nixosConfigurations.hostname.config.system.build.toplevel'
<bqv>
i'm somewhat earnestly interested to see how that goes
<matthewcroughan_>
when I run `nix flake update nixpkgs` are my binaries updated?
<bqv>
no.
<matthewcroughan_>
I'm a bit confused how I upgrade my system
<nicolas[m]>
`--update-input nixpkgs`
<bqv>
i'm on too little sleep for this
<bqv>
is there another flake user here
<nicolas[m]>
and you have to pass the flag for each input you want to update
<matthewcroughan_>
nicolas[m]: I just asked that :P
<matthewcroughan_>
how on earth is `nix flake update` not the same as `--update-input`
<siraben>
(node:2867) UnhandledPromiseRejectionWarning: Error: The process '/nix/var/nix/profiles/per-user/runner/profile/bin/cachix' failed with exit code 1
<matthewcroughan_>
nicolas[m]: new bug?
<nicolas[m]>
siraben: Cachix could be down or very slow
<siraben>
I wonder if it's just me or is anyone else experiencing this as well
<nicolas[m]>
I can't login into Cachix with GitHub right now
<nicolas[m]>
So you might not be the only one
<bqv>
cole-h: currently, you can't access the activation scripts once they've been set (try eval --json config.system.activationScripts)
<bqv>
this just makes them accessible, in a non-breaking way
<siraben>
Oh, rerunning it works now
<siraben>
yay
<cole-h>
And why would one want to do this?
<matthewcroughan_>
nicolas[m]: did me resizing my window screw up yours? :D
<matthewcroughan_>
curious
<bqv>
because i don't want to reimplement nixpkgs, i can pinch most of it for what i'm up to
<bqv>
(i can anyway, this would just be much MUCH cleaner)
<nicolas[m]>
matthewcroughan_: yeah my alacritty crashed again
<matthewcroughan_>
omg lol
<matthewcroughan_>
what version?
<cole-h>
How does this help you not "reimplement nixpkgs" though? (I'm looking for something concrete)
<nicolas[m]>
matthewcroughan_: 0.5.0
<bqv>
cole-h: i'm creating a compatibility layer. it wouldn't be much of a compatibility layer if every package that used activationScripts had to be explicitly implemented in the compatibility layer now would it?
<matthewcroughan_>
trying on mine
<nicolas[m]>
I don't have any entry in `coredumpctl list` :/
<matthewcroughan_>
I'm on 0.5.0 too
<matthewcroughan_>
omg it's totally busted
<matthewcroughan_>
yeah I see what you're saying, that's terrible
<bqv>
as i say, the alternative is to rip out the activation part of nixpkgs and reimplement it in a compatible way but more transparently, but that's a little bit awful, and i don't see why this would hurt
<bqv>
i'm confused why they were implemented in this black-box way in the first place
<cole-h>
Sounds sane to me. I'd say go for the PR :)
<matthewcroughan_>
nicolas[m]: I'm gonna be resizing my terminal a bit every now and then since I'm on a tiling window manager, you might want to use a terminal that doesn't suck temporarily
<matthewcroughan_>
i.e what should I put in the PR on GH?
<siraben>
I'm basically copying and pasting build then upload artifacts in my GH actions
<bqv>
matthewcroughan_: PR title can just be the commit message, comment can be what i said to cole-h
<cole-h>
FWIW, I don't think you should take on this patch unless you have concrete ideas of what could be done with it (e.g. how you'd use it)
<matthewcroughan_>
bq
<bqv>
'currently, you can't access the activation scripts once they've been set (try eval --json config.system.activationScripts). this just makes them accessible, in a non-breaking way'
<cole-h>
If somebody comes along and asks for clarification, you can't provide any because you don't have any use for it
<matthewcroughan_>
bqv: not sure which thing you're referring to that you stated to cole
<bqv>
quoted
cjpbirkbeck has quit [Quit: Goodbye, take care]
<matthewcroughan_>
ok god it
<matthewcroughan_>
got it
<matthewcroughan_>
I'm still not used to this keyboard haha
<tsujp69>
im running LUKS on LVM, for the root partition in my configuration.nix I point to the crypted UUID correct not the actual device UUID?
<matthewcroughan_>
I wanna see whether home manager has anything available for a given package
<cole-h>
matthewcroughan_: Would be great if you could work this out with them in DMs or something, to keep this channel relatively on-topic ^^;
<matthewcroughan_>
It is on topic.
<matthewcroughan_>
It's about my woes with trying to figure out home-manager. Sure, at this point some matrix has stepped in.
<matthewcroughan_>
but it is about a nix matrix channel, and some command you've pasted.
<tsujp69>
I'm having trouble booting into nixOS with LUKS on LVM, cannot mount my LUKS partition but my configuration appears correct, can anyone offer assistance?
<cole-h>
Yeah, and that Matrix part is off-topic ;)
<matthewcroughan_>
Ok? And?
<matthewcroughan_>
I've mentioned my weird keyboard here too. That's off topic.
<matthewcroughan_>
I'm not exactly hogging the chat.
<matthewcroughan_>
I mean, I am. But it's mostly about nix :D
<matthewcroughan_>
bqv: what would system.autoUpgrade.enable and system.autoUpgrade.allowReboot do on a flakes system?
<matthewcroughan_>
colemickens: what about system.autoUpgrade.channel
<bqv>
nothing useful
<matthewcroughan_>
What does this do on a regular channel based system?
<matthewcroughan_>
going to assume it just runs nixos-rebuild on an interval?
Emantor has joined #nixos
<bqv>
adds a cron job to update your channels, and then nix-env -u on a random basis
<matthewcroughan_>
sounds stable
<colemickens>
matthewcroughan_ idk I don't use channels and don't really auto-upgrade, though CI preemptively builds so my rebuilds are usually precached
<matthewcroughan_>
how do I figure out what an option does?
<matthewcroughan_>
Here's my notes on installing ZFS on root with luks
<etu>
Well, most of us run EFI and need a separate ESP anyways?
<tsujp69>
I was planninng to do LUKS on LVM and then XFS on that LUKS, but I can look at ZFS now
<matthewcroughan_>
ZFS is the greatest filesystem ever.
<matthewcroughan_>
LVM is highly illogical.
<matthewcroughan_>
Datasets are more intuitive and basically accomplish the same thing
<etu>
ZFS is a great lifestyle
<tsujp69>
XFS is better for parallel I/O no and finding files much faster? How does ZFS compare for that?
<etu>
I use it on most of my nixos machines (ZFS)
<matthewcroughan_>
ZFS is faster than XFS because of compression.
<matthewcroughan_>
I expect it to be, anyway.
<matthewcroughan_>
I think you could find benchmarks to back that up.
<etu>
The ARC is excellent as well
<matthewcroughan_>
Yes, of course, it'll be faster because it uses all of your RAM as cache by default.
<matthewcroughan_>
"uses" does not mean it gets in the way. It does not consume that RAM, it uses what you're not using is a better way to think of it.
<etu>
But unused RAM is wasted RAM
<matthewcroughan_>
Yes, that's the point :P
<tsujp69>
yeah dw we aint windows plebs here "hurrr durr my precious ram being used"
<tsujp69>
why would I use LUKS as well as ZFS if ZFS already has the encryption?
<matthewcroughan_>
If you add zstd-fast to your root dataset, expect massive I/O increases, as the data is compressed on disk, meaning less I/O to perform.
<etu>
tsujp69: It's the only filesystem i haven't had a data loss on
<matthewcroughan_>
tsujp69: You might not want to. I prefer using LUKS for full disk encryption.
<tsujp69>
So you're using LUKS for the full disk encryption and ZFS for the filesystem then
LnL- has joined #nixos
LnL- has quit [Changing host]
LnL- has joined #nixos
<tsujp69>
As I see in your nontes you make a crypted volume and thenn put your zpool on that crypted volume
LnL has quit [Ping timeout: 260 seconds]
<matthewcroughan_>
that's right tsujp69
<matthewcroughan_>
I mean, if I wanted more encryption, I would make a dataset (logical volume) and then encrypt that.
<etu>
The nice thing with ZFS encryption is that when you go ZFS send to backup a dataset, that dataset it's encrypted by default
<tsujp69>
`compression=lz4` can instead be `compression=zstd-fast` right?
<matthewcroughan_>
But in order to encrypt the root, such that I can boot from it and decrypt it on boot, it's far simpler to use LUKS
<matthewcroughan_>
tsujp69: that's right, but the benchmarks would indicate that zstd is a better choice in a lot of scenarios.
<tsujp69>
ah just `zstd` instead of `zstd-fast` then?
<matthewcroughan_>
My NixOS install should be THE wiki page.
<etu>
Cool :)
<matthewcroughan_>
for luks on zfs on root
<matthewcroughan_>
Like seriously, my script actually comes from cole-h
<matthewcroughan_>
The wiki over-complicates so many simple things
<clever>
my laptop is using zfs+swap on lvm, then lvm on luks
<tsujp69>
one more noob question, how do I go from this state now to more things installed, say I want firefox by default now etc just `nixos-install` again from my current system (not the live USB)?
<clever>
tsujp69: if you want to modify the current os, you use nixos-rebuild
<matthewcroughan_>
No, that would be imperative.
<danderson>
Edit the config in /etc/nixos/configuration.nix and `nixos-rebuild switch`
<clever>
tsujp69: nixos-install is basically just a script to run nixos-rebuild in a chroot, to target the non-current os
<matthewcroughan_>
tsujp69: If you were able to install everything the way you just said you want to, that would be known as imperative. Yknow, apt-get, pacman, yum, apk.
<danderson>
nixos-rebuild has a bunch of other options too. `switch` makes the new config live immediately, and also sets it to be the default when booting
<danderson>
other useful ones are `test` (apply the config to the running system, but keep the boot config to be the previous one - if it goes horribly wrong just reboot to undo)
<amosbird>
Hello, is nixos a suitable choice to build static binaries?
<matthewcroughan_>
tsujp69: Imperative is the opposite of Nix. You can use nix-env to install things imperatively, but if you want it to permanently stick around, you put it all in /etc/nixos/configuration.nix, for example.
<danderson>
and `nixos-rebuild boot` changes the bootup config without changing the running one. It's handy if you're making a very intrusive change that needs a reboot anyway.
<etu>
amosbird: No, but nix is. You don't need the os part
<tsujp69>
Gotcha, I'll edit my configuration.nix to have all the stuff I want by default and then I'll test that and if it reboots and isn't borked etc I can run `nixos-rebuild switch` to make it my new default
<tsujp69>
then commit that configuration.nix and boom
<matthewcroughan_>
you can think of it as a commit, you may even go as far as to commit your change to github once you're sure it works okay
<matthewcroughan_>
nixos-rebuild switch will make your current configuration.nix true, errors will be printed
<danderson>
tsujp69: nixos also sets up your bootloader to list previous versions of configuration - so if you get into a bad state, you can reboot and select the previous config at the bootloader
<matthewcroughan_>
If you ever need to figure out a package..
<danderson>
very nice to get out of trouble. I did that once when an upgrade completely broke my video output. One reboot and selection of the previous gen later, I was back in the game.
<tsujp69>
how do you get that list of previous configs, say the previous 3, on the bootloader danderson?
<tsujp69>
Nice matthewcroughan_ checking out now
<etu>
tsujp69: "nix search firefox" for local searching :)
dbmikus has joined #nixos
<etu>
It's slow the first time when it builds the index
<etu>
tsujp69: the bootloader generations will be there on boot, you'll see it when you have more than one :)
chambln has quit [Ping timeout: 260 seconds]
<danderson>
yeah, the previous generations show up magically. I think there's an option somewhere to limit how many you get, but by default it's "lots" :)
<tsujp69>
`environment.systemPackages` is for system default packages, and `users.users.<name?>.packages` is for packages for a specific user
dbmikus has quit [Ping timeout: 246 seconds]
<tsujp69>
and `nix-env` is imperative only (not affecting configuration.nix)?
<etu>
tsujp69: yes, pro tip: don't install things with nix-env, it's weird ;)
<danderson>
... I upgraded to 20.09 on release day, how do I already have 2GiB of updates to install
<tsujp69>
how would I easily use something without having to rebuild if I just wanted to install and try something out then etu?
<etu>
tsujp69: if you want something temporary and not in your config, you can use nix-shell
<clever>
tsujp69: nix-shell -p firefox
<tsujp69>
gotcha
<clever>
that will add firefox to $PATH for only that shell
<clever>
and once you exit nix-shell, its basically gone
<etu>
:)
<danderson>
but also, you're welcome to use nix-env if you want to. It won't _break_ anything to use it.
<danderson>
you just won't have a nice portable list of installed software anywhere
<danderson>
but it can be handy for test-driving some stuff
<tsujp69>
very cool
<danderson>
my user's nix-env is actually full of crap. I should clear it out.
<matthewcroughan_>
tsujp69: You can go even further and just have this stuff for the period of the active shell
<matthewcroughan_>
nix-shell
<danderson>
57 packages installed in nix-env. So that's 57 packages I would be missing if I reinstalled my laptop from my checked-in configs
<matthewcroughan_>
similar to nix-env, although everything done with nix-shell is only persisted for that literal spawn of the instance of the shell
<matthewcroughan_>
danderson: just run nix-env -e '.*'
<matthewcroughan_>
you will thank me :D
palo1 has joined #nixos
<matthewcroughan_>
Did you do it?
palo has quit [Ping timeout: 272 seconds]
palo1 is now known as palo
<energizer>
nix-env does break stuff by causing conflicts
<energizer>
they can be fixed by uninstalling the nix-env things
<tsujp69>
is there any safe way to include a password for a user in configuration.nix
<danderson>
matthewcroughan_: planning to, once I move some of those things into my nixos config :)
<matthewcroughan_>
tsujp69: you can refer to that topic broadly as keeping secrets
<matthewcroughan_>
and there are many ways, and they are all fairly complex
<{^_^}>
[nixpkgs] @harendra-kumar opened pull request #102323 → Add benchmark support in shellFor → https://git.io/JTQrT
<tsujp69>
where it says `my-hello` I can just add another line for vim etc, and if I had another custom package just another block within the let scope
<tsujp69>
matthewcroughan_ I am getting a syntax error when attempting to inline define a package from github http://ix.io/2CF8
<tsujp69>
coreutils is read as undefined, as is wget etc so I have borked something there. I am unsure of the exact syntax, I have done it this way instead of seperate files because I have quite a few git specific packages to install so just want them all there instead of as 500 files all being imported
<tsujp69>
hang on, its because `with pkgs` is within the let scope only
<siraben>
tsujp69: you should split out the zig derivation into a separate file
<tsujp69>
but if I have say 50 of these deviations I then need 50 files no?
<tsujp69>
I guess that is the sane thing to do I suppose
<siraben>
tsujp69: overlays were invented for this purpose, so that you can basically say "use the derivation from nixpkgs with a few changes (newer source, disabling features, etc.)"
<tsujp69>
I shouild put this new package override file in `/etc/nixos` alongside `configuration.nix` correct?
<siraben>
oh you can inline it
<siraben>
just replace your let body with the body of my lambda
<siraben>
`let zig = pkgs.zig.overrideAttrs ...`
grumboo is now known as grumble
<siraben>
ooh, looks like this build fails because newer zig needs newer clang
<tsujp69>
yeah there was this fuckaround I don't quite understand but basically its fixed after zig 0.7.0
<tsujp69>
until then certain stuff needing newer zig has to be built from the HEAD and have a newer clang etc etc
<siraben>
hm, you could try looking at the error message and add more overrides or write a new derivation entirely using the one from nixpkgs as a template
<siraben>
oh so you're gonna want to change that line to `(callPackage ./zig-overlay-2.nix {})`
<siraben>
it would be misleading to call it `zig-overlay-2` btw, call the file `zig-updated.nix` or something
<siraben>
since this is no longer an overlay but an entire package
<tsujp69>
oh right
Heirlung has joined #nixos
<siraben>
yeah this is probably the easiest way to go if it involves a lot of changes
<siraben>
and if you manage to get it to build, do submit a PR to nixpkgs
<tsujp69>
wrt to your overlay from before too I was getting a syntax error for that file for line 1 column 30
<siraben>
yeah because it's a lambda, you'd have to wrap the whole thing in parens to be parsed as an expression
<siraben>
I'll explain the structure of what you're looking at in your `zig.nix` file
<siraben>
the whole thing is basically a big lambda that takes an attribute set (i.e. like python dictionary) as an input
<siraben>
then calls `llvmPackages.stdenv.mkDerivation` with a set `rec { ... }`, the rec indicates that the set can refer to its own attributes
<siraben>
what `(callPackage ./zig-overlay-2.nix {})` does is call the nix file with the appropriate dependencies and the `{}` indicates if you want to pass parameters manually
<matthewcroughan_>
Or better yet, exclude rather than include?
FRidh has joined #nixos
<matthewcroughan_>
What I am actually saying is that I would prefer excludes, rather than explicit inclusion via import.
<colemickens>
"because imports are normally listed explicitly like this"
<colemickens>
yes, okay
<colemickens>
I don't know that syntax off the top of my head
<matthewcroughan_>
It's possible to do though? Just wanting to know.
<matthewcroughan_>
I'll figure it out at some point.
<matthewcroughan_>
It just seems like a lot of work, to me, to have to include everything explicitly, considering I already am mentally including it by making a nix file for it.
<colemickens>
bqv's flake does it somewhere or something
<colemickens>
I don't know what to tell you it's how nix works, nothing about nix ever auto discovers files except for inferring a default.nix afre a slash
<{^_^}>
[nixpkgs] @FRidh pushed 56 commits to staging-next: https://git.io/JTQDk
<matthewcroughan_>
Yes, that's fine, I just want to glob it if possible.
yinfeng has quit [Quit: yinfeng]
zupo has quit [Ping timeout: 272 seconds]
<matthewcroughan_>
And exclude, because I'm going to seriously have a lot of packages.
<typetetris>
amosbird: You could try to use `nixpkgs.pkgsMusl.stdenv` instead of `nixpkgs.stdenv` if your project already has a nixexprs to build it. Might not be enough though.
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
euandreh has joined #nixos
malook has quit [Remote host closed the connection]
eric_ has joined #nixos
eric_ has quit [Client Quit]
<typetetris>
So with flakes, nixpkgs doesn't declare all its sources as inputs. For the evaluation of the nixexprs I assume, nix with flakes activated, should fail on something like `fetchUrl` without a `sha256` argument? Otherwise, whats the point?
<typetetris>
Otherwise the nixexprs evaluation wouldn't be reproducible, wouldn't it?
eahlberg has joined #nixos
<tsujp69>
is there a wiki page on writing nix packages>
hnOsmium0001 has quit [Quit: Connection closed for inactivity]
<FRidh>
fixed-output derivations always need a hash. Special functions for fetching expressions, such as fetchTarball don't, unless --pure mode is used. Flakes work by default using pure mode.
<tsujp69>
running `nix-build greetd.nix` gives me the following error: cannot auto-call a function that has an argument without a default value ('stdenv')
<colemickens>
tsujp69: is it just a package derivation or did you write a nixos module?
<tsujp69>
I think I've written my own module? the top level scope is `rustPlatform.buildRustPackage`
<colemickens>
tsujp69: So, it sounds like you wrote a package definition. Those are usually meant to be "built" via nixpkgs, with callPackage
<colemickens>
tsujp69: is this something you plan to upstream to nixpkgs?
yinfeng has quit [Client Quit]
<matthewcroughan_>
Ah ok, I am not talking about building a package like that.
<tsujp69>
yes I plan to sumit a PR to have it included in nixpkgs
<tsujp69>
submit*
<matthewcroughan_>
I'm not familiar with doing what you are doing, colemickens certainly is though :D
yinfeng has joined #nixos
<colemickens>
tsujp69: okay, so I would go ahead and test it by staging it into a nixpkgs tree, adding it to pkgs/top-level/all-packages.nix and then building it
<{^_^}>
[nixpkgs] @FRidh pushed commit from @TredwellGit to staging « openblas: 0.3.10 -> 0.3.12 »: https://git.io/JTQ9e
<matthewcroughan_>
colemickens: So, earlier I was asking how I could discover whether home-manager has extensions for a given package?
<matthewcroughan_>
In the repl, how could I do this?
<tsujp69>
what is home-manager? Is it useful?
<matthewcroughan_>
I don't really fully know my self yet what it truly does.
<{^_^}>
[nixpkgs] @FRidh merged pull request #102029 → groff: set "operating system" for mdoc pages → https://git.io/JTMpS
<{^_^}>
[nixpkgs] @FRidh pushed commit from @alyssais to staging « groff: set "operating system" for mdoc pages »: https://git.io/JTQ9J
<colemickens>
I don't know, I don't tend to use the repl, sorry. I just google "home manager options" every single time and then click the first option. :|
<matthewcroughan_>
The idea, at least afaik, is that it's a portable manner of configuring packages to be used via nix, separate from nixos entirely.
<matthewcroughan_>
Whereas your configuration.nix might describe your system, laptop. You might then have another configuration.nix for another machine, you would *not* define your packages in there.
<matthewcroughan_>
Instead, you would say "I want a user named matthew, and he should have vim." And you would even configure vim inside of this "vim.nix"
<matthewcroughan_>
vim.nix would also therefore replace the dotfiles for vim.
FRidh has quit [Remote host closed the connection]
<matthewcroughan_>
So at this point, you have 3 primary structures. You have your hardware-configuration.nix, configuration.nix and users/various-stuff.nix
<colemickens>
the quick answer is : nixos->/etc => home-manager->/home/user
<matthewcroughan_>
colemickens: wait, hmm, what is ../../mixins/common.nix in this concept?
<matthewcroughan_>
Is that all the programs you expect to have on any given machine?
<colemickens>
matthewcroughan_: some common nix settings that I expect on all machines. It sort of overlaps conceptually with profiles/core.nix. There are some specifics that I don't always keep straight. I have some machines I try to keep super minimal where home-manager isn't even deployed.
<matthewcroughan_>
settings, but not programs.
<matthewcroughan_>
Got it.
<{^_^}>
[nixpkgs] @FRidh merged pull request #101369 → kdeApplications: Use latest qt515 by default → https://git.io/JTgIS
<colemickens>
matthewcroughan_: To add extra nuance, though, my very base "profile" is profiles/user.nix and it skips h-m but does still make sure I have nvim/tmux/htop in systemPackages so I have my essentials even if I don't deploy an actual profile with any apps.
<matthewcroughan_>
So your pinebook only has sway and some other small things? o.O colemickens
<matthewcroughan_>
you really have almost nothing on it
<matthewcroughan_>
OH!!! So you do everything else with home-manager?
<{^_^}>
[nixpkgs] @FRidh pushed 22 commits to staging-next: https://git.io/JTQ9l
<matthewcroughan_>
So the lack of stuff I'm seeing is really just because you do everything else in home-manager?
<colemickens>
profiles/sway.nix includes profiles/gui.nix which contains common gui stuff, which is maybe what you're expecting?
<matthewcroughan_>
Well, where do you install vim?
alp has quit [Ping timeout: 264 seconds]
<colemickens>
matthewcroughan_: I mean, "in home-manager" mostly just means it's "home-manager.users.cole.X" instead of "services.X", that's it.
<colemickens>
matthewcroughan_: like, nothing about my directory structure has any relationship to whether something is installed/configured with nixos or home-manager
<colemickens>
it's in mixins/neovim.nix
<matthewcroughan_>
yes, I know that much
<matthewcroughan_>
I know at least that everything must be included somehow somewhere
<matthewcroughan_>
but it's obscured by your dir structure, certainly
<colemickens>
the profiles cascade include each other, sway is the top level one
<colemickens>
I mean, it is literally documented in the readme
<matthewcroughan_>
because dir structures are useful to imply things, like how cole-h has users/ and a default.nix in every folder as an entrypoint to define vars.
<colemickens>
not each one explicitly but..
<colemickens>
yeah, which is why my readme specifically says its not a multi-user layout ;)
<matthewcroughan_>
I like the look of this a lot more than cole-h's thus far, because it gets rid of that default.nix entrypoint which is a bit of boiler plate that could be done away with, I think.
<matthewcroughan_>
uh, in the users folder, which you've probably seen before.
m0rphism has joined #nixos
<matthewcroughan_>
top level nix files = users, folders = programs those users have access to
<matthewcroughan_>
in reality, like you've said before, it all ends up in a big output in nix, but the dir structure can help a lot mentally
vonfry has joined #nixos
<colemickens>
I think bqv's in similarish to mine, but more cleanly laid out with regards to keeping home-manager profiles nicely separate
eoli3n has joined #nixos
<matthewcroughan_>
colemickens: Earlier, I got rid of everything I ever installed with nix-env. I want now to see about putting this all into home-manager.
<colemickens>
but also, there are just some things that span nixos/home-manager configuration, so then you end up having ot make sure you simultaneously import both the nixos+h-m modules in your repo... or... you throw in the towel and stick them together.
<matthewcroughan_>
One example application I got rid of is tmate. How do I know whether this is worth doing?
<matthewcroughan_>
Why would I put it in home-manager if home-manager doesn't do anything special with it? How do I know if I even can?
<tsujp69>
dafook im using nix-prefetch-git but I am getting incorrect length for sha256 from fetchgit in my package definition?
<tsujp69>
how is that possible...
<colemickens>
matthewcroughan_: fwiw, there's basically zero functional difference in moving the pkgs from environment.sysPkgs to h-m. AFAIK. Other than a warm feeling. I did it too, just warning you.
<evax>
I'm packaging a proprietary binary that has bad release practices (the dowloadable file is updated in place for minor versions, so it breaks hashing). Is there a standard way to deal with this in nixpkgs, maybe caching the files properly?
<tsujp69>
I double checked the hash and it's the one nix-prefetch-git is spitting out
<matthewcroughan_>
And portability colemickens
<matthewcroughan_>
I'm in it primarily for that.
<colemickens>
matthewcroughan_: once you start playing, you'll find there are a number of things that can be done in both and you will just have to choose how you want to paint the shed.
<colemickens>
matthewcroughan_: mmm, that's a good point, I hadn't thought about that.
<matthewcroughan_>
Being able to go from my laptop, to someone else's laptop, to my phone with nix-on-droid, yes, that's delicious :P
<colemickens>
tsujp69: use --unpack
<matthewcroughan_>
To be able to share shells with my friends. So much better than docker.
<matthewcroughan_>
Docker is an absolute behemoth compared to this approach, although of course has some of the same benefits.
<matthewcroughan_>
Also needs a LOT more data LOL
<matthewcroughan_>
My God the amount of space needed for all this Nix stuff is ungodly.
sangoma has quit [Ping timeout: 260 seconds]
<matthewcroughan_>
And the bandwidth requirements, my friend in Florida would have no chance :D
<tsujp69>
unpack isn't a flag for nix-prefetch-git
<colemickens>
tsujp69: oops, sorry, thought you meant nix-prefetch-url, did't look close enough
<colemickens>
tsujp69: still, there might be a relevant flag that affects how it unpacks/processes the checkout?
<vonfry>
Could nixos module write systemd unit with "@"? For example, A service named "service_name@" with "User=%I". I try to read document and the source of systemd module, but I cannot find how.
<matthewcroughan_>
vonfry: I actually figured that out in Yocto a few days ago, rather than Nix haha
<tsujp69>
well this isn't that the hash doesnt match, it's saying its an incorrect length for a sha256 hash
rprije has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @FRidh pushed to master « kdeApplications.okteta: remove alias »: https://git.io/JTQHO
<colemickens>
can you pastebin the file/error?
FRidh has joined #nixos
yinfeng has joined #nixos
<matthewcroughan_>
colemickens: I'll look into this myself, but what exactly is the magic bit of home-manager?
<matthewcroughan_>
Wasn't there some thing about how home-manager has some magic extensions for certain software? Let's you configure it more?
<tsujp69>
hold up it was an error for cargoSha256 and not the fetchgit sha256... ugh. All good now colemickens
<colemickens>
uh home-manager just does what nixos does for /etc, it writes out symlinks for config files to nix store paths
civodul has joined #nixos
<colemickens>
it just does it for stuff in /home/user/ instead
<matthewcroughan_>
yes, and so does this interface with nixos too?
<matthewcroughan_>
so can a user have systemd services, and stuff?
<colemickens>
matthewcroughan_: some of the home-manager moduels configure user-systemd services, yeah
mananamenos has joined #nixos
<matthewcroughan_>
and I'm going to guess that would never work on other OS', yet at least
<colemickens>
that runs spotifyd as a systemd user service
<matthewcroughan_>
at least until this is a thing, your home-managed systemd user service is never going to work on anything other than nixos though right?
sangoma has joined #nixos
<colemickens>
matthewcroughan_: I think it works on non-nixos linux, but don't quote me
<matthewcroughan_>
omg, is that how you declare systemd services in any configuration.nix?
<matthewcroughan_>
some are configured purely in a .nix file, others are not.
<dansho_>
how do you use the latest packages on hackage?
<matthewcroughan_>
Those that are not, are not "supported" by home-manager, therefore you can't keep it all in the .nix because it won't know how to write the config?
<matthewcroughan_>
Why bother even having it support and write the config? Is there any special benefit to this?
<srhb>
dansho_: There's callHackageDirect, but you pay a cost of not having the shasums in-tree already as they are in haskellPackages (for whatever stackage lts it was based on)
<matthewcroughan_>
I would not mind putting every one of my configs inside of the same dir as my .nix, and using h-m to symlink like you say.
<colemickens>
matthewcroughan_: if you look at my meli pr I linked to..
<colemickens>
please...
whatisRT has joined #nixos
<colemickens>
it will become quite clear what's going on
<dansho_>
srhb, random-fu is marked as broken, if i allow broken it wants random 1.2, however there is haskellPackages.random_1_2 in nixpkgs, i can't figure out how to get it to see that
<matthewcroughan_>
cole
vonfry` has joined #nixos
<matthewcroughan_>
colemickens: a little.. I'm a bit wondering about the . though
vonfry` has quit [Remote host closed the connection]
<gnidorah>
FRidh: adjusted, thanks #100485
<matthewcroughan_>
How do I figure out what home.file does?
<srhb>
matthewcroughan_: It should be well-documented, it's the most-often-used low-level feature on top of which most of home-manager's modules are implemented, since it's the mechanism that is used to symlink files in place during activation.
<matthewcroughan_>
So, your L34 says, in English: "Symlink the output of pkgs.writeText "gdbinit" ''set auto-load safe-path /nix/store'' INTO the user's homedir"
<matthewcroughan_>
Is that right?
eoli3n has quit [Remote host closed the connection]
<tsujp69>
the nativeBuildInputs is only for `mkDerivation` right? It is not for `buildRustPackage`?
eoli3n has joined #nixos
<colemickens>
matthewcroughan_: no, everything nix builds goes in the store
<matthewcroughan_>
colemickens: Attribute set of files to link into the user home.
malook has joined #nixos
<matthewcroughan_>
I'm confused then. The home-manager docs certainly say that's what it does.
<colemickens>
if you look at the meli PR, you'll see that it allows the user to specify freeform Nix, it converts it to TOML and "builds" it to a file. The result of that build is... a nix store path, and then it's symlinked into the home dir later by a service.
<colemickens>
just try it
<srhb>
tsujp69: Both.
<colemickens>
the easiest way to learn this stuff is to just try it
<matthewcroughan_>
I don't know how to "just try it"
<matthewcroughan_>
You say that as if you don't need 100 lines prior to test this stuff out.
<colemickens>
You don't?
<colemickens>
There are plenty of blog posts and example repos and even a bare standalone home manager template
<matthewcroughan_>
I have no idea what interactive.nix is. I have no idea how to "run it".
<srhb>
dansho_: Is this a shell.nix under your control?
<colemickens>
I don't think its 100 lines. The manual is not that long. The options are fully indexed on a single html page.
<matthewcroughan_>
If I put that in my configuration.nix, I won't have ../../mixins
<matthewcroughan_>
If I put that in my configuration.nix, I won't know what to remove and what to keep.
<dansho_>
srhb, yes
malook has quit [Client Quit]
<tsujp69>
how can I solve an `ld` fail for `lpam`, I don't see a pam package srhb
<srhb>
dansho_: Long story short, for single packages you may want to use override to set a version specifically, like `foo.override { random = hpackages.random_1_2; }
<matthewcroughan_>
What you have asked me to do isn't possible or easy in the way you think it is, because you have the curse of knowledge, you know what to do and I do not :P
<colemickens>
then read the manual
medvid has quit [Quit: WeeChat 2.3]
<matthewcroughan_>
I just did.
<matthewcroughan_>
I gave you the definition from the manual.
mmohammadi9812 has joined #nixos
<matthewcroughan_>
>Attribute set of files to link into the user home.
<matthewcroughan_>
home.file does that. It "links into the users home".
<colemickens>
if you wuold just follow the first three steps of the home manager readme, activated an option and spent 50 seconds inspecting your sysmt you'd confirm what I've spelled out three times already in this conversation.
<matthewcroughan_>
You told me that this does not link to the users home, that it's in /nix/store, I do not understand.
<dansho_>
srhb, what would foo be usually?
<colemickens>
I've told you like half a dozen times over three weeks that everything nix builds goes into /nix/store, if you don't get that, I don't know how you're going to get nix to click.
<dansho_>
this shell.nix comes from cabal2nix --shell i think
<matthewcroughan_>
You didn't tell me to follow home-manager's readme. You told me to read the manual. colemickens :D
mniip has joined #nixos
medvid has joined #nixos
<colemickens>
K.
<srhb>
dansho_: A haskell package.
<matthewcroughan_>
Build outputs get put in /nix/store. What does that have to do with linking?
<matthewcroughan_>
what does the home-manager manual mean by "link into the user home." then?
<srhb>
dansho_: In this case it looks like it'll be random-source
<matthewcroughan_>
Stuff gets linked from /nix/store -> other parts of system, I thought?
<matthewcroughan_>
How does this not mean "Link the output of the thing on the right into the user's home.file"?
<tsujp69>
is there a way to match exact results on the nixpkg search website?
<tsujp69>
I typed pam and I get 600 results, I typed "pam" and I get 0 results, but the package `pam` does exist
<tsujp69>
it unfriendly on the website unless im missing something
<matthewcroughan_>
it won't be pam exactly, it'll be security.pam or something
<matthewcroughan_>
and it'll probably be an option, not a package
<srhb>
matthewcroughan_: It does mean that, at least indirectly.
<matthewcroughan_>
srhb: so why is colemickens mad at me? I read the manual, explicitly asked whether my statement was correct or incorrect in order to learn how wrong/right I am in my understanding.
<srhb>
matthewcroughan_: I don't want to venture a guess at that, nor do I think it's productive to ask another person in the channel like that without exacerbating whatever was going wrong :)
<dansho_>
nixpkgs is 20.09
<matthewcroughan_>
srhb: well it's always better to ask another person what you did wrong in a situation, since you can't always see it yourself.
<srhb>
matthewcroughan_: I don't disagree about that, just the talking-in-the-third-person in channel :)
<{^_^}>
[nixpkgs] @NinjaTrappeur pushed 2 commits to master: https://git.io/JTQd1
<__monty__>
jophish: Well it begins with a bash shebang, so I'll forgive the language detection.
<jophish>
heheh
<siraben>
Is there a way to patch environment variables?
<jophish>
__monty__: I discovered the shh package the other day, it makes writing shell scripts in Haskell pretty good!
<siraben>
In Nix for a build
<jophish>
siraben: in mkDerivation's argument just define an attr
<jophish>
like mkDerivation { FOO="bar"; ... }
<__monty__>
jophish: Might be great. My issue with it is nix-shell shebang was so much slower than stack shebang which was already kinda slow. So now I just package all my haskell tidbits with haskell.nix and install them like any other package.
tcunha has quit [Remote host closed the connection]
<jophish>
yeah, that's actually what I'm leaning towards this this change, to compile these ahead of time and put into cachix
<jophish>
at the moment to run these scripts in CI takes 300MB of download (3GB unpacked!)
<siraben>
jophish: Hm, looks like they're not even the usual env variables
<siraben>
it's what is returned by `qmake -query`
<siraben>
And they have to be set with `qmake -set`
<__monty__>
I don't experience any slowdown compared to non-nix cabal. But I also don't touch HIE or ghcide. Maybe you remember ending up having to compile GHC (twice) because you weren't hitting the cache?
<__monty__>
The most important improvement imo is UX. You have a cabal (or stack) project and it just works (most of the time).
<__monty__>
Very different from the nixpkgs infra.
tcunha has joined #nixos
<siraben>
Dammit I think I'll just have to set the qmake variables myself
<jophish>
cabal.project and all I guess
<__monty__>
Yes
<jophish>
nice
<jophish>
perhaps I should give it another go sometime
<jophish>
problem is I know how to use the regular infra
werner291 has joined #nixos
<tsujp69>
what is the canonical `pkgname-git` equivalent from the AUR for NixOS?
<tsujp69>
To do the overlay yourself? Surely there could be the same `pkgname-git` equivalent packages?
<tsujp69>
Or is that moot because overlays exist>?
<srhb>
tsujp69: There are some foo-unstable packages, but yes, mostly just your own overlay
<tsujp69>
(it could still be useful because now people don't have to define overlays themselves for dependencies?)
<__monty__>
If it's not rubbing you the wrong way and you're not much into tinkering with this stuff there's no hurry to switch. It's still moving quite fast so there's a cost in keeping up.
<srhb>
tsujp69: Maybe NUR has opinions on this.
<tsujp69>
is it just me or is the NUR list of packages extremely small?
Fare has quit [Ping timeout: 260 seconds]
<tsujp69>
wrt Arch linux often things get into community which are purely open source and "core" in some sense, and so `community` is very small and AUR is huge
<srhb>
tsujp69: Haven't thought about it much. But maybe the ease of adding to nixpkgs, and the ease of overlays has an effect.
<tsujp69>
For NixOS (and im new as of today) nixpkgs seems huge and the NUR seems tiny
<srhb>
Yes, that sounds right, and I think the cause is likely coupled to what I just mentioned.
werner291 has quit [Client Quit]
<tsujp69>
Seems like the main place to add pkgs is nixpkgs and not NUR, no? The NUR packages I saw were all these deviant-weird builds?
<srhb>
Right.
<srhb>
tsujp69: There's also something to be said for the integrity of the monorepo; one commit hash gives you a bunch of confidence of interoperability because everything from packages to tests are encompassed in just that one string
<{^_^}>
[nixpkgs] @FRidh opened pull request #102347 → kdeApplications: Use latest qt515 by default → https://git.io/JTQbk
<srhb>
tsujp69: When you split things out, you need more data for the same confidence. eg. I used this commit of nixpkgs, and this of nur.
<tsujp69>
true, and so having a decoupled overlay that references some hash would be against that
<tsujp69>
as is including every single possible overlay vs just doing it yourself
<srhb>
Right.
cfricke has joined #nixos
dansho_ has quit [Ping timeout: 264 seconds]
<srhb>
It's a balance and there's pros and cons. I lean in the "yay monorepo" camp.
<srhb>
Flakes might slightly alleviate the decoupling a little, I'll have to ask: "what's your lockfile" instead of: "what's your nixpkgs commit", and I'll have to check a lot of permutations instead, but the gain is some flexibility.
<tsujp69>
where can I read more about flakes?
<srhb>
Honestly there's no great single source right now. I'd advice to hold off, but otherwise: The wiki, the tweag blog posts.
<nschoe>
I just wanted to know if it was also okay for NixOS, or there was a better, declarative way in configuration.nix.
<nschoe>
I'm using i3 and xfce (as desktop manager only). I works all right, but I'd like to install icons and themes (namely https://github.com/robertovernina/NordArc). Now the "normal linux" way is to put icons and themes in either ~/.icons and ~/.themes or ~/.local/share/themes and ~/.local/share/icons.
<nschoe>
(I am not using home-manager)
<matthewcroughan_>
I have a feeling that home manager would be the way to handle that declaratively nschoe
<nschoe>
matthewcroughan_: yeah I figured as much. But I'm not yet ready to switch to home-manager. I will, but later.
<siraben>
Alternatively... I could just drop the entire Qt provided toolchain and see what happens if I go with Nixpkgs's...
<tsujp69>
How can I become a nixOS team member? I realise that is a broad question so for example I know as a package maintainer I just have to e maintaining a few packages and then I can apply what aobut other things
<tsujp69>
NixOS is something I feel I can sink my teeth into
<tsujp69>
feels end-game
<nschoe>
But I see that we have soem packages like xfce.xfce4-icon-theme and papirus-icon-theme so maybe I can look at their packages and see how they are "properly installed"?
<freezeboy>
hi, I' currently struggling with a python program which test wants to set the locale and apparently, it breaks, anyone had this experience ?
<freezeboy>
change the content of package.json file, run generate-dependencies, maybe some patches in default.nix and it is done
<pinpox>
freezeboy: Thanks, will read through that! shouldn't be too difficult
<pinpox>
btw, is stuff like this documented anywhere?
<pinpox>
The manual is sometimes a bit too broad for specific tasks, even though there might be everything needed in there in theory
zupo has quit [Ping timeout: 264 seconds]
<freezeboy>
last time I checked it wasn't in fact I took the pattern from spacegun package :D
alp has quit [Ping timeout: 268 seconds]
<pinpox>
I have written down a bit of nix-stuff in my personal blog, I just feel this could help much more people if it were at some official source of information.
<siraben>
Is it a good idea to pin nixpkgs in my NixOS/home-manager configuration?
<pinpox>
siraben: I personally find it too much work to update the pinned version on my personal notebook, that is why I don't. Not meant as a general recommendation though
<siraben>
But I could use niv to make it easy right?
<etu>
tsujp69: The package used in nativeBuildInputs in the package you want to change is probably getting that dependency as an input to the function
<etu>
tsujp69: Then you should be able to use attributeName.override to change some of the inputs
<tsujp69>
im confused by that etu
<Henson>
I'm having an issue having upgraded from NixOS 20.03 to 20.09. I've got an Intel video card and have had no problems with 20.03. Upon upgrading to 20.09 display-manager.service wouldn't start, with xorg having a "/dev/dri/card0: failed to set DRM interface version 1.4: Permission denied" error....
<etu>
tsujp69: The { ... }: at the top of a nix file shows you that it's a function declaration, and the params there are inputs to that function
<tsujp69>
To name names, I'm trying to build a wm that needs a version of zig from the master branch, I have my own `zig-head.nix` which works and compiles and installs, now I want my `wm.nix` to use my `zig-head.nix` as it's `nativeBuildInputs` for `zig`
<tsujp69>
I see
<Henson>
I gave up one night and started trying the next day with a minimal NixOS config and gradually enabled things. It eventually worked with the original config fully reproduced...
<Henson>
I booted back into 20.03 to try something and now 20.09 isn't working anymore. Does anybody have any suggestions?
<Henson>
after the 20.09 config worked I used it for a week and it was totally fine.
<etu>
tsujp69: If I wanted to build that with a very specific GTK version, I could do: (stupidterm.override { gtk = myGtk; })
<etu>
tsujp69: And that would work, because the gtk attribute is passed as an argument to that function
jabster28_ has quit [Ping timeout: 265 seconds]
<freezeboy>
any idea why, when splitting to mutliple outputs the $dev/lib/cmake/*.cmake files are not pointing to $dev but still $out ? (no custom rules to generate these files)
<tsujp69>
So etu `nativeBuildInputs = [ (stupidterm.override { gtk = myGtk; }) ];` for instance
<tsujp69>
and I can further do `gtk = (import ./my-gtk.nix)`?
<etu>
tsujp69: Nah, that override would happen in your configuration.nix where you install that package
<tsujp69>
So currently in nixpkgs there is zig 0.6.0 but recently zig had an issue with llvm or something I am not sure and the long story short is the creator of the language Andrew Kelly is very sorry and this will be fixed in Zig 0.7.0 but until then for all not-old Zig stuff we should be using the HEAD of the master branch of zig. So I have a
<tsujp69>
`zig-head.nix` package which builds zig from the head and installs it and that's done and dusted as of earlier today
<tsujp69>
Now I want to compile a tiling window manager that is written in zig, and this wm needs the master branch of zig to do so
Jackneill has quit [Ping timeout: 272 seconds]
<tsujp69>
But nixpkgs doesn't have that type of zig, it only has zig 0.6.0 (which is fine that's the latest release) but in this case I need to `nix-build` this wm with my `zig-head.nix` file
<tsujp69>
So that its compiled with the correct zig version
<etu>
tsujp69: I see
sangoma has joined #nixos
Neo-- has joined #nixos
<etu>
tsujp69: Then you probably want to use .overrideAttrs
<etu>
tsujp69: That would override the src attribute of zig, then you can specify where to fetch it from and get a different zig put into that nativeBuildInputs
<tsujp69>
I cannot only do that since I also need to set doCheck to false in that case, there is some other weird issue with XDG_CONFIG_HOME with nix (its an open issue on zig's github)
<tsujp69>
The total diff is `doCheck = false` and then of course just a different `rev` within `fetchFromGitHub`
<Henson>
I figured it out. I had to explicitly specify the driver to use services.xserver.videoDrivers = [ "intel" ]; Now 20.09 works but 20.03 doesn't, haha. Probably just a driver autodetection and conflict issue between the two versions.
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
<{^_^}>
[nixpkgs] @erikarvstedt opened pull request #102354 → extra-container: init at 0.5 → https://git.io/JT7Zi
<yurb>
hm, I can't find a way to set the io scheduler via configuration.nix (i.e. set `/sys/block/sda/queue/scheduler`)
<freezeboy>
do you know how to list all the buildtime dependencies of a nix expression ?
cosimone has joined #nixos
<freezeboy>
in my ci, I would like to isolate the build of the deps from the build of my project
zupo_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<freezeboy>
supersandro2000 hum this command also give me the main output, and it looks like it runs nix path-info
<pta2002>
yeah that latter one worked
<pta2002>
LnL-: would prefixing mean nix-env -iA nixpkgs.htop?
<pta2002>
because i tried that and it did not work
<LnL->
depends on the platform, on nixos the channel is named nixos
<LnL->
my example works everywhere
<supersandro2000>
pta2002: I know a Pi4 with NixOS. In sort: never use unstable channel.
<pta2002>
LnL-: so if i didn't want to do -f, i'd do nix-env -iA nixos.htop?
<pta2002>
sorry im new to this
sangoma has joined #nixos
<pta2002>
supersandro2000: yea im on stable
<supersandro2000>
the one I know freezes everytime anything unstable is done with it
<LnL->
yeah that's equivalent (assuming it's on nixos)
<pta2002>
saw some warnings about not even stable being perfect on the pi, so i decided to not risk the unstable
<pta2002>
i moved hte pi to a better power supply and now it seems to be chugging along a lot better
<pta2002>
though ram is full and an sd card makes for terrible swap
<pta2002>
need to get myself one of those 8GB pi 4s
pushqrdx has joined #nixos
<pushqrdx>
can someone help me understand where i can install a patched binary firmware that i normally install under /usr/lib/firmware, it's supposed to patch some alsa-firmware binaries for glitchy audio on ca0132 chip
<pushqrdx>
i'd really appreciate any help
<pushqrdx>
what i tried already is creating a derivation for it and placing it beside configuration.nix, then specifying hardware.firmware in my config
Neo-- has quit [Ping timeout: 260 seconds]
alp has joined #nixos
<pushqrdx>
it appears to have copied the binaries under /nix/var/nix/<current gen>/lib/firmware however the audio is still glitchy as if it's not applied
<aasg>
supersandro2000 (IRC): another update, this time I marked the ones I didn't yet get to as broken so nixpkgs-review doesn't try to build them
<NieDzejkob>
pushqrdx: is the original firmware normally present in /nix/var/nix/<current gen>/lib/firmware?
<pushqrdx>
yes
<aasg>
The MAMEs should work as well since I copied the dependencies from our MAME derivation
<pushqrdx>
it's part of alsa-firmware
<pushqrdx>
NieDzejkob: but after doing the derivation i noticed that the 2 binaries are now linked to my patch, however they aren't loaded because i still have broken audio
<pushqrdx>
for some reason
<NieDzejkob>
hmm. Maybe alsa-firmware is getting pulled in somewhere else too?
<pushqrdx>
can i uninstall alsa-firmware
cr4y1_ has joined #nixos
<pushqrdx>
just to give it a try though i am sure it's not the way
<NieDzejkob>
not really, that's not how nix works
<NieDzejkob>
I'd want to figure out whether the original alsa-firmware is in the closure of your current generation
<pushqrdx>
what should i do then, been trying to fix that audio thing for almost half a day now so frustrating
orivej has joined #nixos
<pushqrdx>
i just want audio, then i'll feel good to optimize the nix config,
<NieDzejkob>
I mean, the overlay is what has a chance of making it work in the first place
<NieDzejkob>
it will replace the original alsa-firmware and anything that wants to use it, even outside of the /lib/firmware symlink, will use your modified version
cr4y1 has quit [Ping timeout: 260 seconds]
<pushqrdx>
but will it selectively just replace those 2 files?
<pushqrdx>
and leave the rest as is
<NieDzejkob>
if you write your derivation like that, then yes
<pushqrdx>
because in normal installations that is what i normally do, just drop the 2 bins in usr/lib/firmware
pushqrdx has quit [Quit: pushqrdx]
werner291 has joined #nixos
<{^_^}>
[nixpkgs] @mweinelt opened pull request #102359 → openldap: add patch to fix nullptr dereference in slapd → https://git.io/JT74y
troydm has quit [Quit: What is Hope? That all of your wishes and all of your dreams come true? To turn back time because things were not supposed to happen like that (C) Rau Le Creuset]
troydm has joined #nixos
<fendor>
can I generate a dockerfile for a nix expression?
g-w1 has left #nixos ["WeeChat 2.3"]
<simpson>
fendor: Trivially, you can use `FROM nixos/nix`, and then COPY arbitrary Nix expressions into the container and RUN nix-env or nix-build.
<simpson>
But perhaps you had something more intricate in mind?
werner291 has quit [Remote host closed the connection]
<fendor>
Not sure what I had in mind is really sensible, I have a project that can be built with nix, a friend wants to deploy via docker and I want would like that the container only includes the required run-time dependencies and no build dependenices
<{^_^}>
[nixpkgs] @ehmry pushed commit from @r-ryantm to master « ocamlPackages.bitstring: 3.0.0 -> 3.1.1 »: https://git.io/JT7EL
<supersandro2000>
I get a few "error: unexpected end-of-file" lately while doing nix-build with a remote worker. Anyone any idea? I only found really old issues
<{^_^}>
[nixpkgs] @veprbl pushed commit from @gnidorah to master « mame: 0.225 -> 0.226 (#102329) »: https://git.io/JT7uS
<aasg>
Question: the Nixpkgs manual says "[super] should be used either to refer to packages you wish to override, or to access functions defined in Nixpkgs", and calls out callPackage specifically
<aasg>
but grahamc's talk uses self.fetchzip, and I see others use self.callPackage as well
<tsujp69>
Ah yeah so when I tried this before I got `called without required argument 'owner'` so overrideAttrs isn't passing through the rest of the attributes, no?
<aasg>
so does it matter if I use super.callPackage or self.callPackage? I guess the latter will use dependencies overriden in later overlays, but maybe it does that regardless?
<tsujp69>
It's stripping them and only setting what is explicitly there etu (and see above message forgot to tag)
<gchristensen>
aasg: my rule of thumb is use self until you hit an error, then change that one use of self to super.
<gchristensen>
until you hit a recursion error*
<etu>
tsujp69: ah, no, you have to provide all the attrs to fetchFromGitHub
<tsujp69>
Ooooooh
Neo-- has joined #nixos
Enderger has joined #nixos
<tsujp69>
I assumed it was a "will pass through everything that existed and replace anything that did exist with what you set now" whereas it's more of a clean-slate
<tsujp69>
etu ^
<etu>
yeah, it does, but not recursively :)
<tsujp69>
Ah, always good to limit recursion hehe
<tsujp69>
Something something infinite something
<etu>
Because it's actually not that simple. fetchFromGitHub is a function and the {} is an attribute set sent as an argument to that function
<etu>
So what src contains isn't that attribute set, it's the result of that function
<tsujp69>
I see
FRidh has quit [Remote host closed the connection]
<Enderger>
Hi, I am trying to configure full system backups for my NixOS machine over WebDav, however to do so I need to store credentials in /etc/davfs2/secrets. Is there any way to do this using the configuration.nix file?
davidv7 has joined #nixos
Acou_Bass has quit [Ping timeout: 240 seconds]
FRidh has joined #nixos
<gchristensen>
Enderger: yes but it isn't a good idea, because the secret credentials will be publicly readable if you do it via Nix
alp has quit [Ping timeout: 260 seconds]
growpotkin has joined #nixos
<Enderger>
Ok, thanks. Is there any way to store them securely, as I intend to have the script run via a cron job and cannot interactively type in the credentials myself.
sangoma has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @FRidh pushed commit from @r-ryantm to master « python37Packages.css-parser: 1.0.5 -> 1.0.6 »: https://git.io/JT7gP
<simpson>
Is there a documented approach to having Nix run benchmarks? I am okay with the precondition that I am responsible for quieting the machine beforehand, and that multiple benchmarks running at once may interfere with each other.
<{^_^}>
[nixpkgs] @teto opened pull request #102367 → neovim: dont wrap when configure is null → https://git.io/JT72p
pushqrdx has joined #nixos
cransom has joined #nixos
domogled has joined #nixos
<pushqrdx>
i have a couple of questions as i am kinda lost on what is doing what in nixos
<pushqrdx>
so if i have nixos why would i need home-manager?
<hyper_ch>
push: nixos handles services and insttalled programs
<hyper_ch>
home-manager handles (some) of your dot files
<hyper_ch>
like settings for certain programs and stuff
<pushqrdx>
but it handles installed programs too
<pushqrdx>
for user
<pushqrdx>
afaik home manager replicates what nixos does on a user level, which is nice for other distros but is this needed if am already running nixos
<hyper_ch>
you can install programs globally or as user
<woffs>
home-manager is for crazy nix freaks who want to define even the contents of their dotfiles in nix language
<hyper_ch>
for some things like .tmux.conf or .bashrc it's nice
<pushqrdx>
alright so it's just that it replicates the same thing that nixos does at OS level, but only for my home directory
<pushqrdx>
having generations etc
<pushqrdx>
but afaik nixos can do what home manager does already right? like i can specify user specific packages perhaps even stuff in home dir?
<srhb>
pushqrdx: The big difference is that NixOS does not know how to link things into your homedir at activation time
<srhb>
pushqrdx: Which is exactly the fundamental building block that home-manager _does_ know how to do.
<pushqrdx>
but regarding user specific programs nixos does have that functionality right?
<srhb>
pushqrdx: Yes.
<Ke>
hmm, your activation script can run arbitrary code?
<pushqrdx>
ok things are getting a bit more clear to me
<srhb>
pushqrdx: It does so by manipulating /etc/
<gchristensen>
Ke: packages don't have activation scripts
mmohammadi9812 has joined #nixos
<pushqrdx>
can someone give me a quick nix stack tourist overview, like there's 22 nix- tools available, i just want to know (nix vs nix-shell vs nix-store vs nix-env)
da_dada has quit [Ping timeout: 272 seconds]
<srhb>
pushqrdx: Your best bet is the manual really. But in short, nix-build for building, nix-shell for shells, nix-store for manipulating the store (the names are pretty accurate)
<srhb>
pushqrdx: nix-env is more tricky, it's for manipulating profiles ("env", I guess)
da_dada has joined #nixos
<pushqrdx>
what about just nix
<srhb>
It's an experimental interface.
<srhb>
I recommend not using it except maybe for `nix search` -- searching packages.
<woffs>
and nix show-derivation
<pushqrdx>
so the main reason i discovered nix was trying to get a handle on my all over the place and sometimes clashing dependencies, my ultimate goal is to have a per directory mini environments where i can throw all kinds of garbage there without polluting my system
<pushqrdx>
so my OS is kept clean, and each project is self contained
<gchristensen>
yeah, nix-shell is great for that
orbekk has quit [Ping timeout: 264 seconds]
<pushqrdx>
so nix-shell is the thing responsible for giving me a directory specific shell where i can do what i described?
<gchristensen>
ye
<pushqrdx>
nix-env is my user environment (a more general scope)
<pushqrdx>
where things specified by nix-env will be available inside nix-shells?
<gchristensen>
it may be surprising that most nixos users don't know how to use nix-env, because they don't use nix-env for anything
<MichaelRaskin>
nix-env is cool for some advanced things, and -i / -iA is just doing things slightly wrong anyway
<pushqrdx>
what about quickly installing a user dependency without rebuilding a generation, i think nix-env does that
<MichaelRaskin>
Why do you want to install it? Maybe you just want to _use_ it?
<MichaelRaskin>
Then nix-shell
<woffs>
nix-env -i / -iA leads to chaos
<woffs>
nix-env -qaPA is fine
<MichaelRaskin>
Even on its own terms it leads to chaos
<pushqrdx>
so to say that if i want cmake for instance, i either really want it globaly at which case i might just edit my configuration.nix to include that
<gchristensen>
again you'd probably want to use nix-shell for that
<pushqrdx>
or i just want it inside a specific project so i just use nix-shell for it?
<srhb>
Right.
<MichaelRaskin>
-i is Really Slow, -iA uses names for installation that you cannot use with -e for removal (sometimes)
<pushqrdx>
so nix-env is essentially polluting everything just as if i did apt-install on a regular distro
<srhb>
pushqrdx: To use your project you need all its dependencies anyway. If it needs cmake, the shell should have cmake.
Acou_Bass has quit [Ping timeout: 272 seconds]
<srhb>
pushqrdx: In the extreme, yes.
<gchristensen>
my installed packages are: vim, git, file, gpg, and ripgrep
<woffs>
pushqrdx: but you are right, things you need globally go into configuration.nix (on nixos) to get managed declaratively
<srhb>
pushqrdx: (It's usually easier to clear up than on a regular distr though)
nixy has joined #nixos
<MichaelRaskin>
I have a ton of kind of installed packages, via multiple buildEnv's via nix-build because nix-env is just not good enough to manage all that
<srhb>
pushqrdx: And on the other extreme, the parts of it that deal with profile generations are quite essential, though mostly hidden from you anyway.
<pushqrdx>
oh, i though nix-env -e deals with cleanly uninstalling a thing
<srhb>
pushqrdx: That's also right.
<MichaelRaskin>
Well, you need to give it a different name than to -iA
<srhb>
pushqrdx: It's just.. Rather unnecessary most of the time :)
<MichaelRaskin>
By the standards of people who stick with Nix that's already not quite clean
<srhb>
pushqrdx: You lose declarative handling of things, and you don't get the ephemeral environments that the shell provides. It's an odd middle ground that's often really not that useful.
<pushqrdx>
so just to make sure i got the idea, if i really want something persistent like ripgrep or neovim but for all users => systemPackage. If i want it for a specific user => user packages. but if it's a per project tool perhaps cmake for the lack of better example then it's probably nix-shell is what i need
<srhb>
pushqrdx: Sounds exactly right.
<pushqrdx>
and if i use cmake in multiple projects nix-shell will reuse the cmake it downloaded previously?
<srhb>
pushqrdx: And I would add: home-manager is not something to be avoided.
endformationage has quit [Ping timeout: 240 seconds]
<srhb>
pushqrdx: If it's the same version of nixpkgs and therefore cmake, yes
<pushqrdx>
so home manager really completes the circle here, the missing part that nix-env kinda covers
<srhb>
pushqrdx: Which you can ensure is the case by pinning the version of nixpkgs each shell uses.
<srhb>
pushqrdx: Right
sangoma has quit [Ping timeout: 272 seconds]
<pushqrdx>
sweet! i really like the control nixos gives never felt in control of dependencies like that before
<srhb>
pushqrdx: Yes, it's a game changer. :)
<pushqrdx>
my macOS is literally at a point where i just need to format and do a clean install because i just can't fix it
Jae[m] has left #nixos ["User left"]
<srhb>
Yeah, I remember that feeling.
<pushqrdx>
it's all over the place with dependencies and homebrew can't manage it anymore
<srhb>
Nix is a high up-front payment, but it really is up-front and just keeps paying off, in my experience.
<pushqrdx>
yeah i feel the learning curve is kinda steep, like i need to understand the nix language yet
<pushqrdx>
but at least now i have a mental model of the os
<pushqrdx>
thanks for the detailed explanations i really appreciate it
<pushqrdx>
so *in* doesn't put the let inside the object on the rhs like i though it would hh?
Fare has quit [Ping timeout: 260 seconds]
<{^_^}>
[nixpkgs] @mweinelt opened pull request #102370 → [staging-20.09] openldap: add patch to fix unauthenticated nullptr dereference in slapd → https://git.io/JT7wM
<srhb>
Don't quite think I follow. It brings the bindings in scope in the expression following "in"
<pushqrdx>
yeah that is what i meant, ok makes sense
nixy37179 has joined #nixos
<pushqrdx>
one thing that is still confusing to me is that some people are talking about direnv
<pushqrdx>
why would i need direnv instead of nix-shell
<aasg>
supersandro2000 (IRC): is that the whole log for mame2016? I can't find the error there
b has joined #nixos
<MichaelRaskin>
I think direnv is to invoke nix-shell in relevant directories, no?
<MichaelRaskin>
There is also lorri
<dutchie>
you can use direnv to automatically enter a nix-shell in that directory
<dutchie>
or you can just run nix-shell each time
<dutchie>
lorri+direnv is great ime
rajivr has quit [Quit: Connection closed for inactivity]
<pushqrdx>
yeah i was just going to ask what the heck is lorri, too many little tools that seem important but i am missing the point of each
<pushqrdx>
also flakes
<srhb>
pushqrdx: One annoyance to some people is that nix-shell basically forces you into bash. With direnv you can "import" the shell environment into your current shell in a much nicer way
mallox has joined #nixos
<srhb>
pushqrdx: It's really just a lot of complimentary tools
<{^_^}>
[nixpkgs] @teto merged pull request #102367 → neovim: dont wrap when configure is null → https://git.io/JT72p
<{^_^}>
[nixpkgs] @teto pushed to master « neovim: dont wrap when is null »: https://git.io/JT7wh
<srhb>
pushqrdx: flakes are also highly experimental.
<srhb>
pushqrdx: I would not worry about them.
sangoma has joined #nixos
<MichaelRaskin>
I kind of worry that their rollout will break too many actually working things
<srhb>
pushqrdx: And frankly with just nix-shell for dev environment, you'll be busy for quite a while without grabbing any extra nice-to-haves :-)
<srhb>
pushqrdx: Besides it'll be clearer why you want them when you want them.
<MichaelRaskin>
That's the only modality of worrying about flakes that makes sense without following development closely
Chiliparrot has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<pushqrdx>
srhb nice
<MichaelRaskin>
Also, by then it will be clearer _what_ are the flakes you might want
<srhb>
pushqrdx: Sorry, I didn't mean for that to come off as sounding hostile. What I meant to say was: nix-shell in itself is already _very_ powerful
<pushqrdx>
srhb no problem i didn't interpret it as hostile at all, really glad for your help and other people helping too
<srhb>
Ok, good :)
<{^_^}>
[nixpkgs] @mweinelt opened pull request #102371 → [staging-20.03] openldap: add patch to fix unauthenticated nullptr dereference in slapd → https://git.io/JT7rB
<pushqrdx>
the problem with nix is that searching online often leads on a very strange tangents
<srhb>
Yes, that really is an issue.
<srhb>
Someone™ should make a `Nix: The basics`
<MichaelRaskin>
Weren't nix-pills a shot at that?
<pushqrdx>
like i came across direnv, lori etc and i thought to myself wth that's a lot of mental overhead also lots of choices which as you many people might feel is overwhelming
<srhb>
MichaelRaskin: A lot of it is very nixpkgs implementation specific
<srhb>
Good knowledge, but centered around mkDerivation and callPackage.
<srhb>
pushqrdx: Yeah... I think it's hard to avoid. But coming here is a good choice. :)
<MichaelRaskin>
Well, if you want the basics of pure Nix, that's how you end up reading The Thesis
<srhb>
What I was looking for was more like.. in 2020, what is the minimal setup (but including what I see as killer features, like home-manager) where you can really reap the benefits without a thousand addons.
<srhb>
Maybe home-manager is already too opinionated there
<srhb>
But I just think it's so convincing :)
<sphalerite>
I think it's also a case of nix being too flexible for there to be one killer usecase for everybody.
<srhb>
True.
<MichaelRaskin>
Meh. NixOS, home-manager. Who needs all that, we have buildEnv!
Fare has joined #nixos
<srhb>
But I'm also sort of alluding to the payoff increasing the more you make the buy-in. But maybe that _is_ a wrong approach.
<srhb>
In a dev shop, nix-shell in itself is often _the_ killer feature.
<MichaelRaskin>
Well, you can buy in in different directions
<srhb>
Sure.
hnOsmium0001 has joined #nixos
<MichaelRaskin>
I somehow ended up having my own scripts slightly pre-dating nix-shell and never migrating
<sphalerite>
something something myEnvFun
<pushqrdx>
what nix really needs is a canonical "nix post installation guide" where it briefly tells you what we just discussed, like things you will frequently use nix-shell, configuration.nix, etc, (foot note check out home manager as it eases blablabla)
hjarvard has quit [Ping timeout: 268 seconds]
<srhb>
pushqrdx: This is where I go "indeed" <wink wink nudge nudge> :-)
justanotheruser has joined #nixos
<pushqrdx>
aand i feel bad for not getting the joke :))
<srhb>
Heh, I was implying "you should totally write this!"
domogled1 has joined #nixos
<MichaelRaskin>
There is also a running joke that people who are past the learning curve have … interesting views on what is the hard part
<pushqrdx>
hhh, yes i am already adding all this to a note about nix, perhaps i will make it available after i get the hang of things
<MichaelRaskin>
Especially when not having immediate feedback
<srhb>
pushqrdx++
<{^_^}>
pushqrdx's karma got increased to 1
<srhb>
And yes, I also have a feeling I'm too far gone. :-P
domogled has quit [Ping timeout: 264 seconds]
<MichaelRaskin>
Basically you selecting the quotes that were most helpful to you from the log — that's something you can do now and review/discuss later. Afterwards the state of mind will be lost
bennofs1 has quit [Ping timeout: 240 seconds]
<MichaelRaskin>
pushqrdx++
<{^_^}>
pushqrdx's karma got increased to 2
<pushqrdx>
i really believe in assessing the difficulty of software by getting someone completely new to try it
<srhb>
For sure!
<srhb>
fwiw I think most seasoned nixers can appreciate that nix _is_ hard to get into. Just not _why_ that is :P
<pushqrdx>
in my case the installation itself was a breeze, post installation though, pretty rough
da_dada has quit [Ping timeout: 256 seconds]
* srhb
nods
domogled has joined #nixos
<MichaelRaskin>
I got into it early enough that back the number of layers was tolerable
sangoma has quit [Read error: Connection reset by peer]
<srhb>
True. But I think what I wanted back then was "make a build for my custom project" and it was hard.
<srhb>
Or, knowing what to even begin investigating was hard.
<srhb>
(The answer is: steal steal steal)
<MichaelRaskin>
Well, if it is well-packaged in general…
Chiliparrot has joined #nixos
<MichaelRaskin>
On the other hands, builds are a mess globally, and Nix kind of highlights this by putting everything about builds into a single construction
zupo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<{^_^}>
[nixpkgs] @alyssais pushed commit from @mweinelt to master « youtube-dl: 2020-09-20 -> 2020.11.01.1 »: https://git.io/JT76a
<hyperfekt>
i think a big problem with letting people get into writing their own nix expressions is the inversion of control
<hyperfekt>
apart from the obvious reasons like tons of magic
<simpson>
I think that the main barrier to taming that sort of wilderness-feeling is going to only come when the toolchains and modules that we're packaging become themselves more structured.
<jbal[m]>
`ungoogled-chromium` seems to break often on hydra (and consequently often when I update, it turns my laptop into a toaster trying to build it), is there an easy way of just getting the latest working version of a package?
<jbal[m]>
That's a doozy. I'm guessing the only way to do that declaratively, would be a cron job that pushes to a git repo?
<MichaelRaskin>
Well, it depends whether you want to have a revision of Nixpkgs where things are available in the cache, or just include the paths from the cache in an environment built from a different revision
<MichaelRaskin>
But sure, you need that scraping, scraping by cron and saving the results sounds reasonable
emacsomancer has joined #nixos
<pushqrdx>
so currently in my configuration.nix i have `environment.shells = [ pkgs.zsh ]` however i noticed that it still using bash
shabius has joined #nixos
cosimone has joined #nixos
<MichaelRaskin>
This setting actually controls what shells the users can choose via chsh
Rusty1 has quit [Quit: Konversation terminated!]
ManiacOfMadness has joined #nixos
<pushqrdx>
huh, but if i cat /etc/shells sh, bash, zsh
<typetetris>
Hi there I try to try flakes on my nixos machine. But `nixos-rebuild switch` complains about git and `nixos-rebuild switch --flake /etc/nixos#my-machine-name` complains abourt `--experimental-features` being an unknown flag.
<{^_^}>
[nixpkgs] @jonringer pushed to master « glslviewer: 2019-04-22 -> 1.6.8, use python3 »: https://git.io/JT7PV
<cole-h>
typetetris: You need `nixUnstable` on your PATH, probably, as well as to have your `nix.package` set to `nixUnstable`/
<jbal[m]>
you also need to make sure you're using nixUnstable if you want to use flakes
<typetetris>
jbal[m]: have git in path, I am not using fetchfromgit in my configuration (but I don't know, wether some of the stuff from nixpkgs I use, uses it). Have `nix.package = pkgs.nixUnstable` and `nix.extraOptions` contains ` experimental-features = nix-command flakes `.
<{^_^}>
[nixpkgs] @jonringer merged pull request #102247 → uutils-coreutils: Use Python3 sphinx for docs → https://git.io/JTHEr
<{^_^}>
[nixpkgs] @jonringer pushed commit from @prusnak to master « uutils-coreutils: Use Python3 sphinx for docs »: https://git.io/JT7PD
<typetetris>
Yes, it is. If I remove `nix.package = pkgs.nixUnstable` and `experimental-features = nix-command flakes` it works just as it worked before trying flakes. (So normal nix).
<jbal[m]>
So there is a .git in /etc/nixos?
<typetetris>
yes, there is.
<boogiewoogie[m]>
hey! I'm trying to package this derivation https://hastebin.com/idukereyuv.nix. it builds fine manually in the nix-shell, however when trying to `nix-build` it, it seems to fail due to not finding java. is there anything I may need to do extra for java-dependent packages?
<typetetris>
But If I put `flake.nix` in `/etc/nixos` it complains `error: 'flake' is not a recognised command`, so I try without flake.nix first and then there is the error about git.
medvid has quit [Ping timeout: 260 seconds]
pushqrdx has quit [Remote host closed the connection]
<jbal[m]>
I'm still new to nix and flakes myself, so I don't know if I'm 100% on the right track though. I'm using my laptop to test nixos out and get everything how I want it, and when I deploy it to my desktop I'm going to try writing a full installation guide
<typetetris>
jbal[m]: Ok. Have a working configuration in /etc/nixos. It is a git depot, but there is no `flake.nix`. `nixos-rebuild switch` worked.
jd has joined #nixos
nixer|28 has joined #nixos
<jbal[m]>
Alright, now try putting flake.nix back, `git add` it (when using flakes, nix only cares about things it sees in git) and try a rebuild with --flake again
<typetetris>
But I haven't set `nix.package = pkgs.nixUnstable` yet ?
<typetetris>
Okay, so I put the `nix.package = pkgs.nixUnstable` and the `experimental-features = nix-command flakes` in my /etc/nixos/configuration.nix, but no flake.nix yet. `nixos-rebuild switch` fails with the errors about git ...
<typetetris>
The `fatal: couldn't find remote ref refs/heads/HEAD` despite /etc/nixos being a git repo.
<{^_^}>
[nixpkgs] @peti opened pull request #102383 → Update Haskell package set to LTS 16.21 (plus other fixes) → https://git.io/JT719
<cole-h>
typetetris: Please paste the full error. (with and without --show-trace)
<cole-h>
There's a high likelihood that it's not your config repo that is having issues, but something else you're referring to
<srid>
I set up my VPS with nixos, and had forgot to manually set a password for the non-root user. Am I locked out of it from doing root things? `sudo` requires password. Is there a way to patch things up without starting from scratch?
<srid>
(non-root user was created declaratively; the root of evil here)
<srid>
(and I disabled root login in ssh declaratively as well)
<srid>
(root user has my ssh key authorized, fwiw)
<jbal[m]>
Does your VPS have console access?
<srid>
'tis a shame even `ssh root@localhost` is refused
<jbal[m]>
I don't know if it will work, but it's worth a try
<gchristensen>
using the console you might be able to just roll back a generation at the bootloader
<cole-h>
In the future, you might want to keep root login enabled, but just disable password authentication. That way you can still SSH into it with your key :P
<srid>
Trying... i wonder how that works non-DigitialOcean distros ...
<srid>
* Trying... i wonder how that works on non-DigitialOcean distros ...
<jbal[m]>
Or that.
<neothefox>
Let's say I made a package that builds a library, and I want to add a bit to /etc/profile.d that injects it with LD_LIBRARY_PRELOAD, adding a file to $out/etc/profile.d doesn't seem to do the trick, so is there another way?
<jbal[m]>
Any VPS without console access is not worth using
<neothefox>
I like the name, nixos-infect is a great name
<gchristensen>
jbal[m]: so not the biggest cloud providers on the planet? :P
<MichaelRaskin>
Do you even need any extra reasons why each of them three is bad?
<srid>
password reset email arrived, but new password doesn't work. fuck it, doing fresh install
<MichaelRaskin>
I assume passwd from under user does expect something as an opld password?
<jbal[m]>
I'd try generation rollback from console first, but shrug
<pushqrdx>
moving what link, the closer thing i got is manually modifying /boot/loader/entries however once i build a newer gen it seems to remember the number anyways
otulp has joined #nixos
<boogiewoogie[m]>
can i somehow reference input derivations' out paths in an expression?
<MichaelRaskin>
There is /nix/var/nix/profiles/system-…-link
<MichaelRaskin>
boogiewoogie[m]: yes, "ls ${input-package}" should work, for example
<MichaelRaskin>
(evaluation-time evaluation of things inside ${})
<pushqrdx>
i have two links now one that is just called system and another that is called system-7-link, now i have two questions, what is that system one, second is it safe to rename the system-7 link and rename the boot loader configs to go back to 0
<MichaelRaskin>
I have at some point removed all the numbered links, and run a nixos-rebuild switch
<MichaelRaskin>
But note, it has been _long_ time since I have last used actual NixOS
<pushqrdx>
oh, the system link just points to the system-<number>-link which is the head, now before i bork my install what i will do is rename the 7-link to 1-link then run `/nix/var/nix/profiles/system-7-link/bin/switch-to-configuration boot`
<bqv>
AIUI only the bootscripts actually care about them
<bqv>
MichaelRaskin: your system fascinates me
<pushqrdx>
MichaelRaskin what system are you using if not NixOS?
<bqv>
I'm building something vaguely similar, but based closer on nixos
<MichaelRaskin>
bqv: maybe once rfcs#78 gets somewhere it will become even easier
<freezeboy>
I am trying to combine nix-build-uncached and <nixpkgs/maintainers/script/build.nix>, but it is not build, just showing the dry-run output, any idea ?
<bqv>
MichaelRaskin: I hadn't seen that, awesome
<MichaelRaskin>
pushqrdx: Nixpkgs for packages, hand-written bootscripts with paths inserted by Nix, Common Lisp daemon for most of the system management stuff
<MichaelRaskin>
Composed by overlay-style makeExtensible
<MichaelRaskin>
NixOS instances evaluated in the process just to steal soem configs from there. That part will probably go away with RFCs#78 replacing it
<bqv>
MichaelRaskin: I'm endeavouring to not rewrite everything, just basically have a compatibility layer to translate systemd-init and services to s6-init and services
<bqv>
So I can reuse the entirety of nixpkgs
<bqv>
But also not have systemd
ilmu has quit [Ping timeout: 268 seconds]
<{^_^}>
[nixpkgs] @symphorien opened pull request #102387 → nixos: mutually exclusive services; application to acme → https://git.io/JT7Dy
<MichaelRaskin>
Thne 78 doesn't really help, as NixOS wants to use upstream unit files as is
Enderger has quit [Ping timeout: 245 seconds]
<bqv>
MichaelRaskin: I was looking at this:
<bqv>
Define generic service abstraction for non-`systemd` systems, possibly with aconvertor from `systemd` units.
mmohammadi9812 has quit [Read error: Connection reset by peer]
boogie_ has quit [Quit: Leaving]
mmohammadi9812 has joined #nixos
<MichaelRaskin>
That's future work in no way detailed by this RFC
<MichaelRaskin>
IT is not unresolved question
<bqv>
Implement a complete service abstraction not tied to global system-wide
<bqv>
Ah
<bqv>
Guess I skimmed too fast
<MichaelRaskin>
This is in no way stipulated by the current RFC
<MichaelRaskin>
Just made simpler with the reusable part cleanly abstraxted
magnetophon has quit [Ping timeout: 260 seconds]
<bqv>
Yeah
<bqv>
Well, there's always nix-processmgmt, wherever that goes...
<bqv>
gchristensen: I take it that's a no, by the way?
<{^_^}>
[nixpkgs] @jonringer pushed commit from @prusnak to master « python3Packages.ovito: 3.0.0 -> 3.3.1 »: https://git.io/JT7yT
sangoma has quit [Read error: Connection reset by peer]
sangoma has joined #nixos
<bqv>
Ok
ilmu has joined #nixos
<cole-h>
Graham is very busy at the moment (and has been since having a baby...), so probably not the best person to be pinging for things that aren't mission critical :)
<{^_^}>
[nixpkgs] @jonringer opened pull request #102389 → pipreqs: use python3 → https://git.io/JT7Ss
brettgilio has joined #nixos
<gchristensen>
bqv: sorry, that isn't really my wheelhouse
eahlberg has quit [Remote host closed the connection]
zupo has joined #nixos
<bqv>
fair enough
zupo has quit [Client Quit]
pr06lefs has joined #nixos
zupo has joined #nixos
<pr06lefs>
is there a command for removing just one package from the nix store? I'm testing and I'd like to force it to rebuild. I'm doing nix-collect-garbage but it removes all the deps too.
ericsagn1 has quit [Ping timeout: 264 seconds]
<bqv>
you could try --rebuild
<bqv>
i'm not sure what range of commands and versions have that, as of now
andymandias_ has joined #nixos
zupo has quit [Client Quit]
andymandias has quit [Ping timeout: 272 seconds]
cole-h has quit [Ping timeout: 264 seconds]
<srhb>
pr06lefs: nix-build and --check should do the trick, or you can use nix-store --delete to delete a single path. (However, unless you're testing for reproducibility, deleting it by hand should never be necessary, any change should cause a rebuild in and of itself)
astylian has joined #nixos
<{^_^}>
[nixpkgs] @RonanMacF opened pull request #102390 → update vimPlugins and add vim-LanguageTool → https://git.io/JT79c
freezeboy has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @prusnak opened pull request #102394 → treewide: remove superflous format string when a variable can be used directly → https://git.io/JT7Qb
luc65r has quit [Quit: WeeChat 2.9]
supersandro2000 has quit [Ping timeout: 240 seconds]
lunik11 has joined #nixos
nii has joined #nixos
lunik1 has quit [Ping timeout: 268 seconds]
lunik11 is now known as lunik1
nii has quit [Remote host closed the connection]
nii has joined #nixos
cosimone has quit [Quit: cosimone]
Fare has quit [Ping timeout: 260 seconds]
Acou_Bass has quit [Ping timeout: 240 seconds]
Fare has joined #nixos
nii has quit [Remote host closed the connection]
Acou_Bass has joined #nixos
freezeboy has quit [Remote host closed the connection]
<omasanori[m]>
Hello, just curious but has anybody already tried packaging GTK 4 yet?
supersandro2000 has joined #nixos
jabster28 has joined #nixos
astylian has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @prusnak closed pull request #102394 → treewide: remove superflous format string when a variable can be used directly → https://git.io/JT7Qb
damjan has joined #nixos
shabius has joined #nixos
supersandro2000 has quit [Ping timeout: 260 seconds]
Acou_Bass has joined #nixos
<typetetris>
hmm, without a poetry2nix app I can switch to flakes. But now it complains about `<nixpkgs/nixos/modules/installer/scan/not-detected.nix>` in my configuration.nix. I don't know what that path does and with what to replace it, or maybe I can just delete it?
vykook has joined #nixos
h0m1 has quit [Quit: WeeChat 2.9]
<typetetris>
Hmm, looks that just turns `hardware.enableRedistributableFirmware`.
h0m1 has joined #nixos
<l33[m]>
I've been playing with lib.attrsets.genAttrs (map (i: "user${toString i}") (lib.lists.range 1 10)) (_: { isNormalUser = true; }) This strings list, but can i adapt this in nixos to create unix users in configuration.nix. like users.users.myuser = { isNormalUser = true;};
<srhb>
pushqrdx: I think that loading the kernel module will only provide you with the device nodes, owned by root/root
_rvl has quit [Ping timeout: 264 seconds]
<srhb>
pushqrdx: Meaning, your group membership won't suffice to grant your user access (yet)
<srhb>
pushqrdx: services.udev.extraRules can be set up to cause udev to alter eg. the group of the node
<srhb>
pushqrdx: Does that clarify?
supersandro2000 has joined #nixos
<pushqrdx>
so normally what i do for ddcutil `sudo usermod myuser -aG i2c` to assigm myself tothe i2c group or sometimes i have to create the group myself
bennofs1 has joined #nixos
<pushqrdx>
now in nix i added i2c under extraGroups, and added the i2c kernel module as you specified
vykook has joined #nixos
<srhb>
pushqrdx: What I'm trying to say is that the device node is probably not _owned_ by i2c by default, but you can check.
<pushqrdx>
ok i will first build using i2c-dev alone and see if that works
<srhb>
pushqrdx: You will need a reboot for boot.kernelPackages to take effect
<pushqrdx>
wait kernelPackages? not kernelModules
<srhb>
kernelModules, sorry
<pushqrdx>
btw what is the difference between kernelModules and extraModulePackages
<srhb>
pushqrdx: kernelModules is essentially just modprobe (of modules already in the kernelPackages)
<srhb>
pushqrdx: extraModulePackages are packages providing extra modules
pushqrdx has quit [Remote host closed the connection]
<danderson>
seems to have some rust and C mixed in with the Go, and requires some weirdo pkg-config wrappers to be installed
<danderson>
bah.
alexherbo2 has joined #nixos
<aasg>
I got an overlay that adds Python packages (among others) via `python3 = final.python3.override { packageOverrides = ...; }`. What's the right way to turn that into an attrset (for NUR)?
<aasg>
Right now I have to do `import ./overlay.nix (pkgs.extend (import ./overlay.nix)) pkgs` or a package that depends on `python3Packages.someNewPackage` fails to build
<{^_^}>
[nixpkgs] @jonringer pushed commit from @r-ryantm to master « fetchmail: 6.4.12 -> 6.4.13 »: https://git.io/JT7xW
<bqv>
just the other day I was looking at my haskell+C project and thinking "heh, i wonder if there's a non-awful reason i could conjure to inject some rust in here"
<danderson>
bqv: also javascript. Current status: my build is failing because yarn is trying to reach out to the network to download a zillion packages
<danderson>
need to figure out how to make that play nice with buildGoModule, or maybe stop using buildGoModule :/
<danderson>
at least the sandboxing works. Build tried to fetch random crap from the network, and nix told it to shove off.
ManiacOfMadness has quit [Ping timeout: 268 seconds]
<colemickens>
I'm currently trying to build a node thing, a dependent project as a postInstall that downloads binaries from the net. I'm so turned off of the ecosystem.
<bqv>
danderson: you had to ruin it
<danderson>
I'm just the messenger.
<bqv>
:D
<danderson>
influx 2 is still cool enough that I want to try and make it work... But man they're not making it easy.
Acou_Bass has joined #nixos
<bqv>
ah, it's a database with builtin time series analysis tools..?
<bqv>
cool
<danderson>
yeah, timeseries database. influx 1.x has separate dashboards, but 2.x bundles a bunch of it into one binary
<danderson>
so it's mostly a one stop shop except for the data collectors
<danderson>
... downside is, you need every build tool under the sun to compile it, apparently
<danderson>
and now I need to figure out how to make yarn stuff work in nix
jumper149 has quit [Quit: WeeChat 2.9]
<Ashy>
spin it up in docker for now if you're just evaluating it?
<danderson>
nah, might as well contribute to nixpkgs while I'm at it
<Ashy>
hmm, influxdb is in nixpkgs by the looks
<danderson>
I'm not actually evaluating influx, it's just homelab nonsense. Distractions are part of the game :)
<danderson>
yes, but 1.x, not 2.0
<Ashy>
ah right
<danderson>
and 2.0 has a much more involved build process
<danderson>
involving Go, C, rust and javascript :/
<gchristensen>
wow
<Ashy>
haha wow
<bqv>
it looked like PHP was on the menu too
<Ashy>
keep it simple stupid??? never heard of it...
<gchristensen>
Ashy: simple isn't cloud native
<bqv>
danderson: if you manage this without IFD, you might be jesus
<danderson>
what's an IFD?
<danderson>
I just need to learn about how yarn packaging works in nix
<gchristensen>
a very nice foot gun
<gchristensen>
,IFD
<{^_^}>
import-from-derivation (IFD) is when you evaluate nix from a derivation result, for example `import (pkgs.writeText "n" "1 + 1")` will evaluate to 2. This is sometimes problematic because it requires evaluating some, building some, and then evaluating the build result. It has been described as "such a nice footgun."
<danderson>
... and then figure out how to multiply inherit buildGoModule and whatever yarn does...
<danderson>
or more likely reimplement bits of each customly just for influx :(
<Ashy>
gchristensen: haha
<danderson>
just need to figure out how to get nix to bundle up yarn deps into a derivation, and tell yarn to not touch the network. How hard can it be...
<danderson>
"haha"
<bqv>
yarn2nix is my first thought
<colemickens>
just
<bqv>
"install debian" is my second
<danderson>
yeah, I'm looking at that now.
<bqv>
danderson: maybe napalm, also?
<danderson>
which yarn2nix is the preferred one currently?
<{^_^}>
nix#1522 (by domenkozar, 3 years ago, open): Optimize store stops working at ~10M files
eoli3n has quit [Ping timeout: 246 seconds]
Fare has quit [Ping timeout: 260 seconds]
<bqv>
matthewcroughan_: btrfs
<matthewcroughan_>
butterfs
<matthewcroughan_>
because it melts like butter when storage dies
<matthewcroughan_>
locks you out, lmao
<matthewcroughan_>
chastefs
<gchristensen>
matthewcroughan_: that isn't very nice or needed
<matthewcroughan_>
I'm not allowed to poke fun at filesystems?
<bqv>
heh, i just made nix segfault
<matthewcroughan_>
What kind of banter is allowed then? :D
<bqv>
querying info about missing paths
<bqv>
Compilation segmentation fault (core dumped) at Sun Nov 1 23:41:24
<matthewcroughan_>
bqv: Do you use btrfs in a mirror?
<bqv>
i've never felt the need to use any form of raid
Acou_Bass has quit [Ping timeout: 240 seconds]
<matthewcroughan_>
If you had ZFS in a mirror and one of the disks died, then there'd be no issue. The pool would continue to operate in a degraded state. Your system would still boot if it were on root for example.
<matthewcroughan_>
With BTRFS, if any of the disks, say in a 5 drive mirror die, your system will not boot. Instead, you will be unable to mount the pool.
jabster28 has quit [Ping timeout: 260 seconds]
<matthewcroughan_>
Additionally, running btrfsck will actually damage the pool
<matthewcroughan_>
So, it's unintuitive, and defeats the purpose of raid. I guess if you're not using it in any sort of array this doesn't apply to you.
<matthewcroughan_>
But I still find it baffling that "degraded" = not allowed to mount.
<bqv>
ok i can reliably segfault nix with this, the heck
jabster28 has joined #nixos
<matthewcroughan_>
what version of nix bqv?
<matthewcroughan_>
and if it's reliable, how can I do it to see if it fails on my end
<gchristensen>
to clarify, it is off-topic to be rude about the technology choices people choose and like
<matthewcroughan_>
gchristensen: It's also rude to interject between two people who clearly take no offense to the situation, and to ruin any semblence of fun.
<samueldr>
gchristensen++
<{^_^}>
gchristensen's karma got increased to 366
<gchristensen>
matthewcroughan_: the culture of #nixos is very important to me and the rest of the channel. it just so happened to be that I spoke up first.
<samueldr>
be excellent to each others, that includes those reading
Acou_Bass has joined #nixos
<matthewcroughan_>
IDK how this is against the culture of nixos.
<matthewcroughan_>
I think you're blowing it out of proportion.
<l33[m]>
nixos is operating system, and everyone is invited.
<gchristensen>
okay, but please note that I've mentioned this part about the excellent, inclusive, friendly, and teaching culture of #nixos
<simpson>
matthewcroughan_: There *is* a learning opportunity here, FWIW; you could go look at how blocks are laid out in ZFS, btrfs, ext4, or other popular filesystems. Look at what choices they made and what kinds of problems they try to recover from.
<matthewcroughan_>
simpson: The degraded state is fine as far as I'm aware. I believe your data is still guaranteed to be safe on say a 3 drive mirror if one of the drives dies.
<bqv>
weird. i took a minimal reproducible example out of context, but it no longer segfaults
<bqv>
termbin.com/qqhd if anyone's interested
<bqv>
was evalling that trace in the context of a flake
<{^_^}>
[nixpkgs] @Icy-Thought opened pull request #102406 → Added Orchis-Theme and Reversal-Icon-Theme → https://git.io/JT7hm
<matthewcroughan_>
simpson: I don't see why this wouldn't be the case. But btrfs will still lock you out of the pool to "prevent dataloss" which is ridiculous, considering that raid is supposed to make your storage highly available, which btrfs seems to completely contradict for no sane reason other than statistical overparanoia.
<gchristensen>
(also, this is, literally, off topic for #nixos. maybe #nixos-chat where the same cultural rules apply, but where it would be on topic)
<simpson>
matthewcroughan_: Sure, but like, glass houses, right? ZFS doesn't play well with md either, but I would rather administer XFS or ext4 on top of md.
<matthewcroughan_>
oh, didn't know that room existed, thanks gchristensen
<simpson>
gchristensen: Sorry, got it.
<gchristensen>
no worries :) this discussion sounds interesting
<matthewcroughan_>
simpson: I'm in there, you're not by the looks of it
<l33[m]>
I don't use file systems, i just tar everything to dd of=/dev/sda2
<bqv>
lmao
<matthewcroughan_>
l33[m]: Lol, you should see how files work on stm-eforth
<matthewcroughan_>
but you're not in #nixos-chat either
<simpson>
matthewcroughan_: Yes, I'd rather not have this discussion at all~