91 lines
1.3 KiB
Lua
91 lines
1.3 KiB
Lua
local ls = require("luasnip")
|
|
local s = ls.snippet
|
|
local t = ls.text_node
|
|
local i = ls.insert_node
|
|
|
|
return {
|
|
-- Full lux module (both nixos and homeManager)
|
|
s("luxmod", {
|
|
t({
|
|
"{ inputs, ... }:",
|
|
"{",
|
|
" lux."
|
|
}),
|
|
i(1, "moduleName"),
|
|
t({
|
|
" = {",
|
|
" nixos = { config, lib, pkgs, ... }: {",
|
|
" "
|
|
}),
|
|
i(2),
|
|
t({
|
|
"",
|
|
" };",
|
|
"",
|
|
" homeManager = { config, lib, pkgs, ... }: {",
|
|
" "
|
|
}),
|
|
i(3),
|
|
t({
|
|
"",
|
|
" };",
|
|
" };",
|
|
"}",
|
|
}),
|
|
}),
|
|
|
|
-- lux nixos only module
|
|
s("luxnixos", {
|
|
t({
|
|
"{ inputs, ... }:",
|
|
"{",
|
|
" lux."
|
|
}),
|
|
i(1, "moduleName"),
|
|
t({
|
|
".nixos = { config, lib, pkgs, ... }: {",
|
|
" "
|
|
}),
|
|
i(0),
|
|
t({
|
|
"",
|
|
" };",
|
|
"}",
|
|
}),
|
|
}),
|
|
|
|
-- lux homeManager only module
|
|
s("luxhm", {
|
|
t({
|
|
"{ inputs, ... }:",
|
|
"{",
|
|
" lux."
|
|
}),
|
|
i(1, "moduleName"),
|
|
t({
|
|
".homeManager = { config, lib, pkgs, ... }: {",
|
|
" "
|
|
}),
|
|
i(0),
|
|
t({
|
|
"",
|
|
" };",
|
|
"}",
|
|
}),
|
|
}),
|
|
|
|
-- den inline aspect
|
|
s("denaspect", {
|
|
t({
|
|
"(",
|
|
" { host, user, ... }: {",
|
|
" "
|
|
}),
|
|
i(0),
|
|
t({
|
|
"",
|
|
" }",
|
|
")"
|
|
}),
|
|
}),
|
|
} |