diff --git a/hosts/dlaptop/hardware.nix b/hosts/dlaptop/hardware.nix index 142422e..84485bc 100644 --- a/hosts/dlaptop/hardware.nix +++ b/hosts/dlaptop/hardware.nix @@ -69,7 +69,7 @@ boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.efiSysMountPoint = "/boot"; boot.initrd.kernelModules = [ ]; - boot.kernelPackages = unstable.linuxPackages_zen; + boot.kernelPackages = unstable.linuxPackages_xanmod_latest; boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call cpupower ]; fileSystems."/" = { diff --git a/hosts/dlaptop/services.nix b/hosts/dlaptop/services.nix index 4469f20..83d0b0c 100644 --- a/hosts/dlaptop/services.nix +++ b/hosts/dlaptop/services.nix @@ -1,8 +1,8 @@ -{ pkgs, lib, ... }: +{ pkgs, lib, inputs, ... }: { - users.users.delta.packages = [ - (pkgs.writeScriptBin "warp-cli" "${pkgs.cloudflare-warp}/bin/warp-cli $@") - ]; + # users.users.delta.packages = [ + # (pkgs.writeScriptBin "warp-cli" "${pkgs.cloudflare-warp}/bin/warp-cli $@") + # ]; # systemd.services.cloudflare-warp = { # enable = true; diff --git a/hosts/dlaptop/system.nix b/hosts/dlaptop/system.nix index fe56c87..adf1254 100644 --- a/hosts/dlaptop/system.nix +++ b/hosts/dlaptop/system.nix @@ -174,7 +174,6 @@ nufraw-thumbnailer android-tools - firefox tor-browser #inputs.anyrun.packages.${pkgs.system}.anyrun sops diff --git a/hosts/generic.nix b/hosts/generic.nix index 19a7410..d162e43 100644 --- a/hosts/generic.nix +++ b/hosts/generic.nix @@ -123,19 +123,33 @@ in { tre = "${pkgs.eza}/bin/exa --tree"; itree = "${pkgs.eza}/bin/exa --icons --tree"; search = "nix-search -d -m 5 -p"; - unpack = "aunpack"; + unpack = "aunpack"; unzip = "aunpack"; where = "which"; c = "cd"; ",s" = ", -s"; }; promptInit = '' - set TERM "xterm-256color" + # set TERM "xterm-256color" set fish_greeting export STARSHIP_CONFIG=/etc/starship.toml ${pkgs.zoxide}/bin/zoxide init fish | source source (${pkgs.starship}/bin/starship init fish --print-full-init | psub) any-nix-shell fish --info-right | source ''; + interactiveShellInit = '' + bind \cq 'fg; commandline -f execute' + + function edit_command_in_editor + set -l temp_file (mktemp) + commandline > $temp_file + $EDITOR $temp_file + commandline (cat $temp_file) + rm $temp_file + end #oops Alt+e does the same by default + + # Bind the function to Ctrl+E + bind \cs 'edit_command_in_editor' + ''; }; programs.tmux.enable = true; diff --git a/hosts/intelnuc/system.nix b/hosts/intelnuc/system.nix index 6a62005..85b3f4a 100644 --- a/hosts/intelnuc/system.nix +++ b/hosts/intelnuc/system.nix @@ -1,18 +1,14 @@ -{ config, pkgs, inputs, self,... }: -{ - imports = [ - ./hardware.nix - ./nginx-work.nix - inputs.secrets.nixosModules.intelnuc - ]; +{ config, pkgs, inputs, self, ... }: { + imports = + [ ./hardware.nix ./nginx-work.nix inputs.secrets.nixosModules.intelnuc ]; system.autoUpgrade = { - enable = false; + enable = true; flake = "github:deltathetawastaken/dotfiles"; dates = "daily"; }; systemd.services.nixos-upgrade = { # 1 hour timeout, default is too low - serviceConfig.TimeoutSec= 3600; + serviceConfig.TimeoutSec = 3600; serviceConfig.TimeoutStartUSec = 3600; serviceConfig.TimeoutStopUSec = 3600; }; @@ -20,7 +16,7 @@ boot.loader.grub.enable = true; boot.loader.grub.device = "/dev/sda"; boot.loader.grub.useOSProber = true; - boot.kernel.sysctl."net.core.rmem_max" = 2500000; #for quic + boot.kernel.sysctl."net.core.rmem_max" = 2500000; # for quic time.timeZone = "Europe/Moscow"; i18n.defaultLocale = "en_US.UTF-8"; @@ -28,7 +24,7 @@ users.users.intelnuc = { isNormalUser = true; description = "intelnuc"; - extraGroups = [ "networkmanager" "wheel" "docker"]; + extraGroups = [ "networkmanager" "wheel" "docker" ]; }; users.users.root.openssh.authorizedKeys.keys = [ @@ -37,9 +33,7 @@ programs.adb.enable = true; - services.udev.packages = [ - pkgs.android-udev-rules - ]; + services.udev.packages = [ pkgs.android-udev-rules ]; environment.systemPackages = with pkgs; [ git @@ -48,7 +42,9 @@ htop zenith xorg.xauth - docker docker-compose traefik + docker + docker-compose + traefik lazydocker android-tools ]; @@ -79,14 +75,10 @@ serviceConfig = { Restart = "on-failure"; RestartSec = "15"; - Type="simple"; + Type = "simple"; }; script = "/home/delta/scripts/vpn-connect-WB"; - path = with pkgs; [ - expect - oath-toolkit - openconnect - ]; + path = with pkgs; [ expect oath-toolkit openconnect ]; }; services.forgejo = { @@ -100,9 +92,7 @@ ROOT_URL = "https://${inputs.secrets.hosts.intelnuc.forgejo.domain}"; }; }; - database = { - type = "sqlite3"; - }; + database = { type = "sqlite3"; }; }; services.cloudflared.enable = true; diff --git a/pkgs/apps.nix b/pkgs/apps.nix index 9e51d0b..07948ee 100644 --- a/pkgs/apps.nix +++ b/pkgs/apps.nix @@ -31,6 +31,8 @@ in { #]; users.users.delta.packages = (with pkgs; [ + alejandra + pre-commit gitleaks git #chromium @@ -301,6 +303,14 @@ in { echo "$word_before_value(seq $from_value $to_value)" end abbr --add range_expand_abbr --position anywhere --regex "\w*\{\d+\.\.\d+\}" --function range_expansion + + function copy_command_to_clipboard + set -l current_command (commandline -b | string trim) + printf "%s" $current_command | wl-copy + end + + # Bind the function to Alt+R + bind \er copy_command_to_clipboard ''; };