wg-bootstrap/flake.nix
2023-07-22 19:52:51 +09:00

31 lines
810 B
Nix

{
description = "wg-quick wrapper for creating interface config and up/down wg";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in{
packages.${system}.default = pkgs.poetry2nix.mkPoetryApplication {
projectDir = self;
};
devShells.${system}.default = pkgs.mkShellNoCC {
shellHook = "echo Welcome to your Nix-powered development environment!";
WG_BOOTSTRAP = "development";
packages = with pkgs; [
(poetry2nix.mkPoetryEnv { projectDir = self; })
wireguard-tools
];
};
apps.${system}.default = {
program = "${self.packages.${system}.default}/bin/wg-start";
type = "app";
};
};
}