Compare commits

..

2 commits

Author SHA1 Message Date
30093eb03d add nix stuff 2024-01-24 16:09:05 +01:00
07b38ba006 add nix 2024-01-24 16:01:02 +01:00
4 changed files with 50 additions and 1 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored
View file

@ -122,6 +122,7 @@ celerybeat.pid
# Environments # Environments
.env .env
.venv .venv
.direnv
env/ env/
venv/ venv/
ENV/ ENV/
@ -157,4 +158,4 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear # and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder. # option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/ .idea/

27
flake.lock generated Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1705913940,
"narHash": "sha256-pjSl/1cwYczhSSudR6z0JA/8MclZx/ztzTahvOzwPPw=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "9ed792777ae7967fee22dae2e88fdb6cb965b193",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

20
flake.nix Normal file
View file

@ -0,0 +1,20 @@
{
description = "A Nix-flake-based Python development environment";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
forEachSupportedSystem = f: nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ python311 virtualenv libffi libsodium jetbrains.pycharm-community ] ++
(with pkgs.python311Packages; [ pip virtualenv ]);
};
});
};
}