From fe167fd07259916ed30f28d038e3db243bf6aa01 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 24 Apr 2024 11:11:05 +0200 Subject: [PATCH 01/10] ironbar: Add dynamic battery --- nix/base/base_packages.nix | 2 ++ nix/flake.nix | 6 +++--- nix/hardware/overheating/base_config.nix | 3 +++ nix/hardware/spaceship/base_config.nix | 2 +- nix/modules/ironbar_config.nix | 5 +++++ nix/programs/hyprland/ironbar.nix | 2 +- 6 files changed, 15 insertions(+), 5 deletions(-) diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index c018a41..7de2427 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -23,6 +23,7 @@ morewaita-icon-theme kdePackages.breeze-icons gnome.seahorse + upower ]; gtk.iconCache.enable = false; @@ -42,6 +43,7 @@ ''; programs.dconf.enable = true; + services.upower.enable = true; services.printing.enable = true; services.dbus.enable = true; services.dbus.packages = with pkgs; [ diff --git a/nix/flake.nix b/nix/flake.nix index 4d1b5f7..c6cd3e4 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -37,7 +37,7 @@ # because allowing rust nightly is too hard by default.... (import (fetchTarball { url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; - sha256 = "sha256:02p0zzglgi3980iyam46wv8ajr83wj6myjhrjjfv96vkafl6pycg"; + sha256 = "sha256:1aaza47rqi74ypi77ksz396q9l7rrxfrdnhi2pfjb0yqmz7l69wl"; })) ]; }; @@ -55,7 +55,7 @@ }; modules = [ ./hardware/marmo/default.nix - ]; + ] ++ base_imports; }; nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { @@ -64,7 +64,7 @@ }; modules = [ ./hardware/overheating/default.nix - ]; + ] ++ base_imports; }; nixosConfigurations."spaceship" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { diff --git a/nix/hardware/overheating/base_config.nix b/nix/hardware/overheating/base_config.nix index cdbfe70..ee120c7 100644 --- a/nix/hardware/overheating/base_config.nix +++ b/nix/hardware/overheating/base_config.nix @@ -10,4 +10,7 @@ ",highrr,auto,1" ]; programs.ironbar.monitor = "eDP-1"; + programs.ironbar.battery = [ + { type = "upower"; class = "memory-usage"; } + ]; } diff --git a/nix/hardware/spaceship/base_config.nix b/nix/hardware/spaceship/base_config.nix index 3f7c2c2..da11987 100644 --- a/nix/hardware/spaceship/base_config.nix +++ b/nix/hardware/spaceship/base_config.nix @@ -43,5 +43,5 @@ wallpaper = HDMI-A-1,/home/dashie/Pictures/backgrounds/shinobu_1200.jpg splash = true ''; - programs.hyprland.extra_autostart= [ "streamdeck -n" ]; + programs.hyprland.extra_autostart = [ "streamdeck -n" ]; } diff --git a/nix/modules/ironbar_config.nix b/nix/modules/ironbar_config.nix index 2b3cacb..f77886c 100644 --- a/nix/modules/ironbar_config.nix +++ b/nix/modules/ironbar_config.nix @@ -8,5 +8,10 @@ Extra settings for foo. ''; }; + + battery = lib.mkOption { + default = []; + example = []; + }; }; } diff --git a/nix/programs/hyprland/ironbar.nix b/nix/programs/hyprland/ironbar.nix index 7529355..0682d27 100644 --- a/nix/programs/hyprland/ironbar.nix +++ b/nix/programs/hyprland/ironbar.nix @@ -142,7 +142,7 @@ ]; config = { monitors."${config.programs.ironbar.monitor}" = { - end = [ + end = config.programs.ironbar.battery ++ [ { type = "sys_info"; format = [ -- 2.51.2 From cf63b635ac1e99f8f2f2c0ce81f09f3e49936b3e Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 29 Apr 2024 14:26:02 +0200 Subject: [PATCH 02/10] packages: Add xone --- nix/base/base_packages.nix | 14 +- nix/flake.lock | 68 ++- nix/flake.nix | 10 +- nix/hardware/spaceship/configuration.nix | 4 + nix/override/cambalache.nix | 92 ++++ nix/override/oxicalc.nix | 1 - nix/override/reset.nix | 53 +++ nix/programs/coding.nix | 10 +- nix/programs/common.nix | 7 + nix/programs/gaming/default.nix | 1 + nix/programs/nvim/default.nix | 44 +- nix/programs/nvim/ftplugin/java.lua | 5 + nix/programs/nvim/lua/config/autocmds.lua | 16 + nix/programs/nvim/lua/config/keymaps.lua | 111 ++--- nix/programs/nvim/lua/config/options.lua | 30 +- nix/programs/nvim/lua/config/plugins.lua | 302 ------------ nix/programs/nvim/lua/plugins/disabled.lua | 1 + nix/programs/nvim/lua/plugins/lsp.lua | 322 ++++++------- nix/programs/nvim/lua/plugins/plugins.lua | 518 +++++++++++---------- scripts/audio_control.sh | 2 - 20 files changed, 798 insertions(+), 813 deletions(-) create mode 100644 nix/override/cambalache.nix create mode 100644 nix/override/reset.nix create mode 100644 nix/programs/nvim/ftplugin/java.lua create mode 100644 nix/programs/nvim/lua/config/autocmds.lua delete mode 100644 nix/programs/nvim/lua/config/plugins.lua diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index 7de2427..ad9f400 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -32,16 +32,18 @@ cantarell-fonts ]; - environment.variables = { - NIX_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages); - PKG_CONFIG_PATH = pkgs.lib.makeLibraryPath (config.systemd.packages ++ config.environment.systemPackages); - }; nix.settings.experimental-features = "nix-command flakes"; programs.fish.enable = true; programs.fish.promptInit = '' ${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source ''; + programs.nix-ld.enable = true; + programs.nix-ld.libraries = with pkgs; [ + jdk + zlib + ]; + programs.dconf.enable = true; services.upower.enable = true; services.printing.enable = true; @@ -72,4 +74,8 @@ }; }; programs.ssh.startAgent = true; + + virtualisation.virtualbox.host.enable = true; + users.extraGroups.vboxusers.members = [ "dashie" ]; + virtualisation.virtualbox.guest.enable = true; } diff --git a/nix/flake.lock b/nix/flake.lock index 1762ed5..0f9508a 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -107,6 +107,24 @@ "type": "github" } }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -345,6 +363,22 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1706487304, + "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "Hyprspace": "Hyprspace", @@ -353,7 +387,8 @@ "hyprland": "hyprland", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_2" + "nixpkgs": "nixpkgs_2", + "rust-overlay": "rust-overlay_2" } }, "rust-overlay": { @@ -378,6 +413,22 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1713579131, + "narHash": "sha256-j/lrqFNzm7SdlBlKX43kA2Wp0OaGVOUjQGnER9//4Ao=", + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + } + }, "systems": { "locked": { "lastModified": 1689347949, @@ -408,6 +459,21 @@ "type": "github" } }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, "wlroots": { "flake": false, "locked": { diff --git a/nix/flake.nix b/nix/flake.nix index c6cd3e4..92bb4c7 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -21,6 +21,9 @@ url = "github:JakeStanger/ironbar"; inputs.nixpkgs.follows = "nixpkgs"; }; + rust-overlay = { + url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; + }; anyrun.url = "github:Kirottu/anyrun"; anyrun.inputs.nixpkgs.follows = "nixpkgs"; @@ -35,10 +38,9 @@ }; overlays = [ # because allowing rust nightly is too hard by default.... - (import (fetchTarball { - url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; - sha256 = "sha256:1aaza47rqi74ypi77ksz396q9l7rrxfrdnhi2pfjb0yqmz7l69wl"; - })) + (import + inputs.rust-overlay + ) ]; }; base_imports = [ diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index cba844e..c99eed4 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -5,4 +5,8 @@ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "spaceship"; + + environment.systemPackages = with pkgs; [ + linuxKernel.packages.linux_zen.virtualbox + ]; } diff --git a/nix/override/cambalache.nix b/nix/override/cambalache.nix new file mode 100644 index 0000000..7b119fb --- /dev/null +++ b/nix/override/cambalache.nix @@ -0,0 +1,92 @@ +{ stdenv +, lib +, pkgs +, fetchFromGitLab +, nix-update-script +}: + +pkgs.python3.pkgs.buildPythonApplication rec { + pname = "cambalache"; + version = "0.90.1"; + + format = "other"; + + # Did not fetch submodule since it is only for tests we don't run. + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "jpu"; + repo = pname; + rev = version; + sha256 = "sha256-YuRxqrGJvhMMZApD/tQSWkUg/nZnp/xryBJSjXCXO4w="; + }; + + nativeBuildInputs = with pkgs; [ + meson + ninja + pkg-config + gobject-introspection # for setup hook + desktop-file-utils # for update-desktop-database + shared-mime-info # for update-mime-database + wrapGAppsHook + ]; + + pythonPath = with pkgs.python3.pkgs; [ + pygobject3 + lxml + ]; + + buildInputs = with pkgs; [ + glib + gtk3 + gtk4 + gtksourceview4 + gtksourceview5 + webkitgtk_4_1 + webkitgtk_6_0 + # For extra widgets support. + libadwaita + libhandy + ]; + + # Prevent double wrapping. + dontWrapGApps = true; + + postPatch = '' + patchShebangs postinstall.py + # those programs are used at runtime not build time + # https://gitlab.gnome.org/jpu/cambalache/-/blob/0.12.1/meson.build#L79-80 + substituteInPlace ./meson.build \ + --replace "find_program('broadwayd', required: true)" "" \ + --replace "find_program('gtk4-broadwayd', required: true)" "" + ''; + + preFixup = '' + # Let python wrapper use GNOME flags. + makeWrapperArgs+=( + # For broadway daemons + --prefix PATH : "${lib.makeBinPath [ pkgs.gtk3 pkgs.gtk4 ]}" + "''${gappsWrapperArgs[@]}" + ) + ''; + + postFixup = '' + # Wrap a helper script in an unusual location. + wrapPythonProgramsIn "$out/${pkgs.python3.sitePackages}/cambalache/priv/merengue" "$out $pythonPath" + ''; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = with lib; { + homepage = "https://gitlab.gnome.org/jpu/cambalache"; + description = "RAD tool for GTK 4 and 3 with data model first philosophy"; + mainProgram = "cambalache"; + maintainers = teams.gnome.members; + license = with licenses; [ + lgpl21Only # Cambalache + gpl2Only # tools + ]; + platforms = platforms.unix; + }; +} diff --git a/nix/override/oxicalc.nix b/nix/override/oxicalc.nix index ba319d5..7f4e20c 100644 --- a/nix/override/oxicalc.nix +++ b/nix/override/oxicalc.nix @@ -32,7 +32,6 @@ rustPlatform.buildRustPackage rec { libadwaita ]; - postInstall = '' install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop install -D --mode=444 $src/${pname}.svg $out/share/pixmaps/${pname}.svg diff --git a/nix/override/reset.nix b/nix/override/reset.nix new file mode 100644 index 0000000..603bc30 --- /dev/null +++ b/nix/override/reset.nix @@ -0,0 +1,53 @@ +{ pkgs +, lib +, fetchFromGitHub +}: +let + toolchain = pkgs.rust-bin.selectLatestNightlyWith (toolchain: toolchain.minimal); + rustPlatform = pkgs.makeRustPlatform { + cargo = toolchain; + rustc = toolchain; + }; +in +rustPlatform.buildRustPackage rec { + pname = "reset"; + version = "1.1.1"; + + src = fetchFromGitHub { + owner = "Xetibo"; + repo = "ReSet"; + rev = "${version}"; + hash = "sha256-nyEGhD4IlsJ1AqRZC7aP2vOuq4etvZ7BwTMxb4u7cxY="; + }; + + cargoHash = "sha256-lcNu8yEQiSTshXCwblBLYpSJWmErS53z+SviqaqlSnI="; + + nativeBuildInputs = with pkgs;[ + pkg-config + glib + wrapGAppsHook4 + ]; + + buildInputs = with pkgs;[ + gtk4 + libadwaita + pulseaudio + dbus + gdk-pixbuf + gnome.adwaita-icon-theme + ]; + + postInstall = '' + install -D --mode=444 $src/${pname}.desktop $out/share/applications/${pname}.desktop + install -D --mode=444 $src/src/resources/icons/ReSet.svg $out/share/pixmaps/ReSet.svg + ''; + + meta = with lib; { + description = ""; + homepage = "https://github.com/Xetibo/ReSet"; + changelog = "https://github.com/Xetibo/ReSet/releases/tag/${version}"; + license = licenses.gpl3; + maintainers = with maintainers; [ DashieTM ]; + mainProgram = "reset"; + }; +} diff --git a/nix/programs/coding.nix b/nix/programs/coding.nix index c03c75a..e7df120 100644 --- a/nix/programs/coding.nix +++ b/nix/programs/coding.nix @@ -17,13 +17,21 @@ deno python3 typst + typst-lsp + typstfmt neovide tree-sitter - dotnet-runtime_8 + dotnet-sdk unzip pkg-config sqlite plantuml vscodium + gradle + maven + jdt-language-server + adoptopenjdk-jre-bin + #vscode-extensions.vscjava.vscode-java-test + #vscode-extensions.vscjava.vscode-java-debug ]; } diff --git a/nix/programs/common.nix b/nix/programs/common.nix index 9016273..0c466b4 100644 --- a/nix/programs/common.nix +++ b/nix/programs/common.nix @@ -47,6 +47,7 @@ in playerctl ncspot poppler_utils + neofetch (callPackage ../override/oxinoti.nix { }) @@ -65,6 +66,12 @@ in (callPackage ../override/streamdeck.nix { }) + (callPackage + ../override/reset.nix + { }) + (callPackage + ../override/cambalache.nix + { }) ]; home.username = "dashie"; diff --git a/nix/programs/gaming/default.nix b/nix/programs/gaming/default.nix index 00b847d..60f705c 100644 --- a/nix/programs/gaming/default.nix +++ b/nix/programs/gaming/default.nix @@ -13,6 +13,7 @@ wine ]; + hardware.xone.enable = true; programs.steam.enable = true; programs.gamemode.enable = true; programs.gamemode = { diff --git a/nix/programs/nvim/default.nix b/nix/programs/nvim/default.nix index 142dd3d..5c1e1fe 100644 --- a/nix/programs/nvim/default.nix +++ b/nix/programs/nvim/default.nix @@ -60,12 +60,16 @@ nvim-lspconfig nvim-notify nvim-spectre - nvim-treesitter + nvim-treesitter.withAllGrammars nvim-treesitter-context nvim-treesitter-textobjects nvim-ts-autotag nvim-ts-context-commentstring nvim-web-devicons + nvim-jdtls + neotest + neotest-java + neotest-rust persistence-nvim plenary-nvim telescope-fzf-native-nvim @@ -97,6 +101,18 @@ defaults = { lazy = true, }, + performance = { + rtp = { + disabled_plugins = { + "gzip", + "netrw", + "tarPlugin", + "tohtml", + "tutor", + "zipPlugin", + }, + }, + }, dev = { -- reuse files from pkgs.vimPlugins.* path = "${lazyPath}", @@ -107,8 +123,6 @@ spec = { { "LazyVim/LazyVim", import = "lazyvim.plugins" }, { import = "lazyvim.plugins.extras.ui.alpha" }, - { import = "plugins" }, - { import = "plugins.plugins" }, { import = "lazyvim.plugins.extras.lang.rust" }, { import = "lazyvim.plugins.extras.lang.tailwind" }, { import = "lazyvim.plugins.extras.lang.java" }, @@ -127,27 +141,15 @@ { "nvim-telescope/telescope-fzf-native.nvim", enabled = true }, -- disable mason.nvim, use programs.neovim.extraPackages { "williamboman/mason-lspconfig.nvim", enabled = false }, - { "williamboman/mason.nvim", enabled = false }, - -- import/override with your plugins - { import = "plugins" }, + --{ "williamboman/mason.nvim", enabled = false }, -- treesitter handled by xdg.configFile."nvim/parser", put this line at the end of spec to clear ensure_installed { "nvim-treesitter/nvim-treesitter", opts = { ensure_installed = {} } }, + { import = "plugins" }, + { import = "plugins.plugins" }, }, install = { colorscheme = { "tokyonight" } }, checker = { enabled = true, notify = false }, change_detection = { enabled = true, notify = false }, - performance = { - rtp = { - disabled_plugins = { - "gzip", - "netrw", - "tarPlugin", - "tohtml", - "tutor", - "zipPlugin", - }, - }, - }, }) ''; }; @@ -157,14 +159,12 @@ let parsers = pkgs.symlinkJoin { name = "treesitter-parsers"; - paths = (pkgs.vimPlugins.nvim-treesitter.withPlugins (plugins: with plugins; [ - c - lua - ])).dependencies; + paths = (pkgs.vimPlugins.nvim-treesitter.withAllGrammars).dependencies; }; in "${parsers}/parser"; # Normal LazyVim config here, see https://github.com/LazyVim/starter/tree/main/lua xdg.configFile."nvim/lua".source = ./lua; + xdg.configFile."nvim/ftplugin".source = ./ftplugin; } diff --git a/nix/programs/nvim/ftplugin/java.lua b/nix/programs/nvim/ftplugin/java.lua new file mode 100644 index 0000000..1a4f22e --- /dev/null +++ b/nix/programs/nvim/ftplugin/java.lua @@ -0,0 +1,5 @@ +local config = { + cmd = { "jdtls" }, + root_dir = vim.fs.dirname(vim.fs.find({ "gradlew", ".git", "mvnw" }, { upward = true })[1]), +} +require("jdtls").start_or_attach(config) diff --git a/nix/programs/nvim/lua/config/autocmds.lua b/nix/programs/nvim/lua/config/autocmds.lua new file mode 100644 index 0000000..291710e --- /dev/null +++ b/nix/programs/nvim/lua/config/autocmds.lua @@ -0,0 +1,16 @@ +-- nvimtree +local function open_nvim_tree(data) + local directory = vim.fn.isdirectory(data.file) == 1 + + if not directory then + return + end + print("FUCK") + -- change to the directory + vim.cmd.cd(data.file) + + -- open the tree + require("nvim-tree.api").tree.open() +end + +vim.api.nvim_create_autocmd({ "VimEnter" }, { callback = open_nvim_tree }) diff --git a/nix/programs/nvim/lua/config/keymaps.lua b/nix/programs/nvim/lua/config/keymaps.lua index 7a5c8db..b325537 100644 --- a/nix/programs/nvim/lua/config/keymaps.lua +++ b/nix/programs/nvim/lua/config/keymaps.lua @@ -1,14 +1,14 @@ local Util = require("lazyvim.util") local function map(mode, lhs, rhs, opts) - local keys = require("lazy.core.handler").handlers.keys - ---@cast keys LazyKeysHandler - -- do not create the map if a lazy keys handler exists - if not keys.active[keys.parse({ lhs, mode = mode }).id] then - opts = opts or {} - opts.silent = opts.silent ~= false - vim.keymap.set(mode, lhs, rhs, opts) - end + local keys = require("lazy.core.handler").handlers.keys + ---@cast keys LazyKeysHandler + -- do not create the map if a lazy keys handler exists + if not keys.active[keys.parse({ lhs, mode = mode }).id] then + opts = opts or {} + opts.silent = opts.silent ~= false + vim.keymap.set(mode, lhs, rhs, opts) + end end local opts = { noremap = true, silent = true } local term_opts = { silent = true } @@ -32,10 +32,10 @@ map("n", "do", ':lua require("dap").step_over()', { desc = "Step ove map("n", "di", ':lua require("dap").step_into()', { desc = "Step into" }) map("n", "dc", ':lua require("dap").continue()', { desc = "Continue" }) map("n", "du", function() - require("dapui").toggle() + require("dapui").toggle() end, { desc = "Toggle DAP UI" }) map("n", "de", function() - require("dapui").eval() + require("dapui").eval() end, { desc = "DAP Eval" }) -- window movement @@ -48,7 +48,7 @@ map("i", "", [[wincmd j]], opts) -- toggle terminal local lazyterm = function() - Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) + Util.terminal(nil, { cwd = Util.root(), esc_esc = false, ctrl_hjkl = false }) end map("n", "", lazyterm, { desc = "Terminal (root dir)" }) map("t", "", "close", { desc = "Hide Terminal" }) @@ -65,70 +65,70 @@ map("n", "", ":BufferLineCycleNext", opts) -- git map("n", "gq", function() - require("telescope.builtin").git_commits() + require("telescope.builtin").git_commits() end, { desc = "Commits" }) map("n", "gw", function() - require("telescope.builtin").git_bcommits() + require("telescope.builtin").git_bcommits() end, { desc = "Commits in branch" }) map("n", "gb", function() - require("telescope.builtin").git_branches() + require("telescope.builtin").git_branches() end, { desc = "Branches" }) map("n", "gr", function() - require("telescope.builtin").git_status() + require("telescope.builtin").git_status() end, { desc = "Git status" }) map("n", "ga", function() - require("telescope.builtin").git_stash() + require("telescope.builtin").git_stash() end, { desc = "Git stash" }) map("n", "gg", function() - Util.terminal({ "gitui" }, { cwd = Util.root() }) + Util.terminal({ "gitui" }, { cwd = Util.root() }) end, { desc = "gitui (root dir)" }) map("n", "gG", function() - Util.terminal({ "gitui" }) + Util.terminal({ "gitui" }) end, { desc = "gitui (cwd)" }) map("n", "gB", function() - require("gitblame") - vim.cmd(":GitBlameToggle") + require("gitblame") + vim.cmd(":GitBlameToggle") end, { desc = "git blame" }) -- harpoon man map("n", "h1", function() - require("harpoon.ui").nav_file(1) + require("harpoon.ui").nav_file(1) end, { desc = "First Harpoon File" }) map("n", "h2", function() - require("harpoon.ui").nav_file(2) + require("harpoon.ui").nav_file(2) end, { desc = "Second Harpoon File" }) map("n", "h3", function() - require("harpoon.ui").nav_file(3) + require("harpoon.ui").nav_file(3) end, { desc = "First Harpoon File" }) map("n", "ha", function() - require("harpoon.mark").add_file() + require("harpoon.mark").add_file() end, { desc = "First Harpoon File" }) map("n", "hd", function() - require("harpoon.mark").remove_file() + require("harpoon.mark").remove_file() end, { desc = "First Harpoon File" }) map("n", "hm", ":Telescope harpoon marks", { noremap = true, silent = true, desc = "Show harpoon marks" }) -- telescope map("n", "fb", function() - require("telescope").extensions.file_browser.file_browser({}) + require("telescope").extensions.file_browser.file_browser({}) end, { desc = "File Browser" }) map("n", "ff", function() - require("telescope.builtin").find_files() + require("telescope.builtin").find_files() end, { desc = "Find Files" }) map("n", "fg", function() - Live_grep_from_project_git_root() + Live_grep_from_project_git_root() end, { desc = "Live Grep (root)" }) map("n", "fG", function() - require("telescope.builtin").live_grep() + require("telescope.builtin").live_grep() end, { desc = "Live Grep (cwd)" }) map("n", "fh", function() - require("telescope.builtin").help_tags() + require("telescope.builtin").help_tags() end, { desc = "Help" }) map("n", "fp", function() - require("telescope").extensions.project.project({}) + require("telescope").extensions.project.project({}) end, { noremap = true, silent = true, desc = "Projects" }) map("n", "z", function() - require("telescope").extensions.zoxide.list({}) + require("telescope").extensions.zoxide.list({}) end, { desc = "Zoxide" }) -- neoscroll @@ -142,13 +142,13 @@ map("n", "t", "TroubleToggle", term_opts) -- format map({ "n", "v" }, "", function() - Util.format({ force = true }) + Util.format({ force = true }) end, { desc = "Format" }) -- better yank function Better_yank(opts) - local current_line = unpack(vim.api.nvim_win_get_cursor(0)) - vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y") + local current_line = unpack(vim.api.nvim_win_get_cursor(0)) + vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "y") end vim.api.nvim_create_user_command("BetterYank", Better_yank, { count = 1 }) @@ -156,8 +156,8 @@ map("n", "by", ":BetterYank", term_opts) -- better delete function Better_delete(opts) - local current_line = unpack(vim.api.nvim_win_get_cursor(0)) - vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "d") + local current_line = unpack(vim.api.nvim_win_get_cursor(0)) + vim.api.nvim_command(current_line .. "," .. (opts.count - (current_line - 1)) .. "d") end vim.api.nvim_create_user_command("BetterDelete", Better_delete, { count = 1 }) @@ -165,13 +165,13 @@ map("n", "bd", ":BetterDelete", term_opts) -- neovide zoom local change_scale_factor = function(delta) - vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta + vim.g.neovide_scale_factor = vim.g.neovide_scale_factor * delta end vim.keymap.set("n", "", function() - change_scale_factor(1.25) + change_scale_factor(1.25) end) vim.keymap.set("n", "", function() - change_scale_factor(1 / 1.25) + change_scale_factor(1 / 1.25) end) -- neovide paste @@ -179,23 +179,24 @@ vim.g.neovide_input_use_logo = 1 vim.api.nvim_set_keymap("i", "", "pI", { noremap = true, silent = true }) function Get_git_root() - local opts = {} - local function is_git_repo() - vim.fn.system("git rev-parse --is-inside-work-tree") + local opts = {} + local function is_git_repo() + vim.fn.system("git rev-parse --is-inside-work-tree") - return vim.v.shell_error == 0 - end - if is_git_repo() then - local dot_git_path = vim.fn.finddir(".git", ".;") - local root = vim.fn.fnamemodify(dot_git_path, ":h") - opts = { - cwd = root, - } - end - return opts + return vim.v.shell_error == 0 + end + if is_git_repo() then + local dot_git_path = vim.fn.finddir(".git", ".;") + local root = vim.fn.fnamemodify(dot_git_path, ":h") + opts = { + cwd = root, + } + end + return opts end function Live_grep_from_project_git_root() - local opts = Get_git_root() - require("telescope.builtin").live_grep(opts) + local opts = Get_git_root() + require("telescope.builtin").live_grep(opts) end + diff --git a/nix/programs/nvim/lua/config/options.lua b/nix/programs/nvim/lua/config/options.lua index 136ed63..e9c9543 100644 --- a/nix/programs/nvim/lua/config/options.lua +++ b/nix/programs/nvim/lua/config/options.lua @@ -2,24 +2,32 @@ -- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua -- Add any additional options here local options = { - fileencoding = "utf-8", - number = true, - showmode = true, - termguicolors = true, - spelllang = "en_us", - shell = "fish", - relativenumber = false, - scrolloff = 5, - scrolljump = 5, - wrap = false, + fileencoding = "utf-8", + number = true, + showmode = true, + termguicolors = true, + spelllang = "en_us", + shell = "fish", + relativenumber = false, + scrolloff = 5, + scrolljump = 5, + wrap = false, } +vim.filetype.add({ + extension = { + typst = "typst", + typ = "typst", + }, +}) vim.o.guifont = "JetBrainsMono Nerd Font:h14" vim.g.neovide_refresh_rate_idle = 180 vim.g.neovide_refresh_rate_idle = 5 vim.g.neovide_hide_mouse_when_typing = true vim.g.mkdp_browser = "/usr/bin/firefox" vim.g.mkdp_auto_start = 1 +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 vim.g.autoformat = false for k, v in pairs(options) do - vim.opt[k] = v + vim.opt[k] = v end diff --git a/nix/programs/nvim/lua/config/plugins.lua b/nix/programs/nvim/lua/config/plugins.lua deleted file mode 100644 index a120ce1..0000000 --- a/nix/programs/nvim/lua/config/plugins.lua +++ /dev/null @@ -1,302 +0,0 @@ -local Util = require("lazyvim.util") - -return { - { - "LazyVim/LazyVim", - opts = { - colorscheme = "tokyonight-night", - -- colorscheme = "catppuccin-mocha", - }, - }, - { - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - keys = function() - return {} - end, - opts = { - defaults = { - layout_strategy = 'flex'; - layout_config = { - flex = { - height = 0.95, - width = 0.95, - flip_columns = 100, - vertical = { preview_height = 0.5, preview_cutoff = 5 }, - horizontal = { preview_width = 0.7, preview_cutoff = 99 }, - }, - }, - }, - }, - }, - { - "ThePrimeagen/harpoon", - lazy = true, - config = function() - require("telescope").load_extension("harpoon") - end, - }, - { - "iamcco/markdown-preview.nvim", - lazy = true, - event = "FileType markdown", - build = "cd app && yarn install", - }, - { - "nvim-telescope/telescope-project.nvim", - lazy = true, - }, - { - "nvim-telescope/telescope-file-browser.nvim", - lazy = true, - config = function() - require("telescope").load_extension("file_browser") - end, - }, - { - "jvgrootveld/telescope-zoxide", - lazy = true, - config = function() - local z_utils = require("telescope._extensions.zoxide.utils") - local t = require("telescope") - -- Configure the extension - t.setup({ - extensions = { - zoxide = { - prompt_title = "[ Queries ]", - mappings = { - default = { - after_action = function(selection) - print("Update to (" .. selection.z_score .. ") " .. selection.path) - end, - }, - [""] = { - before_action = function(selection) - print("before C-s") - end, - action = function(selection) - vim.cmd("edit " .. selection.path) - end, - }, - [""] = { action = z_utils.create_basic_command("split") }, - }, - }, - }, - }) - - -- Load the extension - t.load_extension("zoxide") - end, - }, - { - "lervag/vimtex", - config = function() - vim.cmd("let g:vimtex_quickfix_mode=0") - vim.cmd("let g:vimtex_view_general_viewer = 'evince'") - vim.cmd("let g:vimtex_compiler_method = 'latexmk'") - vim.cmd( - "let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}" - ) - end, - }, - { - "rcarriga/nvim-notify", - opts = { - top_down = false, - }, - }, - { - "jbyuki/instant.nvim", - config = function() - vim.cmd("let g:instant_username = 'dashie'") - end, - }, - { - "nvim-treesitter/nvim-treesitter", - opts = { - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - }, - }, - }, - { - "karb94/neoscroll.nvim", - config = function() - require("neoscroll").setup() - end, - }, - { - "kaarmu/typst.vim", - lazy = true, - event = "FileType typst", - }, - { - "folke/which-key.nvim", - event = "VeryLazy", - opts = { - plugins = { spelling = true }, - defaults = { - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["gz"] = { name = "+surround" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - [""] = { name = "+tabs" }, - ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, - ["f"] = { name = "+file/find" }, - ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks" }, - ["q"] = { name = "+quit/session" }, - ["s"] = { name = "+search" }, - ["u"] = { name = "+ui" }, - ["w"] = { name = "+windows" }, - ["x"] = { name = "+diagnostics/quickfix" }, - ["h"] = { name = "+harpoon" }, - ["d"] = { name = "+DAP" }, - }, - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - wk.register(opts.defaults) - end, - }, - { - "f-person/git-blame.nvim", - lazy = true, - }, - { - "mg979/vim-visual-multi", - }, - { - "barreiroleo/ltex_extra.nvim", - ft = { "markdown", "tex", "typst", "typ" }, - lazy = true, - }, - { - "smjonas/inc-rename.nvim", - lazy = true, - event = "BufEnter", - config = function() - require("inc_rename").setup({ - cmd_name = "IncRename", -- the name of the command - hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name - preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead - show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation - input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing") - post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument - }) - end, - }, - { - "nvim-neo-tree/neo-tree.nvim", - opts = { - window = { - position = "right", - mappings = { - ["l"] = "none", - }, - }, - }, - keys = { - { - "fe", - function() - require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() }) - end, - desc = "Explorer NeoTree (root dir)", - }, - { - "fE", - function() - require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() }) - end, - desc = "Explorer NeoTree (cwd)", - }, - { "", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, - { "", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, - }, - }, - { - "folke/edgy.nvim", - opts = { - animate = { - enabled = false, - }, - left = {}, - right = { - -- Neo-tree filesystem always takes half the screen height - { - title = "Neo-Tree", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "filesystem" - end, - size = { height = 0.5 }, - }, - { - title = "Neo-Tree Git", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "git_status" - end, - pinned = true, - open = "Neotree position=right git_status", - }, - { - title = "Neo-Tree Buffers", - ft = "neo-tree", - filter = function(buf) - return vim.b[buf].neo_tree_source == "buffers" - end, - pinned = true, - open = "Neotree position=top buffers", - }, - { - ft = "Outline", - pinned = true, - open = "SymbolsOutlineOpen", - }, - -- any other neo-tree windows - "neo-tree", - }, - }, - }, - { - "rcarriga/nvim-dap-ui", - keys = { - { - "dk", - function() - require("dap").down() - end, - desc = "Down", - }, - { - "dl", - function() - require("dap").up() - end, - desc = "Up", - }, - { - "d;", - function() - require("dap").run_last() - end, - desc = "Run Last", - }, - }, - }, -} diff --git a/nix/programs/nvim/lua/plugins/disabled.lua b/nix/programs/nvim/lua/plugins/disabled.lua index 2db2e59..76dc307 100644 --- a/nix/programs/nvim/lua/plugins/disabled.lua +++ b/nix/programs/nvim/lua/plugins/disabled.lua @@ -5,4 +5,5 @@ return { { { "folke/noice.nvim", enabled = false } }, { { "nvimtools/none-ls.nvim", enabled = false } }, { { "nvimdev/dashboard-nvim", enabled = false } }, + { { "nvim-neo-tree/neo-tree.nvim", enabled = false } }, } diff --git a/nix/programs/nvim/lua/plugins/lsp.lua b/nix/programs/nvim/lua/plugins/lsp.lua index f0365f3..33b43d6 100644 --- a/nix/programs/nvim/lua/plugins/lsp.lua +++ b/nix/programs/nvim/lua/plugins/lsp.lua @@ -1,162 +1,164 @@ return { - { - "williamboman/mason.nvim", - opts = { - ensure_installed = {}, - }, - }, - { - "neovim/nvim-lspconfig", - ---@class PluginLspOpts - opts = { - -- inlay_hints = { - -- enabled = true, - -- }, - format_notify = false, - -- LSP Server Settings - ---@type lspconfig.options - servers = { - rust_analyzer = { - mason = false, - }, - marksman = { - mason = false, - }, - clangd = { - mason = false, - }, - jdtls = { - mason = false, - }, - gopls = { - mason = false, - }, - pyright = { - mason = false, - }, - ruff_lsp = { - mason = false, - }, - texlab = { - mason = false, - }, - taplo = { - keys = { - { - "K", - function() - if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then - require("crates").show_popup() - else - vim.lsp.buf.hover() - end - end, - desc = "Show Crate Documentation", - }, - }, - mason = false, - }, - bashls = { - mason = false, - }, - ansiblels = { - mason = false, - }, - typst_lsp = { - settings = { - experimentalFormatterMode = "on", - exportPdf = "onSave", - }, - mason = false, - }, - nil_ls = { - settings = { - ["nil"] = { - formatting = { - command = { "nixpkgs-fmt" }, - }, - }, - }, - mason = false, - }, - ltex = { - settings = { - ltex = { - checkFrequency = "save", - }, - }, - filetypes = { - "bib", - "gitcommit", - "markdown", - "org", - "plaintex", - "rst", - "rnoweb", - "tex", - "pandoc", - "typst", - "typ", - }, - mason = false, - }, - sqlls = { - mason = false, - }, - lemminx = { - mason = false, - }, - opencl_ls = { - mason = false, - }, - yamlls = { - mason = false, - }, - lua_ls = { - mason = false, - { - Lua = { - workspace = { - checkThirdParty = false, - }, - completion = { - callSnippet = "Replace", - }, - }, - }, - }, - }, - }, - init = function() - local keys = require("lazyvim.plugins.lsp.keymaps").get() - local my_keys = require("config.lsp-keymap").get() - local count = 0 - for _ in pairs(my_keys) do - keys[#keys + 1] = my_keys[count] - count = count + 1 - end - end, - }, - { - "stevearc/conform.nvim", - opts = { - keys = { - { - -- Customize or remove this keymap to your liking - "cF", - function() - require("conform").format({ async = true, lsp_fallback = true }) - end, - mode = "", - desc = "Format buffer", - }, - }, - formatters_by_ft = { - typst = { "typstfmt" }, - nix = { "nixpkgs-fmt" }, - lua = { "stylua" }, - sh = { "shfmt" }, - }, - }, - }, + { + "williamboman/mason.nvim", + --opts = function() + -- return { + -- ensure_installed = {}, + -- } + --end, + }, + { + "neovim/nvim-lspconfig", + ---@class PluginLspOpts + opts = { + -- inlay_hints = { + -- enabled = true, + -- }, + format_notify = false, + -- LSP Server Settings + ---@type lspconfig.options + servers = { + rust_analyzer = { + mason = false, + }, + marksman = { + mason = false, + }, + clangd = { + mason = false, + }, + jdtls = { + mason = false, + }, + gopls = { + mason = false, + }, + pyright = { + mason = false, + }, + ruff_lsp = { + mason = false, + }, + texlab = { + mason = false, + }, + taplo = { + keys = { + { + "K", + function() + if vim.fn.expand("%:t") == "Cargo.toml" and require("crates").popup_available() then + require("crates").show_popup() + else + vim.lsp.buf.hover() + end + end, + desc = "Show Crate Documentation", + }, + }, + mason = false, + }, + bashls = { + mason = false, + }, + ansiblels = { + mason = false, + }, + typst_lsp = { + settings = { + experimentalFormatterMode = "on", + exportPdf = "onSave", + }, + mason = false, + }, + nil_ls = { + settings = { + ["nil"] = { + formatting = { + command = { "nixpkgs-fmt" }, + }, + }, + }, + mason = false, + }, + ltex = { + settings = { + ltex = { + checkFrequency = "save", + }, + }, + filetypes = { + "bib", + "gitcommit", + "markdown", + "org", + "plaintex", + "rst", + "rnoweb", + "tex", + "pandoc", + "typst", + "typ", + }, + mason = false, + }, + sqlls = { + mason = false, + }, + lemminx = { + mason = false, + }, + opencl_ls = { + mason = false, + }, + yamlls = { + mason = false, + }, + lua_ls = { + mason = false, + { + Lua = { + workspace = { + checkThirdParty = false, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }, + }, + }, + init = function() + local keys = require("lazyvim.plugins.lsp.keymaps").get() + local my_keys = require("config.lsp-keymap").get() + local count = 0 + for _ in pairs(my_keys) do + keys[#keys + 1] = my_keys[count] + count = count + 1 + end + end, + }, + { + "stevearc/conform.nvim", + opts = { + keys = { + { + -- Customize or remove this keymap to your liking + "cF", + function() + require("conform").format({ async = true, lsp_fallback = true }) + end, + mode = "", + desc = "Format buffer", + }, + }, + formatters_by_ft = { + typst = { "typstfmt" }, + nix = { "nixpkgs-fmt" }, + lua = { "stylua" }, + sh = { "shfmt" }, + }, + }, + }, } diff --git a/nix/programs/nvim/lua/plugins/plugins.lua b/nix/programs/nvim/lua/plugins/plugins.lua index e7e0b4b..88d1824 100644 --- a/nix/programs/nvim/lua/plugins/plugins.lua +++ b/nix/programs/nvim/lua/plugins/plugins.lua @@ -1,255 +1,273 @@ local Util = require("lazyvim.util") return { - { - "LazyVim/LazyVim", - opts = { - colorscheme = "tokyonight-night", - -- colorscheme = "catppuccin-mocha", - }, - }, - { - "nvim-telescope/telescope.nvim", - cmd = "Telescope", - keys = function() - return {} - end, - opts = { - defaults = { - layout_strategy = "flex", - layout_config = { - flex = { - height = 0.95, - width = 0.95, - flip_columns = 100, - }, - vertical = { preview_height = 0.5, preview_cutoff = 5 }, - horizontal = { preview_width = 0.7, preview_cutoff = 99 }, - }, - }, - }, - }, - { - "nvim-telescope/telescope-project.nvim", - lazy = true, - }, - { - "nvim-telescope/telescope-file-browser.nvim", - lazy = true, - config = function() - require("telescope").load_extension("file_browser") - end, - }, - { - "jvgrootveld/telescope-zoxide", - lazy = true, - config = function() - local z_utils = require("telescope._extensions.zoxide.utils") - local t = require("telescope") - -- Configure the extension - t.setup({ - extensions = { - zoxide = { - prompt_title = "[ Queries ]", - mappings = { - default = { - after_action = function(selection) - print("Update to (" .. selection.z_score .. ") " .. selection.path) - end, - }, - [""] = { - before_action = function(selection) - print("before C-s") - end, - action = function(selection) - vim.cmd("edit " .. selection.path) - end, - }, - [""] = { action = z_utils.create_basic_command("split") }, - }, - }, - }, - }) + { + "LazyVim/LazyVim", + opts = { + colorscheme = "tokyonight-night", + -- colorscheme = "catppuccin-mocha", + }, + }, + { + "nvim-telescope/telescope.nvim", + cmd = "Telescope", + keys = function() + return {} + end, + opts = { + defaults = { + layout_strategy = "flex", + layout_config = { + flex = { + height = 0.95, + width = 0.95, + flip_columns = 100, + }, + vertical = { preview_height = 0.5, preview_cutoff = 5 }, + horizontal = { preview_width = 0.7, preview_cutoff = 99 }, + }, + }, + }, + }, + { + "nvim-telescope/telescope-project.nvim", + lazy = true, + }, + { + "nvim-telescope/telescope-file-browser.nvim", + lazy = true, + config = function() + require("telescope").load_extension("file_browser") + end, + }, + { + "jvgrootveld/telescope-zoxide", + lazy = true, + config = function() + local z_utils = require("telescope._extensions.zoxide.utils") + local t = require("telescope") + -- Configure the extension + t.setup({ + extensions = { + zoxide = { + prompt_title = "[ Queries ]", + mappings = { + default = { + after_action = function(selection) + print("Update to (" .. selection.z_score .. ") " .. selection.path) + end, + }, + [""] = { + before_action = function(selection) + print("before C-s") + end, + action = function(selection) + vim.cmd("edit " .. selection.path) + end, + }, + [""] = { action = z_utils.create_basic_command("split") }, + }, + }, + }, + }) - -- Load the extension - t.load_extension("zoxide") - end, - }, - { - "lervag/vimtex", - config = function() - vim.cmd("let g:vimtex_quickfix_mode=0") - vim.cmd("let g:vimtex_view_general_viewer = 'evince'") - vim.cmd("let g:vimtex_compiler_method = 'latexmk'") - vim.cmd( - "let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}" - ) - end, - }, - { - "jbyuki/instant.nvim", - config = function() - vim.cmd("let g:instant_username = 'dashie'") - end, - }, - { - "nvim-treesitter/nvim-treesitter", - opts = { - textobjects = { - select = { - enable = true, - lookahead = true, - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ["af"] = "@function.outer", - ["if"] = "@function.inner", - ["ac"] = "@class.outer", - ["ic"] = "@class.inner", - }, - }, - }, - }, - }, - { - "karb94/neoscroll.nvim", - config = function() - require("neoscroll").setup() - end, - }, - { - "kaarmu/typst.vim", - lazy = true, - event = "FileType typst", - }, - { - "folke/which-key.nvim", - event = "VeryLazy", - opts = { - plugins = { spelling = true }, - defaults = { - mode = { "n", "v" }, - ["g"] = { name = "+goto" }, - ["gz"] = { name = "+surround" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - [""] = { name = "+tabs" }, - ["b"] = { name = "+buffer" }, - ["c"] = { name = "+code" }, - ["f"] = { name = "+file/find" }, - ["g"] = { name = "+git" }, - ["gh"] = { name = "+hunks" }, - ["q"] = { name = "+quit/session" }, - ["s"] = { name = "+search" }, - ["u"] = { name = "+ui" }, - ["w"] = { name = "+windows" }, - ["x"] = { name = "+diagnostics/quickfix" }, - ["h"] = { name = "+harpoon" }, - ["d"] = { name = "+DAP" }, - }, - }, - config = function(_, opts) - local wk = require("which-key") - wk.setup(opts) - wk.register(opts.defaults) - end, - }, - { - "f-person/git-blame.nvim", - lazy = true, - }, - { - "mg979/vim-visual-multi", - }, - { - "barreiroleo/ltex_extra.nvim", - ft = { "markdown", "tex", "typst", "typ" }, - lazy = true, - }, - { - "smjonas/inc-rename.nvim", - lazy = true, - event = "BufEnter", - config = function() - require("inc_rename").setup({ - cmd_name = "IncRename", -- the name of the command - hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name - preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead - show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation - input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing") - post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument - }) - end, - }, - { - "nvim-neo-tree/neo-tree.nvim", - opts = { - window = { - position = "right", - mappings = { - ["l"] = "none", - }, - }, - }, - keys = { - { - "fe", - function() - require("neo-tree.command").execute({ position = "right", toggle = true, dir = Util.root() }) - end, - desc = "Explorer NeoTree (root dir)", - }, - { - "fE", - function() - require("neo-tree.command").execute({ position = "right", toggle = true, dir = vim.loop.cwd() }) - end, - desc = "Explorer NeoTree (cwd)", - }, - { "", "fe", desc = "Explorer NeoTree (root dir)", remap = true }, - { "", "fE", desc = "Explorer NeoTree (cwd)", remap = true }, - }, - }, - { - "rcarriga/nvim-dap-ui", - keys = { - { - "dk", - function() - require("dap").down() - end, - desc = "Down", - }, - { - "dl", - function() - require("dap").up() - end, - desc = "Up", - }, - { - "d;", - function() - require("dap").run_last() - end, - desc = "Run Last", - }, - }, - }, - { - "DashieTM/test_plugin", - lazy = false, - opts = { - what = 0, - }, - }, - { - "DreamMaoMao/yazi.nvim", - dependencies = { - "nvim-telescope/telescope.nvim", - "nvim-lua/plenary.nvim", - }, - keys = { - { "fy", "Yazi", desc = "Toggle Yazi" }, - }, - }, + -- Load the extension + t.load_extension("zoxide") + end, + }, + { + "lervag/vimtex", + config = function() + vim.cmd("let g:vimtex_quickfix_mode=0") + vim.cmd("let g:vimtex_view_general_viewer = 'evince'") + vim.cmd("let g:vimtex_compiler_method = 'latexmk'") + vim.cmd( + "let g:vimtex_compiler_latexmk = {'options': ['-pdf', '-shell-escape', '-file-line-error', '--extra-mem-bot=10000000', '-synctex=1', '-interaction=nonstopmode',],}" + ) + end, + }, + { + "jbyuki/instant.nvim", + config = function() + vim.cmd("let g:instant_username = 'dashie'") + end, + }, + { + "nvim-treesitter/nvim-treesitter", + opts = { + textobjects = { + select = { + enable = true, + lookahead = true, + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ["af"] = "@function.outer", + ["if"] = "@function.inner", + ["ac"] = "@class.outer", + ["ic"] = "@class.inner", + }, + }, + }, + }, + }, + { + "karb94/neoscroll.nvim", + config = function() + require("neoscroll").setup() + end, + }, + { + "kaarmu/typst.vim", + lazy = true, + event = "FileType typst", + }, + { + "folke/which-key.nvim", + event = "VeryLazy", + opts = { + plugins = { spelling = true }, + defaults = { + mode = { "n", "v" }, + ["g"] = { name = "+goto" }, + ["gz"] = { name = "+surround" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + [""] = { name = "+tabs" }, + ["b"] = { name = "+buffer" }, + ["c"] = { name = "+code" }, + ["f"] = { name = "+file/find" }, + ["g"] = { name = "+git" }, + ["gh"] = { name = "+hunks" }, + ["q"] = { name = "+quit/session" }, + ["s"] = { name = "+search" }, + ["u"] = { name = "+ui" }, + ["w"] = { name = "+windows" }, + ["x"] = { name = "+diagnostics/quickfix" }, + ["h"] = { name = "+harpoon" }, + ["d"] = { name = "+DAP" }, + }, + }, + config = function(_, opts) + local wk = require("which-key") + wk.setup(opts) + wk.register(opts.defaults) + end, + }, + { + "f-person/git-blame.nvim", + lazy = true, + }, + { + "mg979/vim-visual-multi", + }, + { + "barreiroleo/ltex_extra.nvim", + ft = { "markdown", "tex", "typst", "typ" }, + lazy = true, + }, + { + "smjonas/inc-rename.nvim", + lazy = true, + event = "BufEnter", + config = function() + require("inc_rename").setup({ + cmd_name = "IncRename", -- the name of the command + hl_group = "Substitute", -- the highlight group used for highlighting the identifier's new name + preview_empty_name = true, -- whether an empty new name should be previewed; if false the command preview will be cancelled instead + show_message = true, -- whether to display a `Renamed m instances in n files` message after a rename operation + input_buffer_type = nil, -- the type of the external input buffer to use (the only supported value is currently "dressing") + post_hook = nil, -- callback to run after renaming, receives the result table (from LSP handler) as an argument + }) + end, + }, + { + "nvim-tree/nvim-tree.lua", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("nvim-tree").setup({ + renderer = { + group_empty = true, + }, + view = { + side = "right", + }, + }) + end, + keys = { + { + "fe", + function() + require("nvim-tree.api").tree.toggle() + end, + desc = "Explorer NvimTree (root dir)", + }, + { + "fE", + function() + require("nvim-tree.api").tree.toggle() + end, + desc = "Explorer NvimTree (cwd)", + }, + { "", "fe", desc = "Explorer NvimTree (root dir)", remap = true }, + { "", "fE", desc = "Explorer NvimTree (cwd)", remap = true }, + }, + }, + { + "rcarriga/nvim-dap-ui", + keys = { + { + "dk", + function() + require("dap").down() + end, + desc = "Down", + }, + { + "dl", + function() + require("dap").up() + end, + desc = "Up", + }, + { + "d;", + function() + require("dap").run_last() + end, + desc = "Run Last", + }, + }, + }, + { + "nvim-neotest/neotest", + dependencies = { + "rcasia/neotest-java", + }, + opts = { + adapters = { + ["neotest-java"] = { + ignore_wrapper = false, -- whether to ignore maven/gradle wrapper + junit_jar = "/home/dashie/.local/share/nvim/mason/bin/junit-standalone.jar", + -- default: .local/share/nvim/neotest-java/junit-platform-console-standalone-[version].jar + }, + }, + }, + }, + { + "DashieTM/test_plugin", + lazy = false, + opts = { + what = 0, + }, + }, + { + "DreamMaoMao/yazi.nvim", + dependencies = { + "nvim-telescope/telescope.nvim", + "nvim-lua/plenary.nvim", + }, + keys = { + { "fy", "Yazi", desc = "Toggle Yazi" }, + }, + }, } diff --git a/scripts/audio_control.sh b/scripts/audio_control.sh index 9dae51a..33cc652 100755 --- a/scripts/audio_control.sh +++ b/scripts/audio_control.sh @@ -1,7 +1,5 @@ ncspot() { - notify-send "$1" - notify-send "$2" NUM=$(pactl list clients short | rg "ncspot" | awk -F 'PipeWire' ' { print $1 } ' | tr -d ' \t\n') CHANGE=$(pactl list sink-inputs short | rg "$NUM" | awk -F ' ' ' { print $1 }' | tr -d ' \t\n') pactl set-sink-input-volume "$CHANGE" "$1" -- 2.51.2 From dcfb38839da1990d050fe6adfe79c6824f60efd1 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Fri, 3 May 2024 22:47:20 +0200 Subject: [PATCH 03/10] change go path, ffs --- nix/base/env.nix | 5 ++++- nix/flake.lock | 30 +++++++-------------------- nix/flake.nix | 1 + nix/programs/coding.nix | 2 ++ nix/programs/nvim/default.nix | 1 + nix/programs/nvim/lua/plugins/lsp.lua | 5 +++++ 6 files changed, 21 insertions(+), 23 deletions(-) diff --git a/nix/base/env.nix b/nix/base/env.nix index d4efa9c..5166603 100644 --- a/nix/base/env.nix +++ b/nix/base/env.nix @@ -9,5 +9,8 @@ SUDO_EDITOR = "neovide --no-fork"; SCRIPTS = "$HOME/.config/scripts"; }; - environment.sessionVariables.NIXOS_OZONE_WL = "1"; + environment.sessionVariables = { + NIXOS_OZONE_WL = "1"; + GOPATH = "$HOME/.go"; + }; } diff --git a/nix/flake.lock b/nix/flake.lock index 0f9508a..e3500e7 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -350,11 +350,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1713625742, - "narHash": "sha256-8MD2uCuGs0v09S/sLR8xC0gYXk6RFSwWdyqYyTpCnes=", + "lastModified": 1714642414, + "narHash": "sha256-Fs83qDWunAxlTbEiC9YbCzpMvxS8wZmPJ18W28Zgl/8=", "owner": "nixos", "repo": "nixpkgs", - "rev": "141867ab45d3f1dba928d61dea643bd5a98778fb", + "rev": "121251b7c5567bc118d6af2ec8c464a951792b45", "type": "github" }, "original": { @@ -363,22 +363,6 @@ "type": "github" } }, - "nixpkgs_3": { - "locked": { - "lastModified": 1706487304, - "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", - "type": "github" - }, - "original": { - "owner": "NixOS", - "ref": "nixpkgs-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, "root": { "inputs": { "Hyprspace": "Hyprspace", @@ -416,11 +400,13 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_3" + "nixpkgs": [ + "nixpkgs" + ] }, "locked": { - "lastModified": 1713579131, - "narHash": "sha256-j/lrqFNzm7SdlBlKX43kA2Wp0OaGVOUjQGnER9//4Ao=", + "lastModified": 1714702555, + "narHash": "sha256-/NoUbE5S5xpK1FU3nlHhQ/tL126+JcisXdzy3Ng4pDU=", "type": "tarball", "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" }, diff --git a/nix/flake.nix b/nix/flake.nix index 92bb4c7..20e1b37 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -23,6 +23,7 @@ }; rust-overlay = { url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; + inputs.nixpkgs.follows = "nixpkgs"; }; anyrun.url = "github:Kirottu/anyrun"; diff --git a/nix/programs/coding.nix b/nix/programs/coding.nix index e7df120..c7658d6 100644 --- a/nix/programs/coding.nix +++ b/nix/programs/coding.nix @@ -31,6 +31,8 @@ maven jdt-language-server adoptopenjdk-jre-bin + omnisharp-roslyn + csharpier #vscode-extensions.vscjava.vscode-java-test #vscode-extensions.vscjava.vscode-java-debug ]; diff --git a/nix/programs/nvim/default.nix b/nix/programs/nvim/default.nix index 5c1e1fe..c0f7885 100644 --- a/nix/programs/nvim/default.nix +++ b/nix/programs/nvim/default.nix @@ -67,6 +67,7 @@ nvim-ts-context-commentstring nvim-web-devicons nvim-jdtls + omnisharp-extended-lsp-nvim neotest neotest-java neotest-rust diff --git a/nix/programs/nvim/lua/plugins/lsp.lua b/nix/programs/nvim/lua/plugins/lsp.lua index 33b43d6..52f7d55 100644 --- a/nix/programs/nvim/lua/plugins/lsp.lua +++ b/nix/programs/nvim/lua/plugins/lsp.lua @@ -64,6 +64,10 @@ return { ansiblels = { mason = false, }, + omnisharp = { + mason = false, + cmd = { "OmniSharp" }, + }, typst_lsp = { settings = { experimentalFormatterMode = "on", @@ -158,6 +162,7 @@ return { nix = { "nixpkgs-fmt" }, lua = { "stylua" }, sh = { "shfmt" }, + cs = { "dotnet-csharpier" }, }, }, }, -- 2.51.2 From 49ece00cffdfe33f242356886c5cf0b92b06bf76 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 5 May 2024 16:05:58 +0200 Subject: [PATCH 04/10] delete flake.lock --- nix/.gitignore | 1 + nix/base/common_hardware.nix | 16 +- nix/flake.lock | 516 ------------------ nix/flake.nix | 34 +- nix/override/streamdeck.nix | 2 +- ...streamdeck_path.patch => streamdeck.patch} | 9 +- nix/programs/flatpak.nix | 1 + nix/programs/utils.nix | 1 - 8 files changed, 38 insertions(+), 542 deletions(-) create mode 100644 nix/.gitignore delete mode 100644 nix/flake.lock rename nix/override/{streamdeck_path.patch => streamdeck.patch} (60%) diff --git a/nix/.gitignore b/nix/.gitignore new file mode 100644 index 0000000..301d47e --- /dev/null +++ b/nix/.gitignore @@ -0,0 +1 @@ +flake.lock diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index e86ab4a..83b53a3 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -42,6 +42,10 @@ DIRENV_LOG_FORMAT = ""; }; + nix.settings.trusted-users = [ + "dashie" + ]; + # allows user change later on users.mutableUsers = true; users.users.dashie = { @@ -58,17 +62,5 @@ password = "firstlogin"; }; - nix.settings = { - builders-use-substitutes = true; - # substituters to use - substituters = [ - "https://anyrun.cachix.org" - ]; - - trusted-public-keys = [ - "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" - ]; - }; - system.stateVersion = "unstable"; } diff --git a/nix/flake.lock b/nix/flake.lock deleted file mode 100644 index e3500e7..0000000 --- a/nix/flake.lock +++ /dev/null @@ -1,516 +0,0 @@ -{ - "nodes": { - "Hyprspace": { - "inputs": { - "hyprland": [ - "hyprland" - ], - "hyprlandPlugins": "hyprlandPlugins", - "nixpkgs": [ - "Hyprspace", - "hyprland", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713113295, - "narHash": "sha256-3oivuUgU2B3zQIuop1lc+VXBOhqCnZMl81pFYdZu1oc=", - "owner": "KZDKM", - "repo": "Hyprspace", - "rev": "046533d6fb0244874273254d4008cbdc48621829", - "type": "github" - }, - "original": { - "owner": "KZDKM", - "repo": "Hyprspace", - "type": "github" - } - }, - "anyrun": { - "inputs": { - "flake-parts": "flake-parts", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1712136515, - "narHash": "sha256-LpjQJYC24S5P5XhJsZX6HqsQT1pohcFzM6N42I6qo/U=", - "owner": "Kirottu", - "repo": "anyrun", - "rev": "be6728884d543665e7bd137bbef62dc1d04a210b", - "type": "github" - }, - "original": { - "owner": "Kirottu", - "repo": "anyrun", - "type": "github" - } - }, - "crane": { - "inputs": { - "nixpkgs": [ - "ironbar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711681752, - "narHash": "sha256-LEg6/dmEFxx6Ygti5DO9MOhGNpyB7zdxdWtzv/FCTXk=", - "owner": "ipetkov", - "repo": "crane", - "rev": "ada0fb4dcce4561acb1eb17c59b7306d9d4a95f3", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "flake-parts": { - "inputs": { - "nixpkgs-lib": [ - "anyrun", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1696343447, - "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", - "owner": "hercules-ci", - "repo": "flake-parts", - "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "flake-parts", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1705309234, - "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "home-manager": { - "inputs": { - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1713077896, - "narHash": "sha256-Noot8H0EZEAFRQWyGxh9ryvhK96xpIqKbh78X447JWs=", - "owner": "nix-community", - "repo": "home-manager", - "rev": "630a0992b3627c64e34f179fab68e3d48c6991c0", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "home-manager", - "type": "github" - } - }, - "hyprcursor": { - "inputs": { - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1712434681, - "narHash": "sha256-qwmR2p1oc48Bj7gUDvb1oGL19Rjs2PmEmk4ChV01A5o=", - "owner": "hyprwm", - "repo": "hyprcursor", - "rev": "818d8c4b69e0997483d60b75f701fe14b561a7a3", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprcursor", - "type": "github" - } - }, - "hyprland": { - "inputs": { - "hyprcursor": "hyprcursor", - "hyprland-protocols": "hyprland-protocols", - "hyprlang": "hyprlang", - "nixpkgs": [ - "nixpkgs" - ], - "systems": "systems", - "wlroots": "wlroots", - "xdph": "xdph" - }, - "locked": { - "lastModified": 1713126795, - "narHash": "sha256-IX9N+WMMcdBsxjQFLHjBCwXByMt+0S8sL18dQ2QTzvI=", - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "67f47fbdccd639502a76ccb3552a23df37f19ef8", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "Hyprland", - "rev": "67f47fbdccd639502a76ccb3552a23df37f19ef8", - "type": "github" - } - }, - "hyprland-protocols": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1691753796, - "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", - "owner": "hyprwm", - "repo": "hyprland-protocols", - "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-protocols", - "type": "github" - } - }, - "hyprlandPlugins": { - "inputs": { - "hyprland": [ - "Hyprspace", - "hyprland" - ], - "systems": [ - "Hyprspace", - "hyprlandPlugins", - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1712836056, - "narHash": "sha256-qf6yev9OlJuQv557ApLQ/5V8pQj0YOO9tyh5j3It1mY=", - "owner": "hyprwm", - "repo": "hyprland-plugins", - "rev": "e9457e08ca3ff16dc5a815be62baf9e18b539197", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprland-plugins", - "type": "github" - } - }, - "hyprlang": { - "inputs": { - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1711671891, - "narHash": "sha256-C/Wwsy/RLxHP1axFFl+AnwJRWfd8gxDKKoa8nt8Qk3c=", - "owner": "hyprwm", - "repo": "hyprlang", - "rev": "c1402612146ba06606ebf64963a02bc1efe11e74", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "hyprlang", - "type": "github" - } - }, - "ironbar": { - "inputs": { - "crane": "crane", - "naersk": "naersk", - "nixpkgs": [ - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1713218218, - "narHash": "sha256-f2GOHnoLe9PeVI0Itvm0RVPxc102ZdHabNDYUxoL/RY=", - "owner": "JakeStanger", - "repo": "ironbar", - "rev": "3fea6e3254a8cda16b32443d1f8f3282218b07c5", - "type": "github" - }, - "original": { - "owner": "JakeStanger", - "repo": "ironbar", - "type": "github" - } - }, - "naersk": { - "inputs": { - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1698420672, - "narHash": "sha256-/TdeHMPRjjdJub7p7+w55vyABrsJlt5QkznPYy55vKA=", - "owner": "nix-community", - "repo": "naersk", - "rev": "aeb58d5e8faead8980a807c840232697982d47b9", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "naersk", - "type": "github" - } - }, - "nix-flatpak": { - "locked": { - "lastModified": 1711997375, - "narHash": "sha256-KvU4gOtuFMS9Il67glRGtdNfguAINT9pCaXtvCL8uI8=", - "owner": "gmodena", - "repo": "nix-flatpak", - "rev": "45bf66f7068db79b552da864c0e87452be624d6c", - "type": "github" - }, - "original": { - "owner": "gmodena", - "repo": "nix-flatpak", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1711715736, - "narHash": "sha256-9slQ609YqT9bT/MNX9+5k5jltL9zgpn36DpFB7TkttM=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "807c549feabce7eddbf259dbdcec9e0600a0660d", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1714642414, - "narHash": "sha256-Fs83qDWunAxlTbEiC9YbCzpMvxS8wZmPJ18W28Zgl/8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "121251b7c5567bc118d6af2ec8c464a951792b45", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "Hyprspace": "Hyprspace", - "anyrun": "anyrun", - "home-manager": "home-manager", - "hyprland": "hyprland", - "ironbar": "ironbar", - "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_2", - "rust-overlay": "rust-overlay_2" - } - }, - "rust-overlay": { - "inputs": { - "flake-utils": "flake-utils", - "nixpkgs": [ - "ironbar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1711851236, - "narHash": "sha256-EJ03x3N9ihhonAttkaCrqxb0djDq3URCuDpmVPbNZhA=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "f258266af947599e8069df1c2e933189270f143a", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1714702555, - "narHash": "sha256-/NoUbE5S5xpK1FU3nlHhQ/tL126+JcisXdzy3Ng4pDU=", - "type": "tarball", - "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" - }, - "original": { - "type": "tarball", - "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" - } - }, - "systems": { - "locked": { - "lastModified": 1689347949, - "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", - "owner": "nix-systems", - "repo": "default-linux", - "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default-linux", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "wlroots": { - "flake": false, - "locked": { - "lastModified": 1713124002, - "narHash": "sha256-vPeZCY+sdiGsz4fl3AVVujfyZyQBz6+vZdkUE4hQ+HI=", - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "611a4f24cd2384378f6e500253983107c6656c64", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "wlroots-hyprland", - "rev": "611a4f24cd2384378f6e500253983107c6656c64", - "type": "github" - } - }, - "xdph": { - "inputs": { - "hyprland-protocols": [ - "hyprland", - "hyprland-protocols" - ], - "hyprlang": [ - "hyprland", - "hyprlang" - ], - "nixpkgs": [ - "hyprland", - "nixpkgs" - ], - "systems": [ - "hyprland", - "systems" - ] - }, - "locked": { - "lastModified": 1709299639, - "narHash": "sha256-jYqJM5khksLIbqSxCLUUcqEgI+O2LdlSlcMEBs39CAU=", - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "rev": "2d2fb547178ec025da643db57d40a971507b82fe", - "type": "github" - }, - "original": { - "owner": "hyprwm", - "repo": "xdg-desktop-portal-hyprland", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/nix/flake.nix b/nix/flake.nix index 20e1b37..8aade6c 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -3,31 +3,31 @@ inputs = { - nix-flatpak.url = "github:gmodena/nix-flatpak"; - nixpkgs.url = "github:nixos/nixpkgs"; + nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; + nix-flatpak = { + url = "github:gmodena/nix-flatpak"; + #inputs.nixpkgs.follows = "nixpkgs"; + }; home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; - hyprland = { - url = "github:hyprwm/Hyprland/67f47fbdccd639502a76ccb3552a23df37f19ef8"; - inputs.nixpkgs.follows = "nixpkgs"; - }; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + # inputs.nixpkgs.follows = "nixpkgs"; Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; ironbar = { url = "github:JakeStanger/ironbar"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; rust-overlay = { url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; - inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; - anyrun.url = "github:Kirottu/anyrun"; - anyrun.inputs.nixpkgs.follows = "nixpkgs"; + # inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { ... }@inputs: @@ -81,4 +81,18 @@ ] ++ base_imports; }; }; + + nixConfig = { + builders-use-substitutes = true; + # substituters to use + extra-substituters = [ + "https://hyprland.cachix.org" + "https://anyrun.cachix.org" + ]; + + extra-trusted-public-keys = [ + "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" + "anyrun.cachix.org-1:pqBobmOjI7nKlsUMV25u9QHa9btJK65/C8vnO3p346s=" + ]; + }; } diff --git a/nix/override/streamdeck.nix b/nix/override/streamdeck.nix index 47ed30d..705155f 100644 --- a/nix/override/streamdeck.nix +++ b/nix/override/streamdeck.nix @@ -19,7 +19,7 @@ python3Packages.buildPythonApplication rec { patches = [ # nixpkgs has a newer pillow version - ./streamdeck_path.patch + ./streamdeck.patch ]; desktopItems = diff --git a/nix/override/streamdeck_path.patch b/nix/override/streamdeck.patch similarity index 60% rename from nix/override/streamdeck_path.patch rename to nix/override/streamdeck.patch index 30cd277..3c8cf05 100644 --- a/nix/override/streamdeck_path.patch +++ b/nix/override/streamdeck.patch @@ -1,8 +1,13 @@ diff --git a/pyproject.toml b/pyproject.toml -index 54a8c19..f107170 100644 +index 54a8c19..0b95fb3 100644 --- a/pyproject.toml +++ b/pyproject.toml -@@ -18,7 +18,7 @@ pillow = "10.2.0" +@@ -14,11 +14,11 @@ packages = [ + [tool.poetry.dependencies] + python = ">=3.8,<3.13" + streamdeck = "^0.9.5" +-pillow = "10.2.0" ++pillow = "^10.2.0" pyside6 = "^6.4.2" CairoSVG = "^2.5.2" filetype = "^1.0.10" diff --git a/nix/programs/flatpak.nix b/nix/programs/flatpak.nix index c61d994..1e1551b 100644 --- a/nix/programs/flatpak.nix +++ b/nix/programs/flatpak.nix @@ -12,6 +12,7 @@ "org.onlyoffice.desktopeditors" "org.gtk.Gtk3theme.adw-gtk3" "com.brave.Browser" + "com.rustdesk.RustDesk" ]; } diff --git a/nix/programs/utils.nix b/nix/programs/utils.nix index 4a95190..e2ef138 100644 --- a/nix/programs/utils.nix +++ b/nix/programs/utils.nix @@ -3,7 +3,6 @@ }: { home.packages = with pkgs; [ - rustdesk keepassxc nheko kdeconnect -- 2.51.2 From 2832f86a7eaace10ec2fb0fc114a40f45bb5215b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 6 May 2024 11:23:35 +0200 Subject: [PATCH 05/10] temporary: disable plugins for hyprland --- nix/.gitignore | 1 - nix/flake.lock | 547 +++++++++++++++++++++++++++++++ nix/flake.nix | 14 +- nix/programs/hyprland/config.nix | 20 +- 4 files changed, 565 insertions(+), 17 deletions(-) create mode 100644 nix/flake.lock diff --git a/nix/.gitignore b/nix/.gitignore index 301d47e..e69de29 100644 --- a/nix/.gitignore +++ b/nix/.gitignore @@ -1 +0,0 @@ -flake.lock diff --git a/nix/flake.lock b/nix/flake.lock new file mode 100644 index 0000000..7868d7b --- /dev/null +++ b/nix/flake.lock @@ -0,0 +1,547 @@ +{ + "nodes": { + "Hyprspace": { + "inputs": { + "hyprland": [ + "hyprland" + ] + }, + "locked": { + "lastModified": 1714860465, + "narHash": "sha256-yFR9gBqvuvN5eYjeV3/luZcWGQL/bDU04XWgW+H8RY4=", + "owner": "KZDKM", + "repo": "Hyprspace", + "rev": "1b3e07c7ac9ecb4e3486467a2bfb3267ee5043a2", + "type": "github" + }, + "original": { + "owner": "KZDKM", + "repo": "Hyprspace", + "type": "github" + } + }, + "anyrun": { + "inputs": { + "flake-parts": "flake-parts", + "nixpkgs": "nixpkgs" + }, + "locked": { + "lastModified": 1713259062, + "narHash": "sha256-WTO84hUL8IlNuHDK2yOCeJ38EewFzGt5E0kzBjNWxa8=", + "owner": "Kirottu", + "repo": "anyrun", + "rev": "f9d30e34fa4ccb2797c6becec37e8bcff6585d39", + "type": "github" + }, + "original": { + "owner": "Kirottu", + "repo": "anyrun", + "type": "github" + } + }, + "crane": { + "inputs": { + "nixpkgs": [ + "ironbar", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1713979152, + "narHash": "sha256-apdecPuh8SOQnkEET/kW/UcfjCRb8JbV5BKjoH+DcP4=", + "owner": "ipetkov", + "repo": "crane", + "rev": "a5eca68a2cf11adb32787fc141cddd29ac8eb79c", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": [ + "anyrun", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1696343447, + "narHash": "sha256-B2xAZKLkkeRFG5XcHHSXXcP7To9Xzr59KXeZiRf4vdQ=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "c9afaba3dfa4085dbd2ccb38dfade5141e33d9d4", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "inputs": { + "systems": "systems_2" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "flake-utils_2": { + "inputs": { + "systems": "systems_3" + }, + "locked": { + "lastModified": 1705309234, + "narHash": "sha256-uNRRNRKmJyCRC/8y1RqBkqWBLM034y4qN7EprSdmgyA=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "1ef2e671c3b0c19053962c07dbda38332dcebf26", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714900398, + "narHash": "sha256-H7XYHpjk1G6dkA3AnbYrKtaTFjcCE7ul6nUVlVQxtsA=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "fdaaf543bad047639ef0b356ea2e6caec2f1215c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "home-manager", + "type": "github" + } + }, + "hyprcursor": { + "inputs": { + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1713612213, + "narHash": "sha256-zJboXgWNpNhKyNF8H/3UYzWkx7w00TOCGKi3cwi+tsw=", + "owner": "hyprwm", + "repo": "hyprcursor", + "rev": "cab4746180f210a3c1dd3d53e45c510e309e90e1", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprcursor", + "type": "github" + } + }, + "hyprland": { + "inputs": { + "hyprcursor": "hyprcursor", + "hyprlang": "hyprlang", + "hyprwayland-scanner": "hyprwayland-scanner", + "nixpkgs": "nixpkgs_2", + "systems": "systems", + "xdph": "xdph" + }, + "locked": { + "lastModified": 1714915839, + "narHash": "sha256-HwrMGeMtYD2AXanipPSSzmc8IGZQsFVDotScXYztHNg=", + "ref": "refs/heads/main", + "rev": "589f758d947cb4e8b888d2da00076a9fb0a6d521", + "revCount": 4614, + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + }, + "original": { + "submodules": true, + "type": "git", + "url": "https://github.com/hyprwm/Hyprland" + } + }, + "hyprland-protocols": { + "inputs": { + "nixpkgs": [ + "hyprland", + "xdph", + "nixpkgs" + ], + "systems": [ + "hyprland", + "xdph", + "systems" + ] + }, + "locked": { + "lastModified": 1714869498, + "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=", + "owner": "hyprwm", + "repo": "hyprland-protocols", + "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprland-protocols", + "type": "github" + } + }, + "hyprlang": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1713121246, + "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprwayland-scanner": { + "inputs": { + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1714755542, + "narHash": "sha256-D0pg+ZRwrt4lavZ97Ca8clsgbPA3duLj8iEM7riaIFY=", + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "rev": "1270ebaa539e56d61b708c24b072b09cbbd3a828", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprwayland-scanner", + "type": "github" + } + }, + "ironbar": { + "inputs": { + "crane": "crane", + "naersk": "naersk", + "nixpkgs": "nixpkgs_4", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1714908696, + "narHash": "sha256-lNzG4jjWmo6zr3ZsurDGOf8PplzuKFYxR65sWZ+CkKY=", + "owner": "JakeStanger", + "repo": "ironbar", + "rev": "c08441eff44ede4febc28aafc306f1e9bede52b4", + "type": "github" + }, + "original": { + "owner": "JakeStanger", + "repo": "ironbar", + "type": "github" + } + }, + "naersk": { + "inputs": { + "nixpkgs": "nixpkgs_3" + }, + "locked": { + "lastModified": 1713520724, + "narHash": "sha256-CO8MmVDmqZX2FovL75pu5BvwhW+Vugc7Q6ze7Hj8heI=", + "owner": "nix-community", + "repo": "naersk", + "rev": "c5037590290c6c7dae2e42e7da1e247e54ed2d49", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "naersk", + "type": "github" + } + }, + "nix-flatpak": { + "locked": { + "lastModified": 1711997375, + "narHash": "sha256-KvU4gOtuFMS9Il67glRGtdNfguAINT9pCaXtvCL8uI8=", + "owner": "gmodena", + "repo": "nix-flatpak", + "rev": "45bf66f7068db79b552da864c0e87452be624d6c", + "type": "github" + }, + "original": { + "owner": "gmodena", + "repo": "nix-flatpak", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1696193975, + "narHash": "sha256-mnQjUcYgp9Guu3RNVAB2Srr1TqKcPpRXmJf4LJk6KRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "fdd898f8f79e8d2f99ed2ab6b3751811ef683242", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_2": { + "locked": { + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_3": { + "locked": { + "lastModified": 1714314149, + "narHash": "sha256-yNAevSKF4krRWacmLUsLK7D7PlfuY3zF0lYnGYNi9vQ=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "cf8cc1201be8bc71b7cbbbdaf349b22f4f99c7ae", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "type": "indirect" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1714253743, + "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_5": { + "locked": { + "lastModified": 1714763106, + "narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=", + "owner": "NixOs", + "repo": "nixpkgs", + "rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d", + "type": "github" + }, + "original": { + "owner": "NixOs", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_6": { + "locked": { + "lastModified": 1706487304, + "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "90f456026d284c22b3e3497be980b2e47d0b28ac", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "Hyprspace": "Hyprspace", + "anyrun": "anyrun", + "home-manager": "home-manager", + "hyprland": "hyprland", + "ironbar": "ironbar", + "nix-flatpak": "nix-flatpak", + "nixpkgs": "nixpkgs_5", + "rust-overlay": "rust-overlay_2" + } + }, + "rust-overlay": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "ironbar", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1714443211, + "narHash": "sha256-lKTA3XqRo4aVgkyTSCtpcALpGXdmkilHTtN00eRg0QU=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "ce35c36f58f82cee6ec959e0d44c587d64281b6f", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rust-overlay_2": { + "inputs": { + "flake-utils": "flake-utils_2", + "nixpkgs": "nixpkgs_6" + }, + "locked": { + "lastModified": 1714875369, + "narHash": "sha256-dyyJEHKbnz2sZcz9yVxOCE/085covNljWKeTCIcBfL0=", + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + }, + "original": { + "type": "tarball", + "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" + } + }, + "systems": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_2": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "xdph": { + "inputs": { + "hyprland-protocols": "hyprland-protocols", + "hyprlang": [ + "hyprland", + "hyprlang" + ], + "nixpkgs": [ + "hyprland", + "nixpkgs" + ], + "systems": [ + "hyprland", + "systems" + ] + }, + "locked": { + "lastModified": 1714060055, + "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "xdg-desktop-portal-hyprland", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/nix/flake.nix b/nix/flake.nix index 8aade6c..f213b00 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -4,30 +4,32 @@ inputs = { nixpkgs.url = "github:NixOs/nixpkgs/nixos-unstable"; + nix-flatpak = { url = "github:gmodena/nix-flatpak"; - #inputs.nixpkgs.follows = "nixpkgs"; }; + home-manager = { url = "github:nix-community/home-manager"; inputs.nixpkgs.follows = "nixpkgs"; }; + hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; - # inputs.nixpkgs.follows = "nixpkgs"; + Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; }; + ironbar = { url = "github:JakeStanger/ironbar"; - # inputs.nixpkgs.follows = "nixpkgs"; }; + rust-overlay = { url = "https://github.com/oxalica/rust-overlay/archive/master.tar.gz"; - # inputs.nixpkgs.follows = "nixpkgs"; }; + anyrun.url = "github:Kirottu/anyrun"; - # inputs.nixpkgs.follows = "nixpkgs"; }; outputs = { ... }@inputs: @@ -84,7 +86,7 @@ nixConfig = { builders-use-substitutes = true; - # substituters to use + extra-substituters = [ "https://hyprland.cachix.org" "https://anyrun.cachix.org" diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index c5b712f..a1a270d 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -243,15 +243,15 @@ "oxinoti" ] ++ config.programs.hyprland.extra_autostart; - plugin = { - hyprspace = { - bind = [ - "SUPER, W, overview:toggle, toggle" - ]; - }; - }; + #plugin = { + # hyprspace = { + # bind = [ + # "SUPER, W, overview:toggle, toggle" + # ]; + # }; + #}; }; - wayland.windowManager.hyprland.plugins = [ - inputs.Hyprspace.packages.${pkgs.system}.Hyprspace - ]; + #wayland.windowManager.hyprland.plugins = [ + # inputs.Hyprspace.packages.${pkgs.system}.Hyprspace + #]; } -- 2.51.2 From 319d99b6e02c24f7e1f397144e3895d0d97e2513 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Mon, 6 May 2024 20:54:33 +0200 Subject: [PATCH 06/10] reset: update version --- nix/override/reset.nix | 6 +++--- nix/programs/hyprland/config.nix | 1 + nix/programs/nvim/lua/plugins/plugins.lua | 3 +++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/nix/override/reset.nix b/nix/override/reset.nix index 603bc30..50f4f83 100644 --- a/nix/override/reset.nix +++ b/nix/override/reset.nix @@ -11,16 +11,16 @@ let in rustPlatform.buildRustPackage rec { pname = "reset"; - version = "1.1.1"; + version = "1.2.0"; src = fetchFromGitHub { owner = "Xetibo"; repo = "ReSet"; rev = "${version}"; - hash = "sha256-nyEGhD4IlsJ1AqRZC7aP2vOuq4etvZ7BwTMxb4u7cxY="; + hash = "sha256-6n7IaYQAw0VSkQFO1wXwQjuGbhvheiV6ZJDkpaEIeLU="; }; - cargoHash = "sha256-lcNu8yEQiSTshXCwblBLYpSJWmErS53z+SviqaqlSnI="; + cargoHash = "sha256-S3Z2tHQuv17Dvg2VMFDeOvDzyLfIPROcFMsYOoCscqM="; nativeBuildInputs = with pkgs;[ pkg-config diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index a1a270d..6031aff 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -168,6 +168,7 @@ swallow_regex = "^(.*)(kitty)(.*)$"; # conversion seems to be borked right now, i want a smooth bibata :( enable_hyprcursor = false; + initial_workspace_tracking = 2; }; gestures = { diff --git a/nix/programs/nvim/lua/plugins/plugins.lua b/nix/programs/nvim/lua/plugins/plugins.lua index 88d1824..8c0b441 100644 --- a/nix/programs/nvim/lua/plugins/plugins.lua +++ b/nix/programs/nvim/lua/plugins/plugins.lua @@ -191,6 +191,9 @@ return { view = { side = "right", }, + diagnostics = { + enable = true, + }, }) end, keys = { -- 2.51.2 From 7040d943cbdeb4f0b7d30f764c6106177da81fee Mon Sep 17 00:00:00 2001 From: DashieTM Date: Tue, 7 May 2024 12:27:23 +0200 Subject: [PATCH 07/10] chore: Add docker --- nix/base/base_packages.nix | 1 + nix/base/common_hardware.nix | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index ad9f400..d9899df 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -43,6 +43,7 @@ jdk zlib ]; + virtualisation.docker.enable = true; programs.dconf.enable = true; services.upower.enable = true; diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index 83b53a3..14879a7 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -51,7 +51,7 @@ users.users.dashie = { isNormalUser = true; description = "dashie"; - extraGroups = [ "networkmanager" "wheel" "gamemode" ]; + extraGroups = [ "networkmanager" "wheel" "gamemode" "docker" ]; packages = with pkgs; [ home-manager xdg-desktop-portal-gtk -- 2.51.2 From 45f6ade78c9656c88392c8962a6880bf5b4471d8 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 8 May 2024 16:08:46 +0200 Subject: [PATCH 08/10] marmo: add config --- nix/flake.lock | 36 +++++++++--------- nix/flake.nix | 5 ++- nix/hardware/marmo/base_config.nix | 13 ++++++- nix/hardware/marmo/configuration.nix | 10 ++++- nix/hardware/marmo/marmo.nix | 57 +++++++++++++++++++++++++++- nix/programs/hyprland/config.nix | 2 +- 6 files changed, 99 insertions(+), 24 deletions(-) diff --git a/nix/flake.lock b/nix/flake.lock index 7868d7b..8c947d3 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -124,11 +124,11 @@ ] }, "locked": { - "lastModified": 1714900398, - "narHash": "sha256-H7XYHpjk1G6dkA3AnbYrKtaTFjcCE7ul6nUVlVQxtsA=", + "lastModified": 1715077503, + "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", "owner": "nix-community", "repo": "home-manager", - "rev": "fdaaf543bad047639ef0b356ea2e6caec2f1215c", + "rev": "6e277d9566de9976f47228dd8c580b97488734d4", "type": "github" }, "original": { @@ -176,11 +176,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1714915839, - "narHash": "sha256-HwrMGeMtYD2AXanipPSSzmc8IGZQsFVDotScXYztHNg=", + "lastModified": 1715171420, + "narHash": "sha256-eMkwxLtoVHrIAJlb+xjA0jlFGqEweKwpzqY5uGhc2xA=", "ref": "refs/heads/main", - "rev": "589f758d947cb4e8b888d2da00076a9fb0a6d521", - "revCount": 4614, + "rev": "36d32973ddc1bd1d4096ec36f3b8cb507009eba4", + "revCount": 4635, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -255,11 +255,11 @@ ] }, "locked": { - "lastModified": 1714755542, - "narHash": "sha256-D0pg+ZRwrt4lavZ97Ca8clsgbPA3duLj8iEM7riaIFY=", + "lastModified": 1715090986, + "narHash": "sha256-FXpQvmS9R7alwZ47XK5UIcAbC9YKSxc0+GOVYqwa0jM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "1270ebaa539e56d61b708c24b072b09cbbd3a828", + "rev": "94e32ec37e7215b16d5c1b41b1773ff6742e704b", "type": "github" }, "original": { @@ -276,11 +276,11 @@ "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1714908696, - "narHash": "sha256-lNzG4jjWmo6zr3ZsurDGOf8PplzuKFYxR65sWZ+CkKY=", + "lastModified": 1715072077, + "narHash": "sha256-5QA9qCtxW6uikNI1+qaWALaf6gRhkHCCoVLthJMviIY=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "c08441eff44ede4febc28aafc306f1e9bede52b4", + "rev": "4695279d6927d05b6d3ed5a930e53f04d797c379", "type": "github" }, "original": { @@ -386,11 +386,11 @@ }, "nixpkgs_5": { "locked": { - "lastModified": 1714763106, - "narHash": "sha256-DrDHo74uTycfpAF+/qxZAMlP/Cpe04BVioJb6fdI0YY=", + "lastModified": 1714906307, + "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", "owner": "NixOs", "repo": "nixpkgs", - "rev": "e9be42459999a253a9f92559b1f5b72e1b44c13d", + "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", "type": "github" }, "original": { @@ -456,8 +456,8 @@ "nixpkgs": "nixpkgs_6" }, "locked": { - "lastModified": 1714875369, - "narHash": "sha256-dyyJEHKbnz2sZcz9yVxOCE/085covNljWKeTCIcBfL0=", + "lastModified": 1715134005, + "narHash": "sha256-oujsCgNiQnZoQntNkkNkA7BhCmUvf9FLWj+2oGT2Jvc=", "type": "tarball", "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" }, diff --git a/nix/flake.nix b/nix/flake.nix index f213b00..973d8ca 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -53,13 +53,14 @@ ]; in { - homeConfigurations."marmo" = inputs.home-manager.lib.homeManagerConfiguration { + nixosConfigurations."marmo" = inputs.nixpkgs.lib.nixosSystem { specialArgs = { inherit inputs pkgs; - mod = ./hardware/overheating/base_config.nix; + mod = ./hardware/marmo/base_config.nix; }; modules = [ ./hardware/marmo/default.nix + ./programs/gaming/default.nix ] ++ base_imports; }; nixosConfigurations."overheating" = inputs.nixpkgs.lib.nixosSystem { diff --git a/nix/hardware/marmo/base_config.nix b/nix/hardware/marmo/base_config.nix index ffcd441..2276588 100644 --- a/nix/hardware/marmo/base_config.nix +++ b/nix/hardware/marmo/base_config.nix @@ -1 +1,12 @@ -{ } +{ + imports = [ + ../../modules + ]; + wayland.windowManager.hyprland.settings.monitor = [ + # default + "DP-1,1920x1080@144,0x0,1" + # all others + ",highrr,auto,1" + ]; + programs.ironbar.monitor = "DP-1"; +} diff --git a/nix/hardware/marmo/configuration.nix b/nix/hardware/marmo/configuration.nix index ffcd441..735ca77 100644 --- a/nix/hardware/marmo/configuration.nix +++ b/nix/hardware/marmo/configuration.nix @@ -1 +1,9 @@ -{ } +{ pkgs, ... }: +{ + boot.kernelPackages = pkgs.linuxPackages_zen; + boot.kernelParams = [ + "amdgpu.ppfeaturemask=0xffffffff" + ]; + networking.hostName = "marmo"; + +} diff --git a/nix/hardware/marmo/marmo.nix b/nix/hardware/marmo/marmo.nix index ffcd441..7e76815 100644 --- a/nix/hardware/marmo/marmo.nix +++ b/nix/hardware/marmo/marmo.nix @@ -1 +1,56 @@ -{ } +{ config, lib, modulesPath, ... }: +{ + imports = + [ + (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + }; + + fileSystems."/home" = + { + device = "/dev/disk/by-label/HOME"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + swapDevices = + [{ device = "/dev/disk/by-label/SWAP"; }]; + + # Enables DHCP on each ethernet and wireless interface. In case of scripted networking + # (the default) this is the recommended approach. When using systemd-networkd it's + # still possible to use this option, but it's recommended to use it in conjunction + # with explicit per-interface declarations with `networking.interfaces..useDHCP`. + networking.useDHCP = lib.mkDefault true; + # networking.interfaces.enp15s0.useDHCP = lib.mkDefault true; + # networking.interfaces.wlp16s0.useDHCP = lib.mkDefault true; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; + services.fstrim.enable = lib.mkDefault true; + nix.settings.auto-optimise-store = true; +} diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index 6031aff..73fcbed 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -168,7 +168,7 @@ swallow_regex = "^(.*)(kitty)(.*)$"; # conversion seems to be borked right now, i want a smooth bibata :( enable_hyprcursor = false; - initial_workspace_tracking = 2; + initial_workspace_tracking = 1; }; gestures = { -- 2.51.2 From 52d35e019d94608bd021a291881812df43021b41 Mon Sep 17 00:00:00 2001 From: DashieTM Date: Wed, 8 May 2024 17:19:40 +0200 Subject: [PATCH 09/10] gamemode: Add configuration for gpu card --- nix/base/base_packages.nix | 3 --- nix/hardware/marmo/configuration.nix | 7 ++++++- nix/hardware/spaceship/configuration.nix | 7 +++++++ nix/modules/gamemode.nix | 11 +++++++++++ nix/programs/gaming/default.nix | 3 ++- 5 files changed, 26 insertions(+), 5 deletions(-) create mode 100644 nix/modules/gamemode.nix diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index d9899df..502e6de 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -76,7 +76,4 @@ }; programs.ssh.startAgent = true; - virtualisation.virtualbox.host.enable = true; - users.extraGroups.vboxusers.members = [ "dashie" ]; - virtualisation.virtualbox.guest.enable = true; } diff --git a/nix/hardware/marmo/configuration.nix b/nix/hardware/marmo/configuration.nix index 735ca77..e7188c9 100644 --- a/nix/hardware/marmo/configuration.nix +++ b/nix/hardware/marmo/configuration.nix @@ -1,9 +1,14 @@ { pkgs, ... }: { + imports = [ + ../../modules/gamemode.nix + ]; boot.kernelPackages = pkgs.linuxPackages_zen; boot.kernelParams = [ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "marmo"; - + programs.gamemode = { + device = 1; + }; } diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index c99eed4..6a5f078 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -6,7 +6,14 @@ ]; networking.hostName = "spaceship"; + programs.gamemode = { + device = 0; + }; environment.systemPackages = with pkgs; [ linuxKernel.packages.linux_zen.virtualbox ]; + + virtualisation.virtualbox.host.enable = true; + users.extraGroups.vboxusers.members = [ "dashie" ]; + virtualisation.virtualbox.guest.enable = true; } diff --git a/nix/modules/gamemode.nix b/nix/modules/gamemode.nix new file mode 100644 index 0000000..220dcef --- /dev/null +++ b/nix/modules/gamemode.nix @@ -0,0 +1,11 @@ +{ lib, ... }: { + options.programs.gamemode = { + device = lib.mkOption { + default = 0; + example = 0; + description = '' + GPU device number + ''; + }; + }; +} diff --git a/nix/programs/gaming/default.nix b/nix/programs/gaming/default.nix index 60f705c..0e0d07b 100644 --- a/nix/programs/gaming/default.nix +++ b/nix/programs/gaming/default.nix @@ -1,4 +1,5 @@ { pkgs +, config , ... }: { imports = [ @@ -24,7 +25,7 @@ }; gpu = { apply_gpu_optimisations = "accept-responsibility"; - gpu_device = 0; + gpu_device = config.programs.gamemode.device; amd_performance_level = "high"; }; custom = { -- 2.51.2 From 4d957a817a562c37539a8815eca2dd5ddda0fc9b Mon Sep 17 00:00:00 2001 From: DashieTM Date: Sun, 12 May 2024 23:29:35 +0200 Subject: [PATCH 10/10] greetd: use proper package for greetd --- nix/base/base_packages.nix | 1 - nix/base/common_hardware.nix | 40 ++++- nix/base/login_manager.nix | 92 +++++----- nix/flake.lock | 169 +++++++++++++----- nix/flake.nix | 2 + nix/hardware/marmo/configuration.nix | 3 +- nix/hardware/marmo/marmo.nix | 33 ---- nix/hardware/overheating/overheating.nix | 33 ---- nix/hardware/spaceship/configuration.nix | 34 +++- nix/hardware/spaceship/spaceship.nix | 34 ---- nix/modules/boot_params.nix | 11 ++ nix/programs/coding.nix | 53 ++++-- nix/programs/common.nix | 5 +- nix/programs/default.nix | 39 +++-- nix/programs/flatpak.nix | 6 +- nix/programs/gaming/default.nix | 2 +- nix/programs/hyprland/config.nix | 9 +- nix/programs/hyprland/default.nix | 11 +- nix/programs/hyprland/hyprgreet.nix | 23 --- nix/programs/hyprland/hyprlock.nix | 37 ++++ nix/programs/media.nix | 7 +- nix/programs/themes/gtk4.nix | 210 +++++++++++------------ nix/programs/themes/qt.nix | 3 - 23 files changed, 484 insertions(+), 373 deletions(-) create mode 100644 nix/modules/boot_params.nix delete mode 100644 nix/programs/hyprland/hyprgreet.nix create mode 100644 nix/programs/hyprland/hyprlock.nix diff --git a/nix/base/base_packages.nix b/nix/base/base_packages.nix index 502e6de..ebde6aa 100644 --- a/nix/base/base_packages.nix +++ b/nix/base/base_packages.nix @@ -1,5 +1,4 @@ { config, pkgs, ... }: - { environment.systemPackages = with pkgs; [ openssl diff --git a/nix/base/common_hardware.nix b/nix/base/common_hardware.nix index 14879a7..d514dc0 100644 --- a/nix/base/common_hardware.nix +++ b/nix/base/common_hardware.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, config, ... }: { # Bootloader. boot.loader.systemd-boot.enable = true; @@ -55,7 +55,6 @@ packages = with pkgs; [ home-manager xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland ]; # this password will only last for the first login # e.g. login, then change to whatever else, this also ensures no public hash is available @@ -63,4 +62,41 @@ }; system.stateVersion = "unstable"; + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + + fileSystems."/" = + { + device = "/dev/disk/by-label/ROOT"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + fileSystems."/boot" = + { + device = "/dev/disk/by-label/BOOT"; + fsType = "vfat"; + options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; + }; + + fileSystems."/home" = + { + device = "/dev/disk/by-label/HOME"; + fsType = "btrfs"; + options = [ + "noatime" + "nodiratime" + "discard" + ]; + }; + + swapDevices = + [{ device = "/dev/disk/by-label/SWAP"; }]; + + boot.kernelParams = [ + "resume=\"PARTLABEL=SWAP\"" + ] ++ config.programs.boot.boot_params; } diff --git a/nix/base/login_manager.nix b/nix/base/login_manager.nix index 826d19c..34d3280 100644 --- a/nix/base/login_manager.nix +++ b/nix/base/login_manager.nix @@ -1,53 +1,65 @@ -{ pkgs +{ inputs +, lib +, config +, pkgs , ... -}: { - # greetd display manager - services.greetd = - let - session = { - command = "${pkgs.hyprland}/bin/Hyprland --config /home/dashie/.config/hypr/hyprgreet.conf"; - user = "dashie"; - }; - in +}: +let + regreet_override = pkgs.greetd.regreet.overrideAttrs (final: prev: { + SESSION_DIRS = "${config.services.xserver.displayManager.sessionData.desktops}/share"; + }); + session = { + command = "${lib.getExe pkgs.hyprland} --config /etc/greetd/hyprgreet.conf"; + user = "dashie"; + }; +in +{ + imports = [ + inputs.hyprland.nixosModules.default + ]; + + services.xserver.displayManager.session = [ { - enable = true; - settings = { - terminal.vt = 1; - default_session = session; - initial_session = session; - }; - }; - programs.regreet = { + manage = "desktop"; + name = "Hyprland"; + start = '' + ${lib.getExe pkgs.hyprland} & waitPID=$! + ''; + } + ]; + + # greetd display manager + programs.hyprland.enable = true; + services.greetd = { enable = true; settings = { - - background = { - fit = "Contain"; - }; - - env = { - QT_QPA_PLATFORMTHEME = "qt5ct"; - PATH = "/home/dashie/.cargo/bin:PATH"; - }; - - GTK = { - application_prefer_dark_theme = true; - cursor_theme_name = "Adwaita"; - icon_theme_name = "Adwaita"; - theme_name = "adw-gtk3"; - - command = { - reboot = [ "systemctl" "reboot" ]; - - poweroff = [ "systemctl" "poweroff" ]; - }; - }; + terminal.vt = 1; + default_session = session; }; }; + environment.etc."greetd/environments".text = '' Hyprland ''; + environment.etc."greetd/hyprgreet.conf".text = '' + exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' + + monitor=${config.programs.ironbar.monitor},3440x1440@180,0x0,1 + monitor=_,disable + + input { + force_no_accel = true + } + + misc { + disable_splash_rendering = true + disable_hyprland_logo = true + } + + exec-once=regreet --style /home/dashie/.config/gtk-3.0/gtk.css; hyprctl dispatch exit + ''; + # unlock GPG keyring on login security.pam.services.greetd.enableGnomeKeyring = true; } diff --git a/nix/flake.lock b/nix/flake.lock index 8c947d3..42051be 100644 --- a/nix/flake.lock +++ b/nix/flake.lock @@ -7,11 +7,11 @@ ] }, "locked": { - "lastModified": 1714860465, - "narHash": "sha256-yFR9gBqvuvN5eYjeV3/luZcWGQL/bDU04XWgW+H8RY4=", + "lastModified": 1715376791, + "narHash": "sha256-QKecFhWAB7sagSE+FXztINDqYqLro2nYp94f+ZtE/f4=", "owner": "KZDKM", "repo": "Hyprspace", - "rev": "1b3e07c7ac9ecb4e3486467a2bfb3267ee5043a2", + "rev": "8049b2794ca19d49320093426677d8c2911e7327", "type": "github" }, "original": { @@ -83,7 +83,7 @@ }, "flake-utils": { "inputs": { - "systems": "systems_2" + "systems": "systems_4" }, "locked": { "lastModified": 1705309234, @@ -101,7 +101,7 @@ }, "flake-utils_2": { "inputs": { - "systems": "systems_3" + "systems": "systems_5" }, "locked": { "lastModified": 1705309234, @@ -124,11 +124,11 @@ ] }, "locked": { - "lastModified": 1715077503, - "narHash": "sha256-AfHQshzLQfUqk/efMtdebHaQHqVntCMjhymQzVFLes0=", + "lastModified": 1715380449, + "narHash": "sha256-716+f9Rj3wjSyD1xitCv2FcYbgPz1WIVDj+ZBclH99Y=", "owner": "nix-community", "repo": "home-manager", - "rev": "6e277d9566de9976f47228dd8c580b97488734d4", + "rev": "d7682620185f213df384c363288093b486b2883f", "type": "github" }, "original": { @@ -176,11 +176,11 @@ "xdph": "xdph" }, "locked": { - "lastModified": 1715171420, - "narHash": "sha256-eMkwxLtoVHrIAJlb+xjA0jlFGqEweKwpzqY5uGhc2xA=", + "lastModified": 1715448710, + "narHash": "sha256-ntVaQOHnfejEiqHUY07kWrytdXVlXtg1RLv65T9w2/c=", "ref": "refs/heads/main", - "rev": "36d32973ddc1bd1d4096ec36f3b8cb507009eba4", - "revCount": 4635, + "rev": "494b9415a1157279a1e1782ba635fc2ef6a18155", + "revCount": 4668, "submodules": true, "type": "git", "url": "https://github.com/hyprwm/Hyprland" @@ -205,11 +205,11 @@ ] }, "locked": { - "lastModified": 1714869498, - "narHash": "sha256-vbLVOWvQqo4n1yvkg/Q70VTlPbMmTiCQfNTgcWDCfJM=", + "lastModified": 1691753796, + "narHash": "sha256-zOEwiWoXk3j3+EoF3ySUJmberFewWlagvewDRuWYAso=", "owner": "hyprwm", "repo": "hyprland-protocols", - "rev": "e06482e0e611130cd1929f75e8c1cf679e57d161", + "rev": "0c2ce70625cb30aef199cb388f99e19a61a6ce03", "type": "github" }, "original": { @@ -243,6 +243,48 @@ "type": "github" } }, + "hyprlang_2": { + "inputs": { + "nixpkgs": [ + "hyprlock", + "nixpkgs" + ], + "systems": "systems_2" + }, + "locked": { + "lastModified": 1713121246, + "narHash": "sha256-502X0Q0fhN6tJK7iEUA8CghONKSatW/Mqj4Wappd++0=", + "owner": "hyprwm", + "repo": "hyprlang", + "rev": "78fcaa27ae9e1d782faa3ff06c8ea55ddce63706", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlang", + "type": "github" + } + }, + "hyprlock": { + "inputs": { + "hyprlang": "hyprlang_2", + "nixpkgs": "nixpkgs_3", + "systems": "systems_3" + }, + "locked": { + "lastModified": 1714843107, + "narHash": "sha256-89WxndRGO3CGuWE5XCaHKnsV3IKBRdOWqScp6o8enT4=", + "owner": "hyprwm", + "repo": "hyprlock", + "rev": "c87af3aa1f6e6bd06cffaabcc400bd45e26d565a", + "type": "github" + }, + "original": { + "owner": "hyprwm", + "repo": "hyprlock", + "type": "github" + } + }, "hyprwayland-scanner": { "inputs": { "nixpkgs": [ @@ -255,11 +297,11 @@ ] }, "locked": { - "lastModified": 1715090986, - "narHash": "sha256-FXpQvmS9R7alwZ47XK5UIcAbC9YKSxc0+GOVYqwa0jM=", + "lastModified": 1715287423, + "narHash": "sha256-B7AJIjOyWgVMKhu7DlOnWa0VprdhywUVHuB/j+EwSxM=", "owner": "hyprwm", "repo": "hyprwayland-scanner", - "rev": "94e32ec37e7215b16d5c1b41b1773ff6742e704b", + "rev": "e2fc1c0eb8b392110588f478cce644348ead7271", "type": "github" }, "original": { @@ -272,15 +314,15 @@ "inputs": { "crane": "crane", "naersk": "naersk", - "nixpkgs": "nixpkgs_4", + "nixpkgs": "nixpkgs_5", "rust-overlay": "rust-overlay" }, "locked": { - "lastModified": 1715072077, - "narHash": "sha256-5QA9qCtxW6uikNI1+qaWALaf6gRhkHCCoVLthJMviIY=", + "lastModified": 1715272723, + "narHash": "sha256-/pHq16sUYKOpwtSDDlnQ3M3lBy9abQq39UNSzadFd8w=", "owner": "JakeStanger", "repo": "ironbar", - "rev": "4695279d6927d05b6d3ed5a930e53f04d797c379", + "rev": "386955c1ea07869277b646c203f7b976d83db427", "type": "github" }, "original": { @@ -291,7 +333,7 @@ }, "naersk": { "inputs": { - "nixpkgs": "nixpkgs_3" + "nixpkgs": "nixpkgs_4" }, "locked": { "lastModified": 1713520724, @@ -340,11 +382,11 @@ }, "nixpkgs_2": { "locked": { - "lastModified": 1714253743, - "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", + "lastModified": 1715087517, + "narHash": "sha256-CLU5Tsg24Ke4+7sH8azHWXKd0CFd4mhLWfhYgUiDBpQ=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "58a1abdbae3217ca6b702f03d3b35125d88a2994", + "rev": "b211b392b8486ee79df6cdfb1157ad2133427a29", "type": "github" }, "original": { @@ -355,6 +397,22 @@ } }, "nixpkgs_3": { + "locked": { + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { "locked": { "lastModified": 1714314149, "narHash": "sha256-yNAevSKF4krRWacmLUsLK7D7PlfuY3zF0lYnGYNi9vQ=", @@ -368,7 +426,7 @@ "type": "indirect" } }, - "nixpkgs_4": { + "nixpkgs_5": { "locked": { "lastModified": 1714253743, "narHash": "sha256-mdTQw2XlariysyScCv2tTE45QSU9v/ezLcHJ22f0Nxc=", @@ -384,13 +442,13 @@ "type": "github" } }, - "nixpkgs_5": { + "nixpkgs_6": { "locked": { - "lastModified": 1714906307, - "narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=", + "lastModified": 1715266358, + "narHash": "sha256-doPgfj+7FFe9rfzWo1siAV2mVCasW+Bh8I1cToAXEE4=", "owner": "NixOs", "repo": "nixpkgs", - "rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588", + "rev": "f1010e0469db743d14519a1efd37e23f8513d714", "type": "github" }, "original": { @@ -400,7 +458,7 @@ "type": "github" } }, - "nixpkgs_6": { + "nixpkgs_7": { "locked": { "lastModified": 1706487304, "narHash": "sha256-LE8lVX28MV2jWJsidW13D2qrHU/RUUONendL2Q/WlJg=", @@ -422,9 +480,10 @@ "anyrun": "anyrun", "home-manager": "home-manager", "hyprland": "hyprland", + "hyprlock": "hyprlock", "ironbar": "ironbar", "nix-flatpak": "nix-flatpak", - "nixpkgs": "nixpkgs_5", + "nixpkgs": "nixpkgs_6", "rust-overlay": "rust-overlay_2" } }, @@ -453,11 +512,11 @@ "rust-overlay_2": { "inputs": { "flake-utils": "flake-utils_2", - "nixpkgs": "nixpkgs_6" + "nixpkgs": "nixpkgs_7" }, "locked": { - "lastModified": 1715134005, - "narHash": "sha256-oujsCgNiQnZoQntNkkNkA7BhCmUvf9FLWj+2oGT2Jvc=", + "lastModified": 1715393623, + "narHash": "sha256-nSUFcUqyTQQ/aYFIB05mpCzytcKvfKMy3ZQAe0fP26A=", "type": "tarball", "url": "https://github.com/oxalica/rust-overlay/archive/master.tar.gz" }, @@ -482,6 +541,36 @@ } }, "systems_2": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_3": { + "locked": { + "lastModified": 1689347949, + "narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=", + "owner": "nix-systems", + "repo": "default-linux", + "rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default-linux", + "type": "github" + } + }, + "systems_4": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -496,7 +585,7 @@ "type": "github" } }, - "systems_3": { + "systems_5": { "locked": { "lastModified": 1681028828, "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", @@ -528,11 +617,11 @@ ] }, "locked": { - "lastModified": 1714060055, - "narHash": "sha256-j43TS9wv9luaAlpxcxw0sjxkbcc2mGANVR2RYgo3RCw=", + "lastModified": 1714662532, + "narHash": "sha256-Pj2xGSYhapYbXL7sk7TTlOtCZcTfPQoL3fPbZeg7L4Y=", "owner": "hyprwm", "repo": "xdg-desktop-portal-hyprland", - "rev": "0fe840441e43da12cd7865ed9aa8cdc35a8da85a", + "rev": "1f228ba2f1f254195c0b571302b37482861abee3", "type": "github" }, "original": { diff --git a/nix/flake.nix b/nix/flake.nix index 973d8ca..58f47c2 100644 --- a/nix/flake.nix +++ b/nix/flake.nix @@ -16,6 +16,8 @@ hyprland.url = "git+https://github.com/hyprwm/Hyprland?submodules=1"; + hyprlock.url = "github:hyprwm/hyprlock"; + Hyprspace = { url = "github:KZDKM/Hyprspace"; inputs.hyprland.follows = "hyprland"; diff --git a/nix/hardware/marmo/configuration.nix b/nix/hardware/marmo/configuration.nix index e7188c9..89ca0f6 100644 --- a/nix/hardware/marmo/configuration.nix +++ b/nix/hardware/marmo/configuration.nix @@ -2,9 +2,10 @@ { imports = [ ../../modules/gamemode.nix + ../../modules/boot_params.nix ]; boot.kernelPackages = pkgs.linuxPackages_zen; - boot.kernelParams = [ + programs.boot.boot_params = [ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "marmo"; diff --git a/nix/hardware/marmo/marmo.nix b/nix/hardware/marmo/marmo.nix index 7e76815..3969c18 100644 --- a/nix/hardware/marmo/marmo.nix +++ b/nix/hardware/marmo/marmo.nix @@ -5,42 +5,9 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/hardware/overheating/overheating.nix b/nix/hardware/overheating/overheating.nix index 6371d50..e30f979 100644 --- a/nix/hardware/overheating/overheating.nix +++ b/nix/hardware/overheating/overheating.nix @@ -5,43 +5,10 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/hardware/spaceship/configuration.nix b/nix/hardware/spaceship/configuration.nix index 6a5f078..a13352f 100644 --- a/nix/hardware/spaceship/configuration.nix +++ b/nix/hardware/spaceship/configuration.nix @@ -1,7 +1,12 @@ -{ pkgs, ... }: +{ pkgs, lib, ... }: { - boot.kernelPackages = pkgs.linuxPackages_zen; - boot.kernelParams = [ + imports = [ + ../../modules/gamemode.nix + ../../modules/boot_params.nix + ../../modules/ironbar_config.nix + ]; + boot.kernelPackages = pkgs.linuxPackages_xanmod_latest; + programs.boot.boot_params = [ "amdgpu.ppfeaturemask=0xffffffff" ]; networking.hostName = "spaceship"; @@ -9,11 +14,22 @@ programs.gamemode = { device = 0; }; - environment.systemPackages = with pkgs; [ - linuxKernel.packages.linux_zen.virtualbox - ]; - - virtualisation.virtualbox.host.enable = true; users.extraGroups.vboxusers.members = [ "dashie" ]; - virtualisation.virtualbox.guest.enable = true; + virtualisation.virtualbox.host.enable = true; + + # enable hardware acceleration and rocm + hardware.xone.enable = true; + hardware.opengl.extraPackages = with pkgs; [ + libvdpau-va-gl + vaapiVdpau + rocmPackages.clr.icd + rocm-opencl-runtime + ]; + hardware.opengl = { + enable = true; + driSupport = lib.mkDefault true; + driSupport32Bit = lib.mkDefault true; + }; + boot.initrd.kernelModules = [ "amdgpu" ]; + programs.ironbar.monitor = "DP-1"; } diff --git a/nix/hardware/spaceship/spaceship.nix b/nix/hardware/spaceship/spaceship.nix index a38ae70..43ae303 100644 --- a/nix/hardware/spaceship/spaceship.nix +++ b/nix/hardware/spaceship/spaceship.nix @@ -5,40 +5,10 @@ (modulesPath + "/installer/scan/not-detected.nix") ]; - boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.kernelModules = [ ]; boot.kernelModules = [ "kvm-amd" ]; boot.extraModulePackages = [ ]; - fileSystems."/" = - { - device = "/dev/disk/by-label/ROOT"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - - fileSystems."/boot" = - { - device = "/dev/disk/by-label/BOOT"; - fsType = "vfat"; - options = [ "rw" "fmask=0022" "dmask=0022" "noatime" ]; - }; - - fileSystems."/home" = - { - device = "/dev/disk/by-label/HOME"; - fsType = "btrfs"; - options = [ - "noatime" - "nodiratime" - "discard" - ]; - }; - fileSystems."/drive2" = { device = "/dev/disk/by-label/DRIVE2"; @@ -50,10 +20,6 @@ ]; }; - - swapDevices = - [{ device = "/dev/disk/by-label/SWAP"; }]; - # Enables DHCP on each ethernet and wireless interface. In case of scripted networking # (the default) this is the recommended approach. When using systemd-networkd it's # still possible to use this option, but it's recommended to use it in conjunction diff --git a/nix/modules/boot_params.nix b/nix/modules/boot_params.nix new file mode 100644 index 0000000..6df3ee5 --- /dev/null +++ b/nix/modules/boot_params.nix @@ -0,0 +1,11 @@ +{ lib, ... }: { + options.programs.boot = { + boot_params = lib.mkOption { + default = [ ]; + example = [ "resume=something" ]; + description = '' + Boot params + ''; + }; + }; +} diff --git a/nix/programs/coding.nix b/nix/programs/coding.nix index c7658d6..16edde3 100644 --- a/nix/programs/coding.nix +++ b/nix/programs/coding.nix @@ -7,33 +7,62 @@ ]; home.packages = with pkgs; [ + #basics git gcc meson ninja - rustup - go - nodejs_20 - deno - python3 - typst - typst-lsp - typstfmt - neovide tree-sitter - dotnet-sdk unzip pkg-config sqlite plantuml + d-spy + + #editors + neovide + ##fallback vscodium + + #rust + rustup + + #python + python3 + python312Packages.python-lsp-server + python312Packages.python-lsp-ruff + python312Packages.python-lsp-black + + #ts/js + nodejs_20 + deno + typescript + nodePackages.typescript-language-server + nodePackages.prettier + + #go + go + gopls + + #typst + typst + typst-lsp + typstfmt + ltex-ls + + #java gradle maven jdt-language-server adoptopenjdk-jre-bin + + #.! + dotnet-sdk_8 omnisharp-roslyn csharpier - #vscode-extensions.vscjava.vscode-java-test - #vscode-extensions.vscjava.vscode-java-debug + + #zig + zig + zls ]; } diff --git a/nix/programs/common.nix b/nix/programs/common.nix index 0c466b4..b4f59d3 100644 --- a/nix/programs/common.nix +++ b/nix/programs/common.nix @@ -26,8 +26,6 @@ in flatpak networkmanager zoxide - pkgs.greetd.greetd - pkgs.greetd.regreet fastfetch pkgs.gnome.gnome-keyring dbus @@ -42,12 +40,13 @@ in zenith nh amberol - satty pulseaudio playerctl ncspot poppler_utils neofetch + brave + greetd.regreet (callPackage ../override/oxinoti.nix { }) diff --git a/nix/programs/default.nix b/nix/programs/default.nix index 6fcf858..1418c7b 100644 --- a/nix/programs/default.nix +++ b/nix/programs/default.nix @@ -2,19 +2,10 @@ let base_imports = [ inputs.hyprland.homeManagerModules.default + inputs.hyprlock.homeManagerModules.default inputs.anyrun.homeManagerModules.default inputs.ironbar.homeManagerModules.default inputs.nix-flatpak.homeManagerModules.nix-flatpak - ./hyprland/default.nix - ./flatpak.nix - ./common.nix - ./coding.nix - ./xdg.nix - ./media.nix - ./utils.nix - ./oxi/default.nix - ./themes/default.nix - ./individual_configs/default.nix ]; in { @@ -22,16 +13,30 @@ in xdg.portal = { enable = true; extraPortals = [ - pkgs.xdg-desktop-portal-hyprland pkgs.xdg-desktop-portal-gtk ]; }; home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.dashie.imports = [ - { - _module = { args = { inherit inputs; }; }; - } - mod - ] ++ base_imports; + + home-manager.users.dashie = { + #home-manager overlap -> use flake instead + disabledModules = [ "programs/hyprlock.nix" ]; + imports = [ + { + _module = { args = { inherit inputs; }; }; + } + ./hyprland/default.nix + ./flatpak.nix + ./common.nix + ./coding.nix + ./xdg.nix + ./media.nix + ./utils.nix + ./oxi/default.nix + ./themes/default.nix + ./individual_configs/default.nix + mod + ] ++ base_imports; + }; } diff --git a/nix/programs/flatpak.nix b/nix/programs/flatpak.nix index 1e1551b..4abc89d 100644 --- a/nix/programs/flatpak.nix +++ b/nix/programs/flatpak.nix @@ -6,13 +6,9 @@ }]; services.flatpak.uninstallUnmanaged = true; services.flatpak.packages = [ + # fallback if necessary, but generally avoided as nix is superior :) "com.github.tchx84.Flatseal" "io.github.Foldex.AdwSteamGtk" - "org.gnome.dspy" - "org.onlyoffice.desktopeditors" - "org.gtk.Gtk3theme.adw-gtk3" - "com.brave.Browser" - "com.rustdesk.RustDesk" ]; } diff --git a/nix/programs/gaming/default.nix b/nix/programs/gaming/default.nix index 0e0d07b..5216390 100644 --- a/nix/programs/gaming/default.nix +++ b/nix/programs/gaming/default.nix @@ -12,9 +12,9 @@ steam lutris wine + adwsteamgtk ]; - hardware.xone.enable = true; programs.steam.enable = true; programs.gamemode.enable = true; programs.gamemode = { diff --git a/nix/programs/hyprland/config.nix b/nix/programs/hyprland/config.nix index 73fcbed..f3ab6b6 100644 --- a/nix/programs/hyprland/config.nix +++ b/nix/programs/hyprland/config.nix @@ -30,7 +30,7 @@ "$mod SUPER,G,exec,oxicalc" "$mod SUPER,D,exec,oxishut" "$mod SUPER,A,exec,oxipaste" - "$mod SUPERSHIFT,L,exec, playerctl -a pause & swaylock -c 000000 & systemctl suspend" + "$mod SUPERSHIFT,L,exec, playerctl -a pause & hyprlock & systemctl hibernate" # media keys ",XF86AudioMute,exec, $HOME/.config/scripts/audio_control.sh mute" @@ -166,9 +166,12 @@ disable_splash_rendering = true; disable_hyprland_logo = true; swallow_regex = "^(.*)(kitty)(.*)$"; + initial_workspace_tracking = 1; + }; + + cursor = { # conversion seems to be borked right now, i want a smooth bibata :( enable_hyprcursor = false; - initial_workspace_tracking = 1; }; gestures = { @@ -186,7 +189,7 @@ "XCURSOR_THEME,Bibata-Modern-Classic" "XCURSOR_SIZE,24" "QT_QPA_PLATFORM,wayland" - "QT_QPA_PLATFORMTHEME = \"qt5ct\"" + "QT_QPA_PLATFORMTHEME,qt5ct" "QT_WAYLAND_FORCE_DPI,96" "QT_AUTO_SCREEN_SCALE_FACTOR,0" "QT_WAYLAND_DISABLE_WINDOWDECORATION,1" diff --git a/nix/programs/hyprland/default.nix b/nix/programs/hyprland/default.nix index 8b9fcd8..6a444ca 100644 --- a/nix/programs/hyprland/default.nix +++ b/nix/programs/hyprland/default.nix @@ -1,4 +1,5 @@ -{ pkgs +{ inputs +, pkgs , ... }: { imports = [ @@ -6,22 +7,20 @@ ./config.nix ./ironbar.nix ./hyprpaper.nix - ./hyprgreet.nix + ./hyprlock.nix ]; home.packages = with pkgs; [ xorg.xprop grim slurp - swappy + satty xdg-desktop-portal-gtk - xdg-desktop-portal-hyprland - hyprpaper + # xdg-desktop-portal-hyprland copyq gnome.nautilus gnome.sushi wl-clipboard - kooha hyprcursor hyprpaper hyprpicker diff --git a/nix/programs/hyprland/hyprgreet.nix b/nix/programs/hyprland/hyprgreet.nix deleted file mode 100644 index c3011d2..0000000 --- a/nix/programs/hyprland/hyprgreet.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - xdg.configFile."hypr/hyprgreet.conf" = { - text = - '' - exec-once=gsettings set org.gnome.desktop.interface color-scheme 'prefer-dark' - - monitor=DP-1,3440x1440@180,0x0,1 - monitor=DP-2,disable - monitor=HDMI-A-1,disable - - input { - force_no_accel = true - } - - misc { - disable_splash_rendering = true - disable_hyprland_logo = true - } - - exec-once=regreet --style /home/dashie/.config/gtk-3.0/gtk.css; hyprctl dispatch exit - ''; - }; -} diff --git a/nix/programs/hyprland/hyprlock.nix b/nix/programs/hyprland/hyprlock.nix new file mode 100644 index 0000000..99ed9d9 --- /dev/null +++ b/nix/programs/hyprland/hyprlock.nix @@ -0,0 +1,37 @@ +{ pkgs +, inputs +, config +, ... +}: +{ + programs.hyprlock.enable = true; + programs.hyprlock = { + + backgrounds = [ + { + monitor = ""; + path = ""; + color = "rgba(26, 27, 38, 1.0)"; + } + ]; + + input-fields = [ + { + monitor = "${config.programs.ironbar.monitor}"; + + placeholder_text = "password or something"; + } + ]; + + labels = [ + { + monitor = ""; + text = "$TIME"; + font_size = 50; + valign = "center"; + halign = "center"; + } + ]; + + }; +} diff --git a/nix/programs/media.nix b/nix/programs/media.nix index 7fc5c33..8f6dc12 100644 --- a/nix/programs/media.nix +++ b/nix/programs/media.nix @@ -14,6 +14,7 @@ zathura evince libreoffice-fresh + onlyoffice-bin pdftk # spotify #ncspot @@ -23,7 +24,9 @@ inkscape gimp krita - # recording - obs-studio + ]; + programs.obs-studio.enable = true; + programs.obs-studio.plugins = with pkgs; [ + obs-studio-plugins.obs-vaapi ]; } diff --git a/nix/programs/themes/gtk4.nix b/nix/programs/themes/gtk4.nix index 2884504..e9caa0a 100644 --- a/nix/programs/themes/gtk4.nix +++ b/nix/programs/themes/gtk4.nix @@ -1,109 +1,109 @@ { # TODO: reenable this again # right now its broken because flatpak... - # xdg.configFile."gtk-4.0/gtk.css" = { - # text = - # '' - # /* - # Generated with Gradience - # - # Issues caused by theming should be reported to Gradience repository, and not to upstream - # - # https://github.com/GradienceTeam/Gradience - # */ - # - # @define-color accent_color #a9b1d6; - # @define-color accent_bg_color #a9b1d6; - # @define-color accent_fg_color rgba(0, 0, 0, 0.87); - # @define-color destructive_color #F28B82; - # @define-color destructive_bg_color #F28B82; - # @define-color destructive_fg_color rgba(0, 0, 0, 0.87); - # @define-color success_color #81C995; - # @define-color success_bg_color #81C995; - # @define-color success_fg_color rgba(0, 0, 0, 0.87); - # @define-color warning_color #FDD633; - # @define-color warning_bg_color #FDD633; - # @define-color warning_fg_color rgba(0, 0, 0, 0.87); - # @define-color error_color #F28B82; - # @define-color error_bg_color #F28B82; - # @define-color error_fg_color rgba(0, 0, 0, 0.87); - # @define-color window_bg_color #1a1b26; - # @define-color window_fg_color #c0caf5; - # @define-color view_bg_color #1a1b26; - # @define-color view_fg_color #c0caf5; - # @define-color headerbar_bg_color #1a1b26; - # @define-color headerbar_fg_color #c0caf5; - # @define-color headerbar_border_color rgba(192, 202, 245, 0.12); - # @define-color headerbar_backdrop_color @window_bg_color; - # @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); - # @define-color card_bg_color #1a1b26; - # @define-color card_fg_color #c0caf5; - # @define-color card_shade_color rgba(0, 0, 0, 0.36); - # @define-color dialog_bg_color #1a1b26; - # @define-color dialog_fg_color #c0caf5; - # @define-color popover_bg_color #1a1b26; - # @define-color popover_fg_color #c0caf5; - # @define-color shade_color rgba(0, 0, 0, 0.36); - # @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); - # @define-color sidebar_bg_color #1a1b26; - # @define-color sidebar_fg_color #c0caf5; - # @define-color secondary_sidebar_bg_color #1a1b26; - # @define-color secondary_sidebar_fg_color #c0caf5; - # @define-color sidebar_shade_color rgba(0, 0, 0, 0.36); - # @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36); - # @define-color thumbnail_bg_color #1a1b26; - # @define-color thumbnail_fg_color #c0caf5; - # @define-color sidebar_backdrop_color @sidebar_bg_color; - # @define-color secondary_sidebar_backdrop_color @sidebar_bg_color; - # @define-color blue_1 #99c1f1; - # @define-color blue_2 #62a0ea; - # @define-color blue_3 #3584e4; - # @define-color blue_4 #1c71d8; - # @define-color blue_5 #1a5fb4; - # @define-color green_1 #8ff0a4; - # @define-color green_2 #57e389; - # @define-color green_3 #33d17a; - # @define-color green_4 #2ec27e; - # @define-color green_5 #26a269; - # @define-color yellow_1 #f9f06b; - # @define-color yellow_2 #f8e45c; - # @define-color yellow_3 #f6d32d; - # @define-color yellow_4 #f5c211; - # @define-color yellow_5 #e5a50a; - # @define-color orange_1 #ffbe6f; - # @define-color orange_2 #ffa348; - # @define-color orange_3 #ff7800; - # @define-color orange_4 #e66100; - # @define-color orange_5 #c64600; - # @define-color red_1 #f66151; - # @define-color red_2 #ed333b; - # @define-color red_3 #e01b24; - # @define-color red_4 #c01c28; - # @define-color red_5 #a51d2d; - # @define-color purple_1 #dc8add; - # @define-color purple_2 #c061cb; - # @define-color purple_3 #9141ac; - # @define-color purple_4 #813d9c; - # @define-color purple_5 #613583; - # @define-color brown_1 #cdab8f; - # @define-color brown_2 #b5835a; - # @define-color brown_3 #986a44; - # @define-color brown_4 #865e3c; - # @define-color brown_5 #63452c; - # @define-color light_1 #ffffff; - # @define-color light_2 #f6f5f4; - # @define-color light_3 #deddda; - # @define-color light_4 #c0bfbc; - # @define-color light_5 #9a9996; - # @define-color dark_1 #77767b; - # @define-color dark_2 #5e5c64; - # @define-color dark_3 #3d3846; - # @define-color dark_4 #241f31; - # @define-color dark_5 #000000; - # - # .navigation-sidebar { - # background-color: #1a1b26; - # } - # ''; - # }; + xdg.configFile."gtk-4.0/gtk.css" = { + text = + '' + /* + Generated with Gradience + + Issues caused by theming should be reported to Gradience repository, and not to upstream + + https://github.com/GradienceTeam/Gradience + */ + + @define-color accent_color #a9b1d6; + @define-color accent_bg_color #a9b1d6; + @define-color accent_fg_color rgba(0, 0, 0, 0.87); + @define-color destructive_color #F28B82; + @define-color destructive_bg_color #F28B82; + @define-color destructive_fg_color rgba(0, 0, 0, 0.87); + @define-color success_color #81C995; + @define-color success_bg_color #81C995; + @define-color success_fg_color rgba(0, 0, 0, 0.87); + @define-color warning_color #FDD633; + @define-color warning_bg_color #FDD633; + @define-color warning_fg_color rgba(0, 0, 0, 0.87); + @define-color error_color #F28B82; + @define-color error_bg_color #F28B82; + @define-color error_fg_color rgba(0, 0, 0, 0.87); + @define-color window_bg_color #1a1b26; + @define-color window_fg_color #c0caf5; + @define-color view_bg_color #1a1b26; + @define-color view_fg_color #c0caf5; + @define-color headerbar_bg_color #1a1b26; + @define-color headerbar_fg_color #c0caf5; + @define-color headerbar_border_color rgba(192, 202, 245, 0.12); + @define-color headerbar_backdrop_color @window_bg_color; + @define-color headerbar_shade_color rgba(0, 0, 0, 0.36); + @define-color card_bg_color #1a1b26; + @define-color card_fg_color #c0caf5; + @define-color card_shade_color rgba(0, 0, 0, 0.36); + @define-color dialog_bg_color #1a1b26; + @define-color dialog_fg_color #c0caf5; + @define-color popover_bg_color #1a1b26; + @define-color popover_fg_color #c0caf5; + @define-color shade_color rgba(0, 0, 0, 0.36); + @define-color scrollbar_outline_color rgba(0, 0, 0, 0.5); + @define-color sidebar_bg_color #1a1b26; + @define-color sidebar_fg_color #c0caf5; + @define-color secondary_sidebar_bg_color #1a1b26; + @define-color secondary_sidebar_fg_color #c0caf5; + @define-color sidebar_shade_color rgba(0, 0, 0, 0.36); + @define-color secondary_sidebar_shade_color rgba(0, 0, 0, 0.36); + @define-color thumbnail_bg_color #1a1b26; + @define-color thumbnail_fg_color #c0caf5; + @define-color sidebar_backdrop_color @sidebar_bg_color; + @define-color secondary_sidebar_backdrop_color @sidebar_bg_color; + @define-color blue_1 #99c1f1; + @define-color blue_2 #62a0ea; + @define-color blue_3 #3584e4; + @define-color blue_4 #1c71d8; + @define-color blue_5 #1a5fb4; + @define-color green_1 #8ff0a4; + @define-color green_2 #57e389; + @define-color green_3 #33d17a; + @define-color green_4 #2ec27e; + @define-color green_5 #26a269; + @define-color yellow_1 #f9f06b; + @define-color yellow_2 #f8e45c; + @define-color yellow_3 #f6d32d; + @define-color yellow_4 #f5c211; + @define-color yellow_5 #e5a50a; + @define-color orange_1 #ffbe6f; + @define-color orange_2 #ffa348; + @define-color orange_3 #ff7800; + @define-color orange_4 #e66100; + @define-color orange_5 #c64600; + @define-color red_1 #f66151; + @define-color red_2 #ed333b; + @define-color red_3 #e01b24; + @define-color red_4 #c01c28; + @define-color red_5 #a51d2d; + @define-color purple_1 #dc8add; + @define-color purple_2 #c061cb; + @define-color purple_3 #9141ac; + @define-color purple_4 #813d9c; + @define-color purple_5 #613583; + @define-color brown_1 #cdab8f; + @define-color brown_2 #b5835a; + @define-color brown_3 #986a44; + @define-color brown_4 #865e3c; + @define-color brown_5 #63452c; + @define-color light_1 #ffffff; + @define-color light_2 #f6f5f4; + @define-color light_3 #deddda; + @define-color light_4 #c0bfbc; + @define-color light_5 #9a9996; + @define-color dark_1 #77767b; + @define-color dark_2 #5e5c64; + @define-color dark_3 #3d3846; + @define-color dark_4 #241f31; + @define-color dark_5 #000000; + + .navigation-sidebar { + background-color: #1a1b26; + } + ''; + }; } diff --git a/nix/programs/themes/qt.nix b/nix/programs/themes/qt.nix index e305cf9..68fb5e5 100644 --- a/nix/programs/themes/qt.nix +++ b/nix/programs/themes/qt.nix @@ -24,9 +24,6 @@ in xdg.configFile."qt5ct/qss/tab.qss" = { text = "${qss}"; }; - xdg.configFile."qt6ct/qss/tab.qss" = { - text = "${qss}"; - }; xdg.configFile."qt5ct/qt5ct.conf" = { text = '' -- 2.51.2