small fixes

This commit is contained in:
Your Name 2024-05-31 05:55:10 +03:00
parent 069d8aad89
commit 45f355646b
6 changed files with 45 additions and 32 deletions

View file

@ -69,7 +69,7 @@
boot.loader.efi.canTouchEfiVariables = true; boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot"; boot.loader.efi.efiSysMountPoint = "/boot";
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelPackages = unstable.linuxPackages_zen; boot.kernelPackages = unstable.linuxPackages_xanmod_latest;
boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call cpupower ]; boot.extraModulePackages = with config.boot.kernelPackages; [ acpi_call cpupower ];
fileSystems."/" = { fileSystems."/" = {

View file

@ -1,8 +1,8 @@
{ pkgs, lib, ... }: { pkgs, lib, inputs, ... }:
{ {
users.users.delta.packages = [ # users.users.delta.packages = [
(pkgs.writeScriptBin "warp-cli" "${pkgs.cloudflare-warp}/bin/warp-cli $@") # (pkgs.writeScriptBin "warp-cli" "${pkgs.cloudflare-warp}/bin/warp-cli $@")
]; # ];
# systemd.services.cloudflare-warp = { # systemd.services.cloudflare-warp = {
# enable = true; # enable = true;

View file

@ -174,7 +174,6 @@
nufraw-thumbnailer nufraw-thumbnailer
android-tools android-tools
firefox
tor-browser tor-browser
#inputs.anyrun.packages.${pkgs.system}.anyrun #inputs.anyrun.packages.${pkgs.system}.anyrun
sops sops

View file

@ -123,19 +123,33 @@ in {
tre = "${pkgs.eza}/bin/exa --tree"; tre = "${pkgs.eza}/bin/exa --tree";
itree = "${pkgs.eza}/bin/exa --icons --tree"; itree = "${pkgs.eza}/bin/exa --icons --tree";
search = "nix-search -d -m 5 -p"; search = "nix-search -d -m 5 -p";
unpack = "aunpack"; unpack = "aunpack"; unzip = "aunpack";
where = "which"; where = "which";
c = "cd"; c = "cd";
",s" = ", -s"; ",s" = ", -s";
}; };
promptInit = '' promptInit = ''
set TERM "xterm-256color" # set TERM "xterm-256color"
set fish_greeting set fish_greeting
export STARSHIP_CONFIG=/etc/starship.toml export STARSHIP_CONFIG=/etc/starship.toml
${pkgs.zoxide}/bin/zoxide init fish | source ${pkgs.zoxide}/bin/zoxide init fish | source
source (${pkgs.starship}/bin/starship init fish --print-full-init | psub) source (${pkgs.starship}/bin/starship init fish --print-full-init | psub)
any-nix-shell fish --info-right | source 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; programs.tmux.enable = true;

View file

@ -1,18 +1,14 @@
{ config, pkgs, inputs, self,... }: { config, pkgs, inputs, self, ... }: {
{ imports =
imports = [ [ ./hardware.nix ./nginx-work.nix inputs.secrets.nixosModules.intelnuc ];
./hardware.nix
./nginx-work.nix
inputs.secrets.nixosModules.intelnuc
];
system.autoUpgrade = { system.autoUpgrade = {
enable = false; enable = true;
flake = "github:deltathetawastaken/dotfiles"; flake = "github:deltathetawastaken/dotfiles";
dates = "daily"; dates = "daily";
}; };
systemd.services.nixos-upgrade = { # 1 hour timeout, default is too low systemd.services.nixos-upgrade = { # 1 hour timeout, default is too low
serviceConfig.TimeoutSec= 3600; serviceConfig.TimeoutSec = 3600;
serviceConfig.TimeoutStartUSec = 3600; serviceConfig.TimeoutStartUSec = 3600;
serviceConfig.TimeoutStopUSec = 3600; serviceConfig.TimeoutStopUSec = 3600;
}; };
@ -20,7 +16,7 @@
boot.loader.grub.enable = true; boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda"; boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true; 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"; time.timeZone = "Europe/Moscow";
i18n.defaultLocale = "en_US.UTF-8"; i18n.defaultLocale = "en_US.UTF-8";
@ -28,7 +24,7 @@
users.users.intelnuc = { users.users.intelnuc = {
isNormalUser = true; isNormalUser = true;
description = "intelnuc"; description = "intelnuc";
extraGroups = [ "networkmanager" "wheel" "docker"]; extraGroups = [ "networkmanager" "wheel" "docker" ];
}; };
users.users.root.openssh.authorizedKeys.keys = [ users.users.root.openssh.authorizedKeys.keys = [
@ -37,9 +33,7 @@
programs.adb.enable = true; programs.adb.enable = true;
services.udev.packages = [ services.udev.packages = [ pkgs.android-udev-rules ];
pkgs.android-udev-rules
];
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
git git
@ -48,7 +42,9 @@
htop htop
zenith zenith
xorg.xauth xorg.xauth
docker docker-compose traefik docker
docker-compose
traefik
lazydocker lazydocker
android-tools android-tools
]; ];
@ -79,14 +75,10 @@
serviceConfig = { serviceConfig = {
Restart = "on-failure"; Restart = "on-failure";
RestartSec = "15"; RestartSec = "15";
Type="simple"; Type = "simple";
}; };
script = "/home/delta/scripts/vpn-connect-WB"; script = "/home/delta/scripts/vpn-connect-WB";
path = with pkgs; [ path = with pkgs; [ expect oath-toolkit openconnect ];
expect
oath-toolkit
openconnect
];
}; };
services.forgejo = { services.forgejo = {
@ -100,9 +92,7 @@
ROOT_URL = "https://${inputs.secrets.hosts.intelnuc.forgejo.domain}"; ROOT_URL = "https://${inputs.secrets.hosts.intelnuc.forgejo.domain}";
}; };
}; };
database = { database = { type = "sqlite3"; };
type = "sqlite3";
};
}; };
services.cloudflared.enable = true; services.cloudflared.enable = true;

View file

@ -31,6 +31,8 @@ in {
#]; #];
users.users.delta.packages = (with pkgs; [ users.users.delta.packages = (with pkgs; [
alejandra
pre-commit
gitleaks gitleaks
git git
#chromium #chromium
@ -301,6 +303,14 @@ in {
echo "$word_before_value(seq $from_value $to_value)" echo "$word_before_value(seq $from_value $to_value)"
end end
abbr --add range_expand_abbr --position anywhere --regex "\w*\{\d+\.\.\d+\}" --function range_expansion 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
''; '';
}; };