able to install

This commit is contained in:
infra 2022-10-03 07:56:42 +00:00
parent 832af3930a
commit 63c1a2de06
6 changed files with 73 additions and 67 deletions

View file

@ -23,9 +23,7 @@
"bonfire": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs"
]
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1664777933,
@ -72,6 +70,22 @@
}
},
"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": {
"lastModified": 1659522808,
"narHash": "sha256-HBcM19nGhI3IWwPNVlYb0MZ8VW6iKp4JbAVkeIHVykc=",
@ -92,7 +106,7 @@
"agenix": "agenix",
"bonfire": "bonfire",
"hardware": "hardware",
"nixpkgs": "nixpkgs"
"nixpkgs": "nixpkgs_2"
}
}
},

View file

@ -6,7 +6,7 @@
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hardware.url = "github:nixos/nixos-hardware";
bonfire.url = "github:bonfire-networks/bonfire-app";
bonfire.inputs.nixpkgs.follows = "nixpkgs";
# bonfire.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
agenix.inputs.nixpkgs.follows = "nixpkgs";
};
@ -14,11 +14,11 @@
outputs = { nixpkgs, bonfire, agenix, ... }@inputs:
let
forAllSystems = nixpkgs.lib.genAttrs [
"aarch64-linux"
"i686-linux"
# "aarch64-linux"
# "i686-linux"
"x86_64-linux"
"aarch64-darwin"
"x86_64-darwin"
# "aarch64-darwin"
# "x86_64-darwin"
];
in
rec {
@ -34,7 +34,7 @@
# Devshell for bootstrapping
# Acessible through 'nix develop' or 'nix-shell' (legacy)
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
@ -61,50 +61,8 @@
modules = (builtins.attrValues nixosModules) ++ [
# > Our main nixos configuration file <
./nixos/configuration.nix
bonfire.nixosModules.bonfire
agenix.nixosModule.age
];
};
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"; };
# }];
# };
})
# bonfire.nixosModule
agenix.nixosModule
];
};
};

View file

@ -7,8 +7,8 @@
# Import your generated (nixos-generate-config) hardware configuration
./hardware-configuration.nix
./vault-warden.nix
./book-stack.nix
./bonfire.nix
# ./book-stack.nix
# ./bonfire.nix
./mumble.nix
];
@ -29,10 +29,11 @@
};
};
environment.systemPackages = [
environment.systemPackages = with pkgs; [
git
vim
];
networking.firewall.allowedTCPPorts = [ 80 443];
# Remove if you wish to disable unfree packages for your system
nixpkgs.config.allowUnfree = true;

View file

@ -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."/" = {
device = "/dev/sda1";
imports =
[ (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";
};
# 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";
}

View file

@ -2,7 +2,7 @@
{
services.murmur = {
enable = true;
hostname = "talk.sincerity.network";
hostName = "talk.sincerity.network";
registerHostname = "talk.sincerity.network";
registerUrl = "talk.sincerity.network";
registerName = "Sincerity Network Mumble";
@ -10,9 +10,13 @@
services.nginx = {
enable = true;
useACME = true;
virtualHosts."talk.sincerity.network" = {
locations."/".proxyPass = "http://localhost:64738/";
enableACME = true;
forceSSL = true;
virtualHosts."talk.sincerity.network".proxyPass = "http://localhost:64738/";
};
};
security.acme.defaults.email = "infra@sincerity.network";
security.acme.acceptTerms = true;
}

View file

@ -2,5 +2,5 @@
# These are similar to nixpkgs packages
{ inputs, pkgs }: {
# example = pkgs.callPackage ./example { };
elixirBonfire = inputs.bonfire.defaultPackage.x86_64-linux;
# elixirBonfire = inputs.bonfire.packages.x86_64-linux.default;
}