able to install
This commit is contained in:
parent
832af3930a
commit
63c1a2de06
22
flake.lock
22
flake.lock
|
@ -23,9 +23,7 @@
|
||||||
"bonfire": {
|
"bonfire": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs"
|
||||||
"nixpkgs"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1664777933,
|
"lastModified": 1664777933,
|
||||||
|
@ -72,6 +70,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1664753041,
|
||||||
|
"narHash": "sha256-0ogaD8PaGHluARFeupofvk1Nq9gpVeZdlFM0Kcwguys=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "a62844b302507c7531ad68a86cb7aa54704c9cb4",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_2": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1659522808,
|
"lastModified": 1659522808,
|
||||||
"narHash": "sha256-HBcM19nGhI3IWwPNVlYb0MZ8VW6iKp4JbAVkeIHVykc=",
|
"narHash": "sha256-HBcM19nGhI3IWwPNVlYb0MZ8VW6iKp4JbAVkeIHVykc=",
|
||||||
|
@ -92,7 +106,7 @@
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"bonfire": "bonfire",
|
"bonfire": "bonfire",
|
||||||
"hardware": "hardware",
|
"hardware": "hardware",
|
||||||
"nixpkgs": "nixpkgs"
|
"nixpkgs": "nixpkgs_2"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
58
flake.nix
58
flake.nix
|
@ -6,7 +6,7 @@
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
hardware.url = "github:nixos/nixos-hardware";
|
hardware.url = "github:nixos/nixos-hardware";
|
||||||
bonfire.url = "github:bonfire-networks/bonfire-app";
|
bonfire.url = "github:bonfire-networks/bonfire-app";
|
||||||
bonfire.inputs.nixpkgs.follows = "nixpkgs";
|
# bonfire.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
agenix.url = "github:ryantm/agenix";
|
agenix.url = "github:ryantm/agenix";
|
||||||
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
};
|
};
|
||||||
|
@ -14,11 +14,11 @@
|
||||||
outputs = { nixpkgs, bonfire, agenix, ... }@inputs:
|
outputs = { nixpkgs, bonfire, agenix, ... }@inputs:
|
||||||
let
|
let
|
||||||
forAllSystems = nixpkgs.lib.genAttrs [
|
forAllSystems = nixpkgs.lib.genAttrs [
|
||||||
"aarch64-linux"
|
# "aarch64-linux"
|
||||||
"i686-linux"
|
# "i686-linux"
|
||||||
"x86_64-linux"
|
"x86_64-linux"
|
||||||
"aarch64-darwin"
|
# "aarch64-darwin"
|
||||||
"x86_64-darwin"
|
# "x86_64-darwin"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
# Devshell for bootstrapping
|
# Devshell for bootstrapping
|
||||||
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
# Acessible through 'nix develop' or 'nix-shell' (legacy)
|
||||||
devShells = forAllSystems (system: {
|
devShells = forAllSystems (system: {
|
||||||
default = legacyPackages.${system}.callPackage ./shell.nix { agenix = agenix; };
|
default = legacyPackages.${system}.callPackage ./shell.nix { agenix = inputs.agenix; };
|
||||||
});
|
});
|
||||||
|
|
||||||
# This instantiates nixpkgs for each system listed above
|
# This instantiates nixpkgs for each system listed above
|
||||||
|
@ -61,50 +61,8 @@
|
||||||
modules = (builtins.attrValues nixosModules) ++ [
|
modules = (builtins.attrValues nixosModules) ++ [
|
||||||
# > Our main nixos configuration file <
|
# > Our main nixos configuration file <
|
||||||
./nixos/configuration.nix
|
./nixos/configuration.nix
|
||||||
bonfire.nixosModules.bonfire
|
# bonfire.nixosModule
|
||||||
agenix.nixosModule.age
|
agenix.nixosModule
|
||||||
];
|
|
||||||
};
|
|
||||||
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"; };
|
|
||||||
# }];
|
|
||||||
# };
|
|
||||||
})
|
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -7,8 +7,8 @@
|
||||||
# Import your generated (nixos-generate-config) hardware configuration
|
# Import your generated (nixos-generate-config) hardware configuration
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./vault-warden.nix
|
./vault-warden.nix
|
||||||
./book-stack.nix
|
# ./book-stack.nix
|
||||||
./bonfire.nix
|
# ./bonfire.nix
|
||||||
./mumble.nix
|
./mumble.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -29,10 +29,11 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [
|
environment.systemPackages = with pkgs; [
|
||||||
git
|
git
|
||||||
vim
|
vim
|
||||||
];
|
];
|
||||||
|
networking.firewall.allowedTCPPorts = [ 80 443];
|
||||||
|
|
||||||
# Remove if you wish to disable unfree packages for your system
|
# Remove if you wish to disable unfree packages for your system
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
|
|
|
@ -1,10 +1,39 @@
|
||||||
# This is just an example, you should generate yours with nixos-generate-config and put it in here.
|
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||||
|
# and may be overwritten by future invocations. Please make changes
|
||||||
|
# to /etc/nixos/configuration.nix instead.
|
||||||
|
{ config, lib, pkgs, modulesPath, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
fileSystems."/" = {
|
imports =
|
||||||
device = "/dev/sda1";
|
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||||
|
];
|
||||||
|
|
||||||
|
boot.initrd.availableKernelModules = [ "ata_piix" "virtio_pci" "floppy" "sr_mod" "virtio_blk" ];
|
||||||
|
boot.initrd.kernelModules = [ ];
|
||||||
|
boot.kernelModules = [ ];
|
||||||
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
|
boot.loader.grub = {
|
||||||
|
enable = true;
|
||||||
|
version = 2;
|
||||||
|
device = "/dev/vda";
|
||||||
|
};
|
||||||
|
|
||||||
|
fileSystems."/" =
|
||||||
|
{ device = "/dev/disk/by-uuid/7c560634-d545-41cc-b375-42ce3037fd73";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Set your system kind (needed for flakes)
|
swapDevices = [ ];
|
||||||
|
|
||||||
|
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||||
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
# still possible to use this option, but it's recommended to use it in conjunction
|
||||||
|
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||||
|
networking.useDHCP = lib.mkDefault true;
|
||||||
|
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||||
|
|
||||||
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
nixpkgs.hostPlatform = "x86_64-linux";
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
{
|
{
|
||||||
services.murmur = {
|
services.murmur = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostname = "talk.sincerity.network";
|
hostName = "talk.sincerity.network";
|
||||||
registerHostname = "talk.sincerity.network";
|
registerHostname = "talk.sincerity.network";
|
||||||
registerUrl = "talk.sincerity.network";
|
registerUrl = "talk.sincerity.network";
|
||||||
registerName = "Sincerity Network Mumble";
|
registerName = "Sincerity Network Mumble";
|
||||||
|
@ -10,9 +10,13 @@
|
||||||
|
|
||||||
services.nginx = {
|
services.nginx = {
|
||||||
enable = true;
|
enable = true;
|
||||||
useACME = true;
|
virtualHosts."talk.sincerity.network" = {
|
||||||
|
locations."/".proxyPass = "http://localhost:64738/";
|
||||||
|
enableACME = true;
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
virtualHosts."talk.sincerity.network".proxyPass = "http://localhost:64738/";
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
security.acme.defaults.email = "infra@sincerity.network";
|
||||||
|
security.acme.acceptTerms = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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 = inputs.bonfire.defaultPackage.x86_64-linux;
|
# elixirBonfire = inputs.bonfire.packages.x86_64-linux.default;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue