make bonfire actually build
waiting on upstream to merge my pr before we can deploy it
This commit is contained in:
parent
787ffe0fa0
commit
2c1dc0899c
74
flake.lock
74
flake.lock
|
@ -1,5 +1,41 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"bonfire": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1664356228,
|
||||||
|
"narHash": "sha256-YLmsR/OSf7q0t3/7gAPI0Uf9sS9JQSWF7trmrtsDPOo=",
|
||||||
|
"owner": "bonfire-networks",
|
||||||
|
"repo": "bonfire-app",
|
||||||
|
"rev": "9533e672724198fcad61ba4d7f7e92649cb4a655",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "bonfire-networks",
|
||||||
|
"repo": "bonfire-app",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"flake-utils": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1656928814,
|
||||||
|
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"hardware": {
|
"hardware": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659356074,
|
"lastModified": 1659356074,
|
||||||
|
@ -15,27 +51,6 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"home-manager": {
|
|
||||||
"inputs": {
|
|
||||||
"nixpkgs": [
|
|
||||||
"nixpkgs"
|
|
||||||
],
|
|
||||||
"utils": "utils"
|
|
||||||
},
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1659484873,
|
|
||||||
"narHash": "sha256-6VoPiGyDdjBHOJ3IpS24lY1lrDiOHeuEefOFI0qz3WE=",
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"rev": "d8d9ff0b2df77defa10375c6665b51f0251c34d6",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "nix-community",
|
|
||||||
"repo": "home-manager",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659522808,
|
"lastModified": 1659522808,
|
||||||
|
@ -54,25 +69,10 @@
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
"bonfire": "bonfire",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"home-manager": "home-manager",
|
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1653893745,
|
|
||||||
"narHash": "sha256-0jntwV3Z8//YwuOjzhV2sgJJPt+HY6KhU7VZUL0fKZQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "1ed9fb1935d260de5fe1c2f7ee0ebaae17ed2fa1",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"root": "root",
|
"root": "root",
|
||||||
|
|
43
flake.nix
43
flake.nix
|
@ -54,7 +54,6 @@
|
||||||
);
|
);
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# FIXME replace with your hostname
|
|
||||||
sincerity = nixpkgs.lib.nixosSystem {
|
sincerity = nixpkgs.lib.nixosSystem {
|
||||||
pkgs = legacyPackages.x86_64-linux;
|
pkgs = legacyPackages.x86_64-linux;
|
||||||
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||||
|
@ -64,6 +63,48 @@
|
||||||
bonfire.nixosModules.bonfire
|
bonfire.nixosModules.bonfire
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
test = nixpkgs.lib.nixosSystem {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
modules = [
|
||||||
|
./nixos/configuration.nix
|
||||||
|
bonfire.nixosModules.bonfire
|
||||||
|
({ pkgs, ... }: {
|
||||||
|
boot.isContainer = true;
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 ];
|
||||||
|
services.nginx = {
|
||||||
|
enable = true;
|
||||||
|
virtualHosts."bonfire.lan".locations."/".proxyPass = "http://localhost:4000";
|
||||||
|
};
|
||||||
|
services.bonfire = {
|
||||||
|
# you will need to expose bonfire with a reverse proxy, for example caddy
|
||||||
|
port = 4000;
|
||||||
|
package = pkgs.elixirBonfire;
|
||||||
|
dbName = "bonfire";
|
||||||
|
# the environment should contain a minimum of
|
||||||
|
# SECRET_KEY_BASE
|
||||||
|
# SIGNING_SALT
|
||||||
|
# ENCRYPTION_SALT
|
||||||
|
# RELEASE_COOKIE
|
||||||
|
# have a look into nix/module.nix for more details
|
||||||
|
# the way to deploy secrets is beyond this readme, but I would recommend agenix
|
||||||
|
environmentFile = "/run/secrets/bonfireEnv";
|
||||||
|
dbSocketDir = "/var/run/postgresql";
|
||||||
|
};
|
||||||
|
|
||||||
|
# this is uniquely for database backup purposes
|
||||||
|
# replace myBackupUserName with the user name that will do the backups
|
||||||
|
# if you want to do backups differently, feel free to remove this part of the config
|
||||||
|
# services.postgresql = {
|
||||||
|
# enable = true;
|
||||||
|
# ensureDatabases = [ "bonfire" ];
|
||||||
|
# ensureUsers = [{
|
||||||
|
# name = "bonfire";
|
||||||
|
# ensurePermissions = { "DATABASE bonfire" = "ALL PRIVILEGES"; };
|
||||||
|
# }];
|
||||||
|
# };
|
||||||
|
})
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{ inputs, ... }:
|
{ inputs, ... }:
|
||||||
let
|
let
|
||||||
# This one brings our custom packages from the 'pkgs' directory
|
# This one brings our custom packages from the 'pkgs' directory
|
||||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
additions = final: _prev: import ../pkgs { pkgs = final; inputs = inputs; };
|
||||||
|
|
||||||
# This one contains whatever you want to overlay
|
# This one contains whatever you want to overlay
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# You can change versions, add patches, set compilation flags, anything really.
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
# These are similar to nixpkgs packages
|
# These are similar to nixpkgs packages
|
||||||
{ inputs, pkgs }: {
|
{ inputs, pkgs }: {
|
||||||
# example = pkgs.callPackage ./example { };
|
# example = pkgs.callPackage ./example { };
|
||||||
elixirBonfire = bonfire.defaultPackage.x86_64-linux;
|
elixirBonfire = inputs.bonfire.defaultPackage.x86_64-linux;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue