reorganised hosts
This commit is contained in:
62
hosts/personal/common/colemak-dh.xkb
Normal file
62
hosts/personal/common/colemak-dh.xkb
Normal file
@@ -0,0 +1,62 @@
|
||||
xkb_keymap {
|
||||
xkb_keycodes { include "evdev+aliases(qwerty)" };
|
||||
xkb_types { include "complete" };
|
||||
xkb_compat { include "complete" };
|
||||
xkb_symbols
|
||||
{
|
||||
include "pc+us(colemak)+inet(evdev)+terminate(ctrl_alt_bksp)"
|
||||
key <TLDE> { [ grave, asciitilde, dead_tilde, asciitilde ] };
|
||||
key <AE01> { [ 1, exclam, exclamdown, onesuperior ] };
|
||||
key <AE02> { [ 2, at, masculine, twosuperior ] };
|
||||
key <AE03> { [ 3, numbersign, ordfeminine, threesuperior ] };
|
||||
key <AE04> { [ 4, dollar, cent, sterling ] };
|
||||
key <AE05> { [ 5, percent, EuroSign, yen ] };
|
||||
key <AE06> { [ 6, asciicircum, hstroke, Hstroke ] };
|
||||
key <AE07> { [ 7, ampersand, eth, ETH ] };
|
||||
key <AE08> { [ 8, asterisk, thorn, THORN ] };
|
||||
key <AE09> { [ 9, parenleft, leftsinglequotemark, leftdoublequotemark ] };
|
||||
key <AE10> { [ 0, parenright, rightsinglequotemark, rightdoublequotemark ] };
|
||||
key <AE11> { [ minus, underscore, endash, emdash ] };
|
||||
key <AE12> { [ equal, plus, multiply, division ] };
|
||||
key <AD01> { [ q, Q, adiaeresis, Adiaeresis ] };
|
||||
key <AD02> { [ w, W, aring, Aring ] };
|
||||
key <AD03> { [ f, F, atilde, Atilde ] };
|
||||
key <AD04> { [ p, P, oslash, Ooblique ] };
|
||||
key <AD05> { [ b, B, dead_breve, asciitilde ] };
|
||||
key <AD06> { [ j, J, dstroke, Dstroke ] };
|
||||
key <AD07> { [ l, L, lstroke, Lstroke ] };
|
||||
key <AD08> { [ u, U, uacute, Uacute ] };
|
||||
key <AD09> { [ y, Y, udiaeresis, Udiaeresis ] };
|
||||
key <AD10> { [ semicolon, colon, odiaeresis, Odiaeresis ] };
|
||||
key <AD11> { [ bracketleft, braceleft, guillemotleft, 0x1002039 ] };
|
||||
key <AD12> { [ bracketright, braceright, guillemotright, 0x100203a ] };
|
||||
key <BKSL> { [ backslash, bar, asciitilde, asciitilde ] };
|
||||
key <AC01> { [ a, A, aacute, Aacute ] };
|
||||
key <AC02> { [ r, R, dead_grave, asciitilde ] };
|
||||
key <AC03> { [ s, S, ssharp, asciitilde ] };
|
||||
key <AC04> { [ t, T, dead_acute, dead_doubleacute ] };
|
||||
key <AC05> { [ g, G, dead_ogonek, asciitilde ] };
|
||||
key <AC06> { [ m, M, dead_macron, asciitilde ] };
|
||||
key <AC07> { [ n, N, ntilde, Ntilde ] };
|
||||
key <AC08> { [ e, E, eacute, Eacute ] };
|
||||
key <AC09> { [ i, I, iacute, Iacute ] };
|
||||
key <AC10> { [ o, O, oacute, Oacute ] };
|
||||
key <AC11> { [ apostrophe, quotedbl, otilde, Otilde ] };
|
||||
key <AB01> { [ z, Z, ae, AE ] };
|
||||
key <AB02> { [ x, X, dead_circumflex, asciitilde ] };
|
||||
key <AB03> { [ c, C, ccedilla, Ccedilla ] };
|
||||
key <AB04> { [ d, D, dead_diaeresis, asciitilde ] };
|
||||
key <AB05> { [ v, V, oe, OE ] };
|
||||
key <AB06> { [ k, K, dead_abovering, asciitilde ] };
|
||||
key <AB07> { [ h, H, dead_caron, asciitilde ] };
|
||||
key <AB08> { [ comma, less, dead_cedilla, asciitilde ] };
|
||||
key <AB09> { [ period, greater, dead_abovedot, asciitilde ] };
|
||||
key <AB10> { [ slash, question, questiondown, asciitilde ] };
|
||||
key <CAPS> { [ Caps_Lock, Caps_Lock, Caps_Lock, Caps_Lock ] };
|
||||
key <LSGT> { [ minus, underscore, endash, emdash ] };
|
||||
key <SPCE> { [ space, space, space, nobreakspace ] };
|
||||
include "level3(ralt_switch)"
|
||||
};
|
||||
|
||||
xkb_geometry { include "pc(pc104)" };
|
||||
};
|
31
hosts/personal/common/nvidia-offload.nix
Normal file
31
hosts/personal/common/nvidia-offload.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{config, pkgs, ... }:
|
||||
let
|
||||
nvidia-offload = pkgs.writeShellScriptBin "nvidia-offload" ''
|
||||
export __NV_PRIME_RENDER_OFFLOAD=1
|
||||
export __NV_PRIME_RENDER_OFFLOAD_PROVIDER=NVIDIA-G0
|
||||
export __GLX_VENDOR_LIBRARY_NAME=nvidia
|
||||
export __VK_LAYER_NV_optimus=NVIDIA_only
|
||||
exec -a "$0" "$@"
|
||||
'';
|
||||
in
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
nvidia-offload
|
||||
];
|
||||
hardware = {
|
||||
opengl = {
|
||||
driSupport32Bit = true;
|
||||
#package = pkgs.mesa_drivers;
|
||||
enable = true;
|
||||
};
|
||||
nvidia = {
|
||||
prime = {
|
||||
offload = { enable = true; };
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:1:0:0";
|
||||
};
|
||||
modesetting = { enable = true; };
|
||||
};
|
||||
};
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
}
|
72
hosts/personal/common/pipewire.nix
Normal file
72
hosts/personal/common/pipewire.nix
Normal file
@@ -0,0 +1,72 @@
|
||||
{lib, config, ... }:
|
||||
|
||||
{
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse = {
|
||||
enable = true;
|
||||
};
|
||||
config.pipewire = {
|
||||
context.modules = [
|
||||
{
|
||||
name = "libpipewire-module-rtkit";
|
||||
args = {
|
||||
nice.level = -15;
|
||||
rt.prio = 88;
|
||||
rt.time.soft = 200000;
|
||||
rt.time.hard = 200000;
|
||||
};
|
||||
flags = [ "ifexists" "nofail" ];
|
||||
}
|
||||
{ name = "libpipewire-module-protocol-native"; }
|
||||
{ name = "libpipewire-module-profiler"; }
|
||||
{ name = "libpipewire-module-metadata"; }
|
||||
{ name = "libpipewire-module-spa-device-factory"; }
|
||||
{ name = "libpipewire-module-spa-node-factory"; }
|
||||
{ name = "libpipewire-module-client-node"; }
|
||||
{ name = "libpipewire-module-client-device"; }
|
||||
{
|
||||
name = "libpipewire-module-portal";
|
||||
flags = [ "ifexists" "nofail" ];
|
||||
}
|
||||
{
|
||||
name = "libpipewire-module-access";
|
||||
args = {};
|
||||
}
|
||||
{ name = "libpipewire-module-adapter"; }
|
||||
{ name = "libpipewire-module-link-factory"; }
|
||||
{ name = "libpipewire-module-session-manager"; }
|
||||
];
|
||||
};
|
||||
|
||||
config.pipewire-pulse = {
|
||||
context.modules = [
|
||||
{ name = "libpipewire-module-protocol-native"; }
|
||||
{ name = "libpipewire-module-client-node"; }
|
||||
{ name = "libpipewire-module-adapter"; }
|
||||
{ name = "libpipewire-module-metadata"; }
|
||||
{
|
||||
name = "libpipewire-module-protocol-pulse";
|
||||
args = {
|
||||
pulse.min.req = "32/48000";
|
||||
pulse.min.quantum = "32/48000";
|
||||
pulse.min.frag = "32/48000";
|
||||
};
|
||||
}
|
||||
];
|
||||
stream.properties = {
|
||||
node.latency = "32/48000";
|
||||
resample.quality = 1;
|
||||
};
|
||||
};
|
||||
};
|
||||
sound.enable = true;
|
||||
# hardware = {
|
||||
# pulseaudio.enable = true;
|
||||
# pulseaudio.support32Bit = true;
|
||||
# };
|
||||
}
|
42
hosts/personal/common/xorg.nix
Normal file
42
hosts/personal/common/xorg.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
{ config, lib, ... }:
|
||||
|
||||
#let
|
||||
# compiledLayout = pkgs.runCommand "keyboard-layout" {} ''
|
||||
# ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${./colemak-dh.xkb} $out
|
||||
# '';
|
||||
#in
|
||||
{
|
||||
services = {
|
||||
xserver = {
|
||||
enable = true;
|
||||
libinput= {
|
||||
enable = true;
|
||||
# mouse = {
|
||||
# accelSpeed = "0";
|
||||
# };
|
||||
touchpad = {
|
||||
middleEmulation = false;
|
||||
clickMethod = "buttonareas";
|
||||
tapping = true;
|
||||
naturalScrolling =true;
|
||||
};
|
||||
};
|
||||
displayManager = {
|
||||
startx = {
|
||||
enable = true;
|
||||
};
|
||||
# sessionCommands = "${pkgs.xorg.xkbcomp}/bin/xkbcomp ${compiledLayout} $DISPLAY";
|
||||
};
|
||||
# extraLayouts = {
|
||||
# colemak-dh = {
|
||||
# description = "Colemak with MOD-dh";
|
||||
# languages = [ "eng" ];
|
||||
# symbolsFile = ./colemak-dh;
|
||||
# };
|
||||
# };
|
||||
layout = "us";
|
||||
xkbVariant = "colemak";
|
||||
};
|
||||
};
|
||||
}
|
@@ -1,21 +0,0 @@
|
||||
{config, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "Satori";
|
||||
wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
firewall.allowedTCPPorts = [ 22 ];
|
||||
interfaces = {
|
||||
enp7s0.useDHCP = true;
|
||||
wlp0s20f3 = {
|
||||
useDHCP = true;
|
||||
ipv4.addresses = [ {
|
||||
prefixLength = 24;
|
||||
address = "192.168.0.109";
|
||||
} ];
|
||||
};
|
||||
};
|
||||
defaultGateway = "192.168.0.1";
|
||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
};
|
||||
}
|
@@ -11,7 +11,7 @@
|
||||
./common/nvidia-offload.nix
|
||||
./common/pipewire.nix
|
||||
./common/xorg.nix
|
||||
./configs/nvim.nix
|
||||
../../configs/nvim.nix
|
||||
];
|
||||
system.stateVersion = "20.09";
|
||||
}
|
||||
|
@@ -21,7 +21,7 @@
|
||||
};
|
||||
grub = {
|
||||
enable = true;
|
||||
useOSProber = true;
|
||||
# useOSProber = true;
|
||||
efiSupport = true;
|
||||
device = "nodev";
|
||||
splashImage = ./cirno.png;
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
37
hosts/personal/satori/networking.nix
Normal file
37
hosts/personal/satori/networking.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{config, pkgs, ... }:
|
||||
|
||||
{
|
||||
networking = {
|
||||
hostName = "Satori";
|
||||
wireless.enable = true;
|
||||
firewall = {
|
||||
allowedTCPPorts = [ 22 ];
|
||||
allowedUDPPorts = [ 17840 ];
|
||||
};
|
||||
interfaces = {
|
||||
enp7s0.useDHCP = true;
|
||||
wlp0s20f3 = {
|
||||
useDHCP = true;
|
||||
ipv4.addresses = [ {
|
||||
prefixLength = 24;
|
||||
address = "192.168.0.109";
|
||||
} ];
|
||||
};
|
||||
};
|
||||
wireguard.interfaces.wg0 = {
|
||||
ips = [ "100.0.0.3/32" ];
|
||||
listenPort = 17840;
|
||||
privateKeyFile = "/var/secrets/wg";
|
||||
peers = [
|
||||
{
|
||||
#Oracle VM1
|
||||
publicKey = "z0Y2VNEWcyVQVSqRHiwmiJ5/0MgSPM+HZfEcwIccSxM=";
|
||||
allowedIPs = [ "100.0.0.0/24" ];
|
||||
endpoint = "140.238.230.155:17840";
|
||||
persistentKeepalive = 25;
|
||||
}
|
||||
];
|
||||
};
|
||||
nameservers = [ "1.1.1.1" "8.8.8.8" ];
|
||||
};
|
||||
}
|
@@ -20,7 +20,10 @@
|
||||
package = pkgs.mysql;
|
||||
dataDir = "/var/db";
|
||||
};
|
||||
sshd.enable = true;
|
||||
openssh = {
|
||||
enable = true;
|
||||
permitRootLogin = "yes";
|
||||
};
|
||||
/* vault = {
|
||||
enable = true;
|
||||
storageBackend = "mysql";
|
||||
@@ -30,7 +33,7 @@
|
||||
systemd.services = {
|
||||
tor.wantedBy = lib.mkForce [];
|
||||
logmein-hamachi.wantedBy = lib.mkForce [];
|
||||
sshd.wantedBy = lib.mkForce [];
|
||||
openssh.wantedBy = lib.mkForce [];
|
||||
mysql.wantedBy = lib.mkForce [];
|
||||
#printing.wantedBy = lib.mkForce [];
|
||||
#vault.wantedBy = lib.mkForce [];
|
Reference in New Issue
Block a user