From f353281d6b1102e1d3bb6ee0d0faefb28213b0c0 Mon Sep 17 00:00:00 2001 From: ISnortPennies Date: Fri, 23 Sep 2022 22:34:03 -0400 Subject: [PATCH] updated afk-cmds pkg removed AFKCommands moved moonfly plugin to correct location switched from alacritty to st --- flake.nix | 16 --- home-manager/alacritty.nix | 34 ------ home-manager/config/Thunar/uca.xml | 31 ----- home-manager/config/rofi/config.rasi | 2 +- .../config/rofi/window-switcher/box.rasi.save | 109 ------------------ home-manager/home.nix | 1 - home-manager/neovim/default.nix | 95 ++++++++------- home-manager/root.nix | 5 - home-manager/sxhkd.nix | 2 +- pkgs/AFKCommands/default.nix | 46 -------- pkgs/afk-cmds/default.nix | 47 ++++++-- systems/desktop.nix | 20 ++-- 12 files changed, 107 insertions(+), 301 deletions(-) delete mode 100644 home-manager/alacritty.nix delete mode 100644 home-manager/config/Thunar/uca.xml delete mode 100644 home-manager/config/rofi/window-switcher/box.rasi.save delete mode 100644 pkgs/AFKCommands/default.nix diff --git a/flake.nix b/flake.nix index 21ccad7..5b6b5ff 100644 --- a/flake.nix +++ b/flake.nix @@ -31,22 +31,6 @@ } ) (import ./suckless) - (self: super: - let - vim-moonfly = super.vimUtils.buildVimPlugin { - name = "vim-moonfly"; - src = pkgs.fetchFromGitHub { - owner = "bluz71"; - repo = "vim-moonfly-colors"; - rev = "065c99b95355b33dfaa05bde11ad758e519b04a3"; - sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI="; - }; - }; - in { - vimPlugins = - super.vimPlugins // { inherit vim-moonfly; }; - } - ) ]; }; lib = nixpkgs.lib; diff --git a/home-manager/alacritty.nix b/home-manager/alacritty.nix deleted file mode 100644 index fd877c2..0000000 --- a/home-manager/alacritty.nix +++ /dev/null @@ -1,34 +0,0 @@ -{ - programs.alacritty = { - enable = true; - settings = { - font.size = 9; - colors = { - primary = { - background = "0x000000"; - foreground = "0xa9b1d6"; - }; - normal = { - black = "0x32344a"; - red = "0xf7768e"; - green = "0x9ece6a"; - yellow = "0xe0af68"; - blue = "0x7aa2f7"; - magenta = "0xad8ee6"; - cyan = "0x449dab"; - white = "0x787c99"; - }; - bright = { - black = "0x444b6a"; - red = "0xff7a93"; - green = "0xb9f27c"; - yellow = "0xff9e64"; - blue = "0x7da6ff"; - magenta = "0xbb9af7"; - cyan = "0x0db9d7"; - white = "0xacb0d0"; - }; - }; - }; - }; -} diff --git a/home-manager/config/Thunar/uca.xml b/home-manager/config/Thunar/uca.xml deleted file mode 100644 index ace2915..0000000 --- a/home-manager/config/Thunar/uca.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - utilities-terminal - Open Terminal Here - 1651604010244754-1 - alacritty --working-directory %f - Example for a custom action - * - - - - - folder - Root - 1651640324751320-1 - qsudo thunar %f - - * - - - - org.xfce.catfish - Search - 1651908115751880-1 - catfish --path=%f - - * - - - diff --git a/home-manager/config/rofi/config.rasi b/home-manager/config/rofi/config.rasi index 7bed4e5..3c6066a 100644 --- a/home-manager/config/rofi/config.rasi +++ b/home-manager/config/rofi/config.rasi @@ -3,7 +3,7 @@ configuration{ lines: 5; show-icons: true; icon-theme: "Flat-Remix-Blue-Dark"; - terminal: "alacritty"; + terminal: "st"; drun-display-format: "{name}"; location: 0; disable-history: false; diff --git a/home-manager/config/rofi/window-switcher/box.rasi.save b/home-manager/config/rofi/window-switcher/box.rasi.save deleted file mode 100644 index c8eee43..0000000 --- a/home-manager/config/rofi/window-switcher/box.rasi.save +++ /dev/null @@ -1,109 +0,0 @@ -configuration { - show-icons: true; - icon-theme: "Flat-Remix-Blue-Dark"; - disable-history: true; - fullscreen: false; - hide-scrollbar: true; - sidebar-mode: false; - display-window: ""; - window-format : "{t}"; - window-thumbnail: false; -} - -* { - background-color: #000000; - black: #000000; - text-color: #7AA2F7; - blue: #7AA2F7; - deepblue: #03339c; - clear: #00000000; - font: "Overpass 16"; -} - -window { - border: 0px; - border-color: @deepblue; - border-radius: 20px; - height: 18.8%; - location: center; - x-offset: 0; - y-offset: 0; -} - -prompt { - enabled: false; - padding: 0.25% 0.75% 0% -0.25%; -} - -entry { - enabled: false; - placeholder-color: @blue; - expand: false; - horizontal-align: 0; - placeholder: "Switch to..."; - padding: 0% 0% 0% 0%; - blink: true; -} - -inputbar { - enabled: false; - children: [ prompt, entry]; - expand: false; - border: 0.3% 0% 0.3% 0%; - border-radius: 100%; - border-color: @deepblue; - margin: 0% 0% 0% 0%; -} - -listview { - margin: 0.3% 0% 0% 0%; - columns: 6; - row: 1; - spacing: 1%; - cycle: true; - dynamic: true; - layout: vertical; - fixed-height : true; -} - -mainbox { - border: 0% 0% 0% 0%; - border-radius: 0% 0% 0% 0%; - border-color: @accent; - children: [ inputbar, listview]; - spacing: -100%; - padding: 1.5% 1% 1% 1%; -} - -element { - orientation: vertical; - border-radius: 100px; - padding: 2% 0% 0% 0%; -} - -element-icon { - size: 100px; - border: 0px; -} - -element-text { - expand: false; - horizontal-align: 0.5; - vertical-align: 0.9; - margin: 1% 0.5% 0.7% 0.5%; -} - -element selected { - background-color: @deepblue; - border: 3px; - border-radius: 15px; - border-color: @deepblue; -} - -element-text, element-icon, element { - background-color: inherit; -} - -listview, element, element selected, element-icon, element-text { - cursor: pointer; -} diff --git a/home-manager/home.nix b/home-manager/home.nix index 1325c67..c9ba2e3 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -6,7 +6,6 @@ ./sxhkd.nix ./rofi.nix ./polybar.nix - ./alacritty.nix ./theme.nix ./picom.nix ./git.nix diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index c3236fe..6277a8c 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -1,4 +1,19 @@ {pkgs, ... }: + +let +vim-moonfly = pkgs.vimUtils.buildVimPlugin { + name = "vim-moonfly"; + src = pkgs.fetchFromGitHub { + owner = "bluz71"; + repo = "vim-moonfly-colors"; + rev = "065c99b95355b33dfaa05bde11ad758e519b04a3"; + sha256 = "sha256-TEYN8G/VNxitpPJPM7+O9AGLm6V7bPkiTlFG5op55pI="; + }; +}; +in + + + { programs.neovim = { enable = true; @@ -8,48 +23,48 @@ extraPackages = with pkgs; [gcc ripgrep fd]; plugins = with pkgs.vimPlugins; [ (nvim-treesitter.withPlugins (plugins: pkgs.tree-sitter.allGrammars)) #syntax highlighting - rainbow nvim-ts-rainbow # rainbow for tree-sitter - nvim-colorizer-lua # colors - nvim-tree-lua # file browser - nvim-web-devicons # for tree-lua - vim-smoothie #smooth scrolling - undotree # better undotree - indentLine # indentlines - vim-smoothie #smooth scrolling - #non-trash auto completion - nvim-cmp - cmp-buffer - cmp-nvim-lsp - cmp-path - cmp-spell - cmp-treesitter - cmp-vsnip - vim-vsnip - lspkind-nvim - nvim-lspconfig - nvim-autopairs # auto brackets - telescope-nvim #search feature - telescope-fzy-native-nvim # search plugin - gitsigns-nvim #in buffer git blame - vim-moonfly #color scheme - lightline-vim #bottom bar - ]; + rainbow nvim-ts-rainbow # rainbow for tree-sitter + nvim-colorizer-lua # colors + nvim-tree-lua # file browser + nvim-web-devicons # for tree-lua + vim-smoothie #smooth scrolling + undotree # better undotree + indentLine # indentlines + vim-smoothie #smooth scrolling +#non-trash auto completion + nvim-cmp + cmp-buffer + cmp-nvim-lsp + cmp-path + cmp-spell + cmp-treesitter + cmp-vsnip + vim-vsnip + lspkind-nvim + nvim-lspconfig + nvim-autopairs # auto brackets + telescope-nvim #search feature + telescope-fzy-native-nvim # search plugin + gitsigns-nvim #in buffer git blame + vim-moonfly #color scheme + lightline-vim #bottom bar + ]; extraConfig = let - luaRequire = module: - builtins.readFile (builtins.toString - ./config - + "/${module}.lua"); - luaConfig = builtins.concatStringsSep "\n" (map luaRequire [ - "init" - "lspconfig" - "nvim-cmp" - ]); -in '' -lua << EOF -${luaConfig} -EOF + luaRequire = module: + builtins.readFile (builtins.toString + ./config + + "/${module}.lua"); + luaConfig = builtins.concatStringsSep "\n" (map luaRequire [ + "init" + "lspconfig" + "nvim-cmp" + ]); + in '' + lua << EOF + ${luaConfig} + EOF -''; + ''; }; } diff --git a/home-manager/root.nix b/home-manager/root.nix index d57b3fd..5c49be0 100644 --- a/home-manager/root.nix +++ b/home-manager/root.nix @@ -4,7 +4,6 @@ ./theme.nix ./git.nix ./neovim - ./alacritty.nix ]; programs.home-manager.enable = true; home = { @@ -12,10 +11,6 @@ homeDirectory = "/root"; stateVersion = "22.11"; file = { - ".config/Thunar" = { - source = ./config/Thunar; - recursive = true; - }; ".config/neofetch/config.conf" = { source = ./config/neofetch/config.conf; recursive = false; diff --git a/home-manager/sxhkd.nix b/home-manager/sxhkd.nix index 6d5aeed..4a08154 100644 --- a/home-manager/sxhkd.nix +++ b/home-manager/sxhkd.nix @@ -3,7 +3,7 @@ enable = true; keybindings = { #terminal - "super + Return" = "alacritty"; + "super + Return" = "st"; #application launcher "super + @space" = "rofi -show drun"; #kill sxhkd diff --git a/pkgs/AFKCommands/default.nix b/pkgs/AFKCommands/default.nix deleted file mode 100644 index 1c5dbee..0000000 --- a/pkgs/AFKCommands/default.nix +++ /dev/null @@ -1,46 +0,0 @@ -{ lib -, stdenv -, writeText -, fetchFromGitHub -, xorg -, glibc -, t-rex-miner -}: -stdenv.mkDerivation rec { - pname = "AFKCommands"; - version = "1.0.0"; - - src = fetchFromGitHub { - owner = "ISnortPennies"; - repo = "AFKCommands"; - rev = "6bb107e8f4ff593e1540986263fad9cb60e7e79a"; - sha256 = "sha256-toJPE/8obPXaSiw0LFRF05AIuD8gGL3YB10cn6FlvEc="; - }; - - buildInputs = [ - xorg.libXScrnSaver - xorg.libX11 - ]; - - ConfigText = writeText "config.h" '' - const int AFK = 300; - const int RESTART = 60; - const char* COMMANDS[] = { - "xmrig --no-color -o rx.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos", - "t-rex --no-color -a autolykos2 -o autolykos.unmineable.com:3333 -u XMR:46vHuD3G9wKVpoBV7rwQQzCRfBw3rxUo3fzj1G9mSFqPg2A71pspHsTTD2Y5hmPXFuVUXRzFj6NevVRUHriDerhw5JcNkXV.nixos --mt 4" - }; - ''; - configurePhase = '' - mkdir -p $out/bin - export C_INCLUDE_PATH=$out - cp $ConfigText $out/config.h - export PREFIX=$out - ''; - meta = with lib; { - homepage = "https://github.com/ISnortPennies/AFKCommands"; - description = ""; - license = licenses.unlicense; - maintainers = with maintainers; [ ]; - platforms = platforms.linux; - }; -} diff --git a/pkgs/afk-cmds/default.nix b/pkgs/afk-cmds/default.nix index 573f164..d8ad412 100644 --- a/pkgs/afk-cmds/default.nix +++ b/pkgs/afk-cmds/default.nix @@ -1,7 +1,17 @@ { lib , rustPlatform , fetchFromGitHub -, xorg +, wrapGAppsHook +, libX11 +, libXScrnSaver +, pkg-config +, cairo +, glib +, gdk-pixbuf +, gtkmm3 +, pango +, libappindicator-gtk3 +, atk }: rustPlatform.buildRustPackage rec { pname = "afk-cmds"; @@ -10,16 +20,34 @@ rustPlatform.buildRustPackage rec { src = fetchFromGitHub { owner = "ISnortPennies"; repo = "afk-cmds"; - rev = "6a131c4892ea411281426d1165a48607e556f729"; - sha256 = "sha256-LK6XeQc5Rc7KxwL2r2L3dCAKtbENuigbyTTuS+7JKnQ="; + rev = "b345d5a038a86c6ca31d3bd8800ac759da912a22"; + sha256 = "sha256-yleq8bg3ZnilbYTNXRteBALiJ/fIXOxXxqf966OokqQ="; }; - - buildInputs = [ - xorg.libXScrnSaver - xorg.libX11 - ]; - cargoSha256 = "sha256-Osxg/KuHOdnz8UYnbT69dmNFLHW6Cq1fLb32/UJeDUg="; + buildInputs = [ + libX11 + libXScrnSaver + cairo + glib + gdk-pixbuf + gtkmm3 + pango + libappindicator-gtk3 + atk + ]; + + nativeBuildInputs = [ + pkg-config + wrapGAppsHook + ]; + + postFixup = '' + wrapProgram $out/bin/afk-cmds \ + --prefix LD_LIBRARY_PATH : ${(lib.makeLibraryPath buildInputs)} + mkdir -p $out/share/icons/hicolor/256x256/apps/ + cp $src/afk-icon.png $out/share/icons/hicolor/256x256/apps/afk-icon.png + ''; + cargoSha256 = "sha256-CPpFUdgb0zTZAVlv4uhJ0Y7eocCjuEZNgQJdNwV1FI4="; meta = with lib; { homepage = "https://github.com/ISnortPennies/AFKCommands"; @@ -28,5 +56,6 @@ rustPlatform.buildRustPackage rec { maintainers = with maintainers; [ ]; platforms = platforms.linux; }; + } diff --git a/systems/desktop.nix b/systems/desktop.nix index 4fc251f..79f1dde 100644 --- a/systems/desktop.nix +++ b/systems/desktop.nix @@ -1,9 +1,9 @@ { config, pkgs, callPackage, lib, ... }: { - #important stuff first +#important stuff first imports = [ - ../modules/boot.nix + ../modules/boot.nix ../modules/packages.nix ../modules/nvidia.nix ../modules/fonts.nix @@ -21,9 +21,9 @@ #end important stuff environment.systemPackages = with pkgs; [ afk-cmds - xmrig - t-rex-miner - vscodium + xmrig + t-rex-miner + vscodium ]; #user managment users = { @@ -50,14 +50,18 @@ }; systemd.services.mining = { enable = true; - path = with pkgs; [ afk-cmds t-rex-miner xmrig alacritty zsh ]; + path = with pkgs; [t-rex-miner afk-cmds st zsh dbus xmrig]; wantedBy = [ "graphical.target" ]; script = '' - afk_cmds -c /home/gerg/afk-cmds.json - ''; + afk-cmds -c /home/gerg/afk-cmds.json + ''; environment = { + # PATH="/run/current-system/sw/bin"; missing something with dbus XAUTHORITY="/home/gerg/.Xauthority"; DISPLAY=":0"; + XDG_DATA_DIRS="/nix/var/nix/profiles/default/share:/run/current-system/sw/share"; + DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; + NO_AT_BRIDGE="1"; }; }; }