From a18f8b72956e9cb50908f3e01e375c4df9fa33ad Mon Sep 17 00:00:00 2001 From: Amneesh Singh Date: Mon, 23 Jan 2023 15:42:08 +0530 Subject: [PATCH] hosts/satori: remove fcitx and change the default kb layout Signed-off-by: Amneesh Singh --- .envrc | 1 - hosts/modules/nvim/default.nix | 4 --- hosts/satori/boot.nix | 4 +-- hosts/satori/colemak | 19 ++++++++++ hosts/satori/colemak-dh | 64 ---------------------------------- hosts/satori/networking.nix | 4 +-- hosts/satori/pkgs.nix | 13 +++---- hosts/satori/services.nix | 3 +- hosts/satori/stuff.nix | 37 +++++--------------- hosts/satori/xorg.nix | 10 +++--- 10 files changed, 44 insertions(+), 115 deletions(-) delete mode 100644 .envrc create mode 100644 hosts/satori/colemak delete mode 100644 hosts/satori/colemak-dh diff --git a/.envrc b/.envrc deleted file mode 100644 index 3550a30..0000000 --- a/.envrc +++ /dev/null @@ -1 +0,0 @@ -use flake diff --git a/hosts/modules/nvim/default.nix b/hosts/modules/nvim/default.nix index 5fc7c9f..76fe28d 100644 --- a/hosts/modules/nvim/default.nix +++ b/hosts/modules/nvim/default.nix @@ -4,10 +4,6 @@ programs.neovim = { enable = true; package = pkgs.neovim-nightly; - # package = inputs.nvim-overlay.packages.${pkgs.system}.default; - # package = pkgs.neovim-nightly.overrideAttrs (_:{ - # nativeBuildInputs = with pkgs; [ unzip cmake pkgconfig gettext tree-sitter ]; - # }); defaultEditor = false; configure = { customRC = '' diff --git a/hosts/satori/boot.nix b/hosts/satori/boot.nix index ecf95a9..69fc0a9 100644 --- a/hosts/satori/boot.nix +++ b/hosts/satori/boot.nix @@ -3,7 +3,7 @@ { boot = { supportedFilesystems = [ "zfs" ]; - kernelPackages = pkgs.linuxPackages_5_15; + kernelPackages = pkgs.linuxPackages_latest; initrd = { availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "vfio-pci" ]; /* preDeviceCommands = '' @@ -15,7 +15,7 @@ '';*/ kernelModules = [ ]; }; - kernelParams = [ "intel_pstate=active" "intel_iommu=on" ]; + kernelParams = [ "intel_pstate=active" "intel_iommu=on" "nvidia_drm.modeset=1" ]; kernelModules = [ "kvm-intel" "snd-seq" "snd-rawmidi" "joydev" ]; extraModulePackages = with config.boot.kernelPackages; [ nvidia_x11 v4l2loopback ]; loader = { diff --git a/hosts/satori/colemak b/hosts/satori/colemak new file mode 100644 index 0000000..1aeab23 --- /dev/null +++ b/hosts/satori/colemak @@ -0,0 +1,19 @@ +default partial alphanumeric_keys modifier_keys +xkb_symbols "dhz" { + name[Group1] = "English (Colemak-DHz)"; + include "us(colemak_dh)" + key { [ z, Z, ae, AE ] }; + key { [ x, X, dead_circumflex, asciitilde ] }; + key { [ c, C, ccedilla, Ccedilla ] }; + key { [ d, D, dead_diaeresis, asciitilde ] }; + key { [ v, V, oe, OE ] }; + include "level3(ralt_switch)" +}; + +partial alphanumeric_keys +xkb_symbols "cta-dhz" { + include "colemak(dhz)" + name[Group1] = "English (cta-DHz)"; + key { [ BackSpace, BackSpace, BackSpace, BackSpace ] }; + include "level3(ralt_switch)" +}; diff --git a/hosts/satori/colemak-dh b/hosts/satori/colemak-dh deleted file mode 100644 index fe29f72..0000000 --- a/hosts/satori/colemak-dh +++ /dev/null @@ -1,64 +0,0 @@ -default partial alphanumeric_keys modifier_keys -xkb_symbols "basic" { - name[Group1] = "English (US Colemak-DH)"; - - key { [ grave, asciitilde, dead_tilde, asciitilde ] }; - key { [ 1, exclam, exclamdown, onesuperior ] }; - key { [ 2, at, masculine, twosuperior ] }; - key { [ 3, numbersign, ordfeminine, threesuperior ] }; - key { [ 4, dollar, cent, sterling ] }; - key { [ 5, percent, EuroSign, yen ] }; - key { [ 6, asciicircum, hstroke, Hstroke ] }; - key { [ 7, ampersand, eth, ETH ] }; - key { [ 8, asterisk, thorn, THORN ] }; - key { [ 9, parenleft, leftsinglequotemark, leftdoublequotemark ] }; - key { [ 0, parenright, rightsinglequotemark, rightdoublequotemark ] }; - key { [ minus, underscore, endash, emdash ] }; - key { [ equal, plus, multiply, division ] }; - key { [ q, Q, adiaeresis, Adiaeresis ] }; - key { [ w, W, aring, Aring ] }; - key { [ f, F, atilde, Atilde ] }; - key { [ p, P, oslash, Ooblique ] }; - key { [ b, B, dead_breve, asciitilde ] }; - key { [ j, J, dstroke, Dstroke ] }; - key { [ l, L, lstroke, Lstroke ] }; - key { [ u, U, uacute, Uacute ] }; - key { [ y, Y, udiaeresis, Udiaeresis ] }; - key { [ semicolon, colon, odiaeresis, Odiaeresis ] }; - key { [ bracketleft, braceleft, guillemotleft, 0x1002039 ] }; - key { [ bracketright, braceright, guillemotright, 0x100203a ] }; - key { [ backslash, bar, asciitilde, asciitilde ] }; - key { [ a, A, aacute, Aacute ] }; - key { [ r, R, dead_grave, asciitilde ] }; - key { [ s, S, ssharp, asciitilde ] }; - key { [ t, T, dead_acute, dead_doubleacute ] }; - key { [ g, G, dead_ogonek, asciitilde ] }; - key { [ m, M, dead_macron, asciitilde ] }; - key { [ n, N, ntilde, Ntilde ] }; - key { [ e, E, eacute, Eacute ] }; - key { [ i, I, iacute, Iacute ] }; - key { [ o, O, oacute, Oacute ] }; - key { [ apostrophe, quotedbl, otilde, Otilde ] }; - key { [ z, Z, ae, AE ] }; - key { [ x, X, dead_circumflex, asciitilde ] }; - key { [ c, C, ccedilla, Ccedilla ] }; - key { [ d, D, dead_diaeresis, asciitilde ] }; - key { [ v, V, oe, OE ] }; - key { [ k, K, dead_abovering, asciitilde ] }; - key { [ h, H, dead_caron, asciitilde ] }; - key { [ comma, less, dead_cedilla, asciitilde ] }; - key { [ period, greater, dead_abovedot, asciitilde ] }; - key { [ slash, question, questiondown, asciitilde ] }; - key { [ Caps_Lock, Caps_Lock, Caps_Lock, Caps_Lock ] }; - key { [ minus, underscore, endash, emdash ] }; - key { [ 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 { [ BackSpace, BackSpace, BackSpace, BackSpace ] }; - include "level3(ralt_switch)" -}; diff --git a/hosts/satori/networking.nix b/hosts/satori/networking.nix index ea26254..b680a20 100644 --- a/hosts/satori/networking.nix +++ b/hosts/satori/networking.nix @@ -5,10 +5,10 @@ hostName = "satori"; hostId = "beca3df0"; defaultGateway = "192.168.1.1"; - wireless.enable = true; + networkmanager.enable = true; wireless.interfaces = [ "wlp0s20f3" ]; firewall = { - allowedTCPPorts = [ 22 18172 6600 8001 25565]; + allowedTCPPorts = [ 22 18172 6600 8001 25565 ]; allowedUDPPorts = [ 22 17840 18172 ]; trustedInterfaces = [ "docker0" ]; }; diff --git a/hosts/satori/pkgs.nix b/hosts/satori/pkgs.nix index 7b4180d..210ae62 100644 --- a/hosts/satori/pkgs.nix +++ b/hosts/satori/pkgs.nix @@ -18,8 +18,8 @@ rnix-lsp vulkan-tools vulkan-headers - igrep jq + dconf ]; programs = { @@ -30,6 +30,7 @@ pinentryFlavor = "curses"; }; }; + git = { enable = true; package = pkgs.git.override { @@ -38,6 +39,7 @@ withManual = false; }; }; + zsh = { enable = true; histSize = 30000; @@ -50,10 +52,9 @@ }; ohMyZsh.enable = true; }; - dconf.enable = true; adb.enable = true; light.enable = true; - proxychains = { + /* proxychains = { enable = true; chain.type = "dynamic"; proxyDNS = true; @@ -65,8 +66,8 @@ port = 2217; }; }; - }; - slock.enable = true; - gamemode.enable = true; + }; */ + gamemode.enable = true; + nm-applet.enable = true; }; } diff --git a/hosts/satori/services.nix b/hosts/satori/services.nix index b707605..b0f72cf 100644 --- a/hosts/satori/services.nix +++ b/hosts/satori/services.nix @@ -3,7 +3,6 @@ { services = { tor.enable = true; - logmein-hamachi.enable = true; openssh = { enable = true; permitRootLogin = "yes"; @@ -26,7 +25,7 @@ }; systemd.services = { tor.wantedBy = lib.mkForce [ ]; - logmein-hamachi.wantedBy = lib.mkForce [ ]; + libvirtd.wantedBy = lib.mkForce [ ]; }; security.pki.certificateFiles = [ ../../cert.pem ]; diff --git a/hosts/satori/stuff.nix b/hosts/satori/stuff.nix index a8f836d..a87f518 100644 --- a/hosts/satori/stuff.nix +++ b/hosts/satori/stuff.nix @@ -2,25 +2,8 @@ { time.timeZone = "Asia/Kolkata"; - environment = { - etc."current-system-packages".text = - let - packages = builtins.map (p: "${p.name}") config.environment.systemPackages; - sortedUnique = builtins.sort builtins.lessThan (lib.unique packages); - formatted = builtins.concatStringsSep "\n" sortedUnique; - in - formatted; - sessionVariables = { - QT_X11_NO_MITSHM = "1"; - HM_CONF_DIR = "/etc/nixos"; - }; - localBinInPath = true; - shellAliases = rec { - ec = "emacsclient"; - ecc = ec + " -c"; - ecnw = ec + " -nw"; - }; - }; + environment.localBinInPath = true; + security = { polkit.enable = true; sudo.enable = true; @@ -31,11 +14,12 @@ users = [ "natto" ]; keepEnv = true; persist = true; - setEnv = [ "SSH_AUTH_SOCK" "PATH" "SHELL" "HOME" ]; + setEnv = [ "SSH_AUTH_SOCK" "PATH" "SHELL" ]; } ]; }; }; + fonts.fonts = with pkgs; [ fira-mono fira-code @@ -51,25 +35,20 @@ takao liberation_ttf ]; + users.users.natto = { isNormalUser = true; shell = pkgs.zsh; home = "/home/natto"; - extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" ]; - }; - i18n = { - inputMethod = { - # enabled = "fcitx5"; - # fcitx5.addons = with pkgs; [ fcitx5-m17n fcitx5-mozc ]; - enabled = "fcitx"; - fcitx.engines = with pkgs.fcitx-engines; [ m17n mozc ]; - }; + extraGroups = [ "wheel" "adbusers" "video" "libvirtd" "docker" "networkmanager" ]; }; + virtualisation = { podman = { enable = true; enableNvidia = true; }; }; + gtk.iconCache.enable = true; } diff --git a/hosts/satori/xorg.nix b/hosts/satori/xorg.nix index cae6e0d..01f2871 100644 --- a/hosts/satori/xorg.nix +++ b/hosts/satori/xorg.nix @@ -29,14 +29,14 @@ }; }; extraLayouts = { - us-colemak = { - description = "Colemak with MOD-dh"; + colemak = { + description = "Colemak Layouts"; languages = [ "eng" ]; - symbolsFile = ./colemak-dh; + symbolsFile = ./colemak; }; }; - layout = "us-colemak"; - xkbVariant = "basic"; + layout = "colemak"; + xkbVariant = "dhz"; # trying to ditch DHz now autoRepeatDelay = 320; autoRepeatInterval = 30; };