hosts/satori: random stuff, move modules

Signed-off-by: Amneesh Singh <natto@weirdnatto.in>
This commit is contained in:
2022-11-05 17:45:11 +05:30
parent fc7a90ef64
commit 90bdddcabc
6 changed files with 230 additions and 57 deletions

110
flake.lock generated
View File

@@ -22,11 +22,11 @@
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs"
}, },
"locked": { "locked": {
"lastModified": 1666471010, "lastModified": 1663268366,
"narHash": "sha256-Ehq7DB68ue5YHJ8sUNJXZhhW4fcT1oc2NkpQPVvrB2c=", "narHash": "sha256-nQL25OVRJNxT5xdNjuz0W0HCZ4abd9gn96nJEYq1Fl8=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "ef5d67c561a8b6ce001dbc555814fdb21c7bd5dd", "rev": "19952866828a8d8a08e0e264ad1842e585eadc23",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -83,11 +83,11 @@
}, },
"flake-utils_3": { "flake-utils_3": {
"locked": { "locked": {
"lastModified": 1659877975, "lastModified": 1656928814,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=", "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"owner": "numtide", "owner": "numtide",
"repo": "flake-utils", "repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0", "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -102,11 +102,11 @@
"utils": "utils" "utils": "utils"
}, },
"locked": { "locked": {
"lastModified": 1666463764, "lastModified": 1663227421,
"narHash": "sha256-NmayV9S0s7CgNEA2QbIxDU0VCIiX6bIHu8PCQPnYHDM=", "narHash": "sha256-8M2ZQPLQw0CUylKbF8pgDMQ5vxOH4i0rxwUhtPIsf7Q=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "69d19b9839638fc487b370e0600a03577a559081", "rev": "5408e27961599b1350b651f88715daf6e67244a7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -157,11 +157,11 @@
}, },
"master": { "master": {
"locked": { "locked": {
"lastModified": 1666486259, "lastModified": 1663270227,
"narHash": "sha256-9G1mE2tz9BRpO7rdkDtnkLYUQ0H2fhWWNdJ2EIXDDt8=", "narHash": "sha256-HWnPdlG+48f5Vgmco2Iij/20AjQuKjaNUJhh/VgbV5Q=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "e14c21ee3c0ee09f805b30fe17d39fced6e81fba", "rev": "c2e7745b08a303b468fcaced4bf0774900aba9bc",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -177,11 +177,11 @@
"utils": "utils_3" "utils": "utils_3"
}, },
"locked": { "locked": {
"lastModified": 1663533210, "lastModified": 1662138272,
"narHash": "sha256-it24pt41yHYhcpfqnEaws7utoNxFFrH/HwBCD/9omkY=", "narHash": "sha256-qklVL7qFzyiIIm00AKRLE+uCYppTQ/S5C6exg0j2fSY=",
"owner": "nbfc-linux", "owner": "nbfc-linux",
"repo": "nbfc-linux", "repo": "nbfc-linux",
"rev": "0396c35b2afc02a705bb53c2fadb7b4f54915d97", "rev": "c6abef1b9f4ec4bb8a2eb4d7e70c1fccbb320677",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -200,11 +200,11 @@
}, },
"locked": { "locked": {
"dir": "contrib", "dir": "contrib",
"lastModified": 1666396419, "lastModified": 1663212973,
"narHash": "sha256-jCFc/dTsDfyyenzmtOm9u3MSZQHsHo46xZ7T+2HiY7c=", "narHash": "sha256-d0dhVnwoWZEsEdtRIZiiadOcCNcddkdk4QHKg2Vnt9E=",
"owner": "neovim", "owner": "neovim",
"repo": "neovim", "repo": "neovim",
"rev": "2f9b94a26836ecb081c717e23913f5b6576cce99", "rev": "89b9eab638d5e6467156c25f0d54df48d861ca16",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -219,11 +219,11 @@
"nixpkgs": "nixpkgs_6" "nixpkgs": "nixpkgs_6"
}, },
"locked": { "locked": {
"lastModified": 1665951041, "lastModified": 1662742160,
"narHash": "sha256-YK4cWVHsP/OhMWhO/n9s7QkziAVetPkNHtIEhwlBmGc=", "narHash": "sha256-zamqdHF0Pp0AkgfDnZdLnAZTfgrTV11dYO9rDsfqfW8=",
"owner": "fufexan", "owner": "fufexan",
"repo": "nix-gaming", "repo": "nix-gaming",
"rev": "05534322548e7bd6b2318bad0fbf2ae904a30c11", "rev": "a37f98a7a81d5ffac328fac06c3f6ad17f90c7d7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -234,11 +234,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1650970888, "lastModified": 1663235518,
"narHash": "sha256-K0Qk6YbkyxBbszkBKCxsLA+jrQpaecf0X8iIO8frS48=", "narHash": "sha256-q8zLK6rK/CLXEguaPgm9yQJcY0VQtOBhAT9EV2UFK/A=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "27a62a9c603d0d832141682cb4f34964d7b48ebb", "rev": "2277e4c9010b0f27585eb0bed0a86d7cbc079354",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -279,11 +279,11 @@
}, },
"nixpkgs_3": { "nixpkgs_3": {
"locked": { "locked": {
"lastModified": 1650970888, "lastModified": 1663235518,
"narHash": "sha256-K0Qk6YbkyxBbszkBKCxsLA+jrQpaecf0X8iIO8frS48=", "narHash": "sha256-q8zLK6rK/CLXEguaPgm9yQJcY0VQtOBhAT9EV2UFK/A=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "27a62a9c603d0d832141682cb4f34964d7b48ebb", "rev": "2277e4c9010b0f27585eb0bed0a86d7cbc079354",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -323,11 +323,11 @@
}, },
"nixpkgs_6": { "nixpkgs_6": {
"locked": { "locked": {
"lastModified": 1663491030, "lastModified": 1656401090,
"narHash": "sha256-MVsfBhE9US5DvLtBAaTRjwYdv1tLO8xjahM8qLXTgTo=", "narHash": "sha256-bUS2nfQsvTQW2z8SK7oEFSElbmoBahOPtbXPm0AL3I4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "767542707d394ff15ac1981e903e005ba69528b5", "rev": "16de63fcc54e88b9a106a603038dd5dd2feb21eb",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -339,11 +339,11 @@
}, },
"nixpkgs_7": { "nixpkgs_7": {
"locked": { "locked": {
"lastModified": 1666424192, "lastModified": 1663235518,
"narHash": "sha256-rb/a7Kg9s31jqkvdOQHFrUc5ig5kB+O2ZKB8mjU2kW8=", "narHash": "sha256-q8zLK6rK/CLXEguaPgm9yQJcY0VQtOBhAT9EV2UFK/A=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4f8287f3d597c73b0d706cfad028c2d51821f64d", "rev": "2277e4c9010b0f27585eb0bed0a86d7cbc079354",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -355,27 +355,27 @@
}, },
"nixpkgs_8": { "nixpkgs_8": {
"locked": { "locked": {
"lastModified": 1666333455, "lastModified": 1663087123,
"narHash": "sha256-oHXIeLB/sPWxKNcSdV1DQi1ddNVoJ17T1yDiMMeygL4=", "narHash": "sha256-cNIRkF/J4mRxDtNYw+9/fBNq/NOA2nCuPOa3EdIyeDs=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "93e0ac196106dce51878469c9a763c6233af5c57", "rev": "9608ace7009ce5bc3aeb940095e01553e635cbc7",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nixos", "owner": "nixos",
"ref": "nixpkgs-unstable", "ref": "nixos-unstable",
"repo": "nixpkgs", "repo": "nixpkgs",
"type": "github" "type": "github"
} }
}, },
"nixpkgs_9": { "nixpkgs_9": {
"locked": { "locked": {
"lastModified": 1665296151, "lastModified": 1659102345,
"narHash": "sha256-uOB0oxqxN9K7XGF1hcnY+PQnlQJ+3bP2vCn/+Ru/bbc=", "narHash": "sha256-Vbzlz254EMZvn28BhpN8JOi5EuKqnHZ3ujFYgFcSGvk=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "14ccaaedd95a488dd7ae142757884d8e125b3363", "rev": "11b60e4f80d87794a2a4a8a256391b37c59a1ea7",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -387,11 +387,11 @@
}, },
"nur": { "nur": {
"locked": { "locked": {
"lastModified": 1666483270, "lastModified": 1663266400,
"narHash": "sha256-eqrah9Jf+Wk28mpT2OsqwkWcnxKHltmRt/N3U4gUx1I=", "narHash": "sha256-6A/5qljK1pauDxSrHS8IR8ZS0raFB4UFwL7e+TjM3qU=",
"owner": "nix-community", "owner": "nix-community",
"repo": "NUR", "repo": "NUR",
"rev": "1970f883e139b06ae109ad2ca2c45b7fa987afb9", "rev": "e77ed0cd9190592525937030c68fa487ce79e0e0",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -407,11 +407,11 @@
"nixpkgs": "nixpkgs_8" "nixpkgs": "nixpkgs_8"
}, },
"locked": { "locked": {
"lastModified": 1666426819, "lastModified": 1663230013,
"narHash": "sha256-28rlBhbY+ZX2uUze5HVR4a5y6fVuyPuU9+NWtxmg6dk=", "narHash": "sha256-te3ZzGAWGoWhbUmk8KTO+Tidn5nShRVcStpDAV167Fg=",
"owner": "nix-community", "owner": "nix-community",
"repo": "neovim-nightly-overlay", "repo": "neovim-nightly-overlay",
"rev": "72ceb9a0def71a405c97a2b86bc08096c3c49157", "rev": "a11980308a32ec895bdc8a2ea3d6ed022d7a615d",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -461,11 +461,11 @@
"nixpkgs": "nixpkgs_9" "nixpkgs": "nixpkgs_9"
}, },
"locked": { "locked": {
"lastModified": 1666407365, "lastModified": 1663210994,
"narHash": "sha256-eD1hN+Uez7oOKl9BgvfBydQOCEqfoLuezoGfR6t0nzI=", "narHash": "sha256-CvuR+v3FClg/En4LDdLOhLQApAZ9xZZaxeDadfwIBkw=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "8ffc63427df1dc7e53fb96cb13b130028c258202", "rev": "f34d44aef4ca7c11e66ed30ef46a93058a578c0f",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -476,11 +476,11 @@
}, },
"stable": { "stable": {
"locked": { "locked": {
"lastModified": 1666401273, "lastModified": 1663067291,
"narHash": "sha256-AG3MoIjcWwz1SPjJ2nymWu4NmeVj9P40OpB1lsmxFtg=", "narHash": "sha256-1BTrqhLMamWf53sJobtMiUDI91PEw6xF8YEwg2VE8w4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3933d8bb9120573c0d8d49dc5e890cb211681490", "rev": "d86a4619b7e80bddb6c01bc01a954f368c56d1df",
"type": "github" "type": "github"
}, },
"original": { "original": {
@@ -492,11 +492,11 @@
}, },
"stable-small": { "stable-small": {
"locked": { "locked": {
"lastModified": 1666401273, "lastModified": 1663209136,
"narHash": "sha256-AG3MoIjcWwz1SPjJ2nymWu4NmeVj9P40OpB1lsmxFtg=", "narHash": "sha256-camNbaOhv/AD6vDr51H9xNjA7ytPvo8uKVlH5Bc+ZWQ=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "3933d8bb9120573c0d8d49dc5e890cb211681490", "rev": "01ec6cc8e9064f51f538428fdb7311bcc44927ea",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@@ -61,9 +61,7 @@
( (
let let
personalModules = [ personalModules = [
./modules/graphics.nix
./modules/sound.nix ./modules/sound.nix
./modules/xorg.nix
]; ];
commonModules = [ commonModules = [
./modules/nvim ./modules/nvim

64
hosts/satori/colemak-dh Normal file
View File

@@ -0,0 +1,64 @@
default partial alphanumeric_keys modifier_keys
xkb_symbols "basic" {
name[Group1] = "English (US Colemak-DH)";
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)"
};
partial alphanumeric_keys
xkb_symbols "ganda-dh" {
include "us-colemak(basic)"
name[Group1] = "English (US Ganda-DH)";
key <CAPS> { [ BackSpace, BackSpace, BackSpace, BackSpace ] };
include "level3(ralt_switch)"
};

61
hosts/satori/graphics.nix Normal file
View File

@@ -0,0 +1,61 @@
{ config, pkgs, lib, ... }:
let
nvidia-offload = pkgs.writeShellScriptBin "nvi" ''
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 "$@"
'';
in
{
environment.systemPackages = with pkgs; [
nvidia-offload
];
hardware = {
/*opengl =
let
fn = oa: with lib; {
nativeBuildInputs = oa.nativeBuildInputs ++ singleton pkgs.glslang;
mesonFlags = oa.mesonFlags ++ singleton "-Dvulkan-layers=device-select,overlay";
patches = oa.patches ++ singleton ./mesa-vulkan-layer-nvidia.patch;
postInstall = oa.postInstall + ''
mv $out/lib/libVkLayer* $drivers/lib
layer=VkLayer_MESA_device_select
substituteInPlace $drivers/share/vulkan/implicit_layer.d/''${layer}.json \
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
layer=VkLayer_MESA_overlay
substituteInPlace $drivers/share/vulkan/explicit_layer.d/''${layer}.json \
--replace "lib''${layer}" "$drivers/lib/lib''${layer}"
'';
};
in
with pkgs; {
driSupport32Bit = true;
enable = true;
package = (mesa.overrideAttrs fn).drivers;
package32 = (pkgsi686Linux.mesa.overrideAttrs fn).drivers;
};*/
opengl = {
driSupport32Bit = true;
enable = true;
};
nvidia = {
prime = {
# sync.enable = true;
offload = { enable = true; };
intelBusId = "PCI:0:2:0";
nvidiaBusId = "PCI:1:0:0";
};
modesetting = { enable = true; };
powerManagement = {
enable = true;
finegrained = true;
};
};
};
services.xserver = {
videoDrivers = [ "nvidia" ];
dpi = 96;
};
}

45
hosts/satori/xorg.nix Normal file
View File

@@ -0,0 +1,45 @@
{ config, lib, ... }:
#let
# compiledLayout = pkgs.runCommand "keyboard-layout" {} ''
# ${pkgs.xorg.xkbcomp}/bin/xkbcomp ${./colemak-dh.xkb} $out
# '';
#in
{
console.useXkbConfig = true;
services = {
xserver = {
enable = true;
libinput= {
enable = true;
mouse = {
accelSpeed = "0";
# accelProfile = "flat";
};
touchpad = {
middleEmulation = false;
clickMethod = "buttonareas";
tapping = true;
naturalScrolling =true;
};
};
displayManager = {
startx = {
enable = true;
};
};
extraLayouts = {
us-colemak = {
description = "Colemak with MOD-dh";
languages = [ "eng" ];
symbolsFile = ./colemak-dh;
};
};
layout = "us-colemak";
xkbVariant = "basic";
autoRepeatDelay = 320;
autoRepeatInterval = 30;
};
};
}

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env sh
for x in "$@"; do
curl -F "file=@\"$x\"" -F "key=$FILEHOST_KEY" $FILEHOST_URL
echo " "
done