Fixes for local system

This commit is contained in:
nostoromo root 2020-02-03 20:51:49 -08:00
parent 2aa6b8efc6
commit 93f490e488
4 changed files with 76 additions and 53 deletions

3
.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
hardware-configuration.nix
configuration.nix
*~

View File

@ -1 +0,0 @@
./hosts/france.nix

View File

@ -1,31 +0,0 @@
# 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, ... }:
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
];
boot.initrd.availableKernelModules = [ "uhci_hcd" "ehci_pci" "ata_piix" "ahci" "usb_storage" "floppy" "sd_mod" "sr_mod" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/87833c39-299b-4e84-9854-beda4a8e0115";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/bfb464c0-c259-4c29-8e8f-b3011bd30c95";
fsType = "ext4";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/ac0fe2b7-dd7a-4e86-aaa0-942acf3d541d"; }
];
nix.maxJobs = lib.mkDefault 8;
}

View File

@ -1,7 +1,8 @@
{ config, pkgs, ... }:
{ lib, config, pkgs, ... }:
let
hostname = "nostromo.sea.fudo.org";
hostname = "nostromo";
inherit (lib.strings) concatStringsSep;
in {
@ -16,20 +17,11 @@ in {
../networks/sea.fudo.org.nix
../profiles/server.nix
../hardware-configuration.nix
../profiles/services/postgres.nix
# ../profiles/services/local_nameserver.nix
];
fudo.postgresql = {
enable = true;
ssl-private-key = "/srv/nostromo.sea.fudo.org/certs/private/privkey.pem";
ssl-certificate = "/srv/nostromo.sea.fudo.org/certs/cert.pem";
keytab = "/srv/nostromo.sea.fudo.org/keytabs/postgres.keytab";
local-networks = [
"10.0.0.1/24"
];
};
networking = {
hostName = hostname;
@ -52,7 +44,11 @@ in {
ipv4.addresses = [
{
address = "10.0.0.2";
prefixLength = 23;
prefixLength = 22;
}
{
address = "10.0.10.2";
prefixLength = 24;
}
];
};
@ -62,6 +58,7 @@ in {
hardware.bluetooth.enable = false;
environment.systemPackages = with pkgs; [
# ganesha
ipfs
libguestfs-with-appliance
libvirt
@ -74,12 +71,67 @@ in {
onShutdown = "shutdown";
};
services.ipfs = {
enable = true;
enableGC = true;
autoMount = false;
defaultMode = "online";
apiAddress = "/ip4/10.0.0.2/tcp/5001";
gatewayAddress = "/ipv4/10.0.0.2/tcp/8080";
fileSystems = {
"/data/gluster0" = {
device = "/dev/nostromo-gluster/gluster0";
fsType = "xfs";
options = ["rw" "inode64" "noatime" "nouuid"];
};
};
services = {
# glusterfs = {
# enable = true;
# enableGlustereventsd = true;
# useRpcbind = true;
# };
# -DWITH_SPDK=OFF
# ceph = {
# enable = true;
# global = {
# clusterName = "sea-data";
# clusterNetwork = "10.0.10.0/24";
# publicNetwork = "10.0.0.0/23";
# monHost = "srv-1.data.sea.fudo.org";
# monInitialMembers = concatStringsSep "," [
# "srv-1.data.sea.fudo.org"
# #"srv-2.data.sea.fudo.org"
# ];
# authClientRequired = "cephx";
# authClusterRequired = "cephx";
# authServiceRequired = "cephx";
# fsid = "14c6fc0f-13f5-43ab-9b90-b012cd12cbaa";
# };
# mds = {
# enable = true;
# daemons = ["srv-1"];
# };
# mon = {
# enable = true;
# daemons = ["srv-1"];
# };
# osd = {
# enable = true;
# daemons = ["srv-1"];
# };
# };
};
# services.ipfs = {
# enable = true;
# enableGC = true;
# autoMount = false;
# defaultMode = "online";
# apiAddress = "/ip4/10.0.0.2/tcp/5001";
# gatewayAddress = "/ipv4/10.0.0.2/tcp/8080";
# };
}