Skip to content

Commit 19ca968

Browse files
committed
fix: add elmerfem channel
When the WSL image is installed, it cannot access the flake inputs anymore, so Elmer has to be installed via a channel.
1 parent 1eb4a93 commit 19ca968

File tree

3 files changed

+28
-7
lines changed

3 files changed

+28
-7
lines changed

flake.lock

+19-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@
4848
wsl.elmer.enable = true;
4949
programs.bash.loginShellInit = "elmer-wsl-welcome";
5050

51+
nixpkgs.overlays = [ inputs.elmer.overlay ];
52+
5153
# When the config is built from a flake, the NIX_PATH entry of nixpkgs is set to its flake version.
5254
# Per default the resulting systems aren't flake-enabled, so rebuilds would fail.
5355
# Note: This does not affect the module being imported into your own flake.
@@ -73,7 +75,6 @@
7375
system = "x86_64-linux";
7476
modules = [
7577
self.nixosModules.default
76-
{ nixpkgs.overlays = [ inputs.elmer.overlay ]; }
7778
(config { })
7879
];
7980
};

modules/build-tarball.nix

+7-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ let
1212
# https://github.com/nix-community/NixOS-WSL
1313
1414
{ config, lib, pkgs, ... }:
15-
15+
let
16+
elmerfem = import <elmerfem>;
17+
in
1618
{
1719
imports = [
1820
# include NixOS-WSL modules
@@ -24,6 +26,8 @@ let
2426
wsl.elmer.enable = true;
2527
${lib.optionalString (!config.wsl.nativeSystemd) "wsl.nativeSystemd = false;"}
2628
29+
nixpkgs.overlays = [ elmerfem.overlay ];
30+
2731
# This value determines the NixOS release from which the default
2832
# settings for stateful data, like file locations and database versions
2933
# on your system were taken. It's perfectly fine and recommended to leave
@@ -78,8 +82,9 @@ in
7882
--system ${config.system.build.toplevel} \
7983
--substituters ""
8084
81-
echo "[Elmer-WSL] Adding channel..."
85+
echo "[Elmer-WSL] Adding channels..."
8286
nixos-enter --root "$root" --command 'HOME=/root nix-channel --add https://github.com/ElmerCSC/Elmer-WSL/archive/refs/heads/main.tar.gz elmer-wsl'
87+
nixos-enter --root "$root" --command 'HOME=/root nix-channel --add https://github.com/ElmerCSC/elmerfem/archive/refs/heads/devel.tar.gz elmerfem'
8388
8489
echo "[Elmer-WSL] Adding default config..."
8590
${if cfg.configPath == null then ''

0 commit comments

Comments
 (0)