update everything

This commit is contained in:
Ray Andrew 2024-11-29 18:43:51 -06:00
parent 0d2ae9ebe2
commit 3adeef67a4
No known key found for this signature in database
13 changed files with 219 additions and 129 deletions

View file

@ -23,6 +23,8 @@ in
extraConfig = '' extraConfig = ''
set abort_key = "<Esc>" set abort_key = "<Esc>"
set editor = "nvim"
set edit_headers = yes set edit_headers = yes
set sidebar_visible set sidebar_visible
set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S" set sidebar_format = "%D%?F? [%F]?%* %?N?%N/?%S"

View file

@ -10,17 +10,20 @@
./discord.nix ./discord.nix
./firefox.nix ./firefox.nix
./foot.nix ./foot.nix
./gnome.nix
./kde.nix ./kde.nix
./keyd.nix ./keyd.nix
./kitty.nix ./kitty.nix
./gnome.nix # ./mypaint.nix
./i3status-rust.nix ./i3status-rust.nix
./slack.nix ./slack.nix
./skype.nix ./skype.nix
./spotify.nix ./spotify.nix
./teams.nix ./teams.nix
./vscode.nix ./vscode.nix
./vlc.nix
./wezterm.nix ./wezterm.nix
./xournalpp.nix
./zathura.nix ./zathura.nix
./zoom.nix ./zoom.nix
]; ];

18
src/home/gui/mypaint.nix Normal file
View file

@ -0,0 +1,18 @@
{
pkgs,
...
}:
let
mypaint-custom = pkgs.mypaint.overrideAttrs (
final: prev: {
checkPhase = '''';
}
);
in
{
home.packages = with pkgs; [
mypaint-custom
mypaint-brushes
mypaint-brushes1
];
}

11
src/home/gui/vlc.nix Normal file
View file

@ -0,0 +1,11 @@
{
pkgs,
config,
...
}:
{
home.packages = with pkgs; [
vlc
];
}

View file

@ -0,0 +1,10 @@
{
pkgs,
...
}:
{
home.packages = with pkgs; [
xournalpp
];
}

View file

@ -4,22 +4,22 @@
... ...
}: }:
let let
zoom = pkgs.zoom-us.overrideAttrs (attrs: {
nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ pkgs.bbe ];
postFixup =
''
cp $out/opt/zoom/zoom .
bbe -e 's/\0manjaro\0/\0nixos\0\0\0/' < zoom > $out/opt/zoom/zoom
''
+ (attrs.postFixup or "")
+ ''
sed -i 's|Exec=|Exec=env XDG_CURRENT_DESKTOP="gnome" |' $out/share/applications/Zoom.desktop
'';
});
in in
# zoom = pkgs.zoom-us.overrideAttrs (attrs: {
# nativeBuildInputs = (attrs.nativeBuildInputs or [ ]) ++ [ pkgs.bbe ];
# postFixup =
# ''
# cp $out/opt/zoom/zoom .
# bbe -e 's/\0manjaro\0/\0nixos\0\0\0/' < zoom > $out/opt/zoom/zoom
# ''
# + (attrs.postFixup or "")
# + ''
# sed -i 's|Exec=|Exec=env XDG_CURRENT_DESKTOP="gnome" |' $out/share/applications/Zoom.desktop
# '';
# });
{ {
home.packages = with pkgs; [ home.packages = with pkgs; [
zoom zoom-us
]; ];
custom.persist = { custom.persist = {

View file

@ -215,14 +215,14 @@ require("lazy").setup({
local builtin = require("telescope.builtin") local builtin = require("telescope.builtin")
vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" }) vim.keymap.set("n", "<leader>sh", builtin.help_tags, { desc = "[S]earch [H]elp" })
vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) vim.keymap.set("n", "<leader>sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" })
vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" }) -- vim.keymap.set("n", "<leader>sf", builtin.find_files, { desc = "[S]earch [F]iles" })
vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" }) vim.keymap.set("n", "<leader>ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" })
vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) vim.keymap.set("n", "<leader>sw", builtin.grep_string, { desc = "[S]earch current [W]ord" })
vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) -- vim.keymap.set("n", "<leader>sg", builtin.live_grep, { desc = "[S]earch by [G]rep" })
vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) vim.keymap.set("n", "<leader>sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" })
vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" }) vim.keymap.set("n", "<leader>sr", builtin.resume, { desc = "[S]earch [R]esume" })
vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) vim.keymap.set("n", "<leader>s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' })
vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" }) -- vim.keymap.set("n", "<leader><leader>", builtin.buffers, { desc = "[ ] Find existing buffers" })
-- Slightly advanced example of overriding default behavior and theme -- Slightly advanced example of overriding default behavior and theme
vim.keymap.set("n", "<leader>/", function() vim.keymap.set("n", "<leader>/", function()
@ -250,15 +250,14 @@ require("lazy").setup({
keys = { keys = {
"<leader>sh", "<leader>sh",
"<leader>sk", "<leader>sk",
"<leader>sf", -- "<leader>sf",
"<leader>sf",
"<leader>ss", "<leader>ss",
"<leader>sw", "<leader>sw",
"<leader>sg", -- "<leader>sg",
"<leader>sd", "<leader>sd",
"<leader>sr", "<leader>sr",
"<leader>s.", "<leader>s.",
"<leader><leader>", -- "<leader><leader>",
"<leader>/", "<leader>/",
"<leader>s/", "<leader>s/",
"<leader>sn", "<leader>sn",
@ -544,7 +543,14 @@ require("lazy").setup({
-- No, but seriously. Please read `:help ins-completion`, it is really good! -- No, but seriously. Please read `:help ins-completion`, it is really good!
mapping = cmp.mapping.preset.insert({ mapping = cmp.mapping.preset.insert({
-- Select the [n]ext item -- Select the [n]ext item
["<C-n>"] = cmp.mapping.select_next_item(), -- ["<C-n>"] = cmp.mapping.select_next_item(),
["<C-N>"] = function()
if cmp.visible() then
cmp.select_next_item()
else
cmp.complete()
end
end,
-- Select the [p]revious item -- Select the [p]revious item
["<C-p>"] = cmp.mapping.select_prev_item(), ["<C-p>"] = cmp.mapping.select_prev_item(),
@ -727,13 +733,31 @@ require("lazy").setup({
"<leader>fm", "<leader>fm",
function() function()
local MiniFiles = require("mini.files") local MiniFiles = require("mini.files")
MiniFiles.open(nil) MiniFiles.open()
end, end,
desc = "[F]ile [M]anager", desc = "[F]ile [M]anager",
}, },
}, },
}, },
{
"echasnovski/mini.pick",
-- cmd = { "Pick" },
version = false,
config = true,
-- stylua: ignore start
keys = {
{ "<leader>sf", "<CMD>Pick files<CR>", desc = "[S]earch [F]iles" },
{ "<leader>sg", "<CMD>Pick grep_live<CR>", desc = "[S]earch by [G]rep" },
{ "<leader><leader>", "<CMD>Pick buffers<CR>", desc = "[ ] Find existing buffers" }
},
-- stylua: ignore end
},
{ "echasnovski/mini.extra", event = "LazyFile", version = false, config = true },
{ "echasnovski/mini.starter", event = "LazyFile", version = false, config = true },
{ -- Highlight, edit, and navigate code { -- Highlight, edit, and navigate code
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
event = "LazyFile", event = "LazyFile",
@ -926,10 +950,14 @@ require("lazy").setup({
-- stylua: ignore start -- stylua: ignore start
-- Add or skip cursor above/below the main cursor. -- Add or skip cursor above/below the main cursor.
set({ "n", "v" }, "<up>", function() mc.lineAddCursor(-1) end) set({ "n", "v" }, "<C-p>", function() mc.lineAddCursor(-1) end)
set({ "n", "v" }, "<down>", function() mc.lineAddCursor(1) end) set({ "n", "v" }, "<C-n>", function() mc.lineAddCursor(1) end)
set({ "n", "v" }, "<leader><up>", function() mc.lineSkipCursor(-1) end) set({ "n", "v" }, "<leader><C-p>", function() mc.lineSkipCursor(-1) end)
set({ "n", "v" }, "<leader><down>", function() mc.lineSkipCursor(1) end) -- set({ "n", "v" }, "<leader><up>", function() mc.lineSkipCursor(-1) end)
-- set({ "n", "v" }, "<C-S-p>", function() mc.lineSkipCursor(-1) end)
-- set({ "n", "v" }, "<leader><down>", function() mc.lineSkipCursor(1) end)
set({ "n", "v" }, "<leader><C-n>", function() mc.lineSkipCursor(1) end)
-- set({ "n", "v" }, "<C-S-n>", function() mc.lineSkipCursor(1) end)
-- Add or skip adding a new cursor by matching word/selection -- Add or skip adding a new cursor by matching word/selection
set({ "n", "v" }, "<leader>mn", function() mc.matchAddCursor(1) end) set({ "n", "v" }, "<leader>mn", function() mc.matchAddCursor(1) end)
@ -991,117 +1019,48 @@ require("lazy").setup({
}, },
{ {
"ThePrimeagen/harpoon", "otavioschwanck/arrow.nvim",
branch = "harpoon2", keys = { ";" },
dependencies = { "nvim-lua/plenary.nvim" }, dependencies = {
opts = {}, { "echasnovski/mini.icons" },
config = function(_, opts)
local harpoon = require("harpoon")
harpoon:setup(opts)
end,
keys = {
{
"<leader>ha",
function()
local harpoon = require("harpoon")
harpoon:list():add()
end,
desc = "[H]arpoon [A]dd",
},
{
"<leader>he",
function()
local harpoon = require("harpoon")
harpoon.ui:toggle_quick_menu(harpoon:list())
end,
desc = "[H]arpoon [E]dit",
},
{
"<leader>hl",
function()
local harpoon = require("harpoon")
local conf = require("telescope.config").values
local function toggle_telescope(harpoon_files)
local file_paths = {}
for _, item in ipairs(harpoon_files.items) do
table.insert(file_paths, item.value)
end
require("telescope.pickers")
.new({}, {
prompt_title = "Harpoon",
finder = require("telescope.finders").new_table({
results = file_paths,
}),
previewer = conf.file_previewer({}),
sorter = conf.generic_sorter({}),
})
:find()
end
toggle_telescope(harpoon:list())
end,
desc = "[H]arpoon [L]list",
},
{
"<leader>h1",
function()
local harpoon = require("harpoon")
harpoon:list():select(1)
end,
desc = "[H]arpoon [1]st entry",
},
{
"<leader>h2",
function()
local harpoon = require("harpoon")
harpoon:list():select(2)
end,
desc = "[H]arpoon [2]nd entry",
},
{
"<leader>h3",
function()
local harpoon = require("harpoon")
harpoon:list():select(3)
end,
desc = "[H]arpoon [3]rd entry",
},
{
"<leader>h4",
function()
local harpoon = require("harpoon")
harpoon:list():select(4)
end,
desc = "[H]arpoon [4]th entry",
},
{
"<leader>h5",
function()
local harpoon = require("harpoon")
harpoon:list():select(5)
end,
desc = "[H]arpoon [5]th entry",
},
}, },
opts = {
show_icons = true,
leader_key = ";", -- Recommended to be a single key
buffer_leader_key = "m", -- Per Buffer Mappings
},
config = function(_, opts)
local arrow = require("arrow")
arrow.setup(opts)
local statusline = require("arrow.statusline")
statusline.text_for_statusline_with_icons()
end,
}, },
{ {
"NeogitOrg/neogit", "NeogitOrg/neogit",
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", -- required "nvim-lua/plenary.nvim", -- required
"sindrets/diffview.nvim", -- optional - Diff integration "sindrets/diffview.nvim", -- optional - Diff integration
-- Only one of these is needed. -- Only one of these is needed.
"nvim-telescope/telescope.nvim", -- optional "nvim-telescope/telescope.nvim", -- optional
-- "ibhagwan/fzf-lua", -- optional -- "ibhagwan/fzf-lua", -- optional
-- "echasnovski/mini.pick", -- optional -- "echasnovski/mini.pick", -- optional
}, },
opts = {
telescope = false,
fzf_lua = false,
diffview = true,
mini_pick = true,
},
config = true, config = true,
keys = {{ "<leader>gg", "<CMD>Neogit<CR>", desc = "Neogit" }}, keys = { { "<leader>gg", "<CMD>Neogit<CR>", desc = "Neogit" } },
}, },
{ {
"sindrets/diffview.nvim", "sindrets/diffview.nvim",
config = true,
keys = { keys = {
{ "<leader>gd", "<CMD>DiffviewOpen<CR>", desc = "[G]it [D]iff" }, { "<leader>gd", "<CMD>DiffviewOpen<CR>", desc = "[G]it [D]iff" },
}, },

View file

@ -1,9 +1,10 @@
{ {
"LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" },
"arrow.nvim": { "branch": "master", "commit": "5438c977e729a29d96bd54c8da3103154e80dbd1" },
"cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" }, "cmp-async-path": { "branch": "main", "commit": "d6d1ffa2075039632a2d71e8fa139818e15ac757" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "62d5accad8b29d6ba9b58d3dff90c43a55621c60" }, "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" },
"copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" }, "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
"copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" }, "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
@ -11,24 +12,26 @@
"friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" },
"gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" },
"gruvbox-material": { "branch": "master", "commit": "170148af9350f578f3623f810e54698fa1e5bdbf" }, "gruvbox-material": { "branch": "master", "commit": "170148af9350f578f3623f810e54698fa1e5bdbf" },
"harpoon": { "branch": "harpoon2", "commit": "a84ab829eaf3678b586609888ef52f7779102263" },
"lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
"lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
"luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" }, "mini.ai": { "branch": "main", "commit": "31c149067d38b97720d2a179619f7745a0006ecc" },
"mini.extra": { "branch": "main", "commit": "098a9dc55b2bdf05a7d6ed018884e0faf94edcbb" },
"mini.files": { "branch": "main", "commit": "6abe854f1410fc6aec69897a78b1db994c32d9c6" }, "mini.files": { "branch": "main", "commit": "6abe854f1410fc6aec69897a78b1db994c32d9c6" },
"mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" }, "mini.icons": { "branch": "main", "commit": "54686be7d58807906cb2c8c2216e0bf9c044f19a" },
"mini.pick": { "branch": "main", "commit": "141496412ccd8a6d01bdafc126ea307687600cad" },
"mini.starter": { "branch": "main", "commit": "3e0af795938ee800846708bed92fbe4e8583141a" },
"mini.statusline": { "branch": "main", "commit": "813854243156472c9d0bc9c64ea0af159b9b37ca" }, "mini.statusline": { "branch": "main", "commit": "813854243156472c9d0bc9c64ea0af159b9b37ca" },
"mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" }, "mini.surround": { "branch": "main", "commit": "48a9795c9d352c771e1ab5dedab6063c0a2df037" },
"multicursor.nvim": { "branch": "1.0", "commit": "b715cc5bf69cf6e338899510eb2b60b1dd7ccce0" }, "multicursor.nvim": { "branch": "1.0", "commit": "b715cc5bf69cf6e338899510eb2b60b1dd7ccce0" },
"neogit": { "branch": "master", "commit": "efd2a182024e422a4c4061683b9264c782eb684a" }, "neogit": { "branch": "master", "commit": "26c5550016b20e4f47b376192f12a54be8897aaa" },
"nvim-cmp": { "branch": "main", "commit": "be7bd4c5f860c79da97af3a26d489af50babfd4b" }, "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" },
"nvim-lspconfig": { "branch": "master", "commit": "ac936a66fba9a58613bed95d7615cff2c5bf0387" }, "nvim-lspconfig": { "branch": "master", "commit": "27008519562f16453813c19dcc6ee97f505e0b1c" },
"nvim-treesitter": { "branch": "master", "commit": "efb2e9c607cab1e4f7171493b7c6f63bd39073fc" }, "nvim-treesitter": { "branch": "master", "commit": "d14bc4bd15a7b9b5a9e7977c6a28f2cab6c4ad4a" },
"oil.nvim": { "branch": "master", "commit": "99ce32f4a2ecf76263b72fcc31efb163faa1a941" }, "oil.nvim": { "branch": "master", "commit": "3c2de37accead0240fbe812f5ccdedfe0b973557" },
"plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
"snacks.nvim": { "branch": "main", "commit": "7564a30cad803c01f8ecc15683a280d2f0e9bdb7" }, "snacks.nvim": { "branch": "main", "commit": "7564a30cad803c01f8ecc15683a280d2f0e9bdb7" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },

View file

@ -30,8 +30,12 @@ in
custom.persist = { custom.persist = {
home.directories = [ home.directories = [
# ".config/nvim" # ".config/nvim"
".config/github-copilot"
".local/share/nvim" ".local/share/nvim"
".local/state/nvim" ".local/state/nvim"
]; ];
home.cache.directories = [
".cache/nvim"
];
}; };
} }

View file

@ -45,6 +45,7 @@
touchpad.enable = true; touchpad.enable = true;
fingerprint.enable = true; fingerprint.enable = true;
bluetooth.enable = true; bluetooth.enable = true;
tablet.enable = true;
wm = { wm = {
i3.enable = true; i3.enable = true;
sway.enable = false; sway.enable = false;

View file

@ -21,6 +21,7 @@
./stylix.nix ./stylix.nix
./touchpad.nix ./touchpad.nix
./sops.nix ./sops.nix
./tablet.nix
./users.nix ./users.nix
./xdg-portal.nix ./xdg-portal.nix
./wm ./wm

23
src/nixos/tablet.nix Normal file
View file

@ -0,0 +1,23 @@
{
pkgs,
config,
lib,
...
}:
{
options.custom = with lib; {
tablet.enable = mkEnableOption "tablet" // {
default = true;
};
};
config = lib.mkIf config.custom.tablet.enable {
hardware.opentabletdriver = {
enable = true;
};
environment.systemPackages = with pkgs; [
libsForQt5.xp-pen-deco-01-v2-driver
];
};
}

55
stowify.sh Executable file
View file

@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -e
SCRIPT_DIR="$( cd "$( dirname "$BASH_SOURCE[0]" )" && pwd )"
symlink_file() {
filename="$SCRIPT_DIR/$1"
destination="$HOME/$2/$1"
mkdir -p $(dirname "$destination")
if [ -L "$destination" ]; then
echo "[WARNING] $filename already symlinked"
return
fi
if [ -e "$destination" ]; then
echo "[ERROR] $destination exists but it's not a symlink. Please fix that manually"
exit 1
fi
ln -s "$filename" "$destination"
echo "[OK] $filename -> $destination"
}
deploy_manifest() {
for row in $(cat $SCRIPT_DIR/$1); do
if [[ "$row" =~ ^#.* ]]; then
continue
fi
filename=$(echo $row | cut -d \| -f 1)
operation=$(echo $row | cut -d \| -f 2)
destination=$(echo $row | cut -d \| -f 3)
case $operation in
symlink)
symlink_file $filename $destination
;;
*)
echo "[WARNING] Unknown operation $operation. Skipping..."
;;
esac
done
}
if [ -z "$@" ]; then
echo "Usage: $0 <MANIFEST>"
echo "ERROR: no MANIFEST file is provided"
exit 1
fi
deployManifest $1