From 88eff63ed8305f1beacec6108d98edfcd4414416 Mon Sep 17 00:00:00 2001 From: nomadics9 Date: Fri, 13 Dec 2024 21:08:00 +0300 Subject: [PATCH] update + changes idk --- flake.lock | 86 ++++++++------------------------ home/features/cli/default.nix | 5 ++ home/features/cli/fish.nix | 28 +++++++++++ home/features/cli/fzf.nix | 2 +- home/features/cli/neofetch.nix | 4 +- home/features/cli/nushell.nix | 24 +++++++++ home/features/desktop/fonts.nix | 3 +- home/nomad/unkown.nix | 4 +- home/nomad/unkown/home.nix | 1 + home/nomad/vps.nix | 2 +- hosts/common/users/nomad.nix | 5 +- hosts/unkown/configuration.nix | 4 ++ hosts/unkown/hardware/nvidia.nix | 5 +- hosts/vps/configuration.nix | 14 +++++- 14 files changed, 110 insertions(+), 77 deletions(-) create mode 100644 home/features/cli/fish.nix create mode 100644 home/features/cli/nushell.nix diff --git a/flake.lock b/flake.lock index 565e86a..28cdc46 100644 --- a/flake.lock +++ b/flake.lock @@ -4,17 +4,16 @@ "inputs": { "flake-parts": "flake-parts", "haskell-flake": "haskell-flake", - "hercules-ci-effects": "hercules-ci-effects", "nixpkgs": [ "nixpkgs" ] }, "locked": { - "lastModified": 1730775052, - "narHash": "sha256-YXbgfHYJaAXCxrAQzjd03GkSMGd3iGeTmhkMwpFhTPk=", + "lastModified": 1733918465, + "narHash": "sha256-hSuGa8Hh67EHr2x812Ay6WFyFT2BGKn+zk+FJWeKXPg=", "owner": "hercules-ci", "repo": "arion", - "rev": "38ea1d87421f1695743d5eca90b0c37ef3123fbb", + "rev": "f01c95c10f9d4f04bb08d97b3233b530b180f12e", "type": "github" }, "original": { @@ -28,11 +27,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1732988076, - "narHash": "sha256-2uMaVAZn7fiyTUGhKgleuLYe5+EAAYB/diKxrM7g3as=", + "lastModified": 1734011192, + "narHash": "sha256-NghuiWXx6Q3gwLiudiNwDpYQ1CPEUK7J+f9dWREN8KA=", "owner": "nix-community", "repo": "disko", - "rev": "2814a5224a47ca19e858e027f7e8bff74a8ea9f1", + "rev": "0f31ad735e784315a22d9899d3ba24340ce64220", "type": "github" }, "original": { @@ -65,11 +64,11 @@ ] }, "locked": { - "lastModified": 1730504689, - "narHash": "sha256-hgmguH29K2fvs9szpq2r3pz2/8cJd2LPS+b4tfNFCwE=", + "lastModified": 1733312601, + "narHash": "sha256-4pDvzqnegAfRkPwO3wmwBhVi/Sye1mzps0zHWYnP88c=", "owner": "hercules-ci", "repo": "flake-parts", - "rev": "506278e768c2a08bec68eb62932193e341f55c90", + "rev": "205b12d8b7cd4802fbcb8e8ef6a0f1408781a4f9", "type": "github" }, "original": { @@ -78,27 +77,6 @@ "type": "github" } }, - "flake-parts_2": { - "inputs": { - "nixpkgs-lib": [ - "arion", - "hercules-ci-effects", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712014858, - "narHash": "sha256-sB4SWl2lX95bExY2gMFG5HIzvva5AVMJd4Igm+GpZNw=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "9126214d0a59633752a136528f5f3b9aa8565b7d", - "type": "github" - }, - "original": { - "id": "flake-parts", - "type": "indirect" - } - }, "haskell-flake": { "locked": { "lastModified": 1675296942, @@ -115,28 +93,6 @@ "type": "github" } }, - "hercules-ci-effects": { - "inputs": { - "flake-parts": "flake-parts_2", - "nixpkgs": [ - "arion", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1730229744, - "narHash": "sha256-2W//PmgocN9lplDJ7WoiP9EcrfUxqvtxplCAqlwvquY=", - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "rev": "d70658494391994c7b32e8fe5610dae76737e4df", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "hercules-ci-effects", - "type": "github" - } - }, "home-manager": { "inputs": { "nixpkgs": [ @@ -144,11 +100,11 @@ ] }, "locked": { - "lastModified": 1733133928, - "narHash": "sha256-gU40r9AfpIr4eq+0noM8yH1Hxf+EA3dqfIpFtQl8Y1E=", + "lastModified": 1734031102, + "narHash": "sha256-6RDywJJ1AuG2NflpXaWgNDYOOLGCqgTezUuc0RiEYzA=", "owner": "nix-community", "repo": "home-manager", - "rev": "873e39d5f4437d2f3ab06881fea8e63e45e1d011", + "rev": "15151bb5e7d6e352247ecaeeeefc34d0f306b287", "type": "github" }, "original": { @@ -159,11 +115,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1732238832, - "narHash": "sha256-sQxuJm8rHY20xq6Ah+GwIUkF95tWjGRd1X8xF+Pkk38=", + "lastModified": 1733749988, + "narHash": "sha256-+5qdtgXceqhK5ZR1YbP1fAUsweBIrhL38726oIEAtDs=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "8edf06bea5bcbee082df1b7369ff973b91618b8d", + "rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68", "type": "github" }, "original": { @@ -191,11 +147,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1733015953, - "narHash": "sha256-t4BBVpwG9B4hLgc6GUBuj3cjU7lP/PJfpTHuSqE+crk=", + "lastModified": 1733759999, + "narHash": "sha256-463SNPWmz46iLzJKRzO3Q2b0Aurff3U1n0nYItxq7jU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "ac35b104800bff9028425fec3b6e8a41de2bbfff", + "rev": "a73246e2eef4c6ed172979932bc80e1404ba2d56", "type": "github" }, "original": { @@ -223,11 +179,11 @@ ] }, "locked": { - "lastModified": 1733128155, - "narHash": "sha256-m6/qwJAJYcidGMEdLqjKzRIjapK4nUfMq7rDCTmZajc=", + "lastModified": 1733965552, + "narHash": "sha256-GZ4YtqkfyTjJFVCub5yAFWsHknG1nS/zfk7MuHht4Fs=", "owner": "Mic92", "repo": "sops-nix", - "rev": "c6134b6fff6bda95a1ac872a2a9d5f32e3c37856", + "rev": "2d73fc6ac4eba4b9a83d3cb8275096fbb7ab4004", "type": "github" }, "original": { diff --git a/home/features/cli/default.nix b/home/features/cli/default.nix index 722ba6e..36f42b7 100644 --- a/home/features/cli/default.nix +++ b/home/features/cli/default.nix @@ -3,12 +3,16 @@ ./zsh.nix ./fzf.nix ./neofetch.nix + ./nushell.nix + ./fish.nix ]; # Starship programs.starship = { enable = true; enableZshIntegration = true; + enableNushellIntegration = true; + enableFishIntegration = true; }; programs.bat = { enable = true; }; @@ -21,6 +25,7 @@ tldr zip exiftool + chafa nvtopPackages.full ]; } diff --git a/home/features/cli/fish.nix b/home/features/cli/fish.nix new file mode 100644 index 0000000..a8d7155 --- /dev/null +++ b/home/features/cli/fish.nix @@ -0,0 +1,28 @@ +{ config +, lib +, ... +}: +with lib; let + cfg = config.features.cli.fish; +in +{ + options.features.cli.fish.enable = mkEnableOption "enable extended fish configuration"; + + config = mkIf cfg.enable { + programs.fish = { + enable = true; + + shellAliases = { + rebuild = "sudo nixos-rebuild switch"; + dotfilesu = "nix flake lock --update-input dotfiles"; + cleanold = "sudo nix-collect-garbage --delete-old"; + cleanboot = "sudo /run/current-system/bin/switch-to-configuration boot"; + }; + functions = { + fish_greeting = '' + chafa --align=Center ~/sync/0nmd/logo.webp --scale=0.8 -f symbols --symbols w + ''; + }; + }; + }; +} diff --git a/home/features/cli/fzf.nix b/home/features/cli/fzf.nix index c67585f..e45a19d 100644 --- a/home/features/cli/fzf.nix +++ b/home/features/cli/fzf.nix @@ -29,7 +29,7 @@ in }; defaultOptions = [ "--preview='bat --color=always -n {}'" - "--bind 'ctrl-/:toggle-preview'" + "--bind 'ctrl-p:toggle-preview'" ]; defaultCommand = "fd --type f --exclude .git --follow --hidden"; changeDirWidgetCommand = "fd --type d --exclude .git --follow --hidden"; diff --git a/home/features/cli/neofetch.nix b/home/features/cli/neofetch.nix index 28d97c6..9cbce2a 100644 --- a/home/features/cli/neofetch.nix +++ b/home/features/cli/neofetch.nix @@ -95,8 +95,8 @@ with lib; let memory_display="on" battery_display="on" disk_display="on" - image_backend="kitty" - image_source="${config.home.homeDirectory}/nixcfg/assets/logo.png" + image_backend="chafa" + image_source="${config.home.homeDirectory}/dev/nixnix/nixcfg/assets/logo.png" ascii_distro="off" ascii="off" ascii_colors=(distro) diff --git a/home/features/cli/nushell.nix b/home/features/cli/nushell.nix new file mode 100644 index 0000000..48d26d2 --- /dev/null +++ b/home/features/cli/nushell.nix @@ -0,0 +1,24 @@ +{ config +, lib +, ... +}: +with lib; let + cfg = config.features.cli.nushell; +in +{ + options.features.cli.nushell.enable = mkEnableOption "enable extended nushell configuration"; + + config = mkIf cfg.enable { + programs.nushell = { + enable = true; + + shellAliases = { + rebuild = "sudo nixos-rebuild switch"; + dotfilesu = "nix flake lock --update-input dotfiles"; + cleanold = "sudo nix-collect-garbage --delete-old"; + cleanboot = "sudo /run/current-system/bin/switch-to-configuration boot"; + + }; + }; + }; +} diff --git a/home/features/desktop/fonts.nix b/home/features/desktop/fonts.nix index d6abd8c..f017b54 100644 --- a/home/features/desktop/fonts.nix +++ b/home/features/desktop/fonts.nix @@ -14,7 +14,8 @@ in home.packages = with pkgs; [ fira-code fira-code-symbols - fira-code-nerdfont + nerd-fonts.fira-code + nerd-fonts.jetbrains-mono font-manager font-awesome_5 font-awesome diff --git a/home/nomad/unkown.nix b/home/nomad/unkown.nix index 3a750ea..c5092b0 100644 --- a/home/nomad/unkown.nix +++ b/home/nomad/unkown.nix @@ -10,7 +10,9 @@ features = { cli = { - zsh.enable = true; + zsh.enable = false; + nushell.enable = false; + fish.enable = true; fzf.enable = true; neofetch.enable = true; }; diff --git a/home/nomad/unkown/home.nix b/home/nomad/unkown/home.nix index 977373e..6930748 100644 --- a/home/nomad/unkown/home.nix +++ b/home/nomad/unkown/home.nix @@ -13,6 +13,7 @@ # Essentials kitty alacritty + tmux firefox google-chrome age diff --git a/home/nomad/vps.nix b/home/nomad/vps.nix index 601bc8a..6669256 100644 --- a/home/nomad/vps.nix +++ b/home/nomad/vps.nix @@ -8,7 +8,7 @@ features = { cli = { - zsh.enable = true; + fish.enable = true; fzf.enable = true; neofetch.enable = true; }; diff --git a/hosts/common/users/nomad.nix b/hosts/common/users/nomad.nix index a36c003..4fc6d56 100644 --- a/hosts/common/users/nomad.nix +++ b/hosts/common/users/nomad.nix @@ -8,7 +8,7 @@ ${user} = { initialPassword = "4321"; isNormalUser = true; - shell = pkgs.zsh; + shell = pkgs.fish; description = "${user}"; extraGroups = [ "wheel" @@ -62,7 +62,8 @@ package = pkgs.wireshark; }; - programs.zsh.enable = true; + # programs.zsh.enable = true; + programs.fish.enable = true; home-manager.users.${user} = import ../../../home/${user}/${config.networking.hostName}.nix; } diff --git a/hosts/unkown/configuration.nix b/hosts/unkown/configuration.nix index 7f2eea1..f8a8d30 100644 --- a/hosts/unkown/configuration.nix +++ b/hosts/unkown/configuration.nix @@ -69,6 +69,10 @@ #Hosts networking.extraHosts = '' + 10.10.11.45 vintage.htb DC01.vintage.htb + 10.10.11.25 greenhorn.htb + 10.10.11.31 infiltrator.htb + 10.10.11.32 sightless.htb ''; # Bluethooth diff --git a/hosts/unkown/hardware/nvidia.nix b/hosts/unkown/hardware/nvidia.nix index 79efca5..072e86a 100644 --- a/hosts/unkown/hardware/nvidia.nix +++ b/hosts/unkown/hardware/nvidia.nix @@ -45,7 +45,7 @@ in #nvidia.nvidiaPersistenced = true; # Optionally, you may need to select the appropriate driver version for your specific GPU. - nvidia.package = config.boot.kernelPackages.nvidiaPackages.beta; + nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; #offload , Sync or reverseSync nvidia.prime = { @@ -74,7 +74,8 @@ in virtualisation.docker = { enable = true; enableOnBoot = true; - #enableNvidia = true; + enableNvidia = true; + extraOptions = ''--data-root=/home/nomad/docker-data''; }; hardware.nvidia-container-toolkit.enable = true; diff --git a/hosts/vps/configuration.nix b/hosts/vps/configuration.nix index 1b03c56..a6fef85 100644 --- a/hosts/vps/configuration.nix +++ b/hosts/vps/configuration.nix @@ -90,12 +90,22 @@ } - nmd.mov { + nmd.mov www.nmd.mov { reverse_proxy localhost:3001 } + www.alaskar.dev alaskar.dev { + root * /var/www/portofolio + file_server + try_files {path} {path}.html + handle_errors { + rewrite * /404.html + file_server + } + } - www.nmd.mov { + + log.nmd.mov { root * /var/www/goaccess file_server