Skip to main content

Template init tool for devenv inspired by nix flake init

Project description

Devenvcp

Template init tool for devenv inspired by nix flake init to copy your devenv templates so you don't need to use nix flakes for it.

Installation

From Pypi

pip install devenvcp

From nix flake

Add this to your inputs

inputs.devenvcp.url = "git+https://codeberg.org/claymorwan/devenvcp"

Then you can install the package using the nix module:

{
  import = [
    # For NixOS
    inputs.devenvcp.nixosModules.default
    # For home-manager
    inputs.devenvcp.homeModules.default
  ];
  
  programs.devenvcp.enable = true;
}

Alternatively install the package like so:

environment.systemPackages = [
  inputs.devenvcp.packages.${pkgs.stdenv.hostPlatform.system}.default
];

for home-manager:

home.packages = [
  inputs.devenvcp.packages.${pkgs.stdenv.hostPlatform.system}.default
];

You can also directly run

nix run git+https://codeberg.org/claymorwan/devenvcp -- <args>

Usage

Create a devenvcp.toml file in which you can add your templates like so

[python]            # name of template
path = "./python"   # relative path your template's directory
aliases = ["py"]    # list of string to use as aliases in the cli

Then run the following

devenvcp path/to/dir/containing/config <template>
# for example
devenvcp ~/.dotfiles/NixOS/dev-shells/devenv python

Configuration

You can define a default path by setting the env DEVENVCP_DEFAULT to a correct, then just run the command as usual without the path:

devenvcp <template>
# for example
devenvcp python

The path here should be an absolute path.

If you're using the nix module, you can set the default path with an option:

{
  programs.devenvcp = {
    enable = true;
    defaultPath = "absolute/path/to/dir/containing/config";
  };
}

Wait can't I just use this with anything else and not just devenv ?

I mean yea, I made it with devenv in mind at first but nothing stops u from using it with to template like anything else lol, I might rename the project eventually who knows

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devenvcp-1.1.1.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devenvcp-1.1.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file devenvcp-1.1.1.tar.gz.

File metadata

  • Download URL: devenvcp-1.1.1.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for devenvcp-1.1.1.tar.gz
Algorithm Hash digest
SHA256 da4000261f6457ce1ae697947b8db18bedeedd9f8846c648945fb061a9391e1c
MD5 feeddc3a83453bd29fca7a886b817a0e
BLAKE2b-256 01912e44f751f34629297abef0c553ea26234b3ac76041e41ee8298657e4dc2d

See more details on using hashes here.

File details

Details for the file devenvcp-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: devenvcp-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"26.05","id":"yarara","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for devenvcp-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f25315c90093bbd62d390b50261c5a0537f5a4b9bcf3c6e9fc049ada58d063d6
MD5 b30616250ab8f3fc24217021bed3d559
BLAKE2b-256 9a98b7045df850895fd0e4305f2cb7fe9897e0b603e52570f3d31f696f31f7f5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page