diff --git a/flake.nix b/flake.nix index 2a1bd11..887c2b1 100755 --- a/flake.nix +++ b/flake.nix @@ -48,11 +48,6 @@ inherit system; config.allowUnfree = true; overlays = [ - (_final: _prev: { - steam = pkgs.writeShellScriptBin "steam" '' - ${_prev.steam.outPath}/bin/steam -pipewire "$@" - ''; - }) inputs.nvim.overlays.default ]; }; diff --git a/home-manager/shared/programs/dev/default.nix b/home-manager/shared/programs/dev/default.nix index 2676e10..f30732b 100644 --- a/home-manager/shared/programs/dev/default.nix +++ b/home-manager/shared/programs/dev/default.nix @@ -1,18 +1,13 @@ {pkgs, ...}: { - programs.taskwarrior = { - enable = true; - colorTheme = "solarized-dark-256"; - }; home.packages = with pkgs; [ - ripgrep - fd k9s kubectl + nerdctl python3 p7zip gnumake go jq - awscli + tree ]; } diff --git a/home-manager/shared/programs/shell/default.nix b/home-manager/shared/programs/shell/default.nix index c1d2880..d3f5bee 100755 --- a/home-manager/shared/programs/shell/default.nix +++ b/home-manager/shared/programs/shell/default.nix @@ -9,9 +9,10 @@ ]; home = { packages = with pkgs; [ - tree eza bat + ripgrep + fd ]; }; programs.fish = { @@ -30,19 +31,25 @@ set -gx NIX_FLAKE '/home/e/dev/nix' "; plugins = [ - { name = "fzf"; src = pkgs.fishPlugins.fzf-fish.src; } - { name = "puffer"; src = pkgs.fishPlugins.puffer.src; } + { + name = "fzf"; + inherit (pkgs.fishPlugins.fzf-fish) src; + } + { + name = "puffer"; + inherit (pkgs.fishPlugins.puffer) src; + } ]; functions = { nix = { wraps = "nix"; body = '' - if status is-interactive - and test (count $argv) = 1 -a "$argv[1]" = develop - nix develop --command (status fish-path) - else - command nix $argv - end + if status is-interactive + and test (count $argv) = 1 -a "$argv[1]" = develop + nix develop --command (status fish-path) + else + command nix $argv + end ''; }; }; @@ -58,6 +65,7 @@ mpv = "mpv --no-keepaspect-window"; cat = "bat -pp"; tcd = "cd $(mktemp -d)"; + docker = "nerdctl"; }; }; programs.bash = { diff --git a/home-manager/shared/programs/shell/tmux.nix b/home-manager/shared/programs/shell/tmux.nix index 60894aa..15fe8a2 100755 --- a/home-manager/shared/programs/shell/tmux.nix +++ b/home-manager/shared/programs/shell/tmux.nix @@ -1,4 +1,4 @@ -_: { +{config, ...}: { programs.tmux = { enable = true; keyMode = "vi"; @@ -17,4 +17,59 @@ _: { setw -g window-status-current-format '[#P:#W*] ' ''; }; + + programs.zellij = { + enable = true; + enableFishIntegration = true; + }; + home.file."${config.xdg.configHome}/zellij/config.kdl".text = '' + on_force_close "quit" + default_layout "compact" + default_mode "locked" + keybinds { + tmux { + bind "Ctrl a" { Write 2; SwitchToMode "Locked"; } + bind "[" { SwitchToMode "Scroll"; } + bind "\"" { NewPane "Down"; SwitchToMode "Locked"; } + bind "%" { NewPane "Right"; SwitchToMode "Locked"; } + bind "z" { ToggleFocusFullscreen; SwitchToMode "Locked"; } + bind "c" { NewTab; SwitchToMode "Locked"; } + bind "," { SwitchToMode "RenameTab"; } + bind "p" { GoToPreviousTab; SwitchToMode "Locked"; } + bind "n" { GoToNextTab; SwitchToMode "Locked"; } + bind "h" { MoveFocus "Left"; SwitchToMode "Locked"; } + bind "l" { MoveFocus "Right"; SwitchToMode "Locked"; } + bind "j" { MoveFocus "Down"; SwitchToMode "Locked"; } + bind "k" { MoveFocus "Up"; SwitchToMode "Locked"; } + bind "Ctrl h" { MoveFocus "Left"; } + bind "Ctrl l" { MoveFocus "Right"; } + bind "Ctrl j" { MoveFocus "Down"; } + bind "Ctrl k" { MoveFocus "Up"; } + bind "o" { FocusNextPane; } + bind "d" { Detach; } + bind "Space" { NextSwapLayout; } + bind "x" { CloseFocus; SwitchToMode "Locked"; } + bind "/" { + LaunchOrFocusPlugin "zellij-forgot" { floating true } + } + } + shared_except "tmux" { + bind "Ctrl a" { + SwitchToMode "Tmux" + } + } + } + mouse_mode true + pane_frames false + plugins { + zellij-forgot location="https://github.com/karimould/zellij-forgot/releases/download/0.4.0/zellij_forgot.wasm" + } + simplified_ui true + theme "ansi" + ui { + pane_frames { + hide_session_name true + } + } + ''; } diff --git a/home-manager/shared/wayland/alacritty/default.nix b/home-manager/shared/wayland/alacritty/default.nix index f7293b8..c145c7c 100755 --- a/home-manager/shared/wayland/alacritty/default.nix +++ b/home-manager/shared/wayland/alacritty/default.nix @@ -19,7 +19,7 @@ _: { }; size = 12; offset = { - x = 1; + x = 0; y = 1; }; }; diff --git a/home-manager/shared/wayland/hyprland/default.nix b/home-manager/shared/wayland/hyprland/default.nix index cd43813..797e85a 100644 --- a/home-manager/shared/wayland/hyprland/default.nix +++ b/home-manager/shared/wayland/hyprland/default.nix @@ -5,7 +5,7 @@ extraConfig = '' monitor=,preferred,auto,1 ''; - plugins = [ pkgs.hyprlandPlugins.hyprexpo ]; + plugins = [pkgs.hyprlandPlugins.hyprexpo]; settings = { "$mod" = "SUPER"; general = { @@ -22,7 +22,9 @@ blur = { enabled = false; }; - drop_shadow = "no"; + shadow = { + enabled = false; + }; }; animations = { enabled = "yes"; @@ -37,7 +39,7 @@ }; master = { new_status = "slave"; - no_gaps_when_only = 1; + new_on_top = true; }; input = { kb_options = "caps:super"; @@ -131,6 +133,17 @@ "noinitialfocus,class:^(xwaylandvideobridge)$" "maxsize 1 1,class:^(xwaylandvideobridge)$" "noblur,class:^(xwaylandvideobridge)$" + "bordersize 0, floating:0, onworkspace:w[t1]" + "rounding 0, floating:0, onworkspace:w[t1]" + "bordersize 0, floating:0, onworkspace:w[tg1]" + "rounding 0, floating:0, onworkspace:w[tg1]" + "bordersize 0, floating:0, onworkspace:f[1]" + "rounding 0, floating:0, onworkspace:f[1]" + ]; + workspace = [ + "w[t1], gapsout:0, gapsin:0" + "w[tg1], gapsout:0, gapsin:0" + "f[1], gapsout:0, gapsin:0" ]; }; }; diff --git a/home-manager/t14/home.nix b/home-manager/t14/home.nix index d7352c8..7d0aa77 100755 --- a/home-manager/t14/home.nix +++ b/home-manager/t14/home.nix @@ -10,10 +10,10 @@ home = { packages = with pkgs; [ # gaming - steam prismlauncher runelite jdk21 + steam-run # comms signal-desktop @@ -30,9 +30,6 @@ piper calibre - # font - spleen - # sysutils appimage-run wireguard-tools diff --git a/nixos/consensus/configuration.nix b/nixos/consensus/configuration.nix index e7a4c00..87bb8b1 100644 --- a/nixos/consensus/configuration.nix +++ b/nixos/consensus/configuration.nix @@ -25,6 +25,7 @@ 2022 3610 6443 + 8080 25565 9002 30001 diff --git a/nixos/default.nix b/nixos/default.nix index 5584c33..d2a84ce 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -47,7 +47,7 @@ in { pkgs = pkgs-stable; inherit inputs system attrs; host = { - hostName = "consensus"; + hostName = "nc"; inherit (attrs) username; }; }; diff --git a/nixos/nc/configuration.nix b/nixos/nc/configuration.nix index 7de0fde..1e9446f 100644 --- a/nixos/nc/configuration.nix +++ b/nixos/nc/configuration.nix @@ -1,7 +1,4 @@ -{ - pkgs, - ... -}: { +{pkgs, ...}: { imports = [ ./hardware-configuration.nix ./k3s.nix @@ -38,10 +35,10 @@ enable = true; allowedTCPPorts = [ 22 - 9000 - 30001 - 30303 - 30304 + 9000 #charon holesky + 30001 #mainnet + 30303 #mainnet + 30304 #charon holesky ]; logRefusedConnections = true; }; @@ -67,11 +64,15 @@ "wheel" "docker" ]; - openssh.authorizedKeys.keys = [''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14'']; + openssh.authorizedKeys.keys = [ + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIHM4Zr0PFN7QdOG2aJ+nuzRCK6caulrpY6bphA1Ppl8Y e@t14'' + ''ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAdo4PS8myKaKAdyIqSFj2VJ+oZ9DNRIp7PBz8IWKjjy'' + ]; }; hd = { isNormalUser = true; extraGroups = [ + "wheel" "docker" ]; }; diff --git a/nixos/nc/hardware-configuration.nix b/nixos/nc/hardware-configuration.nix index 5eea1d7..ea8fd4a 100755 --- a/nixos/nc/hardware-configuration.nix +++ b/nixos/nc/hardware-configuration.nix @@ -4,16 +4,24 @@ config, ... }: { - imports = [ (modulesPath + "/profiles/qemu-guest.nix") ]; + imports = [(modulesPath + "/profiles/qemu-guest.nix")]; boot.loader.grub.device = "/dev/vda"; - boot.initrd.availableKernelModules = [ "ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi" ]; - boot.initrd.kernelModules = [ "nvme" ]; - fileSystems."/" = { device = "/dev/vda3"; fsType = "ext4"; }; + boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "xen_blkfront" "vmw_pvscsi"]; + boot.initrd.kernelModules = ["nvme"]; + fileSystems."/" = { + device = "/dev/vda3"; + fsType = "ext4"; + }; boot = { kernelModules = ["kvm-intel"]; tmp.cleanOnBoot = true; }; - + swapDevices = [ + { + device = "/swapfile"; + size = 8 * 1024; + } + ]; zramSwap.enable = false; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; diff --git a/nixos/t14/configuration.nix b/nixos/t14/configuration.nix index 01b85cc..1a8ad92 100755 --- a/nixos/t14/configuration.nix +++ b/nixos/t14/configuration.nix @@ -13,6 +13,7 @@ in { environment.systemPackages = with pkgs; [ cryptsetup nfs-utils + nerdctl ]; environment.extraInit = "[[ -f ${homeManagerSessionVars} ]] && source ${homeManagerSessionVars} && echo 'x' > /tmp/test"; @@ -24,7 +25,7 @@ in { # Networking networking = { hostId = "1185c58e"; - nameservers = ["100.114.91.10"]; + nameservers = ["9.9.9.9" "1.1.1.1"]; networkmanager = { enable = true; dns = "systemd-resolved"; @@ -40,9 +41,8 @@ in { # Services virtualisation = { - podman = { + containerd = { enable = true; - dockerCompat = true; }; }; @@ -58,6 +58,7 @@ in { ssh = { startAgent = true; }; + steam.enable = true; }; services = { resolved = { @@ -78,9 +79,19 @@ in { tlp = { enable = true; settings = { - WIFI_PWR_ON_BAT = "off"; - START_CHARGE_THRESH_BAT0 = 80; - STOP_CHARGE_THRESH_BAT0 = 85; + START_CHARGE_THRESH_BAT0 = 40; + STOP_CHARGE_THRESH_BAT0 = 80; + CPU_BOOST_ON_AC = 1; + CPU_BOOST_ON_BAT = 0; + CPU_SCALING_GOVERNOR_ON_AC = "performance"; + CPU_SCALING_GOVERNOR_ON_BAT = "powersave"; + CPU_ENERGY_PERF_POLICY_ON_BAT = "power"; + CPU_ENERGY_PERF_POLICY_ON_AC = "performance"; + + CPU_MIN_PERF_ON_AC = 0; + CPU_MAX_PERF_ON_AC = 100; + CPU_MIN_PERF_ON_BAT = 0; + CPU_MAX_PERF_ON_BAT = 20; }; }; ratbagd.enable = true; # Logitech