define base packages in another module
This commit is contained in:
parent
a39878e91c
commit
d0ed46d044
10
base-packages/default.nix
Normal file
10
base-packages/default.nix
Normal file
@ -0,0 +1,10 @@
|
||||
{ lib, pkgs }:
|
||||
{
|
||||
mkBasePackages = {
|
||||
inherit pkgs;
|
||||
packages = [
|
||||
pkgs.vim
|
||||
pkgs.haxe
|
||||
];
|
||||
};
|
||||
}
|
||||
@ -13,17 +13,8 @@
|
||||
#<nixos-wsl/modules>
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
wget
|
||||
git
|
||||
vim
|
||||
wget
|
||||
curl
|
||||
haxe
|
||||
|
||||
];
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
package = pkgs.nix-ld-rs;
|
||||
};
|
||||
|
||||
|
||||
# Enable Experimental Features
|
||||
|
||||
14
flake.nix
14
flake.nix
@ -6,10 +6,11 @@
|
||||
nixos-wsl.url = "github:nix-community/NixOS-WSL/main";
|
||||
};
|
||||
outputs = { self, nixpkgs, nixos-wsl, nix, ...}@inputs:
|
||||
let
|
||||
system = if builtins ? currentSystem
|
||||
let system = if builtins ? currentSystem
|
||||
then builtins.currentSystem
|
||||
else "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
basePackages = (import ./base-packages { inherit pkgs; });
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
@ -22,6 +23,15 @@
|
||||
system.stateVersion = "24.05";
|
||||
wsl.enable = true;
|
||||
nix.settings.experimental-features = ["nix-command" "flakes" ];
|
||||
environment.systemPackages = basePackages.mkBasePackages.packages [
|
||||
pkgs.wget
|
||||
pkgs.git
|
||||
pkgs.curl
|
||||
];
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
package = pkgs.nix-ld-rs;
|
||||
};
|
||||
}
|
||||
];
|
||||
specialArgs = { inherit inputs; };
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user