• Operand
  • # (b)ring mi - belles.

gram:build

> ./nixos/flake.nix

Lenses
(coming soon!)


{ inputs = {
    nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
    edge.url = "github:nixos/nixpkgs/nixos-unstable";
    nixos-hardware.url = "github:nixos/nixos-hardware";
    home-manager.url = "github:nix-community/home-manager/release-24.05";
    morph.url = "github:DBCDK/morph";
    # alacritty-theme.url = "github:alexghr/alacritty-theme.nix";
    hyprland.url = "github:hyprwm/Hyprland";

    # hyprland-plugins = { url = "github:hyprwm/hyprland-plugins"; inputs.hyprland.follows = "hyprland"; };
    # hyprfocus = { url = "github:VortexCoyote/hyprfocus"; inputs.hyprland.follows = "hyprland"; };
  };

  # hook up symlinks!
  # /root/.config/nushell/config.nu

  outputs = {
    self, nixpkgs, edge, home-manager,
    nixos-hardware, nix, alacritty-theme, ...
  }@sources: rec {
    # nix.packages = nixpkgs.nix;
    # nix.settings.experimental-features = [ "nix-command" "flakes" ];
    specialArgs = sources; #{ inherit sources; pkgs = nixpkgs.lib.pkgs; };

    nixosConfigurations.chesapeake = ( import ./cell/chesapeake/index.nix sources );

    colmena = let
      pkgs = import nixpkgs {};
      build = { address, modules }: {
        deployment = { targetPort = 22; targetUser = "root"; targetHost = address; };
        networking.interfaces.eth0.ipv4.addresses = [ { address = address; prefixLength = 24; }];
        imports = modules ++ [ ./calm/access.nix ];
      };
    in {
      meta.nixpkgs = import nixpkgs { system = "x86_64-linux"; };
      # chesapeake = build { address = "127.0.0.1"; modules = [ ./cell/chesapeake.nix ]; };
      hac-wiki = build { address = "10.11.3.215"; modules = [ ./calm/hac-wiki.nix ]; };

      # calm = { inherit nixosConfigurations.mesh-b; deployment.targetHost = "10.10.0.12"; };
      # mesh-a = build { address = "10.10.0.11"; modules = mesh; };
      # mesh-b = build { address = "10.10.0.12"; modules = [ ./calm/mesh-b/configuration.nix ]; };
      # mesh-c = build { address = "10.10.0.13"; modules = mesh; };

      base = build {
        address = "172.233.194.84";
        modules = [
          ./calm/linode.nix
          ./calm/base/configuration.nix
          # ./calm/base/base.nix

          ({ environment.systemPackages = with pkgs; [ git helix ]; })

          ( import ./module/lxd.nix )

          ( import ./gram/elixir.nix {
           base = "operand"; name = "op"; domain = "operand.online"; channel = 4000;
           codebase = builtins.fetchGit {
           url = "file:///home/calliope/base/code/operand";
           # rev = "05c8802c825ca2cdf819c6f57973739945f2c11f";
           }; })

          ( import ./gram/elixir.nix {
           base = "cc"; name = "cc"; domain = "command.college"; channel = 4001;
           codebase = builtins.fetchGit {
           url = "file:///home/calliope/base/code/cc";
           # rev = "05c8802c825ca2cdf819c6f57973739945f2c11f";
           }; })

          ( import ./gram/elixir.nix {
           base = "pain"; name = "pain"; domain = "book.painawayofphilly.com"; channel = 4444;
           codebase = builtins.fetchGit {
           url = "file:///home/calliope/base/code/pain";
           # rev = "f1a1694e3b1f69503026be8100385233796ce99b";
           }; })

          ( import ./gram/expose.nix {
            domain = "share.operand.space";
            name = "share";
            channel = 2222;
            command = "${pkgs.miniserve}/bin/miniserve -p 2222 -H /root/share";
            })

          ( import ./gram/relay.nix {
            ipv4 = "172.233.194.84";
            ipv6 = "2600:3c05::f03c:94ff:fe44:581d";
            domain = "assembled.app";
          })

          ( import ./gram/book.nix {
            channel = 3333;
            domain = "page.operand.space";
          })
        ];
      };

      # pull = build {
      #   address = "";
      #   modules = [ ./calm/pull/base.nix ./module/p2p.nix ];
      # };

      # deploy = build {
      #   address = "10.0.0.205";
      #   modules = [ "${nixpkgs}/nixos/modules/virtualisation/lxc-container.nix" ./calm/deploy.nix ];
      # };

    };
  };
}