disko2: Set up dev environment for python

This commit is contained in:
Felix Uhl 2024-10-28 22:44:33 +01:00
parent 0e55423bf8
commit b102aeb547
4 changed files with 29 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

2
.gitignore vendored
View file

@ -1,4 +1,6 @@
result
.direnv
# Created by the NixOS interactive test driver
.nixos-test-history

10
.vscode/extensions.json vendored Normal file
View file

@ -0,0 +1,10 @@
{
"recommendations": [
"mkhl.direnv",
"jnoortheen.nix-ide",
"ms-python.python",
"ms-python.debugpy",
"ms-python.black-formatter",
"ms-python.isort"
]
}

View file

@ -72,6 +72,22 @@
inherit (self.packages.${system}) disko-doc;
});
devShells = forAllSystems (system:
let
pkgs = nixpkgs.legacyPackages.${system};
in
{
default = pkgs.mkShell {
name = "disko-dev";
packages = with pkgs; [
(python3.withPackages (ps: [
ps.black # Code formatter
ps.isort # Import sorter
]))
];
};
});
nixosConfigurations.testmachine = lib.nixosSystem {
system = "x86_64-linux";
modules = [