From f5b5c2c99b2db87a9c4830040655e7ba6909d10e Mon Sep 17 00:00:00 2001 From: Nicolai Van der Storm Date: Thu, 9 Nov 2023 09:38:02 +0100 Subject: [PATCH] ma --- flake.lock | 68 +++++++++---------- nix/systems/main/base/networking.nix | 2 +- nix/systems/main/base/packages.nix | 15 +++- nix/systems/main/base/services.nix | 6 +- nix/systems/main/desktop/default.nix | 3 + .../main/desktop/hardware-configuration.nix | 2 +- nix/users/base/neovim/core/keymaps.lua | 4 +- nix/users/base/neovim/default.nix | 1 + nix/users/base/neovim/plugins/indent.lua | 40 ++++++++++- nix/users/nicolaivds/default.nix | 3 + nix/users/nicolaivds/general/packages.nix | 14 +++- nix/users/nicolaivds/programs/default.nix | 1 + nix/users/nicolaivds/programs/iphone.nix | 8 --- nix/users/nicolaivds/programs/orcaslicer.nix | 33 +++++++++ nix/users/nicolaivds/themes/gtk.nix | 8 +-- 15 files changed, 150 insertions(+), 58 deletions(-) delete mode 100644 nix/users/nicolaivds/programs/iphone.nix create mode 100644 nix/users/nicolaivds/programs/orcaslicer.nix diff --git a/flake.lock b/flake.lock index 0b53f44..6d3e5b0 100644 --- a/flake.lock +++ b/flake.lock @@ -23,11 +23,11 @@ "systems": "systems_2" }, "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", + "lastModified": 1694529238, + "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", "owner": "numtide", "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", + "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", "type": "github" }, "original": { @@ -43,11 +43,11 @@ ] }, "locked": { - "lastModified": 1698128422, - "narHash": "sha256-Qf39ATHrj6wfeC+K6uwD/FnI7RKrdEiN3uWaciUi0rM=", + "lastModified": 1699368917, + "narHash": "sha256-nUtGIWf86BOkUbtksWtfglvCZ/otP0FTZlQH8Rzc7PA=", "owner": "nix-community", "repo": "home-manager", - "rev": "6045b68ee725167ed0487f0fb88123202ba61923", + "rev": "6a8444467c83c961e2f5ff64fb4f422e303c98d3", "type": "github" }, "original": { @@ -65,11 +65,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1698105820, - "narHash": "sha256-elFzVUbFWhkWwezzV+dgMIfupGU4WblM4XpEBnKSqWk=", + "lastModified": 1699447387, + "narHash": "sha256-757r6PbNsKNqP68renCiz9kNpnBeCRUdje98duGrQKA=", "owner": "hyprwm", "repo": "Hyprland", - "rev": "14a3c939ce019623126893aa4c454e62bb29779c", + "rev": "c619e6976f8d7f9637b4bee098159935412c2e99", "type": "github" }, "original": { @@ -139,11 +139,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1694767346, - "narHash": "sha256-5uH27SiVFUwsTsqC5rs3kS7pBoNhtoy9QfTP9BmknGk=", + "lastModified": 1698134075, + "narHash": "sha256-foCD+nuKzfh49bIoiCBur4+Fx1nozo+4C/6k8BYk4sg=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "ace5093e36ab1e95cb9463863491bee90d5a4183", + "rev": "8efd5d1e283604f75a808a20e6cde0ef313d07d4", "type": "github" }, "original": { @@ -171,11 +171,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1697723726, - "narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=", + "lastModified": 1699099776, + "narHash": "sha256-X09iKJ27mGsGambGfkKzqvw5esP1L/Rf8H3u3fCqIiU=", "owner": "nixos", "repo": "nixpkgs", - "rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0", + "rev": "85f1ba3e51676fa8cc604a3d863d729026a6b8eb", "type": "github" }, "original": { @@ -187,11 +187,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1693060755, - "narHash": "sha256-KNsbfqewEziFJEpPR0qvVz4rx0x6QXxw1CcunRhlFdk=", + "lastModified": 1697915759, + "narHash": "sha256-WyMj5jGcecD+KC8gEs+wFth1J1wjisZf8kVZH13f1Zo=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "c66ccfa00c643751da2fd9290e096ceaa30493fc", + "rev": "51d906d2341c9e866e48c2efcaac0f2d70bfd43e", "type": "github" }, "original": { @@ -201,11 +201,11 @@ }, "nur": { "locked": { - "lastModified": 1698136132, - "narHash": "sha256-lNCbMLMq1Z3+MWnEIeyqMPO3UXPBZl19QAigbItl7cA=", + "lastModified": 1699515408, + "narHash": "sha256-V9uAZ77ufNz8bOaX7Ybhve4ln/reFM9z0RYUnJwElyg=", "owner": "nix-community", "repo": "NUR", - "rev": "8ea003a1d3e54c1e814e21f5d8a78f9c3c1946e3", + "rev": "835b3bcc90617409fe63065a5bf0e7dea3a68f4c", "type": "github" }, "original": { @@ -220,11 +220,11 @@ "nixpkgs": "nixpkgs_5" }, "locked": { - "lastModified": 1693147294, - "narHash": "sha256-4+09HY6FhZTZBHnQaKMANq8nAz//lIZ95X78ylCKjr4=", + "lastModified": 1698172993, + "narHash": "sha256-8ctrNf52ynJM62Wdq8tvpGks+CEFHzKDjOz/q3dqK3I=", "owner": "ovlach", "repo": "nix-orca-slicer", - "rev": "1e71e6e01ef3b49d0731ca611b6bfce32dbe26d0", + "rev": "dcce60f691e06953e707aeff3daf1573df10ab0d", "type": "github" }, "original": { @@ -253,11 +253,11 @@ "nixpkgs-stable": [] }, "locked": { - "lastModified": 1697943852, - "narHash": "sha256-DaBxUPaZhQ3yLCmAATshYB7qo7NwcMvSFWz9T3bjYYY=", + "lastModified": 1699311858, + "narHash": "sha256-W/sQrghPAn5J9d+9kMnHqi4NPVWVpy0V/qzQeZfS/dM=", "owner": "mic92", "repo": "sops-nix", - "rev": "30a0ba4a20703b4bfe047fe5def1fc24978e322c", + "rev": "664187539871f63857bda2d498f452792457b998", "type": "github" }, "original": { @@ -300,18 +300,18 @@ "flake": false, "locked": { "host": "gitlab.freedesktop.org", - "lastModified": 1696410538, - "narHash": "sha256-ecDhdYLXWHsxMv+EWG36mCNDvzRbu9qfjH7dLxL7aGM=", + "lastModified": 1697909146, + "narHash": "sha256-jU0I6FoCKnj4zIBL4daosFWh81U1fM719Z6cae8PxSY=", "owner": "wlroots", "repo": "wlroots", - "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc", + "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", "type": "gitlab" }, "original": { "host": "gitlab.freedesktop.org", "owner": "wlroots", "repo": "wlroots", - "rev": "3406c1b17a4a7e6d4e2a7d9c1176affa72bce1bc", + "rev": "47bf87ade2bd32395615a385ebde1fefbcdf79a2", "type": "gitlab" } }, @@ -331,11 +331,11 @@ ] }, "locked": { - "lastModified": 1694628480, - "narHash": "sha256-Qg9hstRw0pvjGu5hStkr2UX1D73RYcQ9Ns/KnZMIm9w=", + "lastModified": 1697981233, + "narHash": "sha256-y8q4XUwx+gVK7i2eLjfR32lVo7TYvEslyzrmzYEaPZU=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "8f45a6435069b9e24ebd3160eda736d7a391cbf2", + "rev": "22e7a65ff9633e1dedfa5317fdffc49f68de2ff2", "type": "github" }, "original": { diff --git a/nix/systems/main/base/networking.nix b/nix/systems/main/base/networking.nix index 09e473f..2a07f93 100644 --- a/nix/systems/main/base/networking.nix +++ b/nix/systems/main/base/networking.nix @@ -6,7 +6,7 @@ firewall = { enable = true; checkReversePath = false; - allowedTCPPorts = [ 80 443 ]; + allowedTCPPorts = [ 80 443 8080 ]; allowedUDPPorts = []; }; }; diff --git a/nix/systems/main/base/packages.nix b/nix/systems/main/base/packages.nix index 6aadd23..31b4fc3 100644 --- a/nix/systems/main/base/packages.nix +++ b/nix/systems/main/base/packages.nix @@ -20,7 +20,20 @@ pathsToLink = [ "/share/zsh" ]; }; - hardware.opengl.enable = true; + hardware.opengl = { + enable = true; + + # Vulkan + driSupport = true; + driSupport32Bit = true; + + # VA-API + extraPackages = with pkgs; [ + vaapiVdpau + libvdpau-va-gl + nvidia-vaapi-driver + ]; + }; # Programs programs = { diff --git a/nix/systems/main/base/services.nix b/nix/systems/main/base/services.nix index 2e28d9a..944fe26 100644 --- a/nix/systems/main/base/services.nix +++ b/nix/systems/main/base/services.nix @@ -2,6 +2,7 @@ { # List services that you want to enable: services = { + usbmuxd.enable = true; xserver = { layout = "be"; xkbVariant = "nodeadkeys"; @@ -16,7 +17,7 @@ spice-vdagentd.enable = true; gvfs = { enable = true; - package = lib.mkForce pkgs.gnome3.gvfs; + # package = lib.mkForce pkgs.gnome3.gvfs; }; pipewire = { @@ -28,6 +29,9 @@ }; udev.packages = with pkgs; [ via + platformio + platformio-core.udev + openocd ]; printing = { enable = true; diff --git a/nix/systems/main/desktop/default.nix b/nix/systems/main/desktop/default.nix index 235cf9c..c6b2178 100644 --- a/nix/systems/main/desktop/default.nix +++ b/nix/systems/main/desktop/default.nix @@ -17,6 +17,9 @@ mangohud nvidia-vaapi-driver egl-wayland + libimobiledevice + ifuse + idevicerestore ]; }; diff --git a/nix/systems/main/desktop/hardware-configuration.nix b/nix/systems/main/desktop/hardware-configuration.nix index c9b10fb..de8f543 100644 --- a/nix/systems/main/desktop/hardware-configuration.nix +++ b/nix/systems/main/desktop/hardware-configuration.nix @@ -62,7 +62,7 @@ modesetting.enable = true; open = true; nvidiaSettings = true; - package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; + # package = config.boot.kernelPackages.nvidiaPackages.vulkan_beta; }; }; } diff --git a/nix/users/base/neovim/core/keymaps.lua b/nix/users/base/neovim/core/keymaps.lua index 068d759..091d862 100644 --- a/nix/users/base/neovim/core/keymaps.lua +++ b/nix/users/base/neovim/core/keymaps.lua @@ -29,6 +29,8 @@ map("v", "", "> gv", opts) ---------- Terminal Mode ---------- +map('n', "tt", ":ToggleTerm", opts) + --Escape Terminal map('t', 'jj', [[]], opts) map('t', '', [[]], opts) @@ -61,7 +63,7 @@ map("n", "gcon", ":G config user.name", opts) map("n", "dt", ":NvimTreeToggle", opts) --Transparency -map("n", "tt", ":TransparentToggle", opts) +-- map("n", "tt", ":TransparentToggle", opts) --Telescope map('n', 'ff', ":Telescope find_files", opts) diff --git a/nix/users/base/neovim/default.nix b/nix/users/base/neovim/default.nix index ddec7d7..0ebb429 100644 --- a/nix/users/base/neovim/default.nix +++ b/nix/users/base/neovim/default.nix @@ -100,6 +100,7 @@ plugin = (nvim-treesitter.withPlugins (p: [ p.tree-sitter-nix p.tree-sitter-c + p.tree-sitter-cpp p.tree-sitter-lua p.tree-sitter-vim p.tree-sitter-python diff --git a/nix/users/base/neovim/plugins/indent.lua b/nix/users/base/neovim/plugins/indent.lua index dd20b0e..04956ec 100644 --- a/nix/users/base/neovim/plugins/indent.lua +++ b/nix/users/base/neovim/plugins/indent.lua @@ -3,8 +3,44 @@ if not status then print('Error with plugin: ', plugin) return end + +local highlight = { + "RainbowRed", + "RainbowYellow", + "RainbowBlue", + "RainbowOrange", + "RainbowGreen", + "RainbowViolet", + "RainbowCyan", +} + +local hooks = require "ibl.hooks" +-- create the highlight groups in the highlight setup hook, so they are reset +-- every time the colorscheme changes +hooks.register(hooks.type.HIGHLIGHT_SETUP, function() + vim.api.nvim_set_hl(0, "RainbowRed", { fg = "#E06C75" }) + vim.api.nvim_set_hl(0, "RainbowYellow", { fg = "#E5C07B" }) + vim.api.nvim_set_hl(0, "RainbowBlue", { fg = "#61AFEF" }) + vim.api.nvim_set_hl(0, "RainbowOrange", { fg = "#D19A66" }) + vim.api.nvim_set_hl(0, "RainbowGreen", { fg = "#98C379" }) + vim.api.nvim_set_hl(0, "RainbowViolet", { fg = "#C678DD" }) + vim.api.nvim_set_hl(0, "RainbowCyan", { fg = "#56B6C2" }) +end) + plugin.setup{ + indent = { + char = "│", + highlight = highlight, + }, + scope = { + enabled = true, + }, + exclude = { + filetypes = { "help", "alpha", "dashboard", "Trouble", "lazy", "neo-tree" }, + }, + whitespace = { + remove_blankline_trail = true, + }, -- show_current_context = true, -- show_current_context_start = true, -} --- vim.g.indent_blankline_filetype_exclude = {'dashboard'} \ No newline at end of file +} \ No newline at end of file diff --git a/nix/users/nicolaivds/default.nix b/nix/users/nicolaivds/default.nix index a382a44..7fdb395 100644 --- a/nix/users/nicolaivds/default.nix +++ b/nix/users/nicolaivds/default.nix @@ -27,6 +27,9 @@ in programs.home-manager.enable = true; nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfreePredicate = _: true; + nixpkgs.config.permittedInsecurePackages = [ + "electron-24.8.6" + ]; home.shellAliases = { home-switch = "home-manager switch --flake ${flake_path}#${username}"; sudo = "sudo -E"; diff --git a/nix/users/nicolaivds/general/packages.nix b/nix/users/nicolaivds/general/packages.nix index 6ce2dd2..745fad8 100644 --- a/nix/users/nicolaivds/general/packages.nix +++ b/nix/users/nicolaivds/general/packages.nix @@ -10,16 +10,22 @@ }) ]; - programs.direnv.enable = true; + programs.direnv = { + enable = true; + enableZshIntegration = true; + nix-direnv.enable = true; + }; #Packages home.packages = with pkgs; [ - betterbird + # betterbird bottles brave btop + clang-tools cliphist foot + firefox gamemode gamescope glibc @@ -27,12 +33,13 @@ grim hplipWithPlugin inputs.maxfetch.packages.${pkgs.system}.default - inputs.orcaslicer.packages.${pkgs.system}.orca-slicer + # inputs.orcaslicer.packages.${pkgs.system}.orca-slicer jellycli jftui libreoffice lutris mpv + minicom neofetch nix-prefetch-github obs-studio @@ -52,6 +59,7 @@ swaylock-effects swaynotificationcenter swww + thunderbird vlc waybar wine-wayland diff --git a/nix/users/nicolaivds/programs/default.nix b/nix/users/nicolaivds/programs/default.nix index 47cabfc..ff82c88 100644 --- a/nix/users/nicolaivds/programs/default.nix +++ b/nix/users/nicolaivds/programs/default.nix @@ -6,5 +6,6 @@ ./vscodium.nix ./git.nix ./sops.nix + ./orcaslicer.nix ]; } diff --git a/nix/users/nicolaivds/programs/iphone.nix b/nix/users/nicolaivds/programs/iphone.nix deleted file mode 100644 index 846bcc9..0000000 --- a/nix/users/nicolaivds/programs/iphone.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ pkgs, ... }: -{ - services.usbmuxd.enable = true; - environment.systemPackages = with pkgs; [ - libimobiledevice - ifuse # optional, to mount using 'ifuse' - ]; -} \ No newline at end of file diff --git a/nix/users/nicolaivds/programs/orcaslicer.nix b/nix/users/nicolaivds/programs/orcaslicer.nix new file mode 100644 index 0000000..c96a5b6 --- /dev/null +++ b/nix/users/nicolaivds/programs/orcaslicer.nix @@ -0,0 +1,33 @@ +{ appimageTools, lib, fetchzip }: +let + pname = "orca-slicer"; + version = "1.6.3"; + name = "OrcaSlicer_V${version}_Linux"; + + srcZipped = fetchzip { + url = "https://github.com/SoftFever/OrcaSlicer/releases/download/v${version}/OrcaSlicer_V${version}_Linux.zip"; + sha256 = "n/D0qfli+kPPKgDIujsPdZHdoUPex3SFuSqLlhGzxJY="; + }; + + appimageContents = appimageTools.extract { + inherit pname version; + src = "${srcZipped}/OrcaSlicer_V${version}_Linux.AppImage"; + }; +in appimageTools.wrapType2 rec { + inherit name version; + src = "${srcZipped}/OrcaSlicer_V${version}_Linux.AppImage"; + + extraInstallCommands = '' + mkdir -p $out/bin + mv $out/bin/${name} $out/bin/${pname} + + ''; + + meta = with lib; { + description = "orca Slicer is an open source slicer for FDM printers"; + homepage = "https://github.com/SoftFever/OrcaSlicer"; + license = licenses.agpl3Plus; + maintainers = [ maintainers.aacebedo ]; + platforms = [ "x86_64-linux" ]; + }; +} \ No newline at end of file diff --git a/nix/users/nicolaivds/themes/gtk.nix b/nix/users/nicolaivds/themes/gtk.nix index dcbc014..8840112 100644 --- a/nix/users/nicolaivds/themes/gtk.nix +++ b/nix/users/nicolaivds/themes/gtk.nix @@ -24,14 +24,10 @@ package = pkgs.catppuccin-gtk.override { variant="mocha"; }; }; gtk3.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; + gtk-application-prefer-dark-theme=1; }; gtk4.extraConfig = { - Settings = '' - gtk-application-prefer-dark-theme=1 - ''; + gtk-application-prefer-dark-theme=1; }; }; } \ No newline at end of file