phreedom has quit [Remote host closed the connection]
phreedom has joined #nixos
goibhniu1 has quit [Ping timeout: 268 seconds]
sam has joined #nixos
sam is now known as Guest9967
<gchristensen>
is it possible to create a module submodule option like: foo.a = {}; foo.b = {}; and then have the submodule have a readOnly attribute which enumerates them? so then automatically foo.a.id == 0; foo.b.id == 1; ?
<gchristensen>
the ways I tried hit infinite recursion
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
<slack1256>
foo = val: { a = val ; b = builtins.length a ; }; ?
<slack1256>
foo = val: rec { a = val ; b = builtins.length a ; }; ?
<disasm>
how can I get buildRustPackage to use the rust in nixpkgs-mozilla overlay?
<slack1256>
gchristensen ^^
stepcut has quit [Ping timeout: 250 seconds]
aanderse has joined #nixos
alex``` has quit [Ping timeout: 246 seconds]
<gchristensen>
ah sorry slack1256, I mean a NixOS module option with mkOption
<slack1256>
No worries, I don' know the answer then :-)
<ashkitten>
clever: it's not picking up the new cmakeFlags set in preConfiguuuure for some reason?
stepcut has joined #nixos
<ashkitten>
oh waiit
<ashkitten>
oops
dhkl has joined #nixos
o1lo01ol1o has joined #nixos
Guest9967 has quit [Remote host closed the connection]
stepcut has quit [Remote host closed the connection]
judson has quit [Ping timeout: 246 seconds]
<{^_^}>
[nixpkgs] @peti pushed to haskell-updates « hackage-packages.nix: automatic Haskell package set update »: https://git.io/fjLPw
<ashkitten>
clever: how can i make fetchgit retain the .git directory for rev-parse during build?
<clever>
ashkitten: leaveDotGit
<clever>
ashkitten: but its better to patch it to not need that
<ashkitten>
clever: i'm trying to get dolphin-emu to have version info (needed for netplay)
<ashkitten>
it needs to do `git describe` so i need the .git dir
<ashkitten>
clever: should i offer git to the build process so it can figure that out itself, or should i override the values by doing the same thing in the derivation?
<clever>
ashkitten: i think i patched dolphin...
<ashkitten>
clever: if i am the netplay host, nobody can connect to me because the version strings don't match
<clever>
i could swear i packaged dolphin-emu, where did i leave it...
<ashkitten>
it is in nixpkgs, yes
<ashkitten>
it just doesn't have version info
<clever>
nope, wasnt me
<clever>
ashkitten: i think you can set vars like DOLPHIN_WC_REVISION via the cmakeFlags
mabel has joined #nixos
<ashkitten>
clever: yes, but i feel that would be duplication of effort. it's three variables that are already handled by the cmakelists.txt if it has git
<clever>
ashkitten: but fetchFromGitHub is downloading a .tar.gz, which is much faster then `git clone`
<clever>
and keeping .git causes an impurity that will randomly break fetching
npmccallum has quit [Ping timeout: 264 seconds]
<ashkitten>
clever: netplay needs the output of `git describe --always --long --dirty` which can't be derived from the revision hash
<clever>
ashkitten: dang
<ashkitten>
clever: i'm also running into an issue where it switches to a new branch fetchgit before building, which screws up the branch and describe variables
Ariakenom_ is now known as Ariakenom
johnw has joined #nixos
nD5Xjz_ has quit [Ping timeout: 245 seconds]
schneid3306 has quit [Quit: ZZZzzz…]
nD5Xjz has joined #nixos
init_6 has quit []
init_6 has joined #nixos
m0rphism has quit [Ping timeout: 250 seconds]
sam has joined #nixos
<clever>
ashkitten: ahhhh, i packaged faster melee, a fork of dolphin!
sam is now known as Guest46966
slack1256 has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @delroth opened pull request #59051 → environment.noXlibs: disable gnome3 support for pinentry → https://git.io/fjL1m
Rusty1 has quit [Quit: Konversation terminated!]
dhkl has quit [Ping timeout: 264 seconds]
drakonis_ has quit [Ping timeout: 268 seconds]
<detran>
I recently switched to the unstable channel, and I've got one program that works while I'm logged in as one user but not as another
<detran>
the program is leiningen, has anybody else seen this issue?
ddellacosta has quit [Ping timeout: 258 seconds]
drakonis_ has joined #nixos
init_6 has quit []
Glider_IRC_ has joined #nixos
palo has joined #nixos
Glider_IRC__ has quit [Ping timeout: 246 seconds]
Guest71014 has quit [Ping timeout: 255 seconds]
dhkl has joined #nixos
o1lo01ol1o has joined #nixos
justanotheruser has quit [Ping timeout: 264 seconds]
o1lo01ol1o has quit [Ping timeout: 246 seconds]
lmarks has quit [Ping timeout: 252 seconds]
sam has joined #nixos
sam is now known as Guest70604
justanotheruser has joined #nixos
<CMCDragonkai>
I'm getting a ghc: can't find package database at ...package.db directory when I run cabal build on a derivation using haskell.lib.buildStrictly.
<{^_^}>
#58847 (by bachp, 3 days ago, open): nixos/fhsUserenv: make all locales available
orivej has joined #nixos
dermetfan has joined #nixos
dermetfan has quit [Client Quit]
mabel has joined #nixos
juhe has joined #nixos
<juhe>
Hi, I'd like to have better control over how nix channel is updated. Is there a way to use nix-channel to point to local path containing git clone of nixpkgs?
<MichaelRaskin>
juhe: I think you are saying you do not want to use the channel directly and just want nixpkgs=/path/to/nixpkgs as a part of your NIX_PATH instead (and maybe use the channel information when deciding to update the repository)
kreisys has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MichaelRaskin>
Running a system without channels works
<juhe>
MichaelRaskin: Yes, that sounds like something I want :-). Could you give me some pointer where I can read more about that?
mounty has quit [Ping timeout: 268 seconds]
mounty has joined #nixos
<juhe>
Hm, probably looking for NIX_PATH seems to be a good start, I see it's set to some stuff so maybe I need to change that path only...
<MichaelRaskin>
Yes, NIX_PATH and maybe nix-channel to remove the channels you don't want to use
<MichaelRaskin>
Just to avoid their getting into the way if you use nix as another UID or something
Guest23923 has quit [Remote host closed the connection]
Mithror has joined #nixos
<yurb>
Do I need to do anything special to make nix packages find their locales on non-nixos? Or are they hard-wired into the packages themselves? Currently it seems they can't find the locale.
<MichaelRaskin>
Generally exporting LOCALE_ARCHIVE to point to either built-from-nixpkgs locale archive file (provided by glibLocales, if you don't care much about space, or you can override the list of languages) or, if you are lucky and glibc versions match, to your system locale-archive
<yurb>
MichaelRaskin: is the locale file something that is made available under ~/.nix-profile when I install packages?
<MichaelRaskin>
Hm, not sure what are the defaults; do you have /lib/ included there?
<MichaelRaskin>
(package /lib/, not global)
<yurb>
yes, there is ~/.nix-profile/lib
<MichaelRaskin>
then installing glibcLocales is likely to provide lib/locale/locale-archive (which is what you need)
<{^_^}>
[nixpkgs] @thefloweringash opened pull request #59054 → [WIP] packr: init at 2.1.0 → https://git.io/fjLMd
<yurb>
MichaelRaskin: Thanks! Installing and pointing LOCALE_ARCHIVE to ~/.nix-profile/lib/locale/locale-archive worked.
linarcx has joined #nixos
<yurb>
MichaelRaskin: Do you know why this is not done by default?
<MichaelRaskin>
Well, the solution I describe eats quite a bit of space. Many desktop users who use Nix in addition to their underlying system don't really care even about a GiB or two of space; but there are Nix-on-non-Linux use cases where a full locale-archive per installation would be… unfortunate
<MichaelRaskin>
Why it is not in docs? We are just not always good with documenting everything (and Nix on non-NixOS Linux is a step below NixOS in support.
<MichaelRaskin>
Maybe installer should also remind/offer to do this, I am honestly not sure how exactly it should be best done
mabel has quit [Ping timeout: 252 seconds]
<yurb>
MichaelRaskin: I see. I don't know much about locales, but is it possible to install only the locales I'm interested in?
<MichaelRaskin>
It is, by installing glibcLocales built with custom parameters
<MichaelRaskin>
Not sure what is the easiest way via nix-env (I don't use nix-env and I don't remember what it supports)
<yurb>
MichaelRaskin: okay, thanks for the hint.
m0rphism has joined #nixos
<juhe>
What is the best place to set NIX_PATH, is it environment.sessionVariables?
<juhe>
That's no problem, opinions are subjective and it is fine, I'll try "environment.sessionVariables" or maybe "nix.nixPath" first and will see the outcame - based on that I'll stay with it or change it.
linarcx has quit [Quit: WeeChat 2.4]
linarcx has joined #nixos
<MichaelRaskin>
yurb: I might have messed up the names of the locales in the example, but the error message should provide the correct option list
<linarcx>
Gyus, i want to search for a package via `nix search`, but it always give me an error: `error: no results for the given search term(s)!`. What's going on?
juhe has quit [Remote host closed the connection]
juhe has joined #nixos
arjen-jonathan has joined #nixos
iyzsong has quit [Ping timeout: 252 seconds]
hlolli__ has quit [Remote host closed the connection]
<linarcx>
manveru: Shit. i found the issues. last night i add i3.nix in nixpkgs in home directory and then:"home-manager switch". i guess it will be the issue. let me delete it and see what happen next.
iceypoi has joined #nixos
<linarcx>
But i'm confused why home-manager didn't show me any error.
<linarcx>
I should report it to those guys to fix this issues.
<iceypoi>
is there a canonical way of turning on numlock during boot? I've found services.xserver.displayManager.sddm.autoNumlock, but is that the only way?
<linarcx>
manveru: Now every thing works like charm. Thank you man. :)
<manveru>
linarcx: the overlay was made by you, not home-manager
<linarcx>
manveru: Yes, i've added it to overlays directory. but forgot to delete it. now system is up and working :)
<manveru>
that's why i would've loved to see what caused it :)
<manveru>
but all's well, so enjoy :)
<linarcx>
manveru: Ha ha ha. you are awesome :)
<manveru>
iceypoi: if you're using sddm, that's the normal way... there's always other ways :)
Anton-Latukha has joined #nixos
carlos1 has quit [Quit: WeeChat 2.2]
Thra11 has joined #nixos
<iceypoi>
the arch wiki suggests creating a systemd service which feels like a reasonable fit to nixos given how it relies on systemd. Do we have a section about building services in the nixos manual?
<iceypoi>
(sorry for noob questions, I'm quite new to nixos)
carlosdagos has joined #nixos
<manveru>
i think that's actually missing from the manual...
<manveru>
well, it's pretty simple for this case
<linarcx>
manveru: It's my question too. i'm currently useing startx and i want to turn on numlock. what should i do?
<manveru>
you can add `numlockx on` before starting your wm
<iceypoi>
well for that case, the arch wiki tells exactly
<iceypoi>
i assume you use xinitrc or xsession
<iceypoi>
in either of those, you can put in the command and have it happen before you starts the wm
<{^_^}>
[nixpkgs] @timokau pushed commit from @megheaiulian to master « gitraken: 5.0.1 -> 5.0.4 (#59052) »: https://git.io/fjLDw
<manveru>
updated the paste with a translation of this service
<manveru>
if that works for you, we could include it in nixpkgs :)
<iceypoi>
cool, I'll test it and if it's fine, I'll make another pr ;-)
<{^_^}>
[nixpkgs] @timokau merged pull request #59051 → environment.noXlibs: disable gnome3 support for pinentry → https://git.io/fjL1m
<{^_^}>
[nixpkgs] @timokau pushed commit from @delroth to master « environment.noXlibs: disable gnome3 support for pinentry (#59051) »: https://git.io/fjLDo
<kandinski>
hey, I have an ASUS 168B+ displaylink monitor, and I just added services.xserver.videoDrivers = [ "displaylink" ]; to my /etc/nix/configuration.nix file and rebuilt switched. However, I can still not see the monitor when I plug it in, despite dmesg recognising the USB device. Any idea?
mabel has joined #nixos
<kandinski>
the above is a 18.09 install, btw, and everything else seems to just work.
<manveru>
kandinski: does `sudo journalctl -xef -u dlm` say anything?
<manveru>
also there should be a /var/log/displaylink with potentially some logs
ng0 has joined #nixos
Mithror has joined #nixos
<kandinski>
manveru: thanks, there is an issue with the evdi module not being found
<{^_^}>
[nixpkgs] @timokau pushed commit from @dtzWill to master « zsh-autosuggestions: 0.5.0 -> 0.5.1 (#59037) »: https://git.io/fjLDA
<kandinski>
before I reboot: this is because I did switch --upgrade and in the rebuilt I bilt evdi for my next kernel, not the one currently running, correct?
<{^_^}>
[nixpkgs] @timokau pushed commit from @dtzWill to master « lxd: 3.11 -> 3.12 (#59034) »: https://git.io/fjLDp
<manveru>
kandinski: you can try something like `sudo modprobe $(nix-build '<nixos>' -A linuxPackages_4_9.evdi)/lib/modules/4.9.166/kernel/drivers/gpu/drm/evdi/evdi.ko`
<lielazivee>
Is there a way to get the evaluated content of NixOps deployment? I.e. I know I can nix-instantiate --eval a nix file/expression and I'm guessing NixOps also does some evaluations of machine configurations under the hood - if that's true, can I get/see that evaluation?
grizwako_ has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @aszlig pushed to master « nixos/tests/acme: Use exact match in TOS location »: https://git.io/fjLyC
freeman42x has joined #nixos
mounty has quit [Ping timeout: 246 seconds]
mounty has joined #nixos
dhkl has joined #nixos
jakov has joined #nixos
sam_ has joined #nixos
<{^_^}>
[nixpkgs] @vcunat pushed 2 commits to staging-next: https://git.io/fjLyw
<jakov>
Hi ! I am having a small issue with downgrading. From my nix-channels i removed nixos-unstable, which had the channel name 'nixos'. With the command
<chaker>
Hey, when I try to build a derivation remotely why does Nix check if the paths that are being copied exist in one of the caches or not?
sam_ has quit [Remote host closed the connection]
sam_ has joined #nixos
alex``` has joined #nixos
<chaker>
It seems like it doesn't because I get `copying path '/nix/store/h0lbngpv6ln56hjj59i6l77vxq25flbz-binutils-2.30' to 'ssh://blaa'` where if I do nix ls-store on cache.nixos.org I find that path.
<chaker>
Is there a way to force nix in the remote machine to check for binary caches and only fallback to copy from my local machine if it doesn't exist in there.
<mikeplus64>
how can i get the stdout of test suites ran w/ callcabal2nix?
lielazivee has quit [Ping timeout: 246 seconds]
<chaker>
Do remote builds use the nix-daemon of the remote machines?
<gchristensen>
yea
<gchristensen>
I take that back. I'm not sure.
<MichaelRaskin>
Well, one is supposed to set up ssh to the remote host
<MichaelRaskin>
If it goes to a non-root user (and it should), then daemon has to be used
afics has quit [Quit: afics]
leat has quit [Ping timeout: 240 seconds]
<chaker>
Okay, this is weird then. Becuase I supllied some AWS credentials to the nix daemon of the remote machine to be able to download some store paths from a private s3 binary cache. However it fails to do so 'Access denied' and it fallback to copy those store paths from my local machine. BTW If I'm sure the credentials are valid and that the nix-daemon itself can download paths from that binary cache. I validated
<chaker>
that using `NIX_REMOTE=daemon nix-store -r foooo`
<chaker>
MichaelRaskin: Both the normal user and the root user in my local machine can ssh to the builder.
<MichaelRaskin>
Never did anything with restricted binary caches
Erasmus has joined #nixos
mabel has quit [Ping timeout: 250 seconds]
<andi->
chaker: I am not sure but e.g. hydra requires the `.aws/credentials` file in the home of the user running the queue. Not exactly sure how that transforms into remote builders being able to pull.. I'd imagine the daemon on the host woudl check the remote (se) store? Mostly guessing.. let me know if you figure it out
dsiypl4__ has joined #nixos
mabel has joined #nixos
iceypoi has quit [Quit: Lost terminal]
dhkl has quit [Ping timeout: 245 seconds]
<chaker>
andi-: That actually make sense if the build aren't done by the nix-daemon. Requiring .aws/credentials to be present means that the Nix check directly the credentials using CPP AWS sdk.
<chaker>
jakov: Not sure if it can help but can you try to run nix-channel --update in root session `sudo su -` then run the update?
iceypoi has joined #nixos
sam_ has joined #nixos
sam_ has quit [Remote host closed the connection]
eyJhb has quit [Quit: Bye]
eyJhb has joined #nixos
sam_ has joined #nixos
<chaker>
The reason I suggested it is that the env variables used during the update if you run `sudo nix-channl --update` are of your non-root user. You can verify that by running sudo echo $NIX_PROFILES
<chaker>
In my case it returns `/etc/profiles/per-user/chaker /run/current-system/sw /nix/var/nix/profiles/default /home/chaker/.nix-profile ` Which isn't the path nixos-rebuild search for.
<iceypoi>
manveru: as for X11, it's probably easiest to use xsession from home-manager: xsession.profileExtra = "${pkgs.numlockx}/bin/numlockx"
<{^_^}>
[nixpkgs] @timokau merged pull request #59048 → xkeyboard-config: intltool should be a nativeBuildInput → https://git.io/fjLXH
<{^_^}>
[nixpkgs] @timokau pushed commit from @delroth to staging « xkeyboard-config: intltool should be a nativeBuildInput (#59048) »: https://git.io/fjLSo
<therealwaphire[m>
does anyone use `unstable` as their main channel on their primary laptop / desktop?
<therealwaphire[m>
while keeping the kernel LTS
carlosdagos has quit [Ping timeout: 250 seconds]
<iceypoi>
can't you just use stable channel and have your own user account set to unstable for all your software?
acarrico has quit [Ping timeout: 264 seconds]
<MichaelRaskin>
I just build my laptop system from master (which has LTS kernel, which I just don't use)
carlosdagos has joined #nixos
<__monty__>
MichaelRaskin: I think they mean LTS as in nixpkgs-17.xx, rather than linux-LTS on nixpkgs-unstable.
Notkea has quit [Read error: Connection reset by peer]
<{^_^}>
[nixpkgs] @offlinehacker pushed 2 commits to master: https://git.io/fjLSX
Notkea has joined #nixos
dhkl has joined #nixos
<jakov>
chaker, sorry for the late response: Output "sudo echo $NIX_PROFILES":
<jakov>
But nixos rebuild switch doesn't work from either shell. It seems to me, that, because i removed the unstable channel from my channel list, it's necessary to delete some entry somewhere.
<Myrl-saki>
Hence why I'm kind of opposed to having the module system as part of the Nix language itself.
<infinisil>
I've been considering adding an RTS to nixlisp, that would be neat
endformationage has joined #nixos
<Myrl-saki>
What happens to nixos-rebuild build-vm's nix-store?
logzet has joined #nixos
<samueldr>
by default they're mounted using p9 IIRC? though don't know at runtime when manipulating them what happens for sure, but I would hazard a guess that it gets overlaid with an overlayfs
<{^_^}>
[nixpkgs] @vbgl pushed commit from @r-ryantm to master « ocamlPackages.reactivedata: 0.2.1 -> 0.2.2 »: https://git.io/fjL9p
sam_ has joined #nixos
<Myrl-saki>
Yeah, I checked the qemu-vm.nix comments, and it's written to either /tmp or something.
<Myrl-saki>
I mean, I could make a Bash script, but I'd rather use something that's actually tested.
<stammon>
Hi I'm trying to connect with x2go client to a server. It works with x2go-client on ubuntu, but on nixos it tells me "The server is unknown. Do you trust the host key?" and when saying yes, it asks again. If someone uses x2goclient on nixos, some help would be appreciated
<samueldr>
though yeah, I don't remember for sure if it was simply looping through /nix/store and trying to copy or if it was more intelligent... if only I knew where the script was
boogiewoogie has quit [Remote host closed the connection]
<{^_^}>
[nixpkgs] @divi255 opened pull request #59077 → libow package (1-wire file system library) → https://git.io/fjLHM
acarrico has quit [Ping timeout: 240 seconds]
<{^_^}>
[nixpkgs] @dtzWill opened pull request #59078 → nextcloud: fix use of mismatched php versions, updates → https://git.io/fjLHD
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
tboston_ has quit [Ping timeout: 252 seconds]
stepcut has quit [Read error: Connection reset by peer]
<softinio_>
Hi I am new to Nix and working on a PR .... how do I run the sandbox locally? I am using a macbook
stepcut has joined #nixos
<Myrl-saki>
samueldr: for i in /nix/.rw-store/store/*; do echo /nix${i#/nix/.rw-store}; done | xargs nix copy --store /nix/.rw-store/store --to ssh://__
<Myrl-saki>
Or something similar.
<Myrl-saki>
Hm, might not work though, since --store should take the root path.
stepcut has quit [Ping timeout: 268 seconds]
<samueldr>
:/ I couldn't find the script, but I'm sure there was some cleverness to it, but don't remember the cleverness
<samueldr>
something about minimizing the "already copied" hits
mconstant has joined #nixos
stepcut has joined #nixos
jakov has left #nixos ["ERC (IRC client for Emacs 26.1)"]
stepcut has quit [Remote host closed the connection]
stepcut has joined #nixos
linarcx has joined #nixos
<Myrl-saki>
Eep. My nix-instantiate runs so slow under run-*-vm.
boogiewoogie has joined #nixos
stepcut has quit [Ping timeout: 245 seconds]
<{^_^}>
[nixpkgs] @dtzWill opened pull request #59079 → php7{1,2,3}: bump for "security release" → https://git.io/fjLQe
<Myrl-saki>
Okay, wtf.
<Myrl-saki>
I have the packages in /nix/store, in both the host and the VM, but the host VM still builds it.
<Myrl-saki>
s/host VM/VM/
stepcut has joined #nixos
stepcut has quit [Remote host closed the connection]
i1nfusion has joined #nixos
<Myrl-saki>
Think it has something to do with my /nix/store having too much files?
<jakov>
Hi! does anyone know how to set the access rights on wireshark using nixos ?
<jakov>
I have already created a group in my /etc/nixos/configuration.nix and added myself to the group.
<jakov>
users.users.jakov = {
<jakov>
users.groups.wireshark = {};
<jakov>
... extraGroups = [ wireshark];
<jakov>
};
leat has joined #nixos
<jakov>
But it's not enough to give me the priviliges to capture network packages.
<jakov>
tboston_ has quit [Ping timeout: 250 seconds]
<Myrl-saki>
Hard yeesh. I get error: hash '' has wrong length for hash type 'sha256'
<Myrl-saki>
Even after nix-store --repair-path
<Myrl-saki>
How do I recalculate hash or whatever?
<Myrl-saki>
I'm so close to ignore-liveliness rn
<manveru>
jakov: i have a few settings for it...
<MichaelRaskin>
jakov: isn't it better to capture with tcpdump (maybe even as root) and only analyse with Wireshark (and maybe under less-privileged user)?
<jakov>
manveru, thank you very much, it works like a charm :D
<softinio_>
so I have added a new vim plugin how do I build it locally in sandbox to test it?
<boogiewoogie>
hey, it seems there's no native nixos option to run awesomeWM as the default window manager, is this correct? trying to get this https://github.com/PapyElGringo/material-awesome to work
<Myrl-saki>
Okay, maybe I was misundertsanding how this works.
mabel has quit [Ping timeout: 268 seconds]
orivej has quit [Ping timeout: 268 seconds]
<infinisil>
softinio_: If you don't have the sandbox enabled through /etc/nix/nix.conf, you can pass `--option build-use-sandbox true` to a nix-build to enable it just for that command
leat has quit [Remote host closed the connection]
ddellacosta has joined #nixos
leat has joined #nixos
<Myrl-saki>
Oh.
<Myrl-saki>
I need to use virtualisation.pathsInNixDB
<Myrl-saki>
Uh, does it suffice to just readDir /nix/store?
sam_ has quit [Remote host closed the connection]
sam_ has joined #nixos
<Myrl-saki>
Aside from /nix/store.links, I guess.
<kalbasit>
I'm trying to make a meta derivation, meaning that when I install it, I get all the packages of it's buildInputs installed and exposed. Is that possible?
<softinio_>
infinisil: ty for that tip thats great .... what would my nix-build command look like? my changes are in pkgs/misc/vim-plugins/generated.nix . sorry if silly question new to doing this
afics has joined #nixos
<clever>
Myrl-saki: when qemu vm's have a writable store, they automatically import a fake backup of db.sqlite
<clever>
Myrl-saki: that fake backup includes the full closure of a given path, but lacks the hashes
<infinisil>
softinio_: Well first you should put it in overrides.nix instead, the file generated.nix is autogenerated, and your changes would be overridden on the next regenerate
<infinisil>
softinio_: The command should be `nix-build -A vimPlugins.<the-plugin-attribute-name>`
<Myrl-saki>
clever: Are you talking about the hash error a while ago?
<Myrl-saki>
Because that was a huge PEBCAK that made me wste 30 minutes lmao
orivej has joined #nixos
leat has quit [Remote host closed the connection]
<kalbasit>
I managed to get it to work with buildEnv
<clever>
jakov, MichaelRaskin: this allows dumpcap to run as root, but not wireshark itself, and thats enough to run wireshark as non-root and still capture packets
<Myrl-saki>
clever: I load-db'd store-paths instead of registration, because I didn't understand the Bash variable.
Neo--- has quit [Ping timeout: 250 seconds]
<clever>
Myrl-saki: ah
boogiewoogie has quit [Remote host closed the connection]
boogiewoogie has joined #nixos
orivej has quit [Ping timeout: 268 seconds]
leat has quit [Remote host closed the connection]
leat has joined #nixos
W1lkins has quit [Read error: Connection reset by peer]
jakov has quit [Quit: ERC (IRC client for Emacs 26.1)]
<{^_^}>
[nixpkgs] @nlewo pushed commit from @offlinehacker to release-19.03 « dockerTools: storePathToLayer use runtimeShell in script »: https://git.io/fjL7T
leat has quit [Remote host closed the connection]
leat has joined #nixos
drakonis_ has joined #nixos
mabel has quit [Ping timeout: 268 seconds]
fendor has joined #nixos
mabel has joined #nixos
<fendor>
how can i tell the nix daemon to stop building something that takes too much time?
<softinio_>
infinisil: I am trying to fix the comment you made in this PR https://github.com/NixOS/nixpkgs/pull/56250 I can't reproduce the error you got. When I build using the command u gave with sandbox enabled it builds with no could not resolve host error
<{^_^}>
#56250 (by softinio, 6 weeks ago, open): vim-plugins: Added more vim plugins
<infinisil>
That sure looks like success to me too
leat has quit [Remote host closed the connection]
<infinisil>
Odd, I'm not sure why that is, the sandbox should prevent it from downloading stuff at build time
leat has joined #nixos
softinio has quit [Quit: Connection closed for inactivity]
<softinio_>
agreed I do think the change you suggested makes sense so do want to make that change but would have been good to have sandbox do what it did for you so I can see it fixed
<softinio_>
going to rebase with latest with master and try again
<infinisil>
linarcx: Hard to say without the error..
<linarcx>
infinisil: error: syntax error, unexpected $end, expecting IND_STR or DOLLAR_CURLY or IND_STRING_CLOSE
leat has quit [Remote host closed the connection]
leat has joined #nixos
<simpson>
linarcx: Un-nest your antiquotes by one level, assigning them using a let-expr. Perhaps write a function, even. That nesting is hard to read and asking for trouble.
mabel has quit [Ping timeout: 250 seconds]
<infinisil>
And line 39 is wrong: `cfg.defaultSession != ""''`, maybe you meant `if cfg.defaultSession != "" then ''`
<linarcx>
infinisil: I should write `then` keyword?
<infinisil>
linarcx: I suggest you to experiment with the language in `nix repl`
<linarcx>
infinisil: Good idea. let me try it.
shibboleth has joined #nixos
leat has quit [Remote host closed the connection]
zupo has joined #nixos
leat has joined #nixos
sam_ has quit [Remote host closed the connection]
rauno has joined #nixos
sam_ has joined #nixos
i1nfusion1 has quit [Remote host closed the connection]
i1nfusion1 has joined #nixos
i1nfusion1 has quit [Remote host closed the connection]
<kalbasit>
how to get the tag of a `dockerTools.buildLayeredImage` without building it?
grizwako has joined #nixos
leat has quit [Remote host closed the connection]
leat has joined #nixos
<alienpirate5>
How do I use bundix with buildFhsUserEnv
<nh2[m]>
apeyroux: that's correct, that pins the version of nixpkgs. Newer versions might also work, but I haven't tested them, and they may need slightly different/more overrides. Porting it to newer nixpkgs versions is something I'd appreciate help with. Also, that will naturally go away once it gets absorbed into nixpkgs.
<softinio>
infinisil: got disconnected did I miss any message from you?
<infinisil>
nope
tboston_ has quit [Ping timeout: 258 seconds]
mabel has joined #nixos
linarcx has quit [Quit: WeeChat 2.4]
<softinio>
infinisil: got the sandbox to work
<softinio>
reproduced your error
<infinisil>
Oh how?
leat has quit [Remote host closed the connection]
leat has joined #nixos
<softinio>
I am using nix on a macbook using nix-darwin .... what I tried that made a difference was run: `nix-channel --update darwin` then rebuild then tried again and it worked
boomshroom has joined #nixos
<softinio>
i can't explain why that made a difference but it did
<boomshroom>
Hello! (Good morning!)
<infinisil>
softinio: Huh alright, I don't see it either, but glad you got it working :)
<softinio>
yeah lol gremlins :-) thanks for your time can now make the PR changes u suggested :-)
<boomshroom>
I'm considerring installing home-manager, but I don't want to break anything.
raduom has quit [Read error: Connection reset by peer]
acarrico has joined #nixos
sam_ has quit [Ping timeout: 258 seconds]
linarcx has joined #nixos
leat has quit [Remote host closed the connection]
leat has joined #nixos
slack1256 has quit [Remote host closed the connection]
<Myrl-saki>
We should try to add Nix to GCJ.
<MichaelRaskin>
GCE you mean?
<MichaelRaskin>
Although resurrecting GCJ would mean irreplaceable pdftk can be built in the future.
<boomshroom>
Anyone who has experience, how does using Home Manager compare to normal configuration, especially if you already have a lot in place?
arjen-jonathan has quit [Ping timeout: 246 seconds]
sam_ has joined #nixos
nschoe has quit [Ping timeout: 240 seconds]
<betawaffle>
does anyone here run nixos on GCE?
<betawaffle>
oh wow, someone asked the same question already?
leat has quit [Remote host closed the connection]
leat has joined #nixos
<boomshroom>
betawaffle: Technically no. Someone thought that was the question being asked, but it wasn'
rembo10 has joined #nixos
<boomshroom>
wasn't. :P
<betawaffle>
ohhh
<betawaffle>
ok, so question still stands.
* betawaffle
awaits answer
domogled has joined #nixos
domogled has quit [Client Quit]
leat has quit [Remote host closed the connection]
leat has joined #nixos
clasick has joined #nixos
<linarcx>
Gyus, what's the difference between system profile and default profile?
Notkea has quit [Ping timeout: 245 seconds]
<clasick>
uh. can someone help me with installation? i've followed all the steps but when i reboot, x11 starts but it goes directly to cli login and sddm doesn't appear
<clasick>
x11, sddm, plasma are all enabled
<clasick>
do i need some intel or nvidia drivers also, cause the manual doesn't mention as such
<boomshroom>
Sounds like something may have crashed. Do you have a log?
<clasick>
i checked journalctl using journalctl -b -p err
<clasick>
doesnt show any errors
<boomshroom>
Try launching sddm manually from the terminal
stepcut has quit [Remote host closed the connection]
<linarcx>
clasick: Upload your `configuration.nix` somewhere.
stepcut has joined #nixos
<ninjin>
Finally returning to my slow project to obtain NixOS Nirvana, but I am stuck with a software raid issue when installing on a server. I have sda and sdb as md0 with RAID1, but when I run `nixos-install` Grub barfs with “error: unable to identify a filesystem in hostdisk//dev/sda”. Has anyone experienced anything akin to this? `/` (md0p1) is encrypted, but `/boot` (md0p3) is not, and `lsblk` looks the way I
<ninjin>
would expect so I really do not understand what Grub is upset about.
<infinisil>
boomshroom: Let's just wait until they can show the logs before suggesting any other things to try
stepcut has quit [Ping timeout: 258 seconds]
sam_ has joined #nixos
leat has quit [Remote host closed the connection]
<boomshroom>
manveru: I wanted to do that kind of separation at first, but now I'm just using unstable across the whole system.
leat has joined #nixos
meck has quit [Quit: WeeChat 2.4]
<boomshroom>
From my understanding, home-manager can be used as either a standalone package, or as a nixos module. Are there any differences, and is there any reason to fetch the upstream vs using the version inx nixpkgs?
<clasick>
linarcx: file.io/N23eEz
<manveru>
boomshroom: mostly more frequent updates, new modules, and stuff
stepcut has joined #nixos
<manveru>
can't say i tried the nixos module though :)
stepcut has quit [Remote host closed the connection]
<clasick>
boomshroom: running "nix-store -qR /nix/var/nix/profiles/system | grep sddm" gives me quite a number of hits including sddm, sddm-greeter,sddm-autologin
<boomshroom>
Also there's the fact that I find installing user-specific packages from the command line easier than modifying a file then updating.
stepcut has joined #nixos
<boomshroom>
clasick: The one without fancy qualifiers should be the one with /bin/sddm
<boomshroom>
Essentially, I like installing packages imperatively, but modifying them declaritively.
<alienpirate5>
The problem is that the ffi gem does not look at /nix/store/g281gj32gbrchxbw4lrfj1wlfw5l6a8f-libopus-1.3/lib/libopus.so
<alienpirate5>
It only looks in /usr/lib
<alienpirate5>
so I would like to use buildFhsUserEnv to build a FHS environment that I can enter
<alienpirate5>
through nix-shell
leat has quit [Remote host closed the connection]
leat has joined #nixos
<infinisil>
boomshroom: I have a feeling clasick did Ctrl-Alt-F7 and doesn't know how to get back to the first tty where their irc client is running xD
<ninjin>
After doing even more digging, I have at least found someone with similar issues on NixOS. Just sad to see it unresolved. https://github.com/NixOS/nixops/issues/946
<{^_^}>
nixops#946 (by nh2, 47 weeks ago, open): hetzner: installing grub fails if /dev/sda isn't used
<manveru>
alienpirate5: lemme know if that works for you, and comment on the PR :)
leat has quit [Remote host closed the connection]
leat has joined #nixos
Cattus is now known as Nycatelos
<ninjin>
Okay, today I learned something, you can not boot a partitioned raid device, but you can boot raided partitions. Thank you for putting up with my ramblings, back to getting this to work.
zupo has joined #nixos
Nycatelos is now known as Cattus
cantstanya has quit [Remote host closed the connection]
Cattus has left #nixos ["WeeChat 2.4"]
<infinisil>
clasick: What hardware are you using? What GPU?
<boomshroom>
Can I still install packages imperatively after installing home-manager?
<stammon>
How can I build a package from nixpackages, if in all-packages, it is not added with callPackage but with libsForQt5.callPackage?
<stammon>
I.e. I want to do something like: nix-build -E 'with import <nixpkgs> { }; libsForQt5.callPackage ./default.nix { }'
logzet has joined #nixos
<stammon>
boomshroom: You can still use `nix-env -i packageName` after installing home-manager
<pingiun>
can I use nixops to place files that should be read by passwordFile options?
leat has quit [Remote host closed the connection]
leat has joined #nixos
<logzet>
Hi! What is the preferred way to set environment variables in the X session? I tried .profile and .xinitrc, but they both don't seem to be sourced. I'm using sddm and i3
<boomshroom>
stammon: But I guess you can't imperatively add packages to the file. I think that's a reasonable compromise.
clasick has quit [Read error: Connection reset by peer]
goibhniu1 has joined #nixos
<stammon>
boomshroom: How would you imperatively add packages to a file? To which file anyways?
<boomshroom>
stammon: I'd like to be able to imperatively install packages, but then modify them after the fact declaratively.
tboston_ has joined #nixos
<stammon>
boomshroom: Your homemanager can involve several configuration files and they don't necessarily have to be at any specific location. Also not only packages set by home.packages are installed, but setting other options can lead to installed packages as well.
<boomshroom>
Is there any way to easily transition packages from nix-env to home-manager?
<stammon>
You can still use nix-env
shibboleth has joined #nixos
<stammon>
I sometimes install packages with nix-env. Roughly every week, I go through all nix-env packages with nix-env -q and remove those, which I won't need and the other make it into my home-manager configuration
goibhniu1 has quit [Ping timeout: 245 seconds]
leat has quit [Remote host closed the connection]
goibhniu1 has joined #nixos
leat has joined #nixos
<stammon>
There is one very small caveat: You can have version conflicts between packages installed with home-manager and nix-env. To apply a conflicting home-configuration, you need to uninstall the nix-env package or remove it from the home-configuration
<boomshroom>
The repo mentions having it manage graphical services, but that it needs to control the X session. How does that work with NixOS and a display manager?
<stammon>
If you want to manage your packages imperatively withing home-configuration, I recommend you writing a small utility. It would modify only one specific file of your home-configuration (let's call it imperative.nix). You include it in your home-configuration. And to add a package you'd write something like myutil install package and it would put that package into that file and apply the full new home-configuration (probably
<stammon>
requiring a configuration setting to specify the update command)
logzet has joined #nixos
<stammon>
> The repo mentions having it manage graphical services, but that it needs to control the X session. How does that work with NixOS and a display manager?
<stammon>
It only manages things, that you configure. A empty home configuration changes nothing. If you only add Packages with the home.packages option, you add new packages and no program gets configured. If you do `man home-configuration.nix` you can see however, that there are plenty of other configuration options, some of which change your display / window manager (like the i3 ones). If you use none, you will have no problem
<{^_^}>
error: syntax error, unexpected ',', expecting ')', at (string):243:54
goibhniu1 has quit [Ping timeout: 250 seconds]
<stammon>
> The repo mentions having it manage graphical services, but that it needs to control the X session. How does that work with NixOS and a display manager?
<stammon>
It only manages things, that you configure. A empty home configuration changes nothing. If you only add Packages with the home.packages option, you add new packages and no program gets configured. If you do `man home-configuration.nix` you can see however, that there are plenty of other configuration options, some of which change your display / window manager (like the i3 ones). If you use none, you will have no problem
<{^_^}>
error: syntax error, unexpected ',', expecting ')', at (string):243:54
leat has quit [Remote host closed the connection]
leat has joined #nixos
arjen-jonathan has quit [Ping timeout: 268 seconds]
<boomshroom>
I'm finding tmux options that I'm using that don't seem covered by the module.
<stammon>
You mean you want to configure your tmux in a way, that is not supported by the tmux module?
<stammon>
also it has a extraConfig option, which you can use to put the options in, that the module doesn't cover. extraConfig will be put directly into the file by the module
<boomshroom>
That's what I'm using.
<stammon>
So you are fine?
<boomshroom>
Ya, I'm just trying to determine what home-manager does vs what I need to copy into extraConfig.
i1nfusion has quit [Remote host closed the connection]
i1nfusion1 has quit [Remote host closed the connection]
drakonis_ has joined #nixos
i1nfusion1 has joined #nixos
<boomshroom>
I notice it's using bind and set where my previous config used set-option and bind-key.
<stammon>
You can put everything in extraConfig and most likely it will work the some. Otherwise you have to have a closer look at the tmux.nix module file, to figure out, what it does for you
i1nfusion has joined #nixos
leat has quit [Remote host closed the connection]
<stammon>
I don't know the difference between bind/set and set-option and bind-key. But as a general rule for home-manager modules, from my experience, they don't always fit to the way you want to configure a program.
leat has joined #nixos
Thra11 has quit [Ping timeout: 240 seconds]
__monty__ has quit [Quit: leaving]
<stammon>
Sometimes I just use home.file to write my own configuration file without using the module at all. Sometimes I just use the extraconfig most modules have with my own config and use some of the module options. And some modules are so nice, that they fit exactly how I want things to be configured and then I use them.
<boomshroom>
Next up neovim! How do specify the plugins? There's a configure option, but it doesn't have much documentation.
goibhniu1 has joined #nixos
<stammon>
I never used the home-manager neovim module or neovim under nixos in general (I barely ever used vim/neovim), so I can't help you much. Maybe this can help you though: https://github.com/rycee/home-manager/issues/416
<{^_^}>
rycee/home-manager#416 (by turion, 25 weeks ago, open): How to install further vim plugins?
<stammon>
@all Also I'm looking still for help with debugging my x2go issues. For one, if someone ever used it and can tell me whether it still works for them, it would be very helpful, because the current version doesn't work for me. If someone who never used it can help me debugging it by helping me build old versions of it, that might also help a lot.
leat has quit [Remote host closed the connection]
leat has joined #nixos
<boomshroom>
How's work on private store files coming along?
<stammon>
I'm not working at it and not very up to date or in touch with the responsible persons. But from what I can tell, there have been several proposals and ideas over the past years. So far nothing practical for me has shown up or seems to be coming.
<stammon>
But maybe others have a different view on this. Also there is something going on with nixops. I just don't put anything sensitive (like passwords) in my config files. Also I don't publish it and use a private gitlab, which works for me
meck has quit [Quit: WeeChat 2.4]
fendor_ has joined #nixos
leat has quit [Remote host closed the connection]
fendor has quit [Ping timeout: 264 seconds]
leat has joined #nixos
civodul has quit [Quit: ERC (IRC client for Emacs 26.1)]
xkapastel has quit [Quit: Connection closed for inactivity]
fendor_ is now known as fendor
<rycee>
logzet: Try ~/.xprofile
<das_j>
Is it possible to use variables in <>? Something like <nixos-${release}>?
<elvishjerricco>
boomshroom: I wouldn't hold my breath on private store files ever coming to Nix proper. Best thing to do is store secrets outside the store (as that link does), or only store encrypted files in the store
logzet has joined #nixos
justanotheruser has quit [Ping timeout: 264 seconds]
<logzet>
rycee: Thanks! It works :)
lielazivee has joined #nixos
meck has joined #nixos
meck has quit [Client Quit]
leat has quit [Remote host closed the connection]
ayerhart has joined #nixos
leat has joined #nixos
meck has joined #nixos
<therealwaphire[m>
Is there a way I can have `home-manager` directly installed when I'm installing the system?
<{^_^}>
[nixpkgs] @worldofpeace pushed 3 commits to master: https://git.io/fjLbX
leat has joined #nixos
pointfourone has joined #nixos
wolfman154 has joined #nixos
<wolfman154>
How do I remove older configurations and packages?
drakonis has joined #nixos
drakonis_ has quit [Ping timeout: 245 seconds]
drakonis_ has joined #nixos
meck has quit [Quit: WeeChat 2.4]
<logzet>
wolfman154: Check out nix-collect-garbage
<logzet>
e.g. nix-collect-garbage -d
lielazivee has quit [Ping timeout: 246 seconds]
<wolfman154>
logzet: thanks, what is the: -d(vs without)?
<wolfman154>
-d
leat has quit [Remote host closed the connection]
leat has joined #nixos
<wolfman154>
logzet++
<{^_^}>
logzet's karma got increased to 1
meck has joined #nixos
pointfourone has quit [Remote host closed the connection]
<ddellacosta>
a bit of a longshot here, but has anyone experienced setting up a networked HP printer and had it fail continuously with an error message about the firewall blocking the connection (which is not actually true)?
<logzet>
wolfman154: Delete everything not needed in the current generation, see nix-collect-garbage --help ;)
<ddellacosta>
using hp-setup
<ddellacosta>
trying to set the printer manually in the CUPS admin doesn't work either
<wolfman154>
logzet: ok thanks, I’m still new to nixos (only three weeks using it)
<{^_^}>
[nixpkgs] @worldofpeace pushed 2 commits to master: https://git.io/fjLN3
gagbo has joined #nixos
<wolfman154>
Yaniel: I did: echo $SHELL and it shows bash, what is the command that shows what terminal emulator I’m using?
<Yaniel>
there isn't any
<Yaniel>
you might not be using a terminal emulator
<Yaniel>
you could be using the linux console
<Yaniel>
your could be SSHing in
<Yaniel>
you could be connected to a UART debug console via a serial port
freeman42x has quit [Ping timeout: 252 seconds]
<wolfman154>
Oh my xmonad text has: terminal = “urxvt” , should I remove it?
<wolfman154>
Yaniel: ?
<Yaniel>
no, why?
<Yaniel>
that is the terminal emulator that gets started when you press the "open new terminal window" key
<Yaniel>
which in turn launches your login shell (bash if you haven't changed it)
i1nfusion1 has quit [Remote host closed the connection]
i1nfusion has quit [Remote host closed the connection]
Qubasa has joined #nixos
i1nfusion1 has joined #nixos
<wolfman154>
Yaniel: oh ok, I’m just trying to fix some errors to get nixos to rebuild without errors.
<wolfman154>
Yaniel++
<{^_^}>
Yaniel's karma got increased to 2
i1nfusion has joined #nixos
<iceypoi>
wolfman154: you also need to make sure urxvt is installed, otherwise nothing will happen in xmonad
<Ralith>
Yaniel: $TERM is a thing, though
<Ralith>
it even propagates over SSH!
slack1256 has joined #nixos
<wolfman154>
iceypoi: how do I check if it is installed or not?
ddellacosta has quit [Ping timeout: 246 seconds]
<Yaniel>
$TERM is a lie though
<Yaniel>
or an approximation
<iceypoi>
type: which urxvt
<iceypoi>
if you get a path, it is
<iceypoi>
otherwise it is not
infinisil has quit [Quit: Configuring ZNC, sorry for the joins/quits!]
<Ralith>
Yaniel: I don't get the impression he's looking for subtleties here :p
leat has quit [Remote host closed the connection]
ddellacosta has joined #nixos
infinisil has joined #nixos
<wolfman154>
iceypoi: it’s not so do I remove from xmonad or install it? 16:59 wolfman154: Oh my xmonad text has: terminal = “urxvt” , should I remove it?
leat has joined #nixos
<iceypoi>
wolfman154: you need to have *some* terminal emulator installed, otherwise you won't be able to open a console at all in xmonad. And urxvt is just fine as a terminal emulator, that's the one I use. I propose intalling it
<wolfman154>
I’m confused, just trying to figure why nixos is not rebuilding correctly
<iceypoi>
wolfman154: when you say "is not rebuilding" what exactly do you mean?
<wolfman154>
iceypoi: so that’s why when I would press: mod + shift + enter , a terminal would not open, I feel dumb :(
<wolfman154>
iceypoi: gdm and gnome don’t want to work with my custom keyboard layout or xmonad so I removed them, I think I need to use the garbage collector after rebuilding so old depencies are not used?
Anton-Latukha has quit [Quit: Leaving.]
<samueldr>
they will be present in the store, but shouldn't really be used unless actively used
<samueldr>
and if actively used, they won't be collected anyway from a GC
<wolfman154>
I’m looking at libinput on nixos options, I still don’t know what syntax to use to make the touchpad just like how it is in gnome3, do you guys know the syntax for this?
<samueldr>
in other words, removing from config and rebuilding should be sufficient, even though they will be in the store, there wouldn't be references left to them
<iceypoi>
wolfman154: I haven't run GC yet, it works pretty well and versions don't interfere
<wolfman154>
samueldr++
<{^_^}>
samueldr's karma got increased to 69
<wolfman154>
iceypoi++
<{^_^}>
iceypoi's karma got increased to 1
sam_ has joined #nixos
<wolfman154>
17:14 wolfman154: I’m looking at libinput on nixos options, I still don’t know what syntax to use to make the touchpad just like how it is in gnome3, do you guys know the syntax for this?
leat has quit [Remote host closed the connection]
<samueldr>
I've seen users here report GCs within the hundred of GBs; and things keep working fine
leat has joined #nixos
<samueldr>
removing all older generations is also not the best idea considering how it can be used to get back into a working system, sometimes
<iceypoi>
samueldr: Is there some kind of best practice like e.g. run a cron job to GC > 90 days old or something?
<wolfman154>
Ok I won’t use it I think it’s because I was using urxvt in xmonad even though it was not installed, that’s why the terminal would not open
<wolfman154>
:(
<slack1256>
iceypoi: Not a best practice(tm), but keeping the last two working generations on disk has worked great for me
<samueldr>
I personally do it with --older-than 14d whenever I feel cramped in my dedicated drive :)
<wolfman154>
So only use gc if you are running out of storage?
<samueldr>
or bi-weekly on my laptop with only 128GB space (projects on it are big!)
<jasongrossman>
Yes, only use GC if you're running out of storage.
<samueldr>
though of note: there are multiple ways to look at GC
<samueldr>
(1) removing unneeded things (2) removing older generations
cantstanya has quit [Ping timeout: 256 seconds]
<samueldr>
(1) can be run however and whenever and should be safe; it might purge things that would have been useful for a nix-shell invocation, but won't remove generations
<samueldr>
this is what happens with nix-collect-garbage without passing -d or --delete-older-than; it removes all things that aren't held by "GC roots"
<samueldr>
while (2) can be done in a rather automatic way with -d or --delete-older-than
cantstanya has joined #nixos
<samueldr>
but keep in mind that GC roots are not only made of generations! any leftover `result` folder from a nix-build, for example, is a GC root and could realistically keep a sizeable closure from being collected
<samueldr>
nix-store --gc --print-roots # this will print all roots, including those from running software that could be otherwise unneeded from GC roots
<wolfman154>
samueldr: I have been using nixos for three weeks, how long until I get comfortable with it?
<samueldr>
e.g. here I see {memory:72} -> /nix/store/73bda0a26bda42v22y9fj051r44wsyma-libpng-apng-1.6.35 <- this means that something in memory refers to something in that specific store path
<jasongrossman>
I have a new VPS with very little disk space which has GC roots that I don't understand. It's new and I've never installed anything on it except via /etc/nixos/configuration.nix ... and yet it has packages installed that are not mentioned in the current configuration, even after sudo nix-collect-garbage -d :-(
gentauro has quit [Ping timeout: 268 seconds]
<samueldr>
wolfman154: varies greatly with how comfortable one is with Linux and general, and by this I mean also the deeper undestanding; then how much time you spend learning the tools; and finally the language (nix) itself
<samueldr>
highly variable I'd say
<jasongrossman>
Specifically, I installed something that depends on GHC (using configuration.nix), then removed it from configuration.nix, then garbage collected, but GHC is still in my store.
leat has quit [Remote host closed the connection]
Rusty1 has joined #nixos
leat has joined #nixos
<samueldr>
I immersed myself deeply at first and it took a while to be 100% confident and groking most things
iyzsong has joined #nixos
gentauro has joined #nixos
<samueldr>
jasongrossman: use nix-store --gc --print-roots to look at existing roots?
<jasongrossman>
samueldr: I don't understand the output of that ... but oh wait. Probably pandoc depends on GHC. I still have pandoc in my configuration.nix. So maybe I don't have a problem.
<samueldr>
and there's the nix why-depends command that you could use, but I'm not sure how it works when you don't how what depends on a thing
<samueldr>
yeah, pandoc has quite the baggage in Nixpkgs
<jasongrossman>
(Except that I wish pandoc didn't depend on GHC, just because disk space.)
<jasongrossman>
samueldr: Thanks!
<wolfman154>
Thanks and later guys I’m going to take a break
<jasongrossman>
Ah, but I have SEVERAL versions of GHC in my store, so I do still have a problem. I'll paste my GC roots here and see whether samueldr or anyone else would be willing to help me understand them.
<samueldr>
one thing that could help, jasongrossman, is rebooting the server if it hasn't been for a while, due to the {memory} roots
<infinisil>
I have at least 8 GHC's in my store :)
<samueldr>
I don't even want to look, I'm not even a haskeller!
sam_ has quit [Read error: Connection reset by peer]
<jasongrossman>
samueldr: Thanks. Tried that.
sam_ has joined #nixos
<samueldr>
though I did just gc (without removing older generations!) I just freed ~22GB apparently
<jasongrossman>
samueldr: Yay!
<boomshroom>
Going for a while without a GC can delete HUGE chunks of the store when you finally do.
<samueldr>
I think it was clever, the other day, who just shed ~300GiB
<dsx>
How to create directories (such as /tmp for example) using pkgs.dockerTools.buildLayeredImage?
r0x has quit [Quit: Leaving]
<infinisil>
Oh boy, it seems that I have many more GHC's than 8
<boomshroom>
Decided to do my own GC just to see what it would do.
<jasongrossman>
I'm having trouble using wgetpaste, because my fingers are so used to wget that they type a space after "wget"!
<boomshroom>
I also probably should have done an update before the GC, but it's a little late now.
leat has quit [Remote host closed the connection]
<samueldr>
wouldn't have collected much more considering memory roots, unless you would have rebooted :)
leat has joined #nixos
<boomshroom>
(Then again the state I have now would have still been rooted since I'm not doing -d)
<jasongrossman>
I haven't been paying much attention to what I've installed. I could rebuild this server from scratch fairly easily, and then watch my GC roots accumulate in real time.
<jasongrossman>
But apparently I have several profiles with GC roots, even though I've done sudo nix-collect-garbage -d
<jasongrossman>
Could it be because I've got named profiles?
<samueldr>
looks like you have four generations, and then those six profiles...
<samueldr>
... I have no experience with profiles
<jasongrossman>
I don't know why I have four generations after using -d :-(
<samueldr>
can't say really
<jasongrossman>
(A side issue: I used named generations on my main computer with systemd-boot, and I find them very useful BUT on the system I'm talking about today, with grub, they don't appear in the boot menu. I don't know why they don't.)
<jasongrossman>
samueldr: OK. I expect it's got something to do with those named profiles then. I'll get rid of them somehow.
<jasongrossman>
samueldr: That's some progress. :-) Thanks.
<samueldr>
jasongrossman: bootloaders don't have equivalent support for extra features :/ it's a bit annoying to me; all "generations" generation is handled in their own isolated script for all bootloaders
<samueldr>
so I guess grub doesn't have profiles support? or uh, maybe they're under a submenu since systemd-boot I think cannot do submenus?
<jasongrossman>
samueldr: I see. Yet another documentation problem! It works wonderfully well on my MacBook with systemd-boot - that makes me happy at least.
<jasongrossman>
samueldr: They are under a submenu, yes, but even there their names are not displayed properly.
<jasongrossman>
samueldr: By the way, I mistyped above. I DO know why I have 4 generations, but I don't know why my named profiles still have GC roots.
<boomshroom>
`deleting '/nix/store/trash'` Ah, the final step
<jasongrossman>
samueldr: I can solve my personal problem easily by rebuilding the server (yay NixOS making that easy).
<jasongrossman>
samueldr: I'll find out later whether my problem comes back.
<samueldr>
the nixos-rebuild manpage explicitly states submenus for GRUB 2, so uh, I don't know :)
<samueldr>
(and no mention on how to remove them)
<jasongrossman>
samueldr: So something is broken, and it's probably grub-specific, and it might just be documentation that's broken. I'm happier now that I understand that.
<jasongrossman>
samueldr: For example, the problem might be that the way grub is set up by this VPS host I need to enable some option to see the names. But actually I don't want the names badly enough to risk these GC problems. So I'm going to cut my losses and stop using named generations ... except on systemd-boot.
josiah_sama has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
leat has quit [Remote host closed the connection]
<jasongrossman>
For posterity, I should say that it looks like there's some problem with GC and named generations, and that presumably has nothing to do with bootloaders.
leat has joined #nixos
<samueldr>
they're not part of "generations" like the other generations, AFAICT
<slack1256>
I would like to associate a generation with a version of nixpkgs. For system generations is possible reading manifest.nix, but for user generations you can't :-(
<jasongrossman>
samueldr: That would explain the problem. We have a documentation problem with nix-collect-garbage -d then.
<samueldr>
not sure, that might be an expectation that "profiles" are "generations" in the same sense that nix-env and nixos-rebuild assumes them to work, while it might be something else?
<samueldr>
I'm looking into it, a bit curious about what's different
<jasongrossman>
samueldr: Just in terms of the documentation, I believe it's slightly wrong. The manual says:
xkapastel has quit [Quit: Connection closed for inactivity]
<jasongrossman>
samueldr: A good improvement to the documentation might be to add "except when using profiles" to the GC section!
<boomshroom>
I forgot about `deleting unused links...`. It's been on that for a while.
<samueldr>
jasongrossman: or more appropriately, "old generation roots"; since it doesn't remove any other kind of roots; e.g. won't clobber any misc. result symlinks
<jasongrossman>
samueldr and posterity: I've solved my immediate problem, which was GC roots for named generations not being garbage collected by nix-collect-garbage -d.
<jasongrossman>
samueldr: yes.
leat has quit [Remote host closed the connection]
<jasongrossman>
samueldr and posterity: The solution is to `cd /nix/var/nix/profiles/system-profiles`, check that there's nothing there you want to keep, do `rm *`, THEN do `nix-collect-garbage -d`.
leat has joined #nixos
<jasongrossman>
samueldr: And then dance because you have your disk space back.