updated to recent config

This commit is contained in:
Michael 2020-02-09 12:06:02 +00:00
parent dd7bf26e80
commit 31bbf5fd33
4 changed files with 70 additions and 25 deletions

View File

@ -5,24 +5,27 @@
{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
[ <nixpkgs/nixos/modules/profiles/qemu-guest.nix>
];
boot.initrd.availableKernelModules = [ "ahci" "xhci_pci" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5f03569f-83a4-45a6-b316-bb792c758ac2";
fsType = "btrfs";
options = [ "subvol=nixos" ];
{ device = "/dev/disk/by-uuid/f0f39014-5f8e-43b7-ab87-168c6e667be6";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/F08B-A699";
fsType = "vfat";
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/5f03569f-83a4-45a6-b316-bb792c758ac2";
fsType = "btrfs";
options = [ "subvol=home" ];
{ device = "/dev/disk/by-uuid/fc010f8a-c955-4d23-8a37-98338ab81e00";
fsType = "ext4";
};
fileSystems."/mnt/storage" =
@ -30,15 +33,10 @@
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A649-113E";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/d3b1291d-2f47-460a-b39b-3aafcd7b1e89"; }
[ { device = "/dev/disk/by-uuid/d6c2d119-73f4-4322-9b55-69406667228b"; }
];
nix.maxJobs = lib.mkDefault 2;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
}

View File

@ -8,12 +8,12 @@
nat = {
enable = true;
externalInterface = "enp2s0";
externalInterface = "enp3s0f1";
internalInterfaces = [ "wg0" ];
};
interfaces = {
enp2s0 = {
enp3s0f1 = {
ipv4.addresses = [ {
address = "10.0.20.28";
prefixLength = 24;
@ -61,7 +61,7 @@
];
extraCommands = ''
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o enp2s0 -j MASQUERADE
iptables -t nat -A POSTROUTING -s 10.0.0.0/24 -o enp3s0f1 -j MASQUERADE
'';
};
};

View File

@ -19,7 +19,47 @@
/mnt/storage 10.0.1.5(rw,nohide,no_root_squash,no_subtree_check)
'';
};
postgresql = {
enable = true;
port = 5432;
dataDir = "/mnt/storage/srv/postgresql";
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{
name = "nextcloud";
ensurePermissions = {
"DATABASE nextcloud" = "ALL PRIVILEGES";
};
}{
name = "superuser";
ensurePermissions = {
"ALL TABLES IN SCHEMA public" = "ALL PRIVILEGES";
};
}
];
};
nextcloud = {
enable = true;
nginx.enable = true;
home = "/mnt/storage/srv/nextcloud";
hostName = "nextcloud.0cd.xyz";
config = {
adminuser = "michael";
adminpassFile = "/home/michael/nextcloud/admin_passwd.txt";
dbtype = "pgsql";
dbhost = "/run/postgresql";
dbname = "nextcloud";
dbuser = "nextcloud";
#dbpassFile = "/home/michael/nextcloud/passwd.txt";
};
};
};
/*systemd = {
services.ocd = {
description = "0cd.xyz-go web server";

View File

@ -1,12 +1,19 @@
{ config, pkgs, ... }:
{
users.users.michael = {
isNormalUser = true;
home = "/home/michael";
description = "Michael";
extraGroups = [ "wheel" "michael" ];
shell = pkgs.zsh;
uid = 1000;
users.users = {
michael = {
isNormalUser = true;
home = "/home/michael";
description = "Michael";
extraGroups = [ "wheel" "michael" ];
shell = pkgs.zsh;
uid = 1000;
};
nextcloud = {
isNormalUser = false;
passwordFile = "/home/michael/nextcloud/passwd.txt";
};
};
}