!SgYlXivkogarTVcnZO:nixos.org

Nix Flakes

862 Members
167 Servers

You have reached the beginning of time (for this room).


SenderMessageTime
25 Jul 2023
@ulli:hrnz.li@ulli:hrnz.liif you do pass pkgs to nixosSystem, this pkgs needs to be correctly instantiated16:44:34
@moots:matrix.orgmootshmm guess i have to dig into flake-parts16:48:06
@moots:matrix.orgmootscause im not sure where i can edit the pkgs var which it uses16:51:10
@ulli:hrnz.li@ulli:hrnz.liyou want to pass pkgs directly to nixosSystem, and not inside specialArgs (which will probably be ignored)16:56:02
@2xsaiko:tchncs.de@2xsaiko:tchncs.de

moots: hrnz already said it, but specifically you should just be able to set these nixos options and that's all you need, keep the rest like a non-cross system

{
  nixpkgs.buildPlatform = "x86_64-linux";
  nixpkgs.hostPlatform = "aarch64-linux";
}
17:16:39
@2xsaiko:tchncs.de@2xsaiko:tchncs.deI feel like setting pkgs like that will prevent e.g. nixpkgs.overlays from working17:17:04
@ulli:hrnz.li@ulli:hrnz.liyes, when pkgs is passed to nixosSystem, everything in the nixpkgs nixos-module won't have any effect anymore17:17:54
@moots:matrix.orgmoots
In reply to @2xsaiko:tchncs.de

moots: hrnz already said it, but specifically you should just be able to set these nixos options and that's all you need, keep the rest like a non-cross system

{
  nixpkgs.buildPlatform = "x86_64-linux";
  nixpkgs.hostPlatform = "aarch64-linux";
}
that doesnt work, and i havent figured out yet how to change nixpkgs before its passed to the nixos config when using flake-parts withsystem
17:21:55
@ulli:hrnz.li@ulli:hrnz.liI use https://git.hrnz.li/Ulli/nixos/src/branch/main/hosts/flake-module.nix#L104 and it works like a charm17:23:20
@2xsaiko:tchncs.de@2xsaiko:tchncs.deoh interesting, is there a reason to explicitly set config like that? I just have these for armv7l: https://git.dblsaiko.net/systems/tree/configurations/turris/default.nix#n3517:27:09
@moots:matrix.orgmoots
In reply to @ulli:hrnz.li
I use https://git.hrnz.li/Ulli/nixos/src/branch/main/hosts/flake-module.nix#L104 and it works like a charm
works i think
17:27:34
@2xsaiko:tchncs.de@2xsaiko:tchncs.deand I assume "doesn't work" means it doesn't try to cross-compile with just those? that's weird17:28:25
@moots:matrix.orgmoots
In reply to @ulli:hrnz.li
I use https://git.hrnz.li/Ulli/nixos/src/branch/main/hosts/flake-module.nix#L104 and it works like a charm
* works i think :)
17:27:36
@2xsaiko:tchncs.de@2xsaiko:tchncs.dewait, you're just calling nixpkgs.lib.nixosSystem yourself from what you sent, then this should have nothing to do with flake-parts17:31:17
@moots:matrix.orgmoots
In reply to @2xsaiko:tchncs.de
and I assume "doesn't work" means it doesn't try to cross-compile with just those? that's weird
i didnt had it as argument to the function, but as part of the configuration
17:30:00
@2xsaiko:tchncs.de@2xsaiko:tchncs.de I think you'll want to add inherit (pkgs) system; in your nixosSystem call though 17:31:53
@moots:matrix.orgmoots

like
had it like
{ nixpkgs.buildPlatform = "x86_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";

Oracle Cloud uses EFI boot

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

}

17:30:43
@moots:matrix.orgmoots *

like
had it like

{
  nixpkgs.buildPlatform = "x86\_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";

# Oracle Cloud uses EFI boot

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

}
17:30:53
@moots:matrix.orgmoots

not like

{  
  # Oracle Cloud uses EFI boot
  boot.loader.systemd-boot.enable = true;
  boot.loader.efi.canTouchEfiVariables = true;
} {nixpkgs.buildPlatform = "x86_64-linux";
  nixpkgs.hostPlatform = "aarch64-linux";
}
17:31:14
@moots:matrix.orgmootsyeah i was confused cause flake-parts withsystem sets smth for nixpkgs17:32:16
@moots:matrix.orgmootseither way it doesnt work for me rn :(17:32:25
@moots:matrix.orgmoots

error: builder for '/nix/store/cwjscarzmmrdhjbsqvwp21qxwnk2sr4q-aarch64-unknown-linux-gnueabihf-stage-static-gcc-12.2.0.drv' failed with exit code 2;
       last 10 log lines:
       > checking for O_CLOEXEC... yes
       > checking for AF_UNIX... yes
       > checking for AF_INET6... yes
       > checking for _LK_LOCK... no
       > checking if mkdir takes one argument... no
       > This target does not support --with-float.
17:32:37
@moots:matrix.orgmootswait my mistake17:33:14
@ulli:hrnz.li@ulli:hrnz.li
In reply to @2xsaiko:tchncs.de
oh interesting, is there a reason to explicitly set config like that? I just have these for armv7l: https://git.dblsaiko.net/systems/tree/configurations/turris/default.nix#n35
there isn't really a reason to do this, this is mostly just leftover from $experiments
17:39:36
@2xsaiko:tchncs.de@2xsaiko:tchncs.deah, okay :p17:40:56
@2xsaiko:tchncs.de@2xsaiko:tchncs.de
In reply to @moots:matrix.org

like
had it like

{
  nixpkgs.buildPlatform = "x86\_64-linux";
nixpkgs.hostPlatform = "aarch64-linux";

# Oracle Cloud uses EFI boot

boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

}
yeah, that's where it should go, these are configuration options
17:42:40

Show newer messages


Back to Room ListRoom Version: 6