provide dev shell

This commit is contained in:
nora 2025-02-28 19:52:39 +01:00
parent 6bb6294aad
commit fbc926acea
4 changed files with 10 additions and 49 deletions

View file

@ -43,19 +43,8 @@
}; };
}; };
# Standalone home-manager configuration entrypoint devShells.${"x86_64-linux"}.c-env = import ./shells/c-env.nix {
# Available through 'home-manager --flake .#nils@nixos' pkgs = import nixpkgs { system = "x86_64-linux"; };
homeConfigurations = {
"nilsh@LAPTOP-Nils" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
# > Our main home-manager configuration file <
modules = [
./home-manager/common.nix
./home-manager/laptop.nix
./home-manager/git.nix
];
};
}; };
}; };
} }

View file

@ -1,34 +0,0 @@
{ inputs, pkgs, ... }: {
nixpkgs = {
# You can add overlays here
overlays = [
# If you want to use overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
inputs.nur.overlays.default
];
# Configure your nixpkgs instance
config = {
allowUnfree = true;
# Workaround for https://github.com/nix-community/home-manager/issues/2942
allowUnfreePredicate = (_: true);
};
};
home.packages = import ./common-packages.nix { inherit pkgs; };
programs.fish.interactiveShellInit = ''
set fish_greeting # Disable greeting
. /home/nilsh/.nix-profile/etc/profile.d/nix.fish
'';
home = {
username = "nilsh";
homeDirectory = "/home/nilsh";
};
}

View file

@ -89,7 +89,10 @@ in
}; };
}; };
boot.binfmt.emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ]; boot.binfmt = {
emulatedSystems = [ "wasm32-wasi" "aarch64-linux" ];
preferStaticEmulators = true; # required to work with podman (apparently)
};
boot.kernelPackages = pkgs.linuxPackages_6_6; boot.kernelPackages = pkgs.linuxPackages_6_6;
@ -331,7 +334,6 @@ in
enable = true; enable = true;
dockerCompat = true; dockerCompat = true;
defaultNetwork.settings.dns_enabled = true; defaultNetwork.settings.dns_enabled = true;
}; };
virtualbox.host = { virtualbox.host = {
enable = true; enable = true;

4
shells/c-env.nix Normal file
View file

@ -0,0 +1,4 @@
{ pkgs }: pkgs.mkShell {
buildInputs = with pkgs; [ openssl zlib ];
nativeBuildInputs = with pkgs; [ pkg-config cmake ];
}