From f2689e9de039a1afb32af1a7a3813639948bb43c Mon Sep 17 00:00:00 2001 From: Jade Date: Sun, 14 May 2023 12:07:54 +0200 Subject: [PATCH] Zellij and some other things --- common.nix | 5 +- .../monosodium-glutamate-g/configuration.nix | 80 +++++++++++-------- modules/default.nix | 1 + modules/helix.nix | 18 ++++- modules/zellij.nix | 32 ++++++++ 5 files changed, 98 insertions(+), 38 deletions(-) create mode 100644 modules/zellij.nix diff --git a/common.nix b/common.nix index ce98932..ffa3b02 100644 --- a/common.nix +++ b/common.nix @@ -68,7 +68,7 @@ with builtins; #}; #security.sudo.extraConfig = "Defaults insults"; - boot.kernel.sysctl.vm.max_map_count = 2147483642; + boot.kernel.sysctl."vm.max_map_count" = 2147483642; hardware.opengl.enable = true; @@ -80,7 +80,8 @@ with builtins; users.users.jade = { isNormalUser = true; extraGroups = [ "wheel" "input" "uinput" "libvirtd" "adbusers" ]; - packages = with pkgs; [ + packages = [ + pkgs.marksman ]; }; diff --git a/hosts/monosodium-glutamate-g/configuration.nix b/hosts/monosodium-glutamate-g/configuration.nix index 620a6a4..f6c57f9 100644 --- a/hosts/monosodium-glutamate-g/configuration.nix +++ b/hosts/monosodium-glutamate-g/configuration.nix @@ -2,7 +2,7 @@ # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). -{ inputs, config, pkgs, lib, ... }: +{ pkgs, ... }: { imports = [ ./hardware-configuration.nix @@ -42,42 +42,56 @@ ios-compat.enable = true; mail.enable = true; }; + zellij.enable = true; terminal.enable = true; - neovim.enable = true; + helix.enable = true; zsh.enable = true; }; + boot = { + loader = { - # monitor control - services.ddccontrol.enable = true; + # Use the systemd-boot EFI boot loader. + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + # latest linux kernel + #boot.kernelPackages = pkgs.linuxPackages_latest; + #boot.kernelPackages = pkgs.linux_zen_xeniafied; + kernelPackages = pkgs.linuxPackages_zen; + #boot.kernelPatches = [ + #{ + #name = "fomx"; + #patch = ../other/0001-fomx.patch; + #} + #]; - # Use the systemd-boot EFI boot loader. - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; - # latest linux kernel - #boot.kernelPackages = pkgs.linuxPackages_latest; - #boot.kernelPackages = pkgs.linux_zen_xeniafied; - boot.kernelPackages = pkgs.linuxPackages_zen; - #boot.kernelPatches = [ - #{ - #name = "fomx"; - #patch = ../other/0001-fomx.patch; - #} - #]; - - boot.binfmt.emulatedSystems = [ "aarch64-linux" ]; - - programs.corectrl.enable = true; + binfmt.emulatedSystems = [ "aarch64-linux" ]; + }; networking.hostName = "monosodium-glutamate-g"; + services = { - services.xserver.layout = "us"; - services.xserver.xkbVariant = "altgr-intl"; + # monitor control + ddccontrol.enable = true; + xserver = { - services.openssh.settings.PermitRootLogin = "without-password"; + layout = "us"; + xkbVariant = "altgr-intl"; + enable = true; + }; - hardware.bluetooth.enable = true; - hardware.keyboard.uhk.enable = true; - hardware.enableRedistributableFirmware = true; + openssh.settings.PermitRootLogin = "without-password"; + + blueman.enable = true; + + gnome.gnome-keyring.enable = true; + }; + hardware = { + + bluetooth.enable = true; + keyboard.uhk.enable = true; + enableRedistributableFirmware = true; + }; # missing: menu-qalc picom-jonaburg environment.systemPackages = with pkgs; [ @@ -92,16 +106,15 @@ rgp tea ]; - programs.wireshark.enable = true; + programs = { + corectrl.enable = true; + wireshark.enable = true; + seahorse.enable = true; + }; environment.pathsToLink = [ "/share/nix-direnv" ]; - - services.blueman.enable = true; - - services.gnome.gnome-keyring.enable = true; - programs.seahorse.enable = true; security.pam.services.jade.enableGnomeKeyring = true; # Copy the NixOS configuration file and link it from the resulting system @@ -111,7 +124,6 @@ # networking.firewall.allowedTCPPorts = [ 4713 ]; systemd.services."NetworkManager-wait-online".enable = false; - services.xserver.enable = true; systemd.services = { create-swapfile = { diff --git a/modules/default.nix b/modules/default.nix index bb2c642..d2b139e 100644 --- a/modules/default.nix +++ b/modules/default.nix @@ -1,6 +1,7 @@ { ... }: { imports = [ + ./zellij.nix ./desktop ./terminal.nix ./neovim.nix diff --git a/modules/helix.nix b/modules/helix.nix index f25a91d..ed29149 100644 --- a/modules/helix.nix +++ b/modules/helix.nix @@ -1,5 +1,4 @@ - -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let cfg = config.jade.helix; in with lib; { @@ -8,6 +7,16 @@ in with lib; { }; config = mkIf cfg.enable { home-manager.users.jade = { pkgs, ... }: { + home = { + sessionVariables.EDITOR = "hx"; + packages = [ + pkgs.nil + pkgs.nodePackages_latest.vscode-html-languageserver-bin + pkgs.nodePackages_latest.vscode-json-languageserver-bin + pkgs.nodePackages_latest.vscode-css-languageserver-bin + pkgs.nodePackages_latest.bash-language-server + ]; + }; programs.helix = { enable = true; settings = { @@ -16,6 +25,11 @@ in with lib; { line-number = "relative"; lsp.display-messages = true; }; + keys.normal = { + space."=" = ":fmt"; + "H" = "goto_line_start"; + "L" = "goto_line_end"; + }; }; }; }; diff --git a/modules/zellij.nix b/modules/zellij.nix new file mode 100644 index 0000000..71edc1a --- /dev/null +++ b/modules/zellij.nix @@ -0,0 +1,32 @@ +{ config, lib, ... }: +let cfg = config.jade.zellij; +in with lib; { + options.jade.zellij= { + enable = mkEnableOption "Enable the Zellij multiplexer"; + }; + config = mkIf cfg.enable { + home-manager.users.jade = { pkgs, ... }: { + programs.zellij = { + enable = true; + enableZshIntegration = true; + settings = { + theme = "gruvbox-dark"; + themes.gruvbox-dark = { + fg = "#D5C4A1"; + bg = "#282828"; + black = "#3C3836"; + red = "#CC241D"; + green = "#98971A"; + yellow = "#D79921"; + blue = "#3C8588"; + magenta = "#B16286"; + cyan = "#689D6A"; + white = "#FBF1C7"; + orange = "#D65D0E"; + }; + pane_frames = false; + }; + }; + }; + }; +}