diff --git a/flake.nix b/flake.nix index dd706333..d9064c8a 100644 --- a/flake.nix +++ b/flake.nix @@ -97,7 +97,7 @@ # However, the configuration name can also be specified using `sudo nixos-rebuild switch --flake /path/to/flakes/directory#`. # The `nixpkgs.lib.nixosSystem` function is used to build this configuration, the following attribute set is its parameter. # Run `sudo nixos-rebuild switch --flake .#msi-rtx4090` in the flake's directory to deploy this configuration on any NixOS system - msi-rtx4090 = nixpkgs.lib.nixosSystem { + msi-rtx4090 = nixpkgs.lib.nixosSystem rec { system = "x86_64-linux"; # The Nix module system can modularize configurations, improving the maintainability of configurations. @@ -116,7 +116,14 @@ # # Only these four parameters can be passed by default. # If you need to pass other parameters, you must use `specialArgs` by uncomment the following line - specialArgs = inputs; # pass all inputs into all sub modules. + specialArgs = { + inherit inputs; + pkgs-stable = import inputs.nixpkgs-stable { + system = system; # refer the `system` parameter form outer scope recursively + # To use chrome, we need to allow the installation of non-free software + config.allowUnfree = true; + }; + }; modules = [ ./hosts/msi-rtx4090 diff --git a/home/linux/hyprland/wayland-apps.nix b/home/linux/hyprland/wayland-apps.nix index 8960ed82..32bb64e6 100644 --- a/home/linux/hyprland/wayland-apps.nix +++ b/home/linux/hyprland/wayland-apps.nix @@ -1,13 +1,10 @@ { pkgs, - nixpkgs-stable, + pkgs-stable, ... -}: let - pkgs-stable = import nixpkgs-stable { - system = pkgs.system; - config.allowUnfree = true; - }; - in { +}: + +{ # TODO vscode & chrome both have wayland support, but they don't work with fcitx5, need to fix it. programs = {