fix(wsl2): use shared Home Manager configuration
This commit is contained in:
parent
0c4b2d691d
commit
227dff7fd1
|
@ -8,10 +8,11 @@
|
||||||
|
|
||||||
outputs = inputs@{ flake-parts, self, ... }:
|
outputs = inputs@{ flake-parts, self, ... }:
|
||||||
let
|
let
|
||||||
|
system = "x86_64-linux";
|
||||||
username = "opdavies";
|
username = "opdavies";
|
||||||
|
|
||||||
nixos-system = import ./system/nixos { inherit inputs username; };
|
nixos-system = import ./system/nixos { inherit inputs username; };
|
||||||
wsl-system = import ./system/wsl2 { inherit inputs username; };
|
wsl-system = import ./system/wsl2 { inherit inputs system username; };
|
||||||
in
|
in
|
||||||
flake-parts.lib.mkFlake { inherit inputs; } {
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
systems = [ "x86_64-linux" ];
|
systems = [ "x86_64-linux" ];
|
||||||
|
|
2
justfile
2
justfile
|
@ -8,7 +8,7 @@ nixos profile command: && clean
|
||||||
sudo nixos-rebuild {{ command }} --flake .#{{ profile }}
|
sudo nixos-rebuild {{ command }} --flake .#{{ profile }}
|
||||||
|
|
||||||
wsl2 command: && clean
|
wsl2 command: && clean
|
||||||
home-manager {{ command }} -f home-manager/home.nix --flake .#wsl2
|
NIXPKGS_ALLOW_UNFREE=1 home-manager {{ command }} --flake .#wsl2 --impure
|
||||||
|
|
||||||
update:
|
update:
|
||||||
nix flake update
|
nix flake update
|
||||||
|
|
|
@ -1,27 +1,16 @@
|
||||||
{ inputs, username }:
|
{ inputs, system, username }:
|
||||||
|
|
||||||
|
let
|
||||||
|
pkgs = inputs.nixpkgs.legacyPackages."${system}";
|
||||||
|
|
||||||
|
shared-config = import ../shared/home-manager.nix { inherit inputs pkgs username; };
|
||||||
|
shared-packages = import ../shared/home-manager-packages.nix { inherit inputs pkgs; };
|
||||||
|
in
|
||||||
inputs.home-manager.lib.homeManagerConfiguration {
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
extraSpecialArgs = { inherit inputs; };
|
inherit pkgs;
|
||||||
|
|
||||||
modules = [
|
modules = [
|
||||||
{
|
{ imports = [ shared-config ]; }
|
||||||
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (inputs.nixpkgs.lib.getName pkg) [
|
{ home.packages = shared-packages; }
|
||||||
"intelephense"
|
|
||||||
"postman"
|
|
||||||
"tabnine"
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
../../home-manager/modules/common.nix
|
|
||||||
../../home-manager/modules/git.nix
|
|
||||||
../../home-manager/modules/home-manager.nix
|
|
||||||
../../home-manager/modules/tmux.nix
|
|
||||||
../../home-manager/modules/zsh.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
|
||||||
pkgs = inputs.nixpkgs.legacyPackages.x86_64-linux;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue