| 9 May 2024 |
@mfed3:matrix.org | Or is that actually doing a nix flake update then building it | 12:25:43 |
| remi-gelinas joined the room. | 13:25:37 |
| Charles Hamilton joined the room. | 19:19:05 |
@aidalgol:matrix.org | In reply to @mfed3:matrix.org
Hey guys I have a question on autoupgrade, what does this actually do:
system.autoUpgrade = {
enable = true;
allowReboot = true;
flake = inputs.self.outPath;
flags = [ "--update-input" "nixpkgs" "--print-build-logs" ];
};
Going by the description of system.autoUpgrade.flags, this will update the nixpkgs input to your system config flake.
If you are using flakes and use a local repo you can add [ "--update-input" "nixpkgs" "--commit-lock-file" ] to update nixpkgs.
| 20:40:24 |
@aidalgol:matrix.org | You could also point system.autoUpgrade.flake to a remote flake (e.g. a git repo), and something else keeps that flake up to date, and the nixos-rebuild systemd job on your server will just apply the flake as-is. | 20:42:16 |
@mfed3:matrix.org | It isn't very clear because I saw peoples usage on other websites saying they run it this way, and it will bump the lock file, meaning it blows past the lock file and changes the one on your local | 21:15:48 |
@mfed3:matrix.org | With the flag you mentioned it will not only blow past your lock file it will update and commit it | 21:16:35 |
@mfed3:matrix.org | So I guess to keep it in line with the flake you want no flags? | 21:17:32 |
| vzxplnhqr joined the room. | 21:17:54 |
vzxplnhqr | Hi flake people. I am trying to follow the "make menuconfig" section of https://nixos.wiki/wiki/Linux_kernel but I do not know how to translate it to the world of flakes:
$ nix-shell -E 'with import <nixpkgs> {}; linux.overrideAttrs (o: {nativeBuildInputs=o.nativeBuildInputs ++ [ pkg-config ncurses ];})'
[nix-shell] $ unpackPhase && cd linux-*
[nix-shell] $ patchPhase
[nix-shell] $ make menuconfig
| 21:19:15 |
vzxplnhqr | (because without figuring this out, I get errors pertaining to ncurses not existing in the build and so on) | 21:20:47 |
@mfed3:matrix.org | My use case is i want to decide when to bump the flag to a version i want and then push that out to my machines and they just check the flake file and update to that version overnight, not updating past that | 21:21:48 |
@aidalgol:matrix.org | Sounds like you want no flags, then. | 21:30:14 |
samasaur | that is correct, you want no flags | 22:45:56 |
@mfed3:matrix.org | Perfect thanks | 23:46:49 |
| 10 May 2024 |
| isabel changed their profile picture. | 13:15:04 |
| EsperLily [she/her] changed their profile picture. | 18:57:03 |
| @ayyz12:matrix.org joined the room. | 22:40:11 |
| 11 May 2024 |
@mfed3:matrix.org | I did a bit of refactoring of my system and i switched my config over to
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations = {
host1 = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
system = "x86_64-linux";
modules = [ ./hosts/host1 ];
};
instead of
modules = [ ./hosts/host1/configuration.nix ] ;
| 01:53:04 |
@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/fed-gc/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:20 |
@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 | Ugh nevermind figured it out, this flakes thing is so weird it doesn't know files exist unless you stage them or commit them | 02:00:14 |
@mfed3:matrix.org | Can't just refactor whatever you want and expect it to pick up the files you changed | 02:00:48 |
samasaur | yeah if your flake is a git repository then all files you want to use must be tracked by git | 03:10:59 |
| skippy changed their display name from skip to skippy. | 03:44:06 |
@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 | 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 | https://github.com/NixOS/nix/issues/4250 | 23:05:48 |
@abmantis:abcosta.com | meh, bug :( | 23:05:51 |
| 12 May 2024 |
| @verlannow:matrix.org joined the room. | 07:22:03 |