{ unstable, inputs, config, pkgs, ... }: let run = pkgs.writeScriptBin "run" '' #!/usr/bin/env bash if [[ $# -eq 0 ]]; then echo "Error: Missing argument" else NIXPKGS_ALLOW_UNFREE=1 nix run --impure nixpkgs#"$1" -- "''${@:2}" fi ''; shell = pkgs.writeScriptBin "shell" '' #!/usr/bin/env bash if [[ $# -eq 0 ]]; then echo "Error: Missing argument." else NIXPKGS_ALLOW_UNFREE=1 nix shell --impure nixpkgs#"$1" -- "''${@:2}" fi ''; fzf = pkgs.fzf.overrideAttrs (oldAttrs: rec { postInstall = oldAttrs.postInstall + '' # Remove shell integrations rm -rf $out/share/fzf $out/share/fish $out/bin/fzf-share '' + (builtins.replaceStrings [ '' # Install shell integrations install -D shell/* -t $out/share/fzf/ install -D shell/key-bindings.fish $out/share/fish/vendor_functions.d/fzf_key_bindings.fish mkdir -p $out/share/fish/vendor_conf.d cat << EOF > $out/share/fish/vendor_conf.d/load-fzf-key-bindings.fish status is-interactive; or exit 0 fzf_key_bindings EOF '' ] [""] oldAttrs.postInstall); }); in { environment.sessionVariables = { FLAKE = "/home/delta/Documents/dotfiles"; }; users.users.delta = { isNormalUser = true; description = "delta"; extraGroups = [ "networkmanager" "wheel" "libvirtd" "adbusers" ]; openssh.authorizedKeys.keys = [ "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGGL2UD0frl9F2OPBiPlSQqxDsuACbAVgwH24F0KT14L" ]; }; nix = { settings = { experimental-features = [ "flakes" "nix-command" ]; auto-optimise-store = true; substituters = [ "https://shwewo.cachix.org" "https://anyrun.cachix.org" ]; trusted-public-keys = [ "shwewo.cachix.org-1:84cIX7ETlqQwAWHBnd51cD4BeUVXCyGbFdtp+vLxKOo=" "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" ]; }; }; nixpkgs.config.allowUnfree = true; boot.kernel.sysctl."kernel.sysrq" = 1; environment.systemPackages = with pkgs; [ run shell git micro nano fishPlugins.grc fishPlugins.autopair fishPlugins.z fishPlugins.tide fishPlugins.sponge fishPlugins.fzf-fish bat #for fzf-fish fzf #for fzf-fish fd #for fzf-fish sysz # systemctl with fzf grc nh any-nix-shell dnsutils inetutils killall tree eza # better ls, will check what's better lsd # better ls, will check what's better (pkgs.writeScriptBin "reboot" ''read -p "Do you REALLY want to reboot? (y/N) " answer; [[ $answer == [Yy]* ]] && ${pkgs.systemd}/bin/reboot'') ]; programs.command-not-found.enable = false; programs.fish = { enable = true; shellAliases = { rebuild = "nh os switch"; rollback = "sudo nixos-rebuild switch --rollback --flake ~/Documents/dotfiles/"; haste = "HASTE_SERVER='https://haste.schizoposting.online' ${pkgs.haste-client}/bin/haste"; ls = "${pkgs.lsd}/bin/lsd"; }; promptInit = '' set TERM "xterm-256color" set fish_greeting #${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source any-nix-shell fish --info-right | source tide configure --auto --style=Lean --prompt_colors='16 colors' --show_time=No --lean_prompt_height='Two lines' --prompt_connection=Disconnected --prompt_spacing=Compact --icons='Few icons' --transient=No ''; }; programs.tmux.enable = true; programs.direnv.enable = true; programs.firejail.enable = true; security.wrappers = { firejail = { source = "${pkgs.firejail.out}/bin/firejail"; }; }; users.defaultUserShell = pkgs.fish; security.rtkit.enable = true; boot.tmp.cleanOnBoot = true; environment.etc."htoprc".text = '' config_reader_min_version=3 fields=0 48 46 47 49 1 hide_kernel_threads=1 hide_userland_threads=1 hide_running_in_container=0 shadow_other_users=0 show_thread_names=0 show_program_path=0 highlight_base_name=1 highlight_deleted_exe=1 shadow_distribution_path_prefix=0 highlight_megabytes=1 highlight_threads=1 highlight_changes=0 highlight_changes_delay_secs=5 find_comm_in_cmdline=1 strip_exe_from_cmdline=1 show_merged_command=0 header_margin=1 screen_tabs=1 detailed_cpu_time=0 cpu_count_from_one=0 show_cpu_usage=1 show_cpu_frequency=1 show_cpu_temperature=1 degree_fahrenheit=0 update_process_names=0 account_guest_in_cpu_meter=0 color_scheme=6 enable_mouse=1 delay=15 hide_function_bar=1 header_layout=two_50_50 column_meters_0=LeftCPUs Memory Swap column_meter_modes_0=1 1 1 column_meters_1=RightCPUs Tasks LoadAverage Uptime column_meter_modes_1=1 2 2 2 tree_view=0 sort_key=46 tree_sort_key=0 sort_direction=-1 tree_sort_direction=1 tree_view_always_by_pid=0 all_branches_collapsed=0 screen:Main=PID USER PERCENT_CPU PERCENT_MEM TIME Command .sort_key=PERCENT_CPU .tree_sort_key=PID .tree_view_always_by_pid=0 .tree_view=0 .sort_direction=-1 .tree_sort_direction=1 .all_branches_collapsed=0 screen:I/O=PID USER IO_PRIORITY IO_RATE IO_READ_RATE IO_WRITE_RATE PERCENT_SWAP_DELAY PERCENT_IO_DELAY Command .sort_key=PID .tree_sort_key=PID .tree_view_always_by_pid=0 .tree_view=0 .sort_direction=1 .tree_sort_direction=1 .all_branches_collapsed=0 ''; }