aboutsummaryrefslogtreecommitdiff
path: root/flake.nix
blob: 6285b653df383f2b82578a055fbac8d24e709af5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{
  description = "My Home Lab project";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-23.11";
    devenv.url = "github:cachix/devenv";
  };

  outputs = inputs@{ flake-parts, nixpkgs, ... }:
    flake-parts.lib.mkFlake { inherit inputs; } {
      imports = [
        inputs.devenv.flakeModule
      ];
      systems = nixpkgs.lib.systems.flakeExposed;
      perSystem = { config, self', inputs', pkgs, system, ... }: {

        packages.default = pkgs.hello;

        devenv.shells.ansible = {
          packages = [ config.packages.default ];
          languages.python.enable = true;
          languages.python.poetry.enable = true;
          languages.python.poetry.activate.enable = true;
          enterShell = ''
            echo this is my ansible project shell.
          '';
        };

        devenv.shells.terraform = {
          packages = [ config.packages.default ];
          languages.opentofu.enable = true;
          enterShell = ''
            echo this is a terraform project shell.
          '';
        };
      };
    };
}