diff --git a/flake.lock b/flake.lock index b93556a..39c30ab 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,84 @@ { "nodes": { + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs-lib": "nixpkgs-lib" + }, + "locked": { + "lastModified": 1769996383, + "narHash": "sha256-AnYjnFWgS49RlqX7LrC4uA+sCCDBj0Ry/WOJ5XWAsa0=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "57928607ea566b5db3ad13af0e57e921e6b12381", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "git-hooks": { + "inputs": { + "flake-compat": "flake-compat", + "gitignore": "gitignore", + "nixpkgs": [ + "rustowl-flake", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1770726378, + "narHash": "sha256-kck+vIbGOaM/dHea7aTBxdFYpeUl/jHOy5W3eyRvVx8=", + "owner": "cachix", + "repo": "git-hooks.nix", + "rev": "5eaaedde414f6eb1aea8b8525c466dc37bba95ae", + "type": "github" + }, + "original": { + "owner": "cachix", + "repo": "git-hooks.nix", + "type": "github" + } + }, + "gitignore": { + "inputs": { + "nixpkgs": [ + "rustowl-flake", + "git-hooks", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1709087332, + "narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=", + "owner": "hercules-ci", + "repo": "gitignore.nix", + "rev": "637db329424fd7e46cf4185293b9cc8c88c95394", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "gitignore.nix", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -36,6 +115,21 @@ "type": "github" } }, + "nixpkgs-lib": { + "locked": { + "lastModified": 1769909678, + "narHash": "sha256-cBEymOf4/o3FD5AZnzC3J9hLbiZ+QDT/KDuyHXVJOpM=", + "owner": "nix-community", + "repo": "nixpkgs.lib", + "rev": "72716169fe93074c333e8d0173151350670b824c", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "nixpkgs.lib", + "type": "github" + } + }, "nixpkgs_2": { "locked": { "lastModified": 1744536153, @@ -52,11 +146,44 @@ "type": "github" } }, + "nixpkgs_3": { + "locked": { + "lastModified": 1771207753, + "narHash": "sha256-b9uG8yN50DRQ6A7JdZBfzq718ryYrlmGgqkRm9OOwCE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "d1c15b7d5806069da59e819999d70e1cec0760bf", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgs_4": { + "locked": { + "lastModified": 1744536153, + "narHash": "sha256-awS2zRgF4uTwrOKwwiJcByDzDOdo3Q1rPZbiHQg/N38=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "18dd725c29603f582cf1900e0d25f9f1063dbf11", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, "root": { "inputs": { "home-manager": "home-manager", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay", + "rustowl-flake": "rustowl-flake", "sops-nix": "sops-nix" } }, @@ -78,6 +205,62 @@ "type": "github" } }, + "rust-overlay_2": { + "inputs": { + "nixpkgs": "nixpkgs_4" + }, + "locked": { + "lastModified": 1771470520, + "narHash": "sha256-PvytHcaYN5cPUll7FB70mXv1rRsIBRmu47fFfq3haxA=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "a1d4cc1f264c45d3745af0d2ca5e59d460e58777", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + }, + "rustowl": { + "flake": false, + "locked": { + "lastModified": 1771242866, + "narHash": "sha256-aMS4XZJe3TAU/jKMDhy1KsZo4VJT4MXxJ6RcXGzuEac=", + "owner": "cordx56", + "repo": "rustowl", + "rev": "5d6d0ac59ba0e734d6e4cc221d2013797ca1512a", + "type": "github" + }, + "original": { + "owner": "cordx56", + "repo": "rustowl", + "type": "github" + } + }, + "rustowl-flake": { + "inputs": { + "flake-parts": "flake-parts", + "git-hooks": "git-hooks", + "nixpkgs": "nixpkgs_3", + "rust-overlay": "rust-overlay_2", + "rustowl": "rustowl" + }, + "locked": { + "lastModified": 1771552019, + "narHash": "sha256-3TtCOpolDiKRe0KE4jVDzqx8jBumwr8blkVez2XMGC8=", + "owner": "nix-community", + "repo": "rustowl-flake", + "rev": "1494ba155a64d21c5e91be09ca3232d0b23bf683", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "rustowl-flake", + "type": "github" + } + }, "sops-nix": { "inputs": { "nixpkgs": [ diff --git a/flake.nix b/flake.nix index a75c6c1..df66da4 100644 --- a/flake.nix +++ b/flake.nix @@ -10,6 +10,7 @@ url = "github:Mic92/sops-nix"; inputs.nixpkgs.follows = "nixpkgs"; }; + rustowl-flake.url = "github:nix-community/rustowl-flake"; }; outputs = inputs: { @@ -30,16 +31,17 @@ config.allowUnfree = true; overlays = [ inputs.rust-overlay.overlays.default + inputs.rustowl-flake.overlays.default ]; }; extraSpecialArgs = { inherit inputs; + rustowl = inputs.rustowl-flake.packages.x86_64-linux.default; }; modules = [ ./home-manager ]; }; }; - }; } diff --git a/home-manager/development.nix b/home-manager/development.nix index e721e68..2956e14 100644 --- a/home-manager/development.nix +++ b/home-manager/development.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, rustowl, ... }: { home.packages = with pkgs; [ # Languages & Compilers @@ -23,5 +23,7 @@ antigravity qwen-code stylua + + rustowl # rustowl check ]; } diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index 00d1561..23fcd81 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: +{ pkgs, inputs, ... }: { programs.neovim = { enable = true; @@ -15,6 +15,12 @@ nodePackages.typescript-language-server nodePackages.svelte-language-server + + inputs.rustowl-flake.packages.${pkgs.system}.rustowl + inputs.rustowl-flake.packages.${pkgs.system}.rustowl-nvim + + + rust-bin.nightly.latest.default ]; initLua = builtins.readFile ./init.lua; }; diff --git a/home-manager/neovim/init.lua b/home-manager/neovim/init.lua index 7d4b5f4..5cd3b60 100644 --- a/home-manager/neovim/init.lua +++ b/home-manager/neovim/init.lua @@ -33,6 +33,12 @@ require("lazy").setup({ vim.cmd([[colorscheme vscode]]) end, }, + { + "cordx56/rustowl", + version = "*", + lazy = false, + opts = {}, + }, { "yorickpeterse/vim-paper", lazy = true, @@ -185,6 +191,10 @@ vim.lsp.set_log_level("off") local map = vim.keymap.set local opts = { noremap = true, silent = true } +map("n", "o", function() + require("rustowl").toggle() +end, { desc = "RustOwl Toggle" }) + map("i", "jk", "", opts) map("n", "f", ":Telescope find_files", opts) map("n", "K", vim.lsp.buf.hover, opts)