Skip to content

Commit

Permalink
fix: add elmerfem channel
Browse files Browse the repository at this point in the history
When the WSL image is installed, it cannot access the flake inputs
anymore, so Elmer has to be installed via a channel.
  • Loading branch information
mk3z committed Aug 27, 2024
1 parent 1eb4a93 commit 19ca968
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 7 deletions.
23 changes: 19 additions & 4 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
wsl.elmer.enable = true;
programs.bash.loginShellInit = "elmer-wsl-welcome";

nixpkgs.overlays = [ inputs.elmer.overlay ];

# When the config is built from a flake, the NIX_PATH entry of nixpkgs is set to its flake version.
# Per default the resulting systems aren't flake-enabled, so rebuilds would fail.
# Note: This does not affect the module being imported into your own flake.
Expand All @@ -73,7 +75,6 @@
system = "x86_64-linux";
modules = [
self.nixosModules.default
{ nixpkgs.overlays = [ inputs.elmer.overlay ]; }
(config { })
];
};
Expand Down
9 changes: 7 additions & 2 deletions modules/build-tarball.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ let
# https://github.com/nix-community/NixOS-WSL
{ config, lib, pkgs, ... }:
let
elmerfem = import <elmerfem>;
in
{
imports = [
# include NixOS-WSL modules
Expand All @@ -24,6 +26,8 @@ let
wsl.elmer.enable = true;
${lib.optionalString (!config.wsl.nativeSystemd) "wsl.nativeSystemd = false;"}
nixpkgs.overlays = [ elmerfem.overlay ];
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It's perfectly fine and recommended to leave
Expand Down Expand Up @@ -78,8 +82,9 @@ in
--system ${config.system.build.toplevel} \
--substituters ""
echo "[Elmer-WSL] Adding channel..."
echo "[Elmer-WSL] Adding channels..."
nixos-enter --root "$root" --command 'HOME=/root nix-channel --add https://github.com/ElmerCSC/Elmer-WSL/archive/refs/heads/main.tar.gz elmer-wsl'
nixos-enter --root "$root" --command 'HOME=/root nix-channel --add https://github.com/ElmerCSC/elmerfem/archive/refs/heads/devel.tar.gz elmerfem'
echo "[Elmer-WSL] Adding default config..."
${if cfg.configPath == null then ''
Expand Down

0 comments on commit 19ca968

Please sign in to comment.