Auto-indent every file
This commit is contained in:
parent
d705ce20c3
commit
4787fea598
14 changed files with 977 additions and 997 deletions
|
@ -1,143 +1,143 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
{
|
||||
networking = {
|
||||
hostName = "helium";
|
||||
firewall.allowedUDPPorts = [ 51820 51821 ];
|
||||
wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
autostart = false;
|
||||
address = [ "172.16.0.2/24" ];
|
||||
dns = [ "192.168.0.1" "vsinerva.fi" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-home";
|
||||
listenPort = 51820;
|
||||
networking = {
|
||||
hostName = "helium";
|
||||
firewall.allowedUDPPorts = [ 51820 51821 ];
|
||||
wg-quick.interfaces = {
|
||||
wg0 = {
|
||||
autostart = false;
|
||||
address = [ "172.16.0.2/24" ];
|
||||
dns = [ "192.168.0.1" "vsinerva.fi" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-home";
|
||||
listenPort = 51820;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "wg.vsinerva.fi:51820";
|
||||
}
|
||||
];
|
||||
};
|
||||
wg1 = {
|
||||
autostart = false;
|
||||
address = [ "10.100.0.7/24" ];
|
||||
dns = [ "1.1.1.1" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-netflix";
|
||||
listenPort = 51821;
|
||||
peers = [
|
||||
{
|
||||
publicKey = "f9QoYPxyaxylUcOI9cE9fE9DJoEX4c6GUtr4p+rsd34=";
|
||||
allowedIPs = [ "0.0.0.0/0" ];
|
||||
endpoint = "wg.vsinerva.fi:51820";
|
||||
}
|
||||
];
|
||||
};
|
||||
wg1 = {
|
||||
autostart = false;
|
||||
address = [ "10.100.0.7/24" ];
|
||||
dns = [ "1.1.1.1" ];
|
||||
privateKeyFile = "/root/wireguard-keys/privatekey-netflix";
|
||||
listenPort = 51821;
|
||||
|
||||
peers = [
|
||||
{
|
||||
publicKey = "XSYHg0utIR1j7kRsWFwuWNo4RPD47KP53cVa6qDPtRE=";
|
||||
allowedIPs = [ "0.0.0.0/0" "192.168.0.0/24" ];
|
||||
endpoint = "netflix.vsinerva.fi:51821";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
peers = [
|
||||
{
|
||||
publicKey = "XSYHg0utIR1j7kRsWFwuWNo4RPD47KP53cVa6qDPtRE=";
|
||||
allowedIPs = [ "0.0.0.0/0" "192.168.0.0/24" ];
|
||||
endpoint = "netflix.vsinerva.fi:51821";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix.settings = {
|
||||
cores = 3;
|
||||
max-jobs = 4;
|
||||
};
|
||||
nix.settings = {
|
||||
cores = 3;
|
||||
max-jobs = 4;
|
||||
};
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
../desktop.nix
|
||||
../development.nix
|
||||
../misc/libinput.nix
|
||||
];
|
||||
disabledModules = [ "services/hardware/libinput.nix" ];
|
||||
imports = [
|
||||
../base.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
../desktop.nix
|
||||
../development.nix
|
||||
../misc/libinput.nix
|
||||
];
|
||||
disabledModules = [ "services/hardware/libinput.nix" ];
|
||||
|
||||
nixpkgs.overlays =
|
||||
[
|
||||
(final: prev:
|
||||
{
|
||||
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [ ../misc/mouse-accel.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
nixpkgs.overlays =
|
||||
[
|
||||
(final: prev:
|
||||
{
|
||||
moonlight-qt = prev.moonlight-qt.overrideAttrs (old: {
|
||||
patches = (old.patches or []) ++ [ ../misc/mouse-accel.patch ];
|
||||
});
|
||||
})
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
zenmonitor moonlight-qt parsec-bin via
|
||||
];
|
||||
environment.systemPackages = with pkgs; [
|
||||
zenmonitor moonlight-qt parsec-bin via
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
hardware = {
|
||||
opengl.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
hardware = {
|
||||
opengl.extraPackages = with pkgs; [
|
||||
rocmPackages.clr.icd
|
||||
];
|
||||
logitech.wireless = {
|
||||
enable = true;
|
||||
enableGraphical = true;
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
xserver = {
|
||||
videoDrivers = [ "amdgpu" "modesetting" ];
|
||||
deviceSection = ''
|
||||
Option "DRI" "2"
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
services = {
|
||||
xserver = {
|
||||
videoDrivers = [ "amdgpu" "modesetting" ];
|
||||
deviceSection = ''
|
||||
Option "DRI" "2"
|
||||
Option "TearFree" "true"
|
||||
'';
|
||||
|
||||
displayManager.setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360
|
||||
'';
|
||||
};
|
||||
displayManager.setupCommands = ''
|
||||
${pkgs.xorg.xrandr}/bin/xrandr --output DisplayPort-0 --auto --pos 0x0 --primary --output eDP --auto --pos 3840x360
|
||||
'';
|
||||
};
|
||||
|
||||
libinput.mouse = {
|
||||
accelProfile = "custom";
|
||||
accelPointsMotion = [ 0.00000 0.02000 0.04000 0.06000 0.08000 0.10000 0.12000 0.14000 0.16000 0.18000 0.20000 0.25250 0.31000 0.37250 0.44000 0.51250 0.59000 0.67250 0.76000 0.85250 0.95000 1.15500 1.37000 1.59500 1.83000 2.07500 2.33000 2.59500 2.87000 3.15500 3.45000 3.75500 4.07000 4.39500 4.73000 5.07500 5.43000 5.79500 6.17000 6.55500 6.95000 7.35500 7.77000 8.19500 8.63000 9.07500 9.53000 9.99500 10.47000 10.95500 11.45000 11.95000 ];
|
||||
accelStepMotion = 0.05;
|
||||
};
|
||||
libinput.mouse = {
|
||||
accelProfile = "custom";
|
||||
accelPointsMotion = [ 0.00000 0.02000 0.04000 0.06000 0.08000 0.10000 0.12000 0.14000 0.16000 0.18000 0.20000 0.25250 0.31000 0.37250 0.44000 0.51250 0.59000 0.67250 0.76000 0.85250 0.95000 1.15500 1.37000 1.59500 1.83000 2.07500 2.33000 2.59500 2.87000 3.15500 3.45000 3.75500 4.07000 4.39500 4.73000 5.07500 5.43000 5.79500 6.17000 6.55500 6.95000 7.35500 7.77000 8.19500 8.63000 9.07500 9.53000 9.99500 10.47000 10.95500 11.45000 11.95000 ];
|
||||
accelStepMotion = 0.05;
|
||||
};
|
||||
|
||||
redshift = {
|
||||
executable = "/bin/redshift-gtk";
|
||||
enable = true;
|
||||
temperature = {
|
||||
night = 2800;
|
||||
day = 6500;
|
||||
};
|
||||
brightness = {
|
||||
night = "0.5";
|
||||
day = "1";
|
||||
};
|
||||
};
|
||||
redshift = {
|
||||
executable = "/bin/redshift-gtk";
|
||||
enable = true;
|
||||
temperature = {
|
||||
night = 2800;
|
||||
day = 6500;
|
||||
};
|
||||
brightness = {
|
||||
night = "0.5";
|
||||
day = "1";
|
||||
};
|
||||
};
|
||||
|
||||
devmon.enable = true;
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
location = {
|
||||
latitude = 60.17;
|
||||
longitude = 24.94;
|
||||
};
|
||||
devmon.enable = true;
|
||||
gvfs.enable = true;
|
||||
udisks2.enable = true;
|
||||
};
|
||||
location = {
|
||||
latitude = 60.17;
|
||||
longitude = 24.94;
|
||||
};
|
||||
|
||||
# Swap + hibernate
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}
|
||||
];
|
||||
boot.resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b";
|
||||
boot.kernelParams = [ "resume_offset=44537856" ];
|
||||
services.logind = {
|
||||
lidSwitch = "hibernate";
|
||||
};
|
||||
swapDevices = [
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 16*1024;
|
||||
}
|
||||
];
|
||||
boot.resumeDevice = "/dev/mapper/luks-f6e1979b-0dee-4ee9-8170-10490019854b";
|
||||
boot.kernelParams = [ "resume_offset=44537856" ];
|
||||
services.logind = {
|
||||
lidSwitch = "hibernate";
|
||||
};
|
||||
|
||||
# Keychron Q11
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
services.udev.extraRules = ''
|
||||
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="3434", ATTRS{idProduct}=="01e0", MODE="0660", GROUP="users", TAG+="uaccess", TAG+="udev-acl"
|
||||
'';
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nextcloud";
|
||||
networking.hostName = "nextcloud";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../nextcloud.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../nextcloud.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "nixos-cpu";
|
||||
networking.hostName = "nixos-cpu";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../development.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../development.nix
|
||||
../vili.nix
|
||||
../syncthing.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, ... }:
|
||||
{
|
||||
networking.hostName = "vaultwarden";
|
||||
networking.hostName = "vaultwarden";
|
||||
|
||||
imports = [
|
||||
../base.nix
|
||||
../vaultwarden.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
../vaultwarden.nix
|
||||
];
|
||||
|
||||
# HARDWARE SPECIFIC
|
||||
|
||||
services.qemuGuest.enable = true;
|
||||
services.qemuGuest.enable = true;
|
||||
|
||||
# Bootloader.
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
}
|
||||
|
|
|
@ -1,17 +1,17 @@
|
|||
{ config, pkgs, lib, ... }:
|
||||
let
|
||||
SSID = "ENTER_SSID";
|
||||
SSIDpassword = "ENTER_PASSWORD";
|
||||
interface = "wlan0";
|
||||
wg_interface = "end0";
|
||||
hostname = "netflix-huijaus";
|
||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||
SSID = "ENTER_SSID";
|
||||
SSIDpassword = "ENTER_PASSWORD";
|
||||
interface = "wlan0";
|
||||
wg_interface = "end0";
|
||||
hostname = "netflix-huijaus";
|
||||
ddPassFile = "/root/wg-conf/ddPassFile";
|
||||
in {
|
||||
imports = [
|
||||
../base.nix
|
||||
];
|
||||
imports = [
|
||||
../base.nix
|
||||
];
|
||||
|
||||
environment.systemPackages = with pkgs; [ git wireguard-tools qrencode ];
|
||||
environment.systemPackages = with pkgs; [ git wireguard-tools qrencode ];
|
||||
|
||||
# enable NAT
|
||||
networking.nat.enable = true;
|
||||
|
@ -33,14 +33,14 @@ in {
|
|||
# This allows the wireguard server to route your traffic to the internet and hence be like a VPN
|
||||
# For this to work you have to set the dnsserver IP of your router (or dnsserver of choice) in your clients
|
||||
postSetup = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
${pkgs.iptables}/bin/iptables -t nat -A POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
'';
|
||||
|
||||
# This undoes the above command
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
# This undoes the above command
|
||||
postShutdown = ''
|
||||
${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_interface} -j MASQUERADE
|
||||
'';
|
||||
|
||||
|
||||
|
||||
# Path to the private key file.
|
||||
#
|
||||
|
@ -78,39 +78,39 @@ ${pkgs.iptables}/bin/iptables -t nat -D POSTROUTING -s 10.100.0.0/24 -o ${wg_int
|
|||
};
|
||||
};
|
||||
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
domains = [ "netflood.ddnsfree.com" ];
|
||||
use = "web, web=checkip.dynu.com/, web-skip='IP Address'";
|
||||
server = "api.dynu.com";
|
||||
username = "VSinerva";
|
||||
passwordFile = ddPassFile;
|
||||
};
|
||||
services.ddclient = {
|
||||
enable = true;
|
||||
domains = [ "netflood.ddnsfree.com" ];
|
||||
use = "web, web=checkip.dynu.com/, web-skip='IP Address'";
|
||||
server = "api.dynu.com";
|
||||
username = "VSinerva";
|
||||
passwordFile = ddPassFile;
|
||||
};
|
||||
#################### EVERYTHING BELOW THIS SHOULD NOT NEED TO CHANGE ####################
|
||||
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
boot = {
|
||||
kernelPackages = pkgs.linuxKernel.packages.linux_rpi4;
|
||||
initrd.availableKernelModules = [ "xhci_pci" "usbhid" "usb_storage" ];
|
||||
loader = {
|
||||
grub.enable = false;
|
||||
generic-extlinux-compatible.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
fileSystems = {
|
||||
"/" = {
|
||||
device = "/dev/disk/by-label/NIXOS_SD";
|
||||
fsType = "ext4";
|
||||
options = [ "noatime" ];
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
wireless = {
|
||||
enable = false;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
networking = {
|
||||
hostName = hostname;
|
||||
wireless = {
|
||||
enable = false;
|
||||
networks."${SSID}".psk = SSIDpassword;
|
||||
interfaces = [ interface ];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue