feat: Added deploy-rs

This commit is contained in:
uttarayan21
2024-09-29 17:44:42 +05:30
parent 2ffff5822d
commit 439dce6255
5 changed files with 202 additions and 133 deletions

View File

@@ -60,7 +60,7 @@ in {
pandoc
aichat
nodejs
sqls
deploy-rs
vcpkg-tool
gh
just
@@ -70,7 +70,6 @@ in {
alejandra
pkg-config
devenv
sleek
ra-multiplex
d2
jujutsu

View File

@@ -3,7 +3,7 @@
skhd = {
enable = true;
skhdConfig = ''
alt - return : ${pkgs.lib.getExe pkgs.kitty} -1 --directory ~
alt - return : ${pkgs.lib.getExe pkgs.kitty} --single-instance --directory ~
# alt - return : $\{pkgs.wezterm}/bin/wezterm-gui
shift + alt - return: pkill afplay

240
flake.lock generated
View File

@@ -205,7 +205,7 @@
},
"crane_3": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-compat": "flake-compat_3",
"flake-utils": "flake-utils_4",
"nixpkgs": [
"music-player",
@@ -295,6 +295,28 @@
"type": "github"
}
},
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"nixpkgs": [
"nixpkgs"
],
"utils": "utils"
},
"locked": {
"lastModified": 1727447169,
"narHash": "sha256-3KyjMPUKHkiWhwR91J1YchF6zb6gvckCAY1jOE+ne0U=",
"owner": "serokell",
"repo": "deploy-rs",
"rev": "aa07eb05537d4cd025e2310397a6adcedfe72c76",
"type": "github"
},
"original": {
"owner": "serokell",
"repo": "deploy-rs",
"type": "github"
}
},
"devshell": {
"inputs": {
"nixpkgs": [
@@ -415,7 +437,39 @@
"type": "github"
}
},
"flake-compat_11": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_3": {
"flake": false,
"locked": {
"lastModified": 1673956053,
@@ -431,7 +485,7 @@
"type": "github"
}
},
"flake-compat_3": {
"flake-compat_4": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
@@ -445,22 +499,6 @@
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_4": {
"flake": false,
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_5": {
"flake": false,
"locked": {
@@ -480,11 +518,11 @@
"flake-compat_6": {
"flake": false,
"locked": {
"lastModified": 1641205782,
"narHash": "sha256-4jY7RCWUoZ9cKD8co0/4tFARpWB+57+r1bLLvXNJliY=",
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b7547d3eed6f32d06102ead8991ec52ab0a4f1a7",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"type": "github"
},
"original": {
@@ -510,20 +548,6 @@
}
},
"flake-compat_8": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-compat_9": {
"flake": false,
"locked": {
"lastModified": 1641205782,
@@ -539,6 +563,20 @@
"type": "github"
}
},
"flake-compat_9": {
"locked": {
"lastModified": 1696426674,
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
"revCount": 57,
"type": "tarball",
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.1/018afb31-abd1-7bff-a5e4-cff7e18efb7a/source.tar.gz"
},
"original": {
"type": "tarball",
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
}
},
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
@@ -728,7 +766,7 @@
},
"flake-utils_10": {
"inputs": {
"systems": "systems_11"
"systems": "systems_12"
},
"locked": {
"lastModified": 1710146030,
@@ -746,7 +784,7 @@
},
"flake-utils_11": {
"inputs": {
"systems": "systems_12"
"systems": "systems_13"
},
"locked": {
"lastModified": 1726560853,
@@ -794,7 +832,7 @@
},
"flake-utils_14": {
"inputs": {
"systems": "systems_13"
"systems": "systems_14"
},
"locked": {
"lastModified": 1710146030,
@@ -812,7 +850,7 @@
},
"flake-utils_15": {
"inputs": {
"systems": "systems_14"
"systems": "systems_15"
},
"locked": {
"lastModified": 1710146030,
@@ -830,7 +868,7 @@
},
"flake-utils_16": {
"inputs": {
"systems": "systems_15"
"systems": "systems_16"
},
"locked": {
"lastModified": 1710146030,
@@ -866,7 +904,7 @@
},
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
"systems": "systems_4"
},
"locked": {
"lastModified": 1726560853,
@@ -882,24 +920,6 @@
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_6"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_5": {
"inputs": {
"systems": "systems_7"
},
@@ -917,10 +937,28 @@
"type": "github"
}
},
"flake-utils_6": {
"flake-utils_5": {
"inputs": {
"systems": "systems_8"
},
"locked": {
"lastModified": 1685518550,
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_6": {
"inputs": {
"systems": "systems_9"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
@@ -937,7 +975,7 @@
},
"flake-utils_7": {
"inputs": {
"systems": "systems_9"
"systems": "systems_10"
},
"locked": {
"lastModified": 1726560853,
@@ -1018,7 +1056,7 @@
},
"git-hooks_2": {
"inputs": {
"flake-compat": "flake-compat_5",
"flake-compat": "flake-compat_6",
"gitignore": "gitignore_3",
"nixpkgs": [
"neovim",
@@ -1322,7 +1360,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_4",
"systems": "systems_5",
"xdph": "xdph"
},
"locked": {
@@ -1432,7 +1470,7 @@
"nixpkgs": [
"nixpkgs"
],
"systems": "systems_5"
"systems": "systems_6"
},
"locked": {
"lastModified": 1725535663,
@@ -1549,7 +1587,7 @@
"lanzaboote": {
"inputs": {
"crane": "crane_2",
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"flake-parts": "flake-parts_4",
"nixpkgs": [
"nixpkgs"
@@ -1781,13 +1819,13 @@
"nvim-devdocs": "nvim-devdocs",
"pets": "pets",
"rest-nvim": "rest-nvim",
"systems": "systems_10",
"systems": "systems_11",
"tree-sitter-d2": "tree-sitter-d2",
"tree-sitter-just": "tree-sitter-just"
},
"locked": {
"lastModified": 1,
"narHash": "sha256-hQ29nKYA2OwUQMz2xWulhRjaa/SSuwLQURT4/t9bkIY=",
"narHash": "sha256-sKcOMKXsh8Q71xCfTf8uWAE3PkCCoBTId4eUTsvcvfM=",
"path": "./neovim",
"type": "path"
},
@@ -2173,7 +2211,7 @@
"nixvim": {
"inputs": {
"devshell": "devshell",
"flake-compat": "flake-compat_3",
"flake-compat": "flake-compat_4",
"flake-parts": "flake-parts_5",
"git-hooks": "git-hooks",
"home-manager": "home-manager_2",
@@ -2202,7 +2240,7 @@
"nixvim_2": {
"inputs": {
"devshell": "devshell_2",
"flake-compat": "flake-compat_8",
"flake-compat": "flake-compat_9",
"flake-parts": "flake-parts_8",
"git-hooks": "git-hooks_3",
"home-manager": "home-manager_3",
@@ -2229,7 +2267,7 @@
},
"nnn": {
"inputs": {
"flake-compat": "flake-compat_4",
"flake-compat": "flake-compat_5",
"flake-parts": "flake-parts_6",
"git-hooks": "git-hooks_2",
"hercules-ci-effects": "hercules-ci-effects",
@@ -2306,7 +2344,7 @@
},
"norg": {
"inputs": {
"flake-compat": "flake-compat_6",
"flake-compat": "flake-compat_7",
"flake-utils": "flake-utils_8",
"nixpkgs": "nixpkgs_5"
},
@@ -2327,7 +2365,7 @@
},
"norg-meta": {
"inputs": {
"flake-compat": "flake-compat_7",
"flake-compat": "flake-compat_8",
"flake-utils": "flake-utils_9",
"nixpkgs": "nixpkgs_6"
},
@@ -2347,7 +2385,7 @@
},
"norg-meta_2": {
"inputs": {
"flake-compat": "flake-compat_10",
"flake-compat": "flake-compat_11",
"flake-utils": "flake-utils_13",
"nixpkgs": "nixpkgs_10"
},
@@ -2367,7 +2405,7 @@
},
"norg_2": {
"inputs": {
"flake-compat": "flake-compat_9",
"flake-compat": "flake-compat_10",
"flake-utils": "flake-utils_12",
"nixpkgs": "nixpkgs_9"
},
@@ -2565,6 +2603,7 @@
"anyrun-nixos-options": "anyrun-nixos-options",
"anyrun-rink": "anyrun-rink",
"cachix-deploy-flake": "cachix-deploy-flake",
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils_3",
"home-manager": "home-manager",
"hyprland": "hyprland",
@@ -2860,6 +2899,21 @@
"type": "github"
}
},
"systems_16": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
@@ -2892,16 +2946,16 @@
},
"systems_4": {
"locked": {
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default-linux",
"repo": "default",
"type": "github"
}
},
@@ -2922,16 +2976,16 @@
},
"systems_6": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"lastModified": 1689347949,
"narHash": "sha256-12tWmuL2zgBgZkdoB6qXZsgJEH9LR3oUgpaQq2RbI80=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"repo": "default-linux",
"rev": "31732fcf5e8fea42e59c2488ad31a0e651500f68",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"repo": "default-linux",
"type": "github"
}
},
@@ -3077,6 +3131,24 @@
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1701680307,
"narHash": "sha256-kAuep2h5ajznlPMD9rnQyffWG8EM/C73lejGofXvdM8=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "4022d587cbbfd70fe950c1e2083a02621806a725",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"xdph": {
"inputs": {
"hyprland-protocols": "hyprland-protocols",

View File

@@ -92,15 +92,21 @@
url = "github:musnix/musnix";
inputs.nixpkgs.follows = "nixpkgs";
};
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
home-manager,
nix-darwin,
flake-utils,
anyrun,
nur,
deploy-rs,
...
} @ inputs: let
config_devices = [
@@ -217,23 +223,24 @@
};
packages = inputs.neovim.packages;
# // {
# x86_64-linux.fprintd =
# (import nixpkgs {
# inherit overlays;
# system = "x86_64-linux";
# })
# .fprintd;
# };
cachix = let
cachix-deploy-lib = inputs.cachix-deploy.lib nixpkgs.legacyPackages.x86_64-linux;
in
cachix-deploy-lib.spec {
agents.mirai = homeConfigurations.mirai.config.system.build.toplevel;
agents.ryu = nixosConfigurations.ryu.config.system.build.toplevel;
# agents.mirai = homeConfigurations.mirai.config.system.build.toplevel;
deploy = {
nodes.mirai = {
hostname = "ryu";
profiles.system = {
user = "servius";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.mirai;
};
};
nodes.mbpro = {
hostname = "Uttarayans-MacBook-Pro.local";
profiles.system = {
user = "root";
path = deploy-rs.lib.aarch64-darwin.activate.darwin self.darwinConfigurations.Uttarayans-MacBook-Pro;
};
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
devshells.default = {
packages = packages;
};

View File

@@ -32,6 +32,18 @@ in rec {
trouble.enable = true;
ts-context-commentstring.enable = true;
which-key.enable = true;
conform-nvim = {
enable = true;
settings = {
format_on_save.lsp_format = "fallback";
formatters_by_ft = {
d2 = ["d2"];
sql = ["sleek"];
toml = ["taplo"];
nix = ["alejandra"];
};
};
};
chatgpt = {
enable = true;
settings = {
@@ -317,6 +329,7 @@ in rec {
lsp = {
enable = true;
servers = {
taplo.enable = true;
gopls.enable = true;
nil-ls = {
enable = true;
@@ -336,29 +349,6 @@ in rec {
ast-grep.enable = true;
sqls.enable = true;
pyright.enable = true;
# pylyzer.enable = true;
# rust-analyzer = {
# enable = false;
# installCargo = false;
# installRustc = false;
# settings = {
# inlayHints = {
# genericParameterHints = {
# lifetime.enable = true;
# };
# implicitDrops.enable = true;
# };
# files = {
# excludeDirs = [
# ".cargo"
# ".direnv"
# ".git"
# "node_modules"
# "target"
# ];
# };
# };
# };
};
onAttach =
/*
@@ -463,7 +453,8 @@ in rec {
"<leader>rr" = "vim.lsp.buf.rename";
"<C-k>" = "vim.lsp.buf.definition";
"<C-\\>" = "require('FTerm').toggle";
"F" = "function() vim.lsp.buf.format({ async = true }) end";
# "F" = "function() vim.lsp.buf.format({ async = true }) end";
"F" = "require('conform').format";
"gi" = "require'telescope.builtin'.lsp_references";
"<leader>a" = "vim.lsp.buf.code_action";
"<leader>bb" = "require'dap'.toggle_breakpoint";
@@ -499,11 +490,11 @@ in rec {
pattern = "*.norg";
command = "set conceallevel=3";
}
{
event = ["BufEnter" "BufWinEnter"];
pattern = "*.sql";
command = "nnoremap <buffer> F :Sqlfmt<cr>";
}
# {
# event = ["BufEnter" "BufWinEnter"];
# pattern = "*.sql";
# command = "nnoremap <buffer> F :Sqlfmt<cr>";
# }
{
event = ["BufWinLeave"];
pattern = "?*";
@@ -732,6 +723,6 @@ in rec {
pkgs.tree-sitter-grammars.tree-sitter-norg-meta
];
extraLuaPackages = luaPkgs: with luaPkgs; [lua-utils-nvim nvim-nio pathlib-nvim];
extraPackages = [pkgs.lldb];
extraPackages = [pkgs.lldb pkgs.taplo pkgs.d2];
};
}