!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

889 Members
180 Servers

Load older messages


SenderMessageTime
11 May 2024
@mfed3:matrix.org@mfed3:matrix.org *

I renamed the file from configuration.nix to default.nix but when I try to build the flake it complains the file doesn't exist

   error: getting status of '/nix/store/mgakxblir0hipxmdd41xrspq7xzd4z1s-source/hosts/host1/default.nix': No such file or directory

it's translating it properly from a folder to looking for default.nix why would it not think it's there?

01:54:32
@mfed3:matrix.org@mfed3:matrix.orgUgh nevermind figured it out, this flakes thing is so weird it doesn't know files exist unless you stage them or commit them02:00:14
@mfed3:matrix.org@mfed3:matrix.orgCan't just refactor whatever you want and expect it to pick up the files you changed02:00:48
@samasaur:matrix.orgsamasauryeah if your flake is a git repository then all files you want to use must be tracked by git03:10:59
@skiparoo:matrix.orgskippy changed their display name from skip to skippy.03:44:06
@abmantis:abcosta.com@abmantis:abcosta.com indeed, if I run nix-collect-garbage, nix develop will download stuff again, even with the --profile flag (and I've checked that the symlink is created) 22:33:51
@abmantis:abcosta.com@abmantis:abcosta.com
copying path '/nix/store/cbv4vws08zb992ncmm05z7ax0hzvcgxy-source' from 'https://cache.nixos.org'...
this path will be fetched (0.10 MiB download, 0.10 MiB unpacked):
  /nix/store/mr8v83npjv2na7w6q922dcjxxfyd58a0-bash-interactive-5.2p26-man
copying path '/nix/store/mr8v83npjv2na7w6q922dcjxxfyd58a0-bash-interactive-5.2p26-man' from 'https://cache.nixos.org'...

That is what it prints with --verbose

22:34:56
@abmantis:abcosta.com@abmantis:abcosta.comhttps://github.com/NixOS/nix/issues/425023:05:48
@abmantis:abcosta.com@abmantis:abcosta.commeh, bug :(23:05:51
12 May 2024
@verlannow:matrix.org@verlannow:matrix.org joined the room.07:22:03
13 May 2024
@conr:mozilla.org@conr:mozilla.org joined the room.01:51:07
@conr:mozilla.org@conr:mozilla.org Is this ok to run nix flake update && sudo nixos-rebuild switch --flake .#device --upgrade ~once a month? 01:53:57
@aidalgol:matrix.org@aidalgol:matrix.orgDepends on what your system is for. You may want certain security fixes sooner than that.02:36:00
@aidalgol:matrix.org@aidalgol:matrix.org BTW, I'm pretty sure the --upgrade flag to nixos-rebuild does nothing when using a flake. 02:36:36
@conr:mozilla.org@conr:mozilla.org aidalgol: Homeserver... plex, samba, nothing crazy. This is my first time using Nixos. 02:48:27
@aidalgol:matrix.org@aidalgol:matrix.orgSounds lower-risk then.02:49:17
@conr:mozilla.org@conr:mozilla.org * aidalgol: Homeserver... plex, samba, nothing crazy. This is my first time using Nixos. I just run it on a low power mini-atx build, 24/7. 02:49:19
@aidalgol:matrix.org@aidalgol:matrix.org I'd say keep an eye on #security:nixos.org for anything that affects any external-facing services or the OS itself, and act accordingly. 02:49:59
@conr:mozilla.org@conr:mozilla.org
In reply to @aidalgol:matrix.org
BTW, I'm pretty sure the --upgrade flag to nixos-rebuild does nothing when using a flake.
How do I upgrade the nixos system files then? Or does nix flake update do that for me?
02:51:15
@aidalgol:matrix.org@aidalgol:matrix.org That's what nix flake update does, yeah. 02:51:29
@aidalgol:matrix.org@aidalgol:matrix.orgYou should keep your config under version control.02:53:08
@aidalgol:matrix.org@aidalgol:matrix.org And then use nix flake update --commit-lock-file. 02:53:23
@conr:mozilla.org@conr:mozilla.org But do I have manually hardcode nixos versions, like nixpkgs.url = "github:nixos/nixpkgs/nixos-23.12"; when its ready? 02:53:27
@aidalgol:matrix.org@aidalgol:matrix.org Yes, nix flake update only updates the VCS revision each input points to, but it does not change the input URL. So if you were tracking nixos-unstable, you would never need to change the input URL, but if you're tracking versioned releases, you will need to do that manually. This goes for flakes in general, not just with nixpkgs/NixOS. 02:55:20
@conr:mozilla.org@conr:mozilla.orgyeah, i wanted to stay on stable because it was my first time, but unstable seems like the way to go. my plex version is like 8mo behind.02:57:28
@aidalgol:matrix.org@aidalgol:matrix.orgWith how easy it is to roll back NixOS, tracking unstable is pretty safe.03:00:28
@conr:mozilla.org@conr:mozilla.orgI'll have to try that next time I have a free weekend.03:07:51
@arianvp:matrix.org@arianvp:matrix.org left the room.17:38:48
@fomosapien:matrix.org@fomosapien:matrix.org changed their display name from Triskelion to Triskelion (AFK).21:26:14
14 May 2024
@azahi:azahi.cc@azahi:azahi.cc joined the room.10:26:59

Show newer messages


Back to Room ListRoom Version: 6