nixbook: add postman, gofmt, difftastic
This commit is contained in:
parent
825381f98b
commit
a8c80aa3d5
9 changed files with 57 additions and 3 deletions
|
|
@ -50,11 +50,10 @@
|
|||
FCS-Tristan-Nixbook = mkConf {
|
||||
nixos-modules = [
|
||||
./hardware/fcs-tristan-nixbook.nix
|
||||
# (auto-login "Hyprland")
|
||||
# ./nixos/programs/hyprland.nix
|
||||
./nixos/workstation.nix
|
||||
./nixos/modules/work.nix
|
||||
./nixos/programs/cosmic.nix
|
||||
./nixos/programs/libvertd.nix
|
||||
];
|
||||
home-modules = [
|
||||
./home/programs/work.nix
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@
|
|||
git fetch origin
|
||||
''}/bin/bare-clone";
|
||||
};
|
||||
delta = {
|
||||
difftastic = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ in {
|
|||
home.packages = [
|
||||
pkgs.thunderbird
|
||||
pkgs.remmina
|
||||
pkgs.postman
|
||||
(import ../../lib/mkapp.nix "slack" {
|
||||
inherit pkgs browser;
|
||||
desktopName = "Slack";
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
wl-clipboard
|
||||
playerctl
|
||||
quickemu
|
||||
devenv
|
||||
];
|
||||
|
||||
services.udiskie = {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ in
|
|||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "bak";
|
||||
users.${user}.imports =
|
||||
home-modules
|
||||
++ [
|
||||
|
|
|
|||
|
|
@ -66,6 +66,14 @@
|
|||
key = "<C-S-Tab>";
|
||||
action = "<CMD>tabprev<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>bn";
|
||||
action = "<CMD>bnext<CR>";
|
||||
}
|
||||
{
|
||||
key = "<leader>bp";
|
||||
action = "<CMD>bprevious<CR>";
|
||||
}
|
||||
{
|
||||
key = "gl";
|
||||
action = "g$";
|
||||
|
|
@ -155,6 +163,33 @@
|
|||
}
|
||||
];
|
||||
|
||||
autoCmd = [{
|
||||
event = "BufWritePre";
|
||||
pattern = "*.go";
|
||||
# https://github.com/golang/tools/blob/master/gopls/doc/vim.md#imports-and-formatting
|
||||
callback.__raw = ''
|
||||
function()
|
||||
local params = vim.lsp.util.make_range_params()
|
||||
params.context = {only = {"source.organizeImports"}}
|
||||
-- buf_request_sync defaults to a 1000ms timeout. Depending on your
|
||||
-- machine and codebase, you may want longer. Add an additional
|
||||
-- argument after params if you find that you have to write the file
|
||||
-- twice for changes to be saved.
|
||||
-- E.g., vim.lsp.buf_request_sync(0, "textDocument/codeAction", params, 3000)
|
||||
local result = vim.lsp.buf_request_sync(0, "textDocument/codeAction", params)
|
||||
for cid, res in pairs(result or {}) do
|
||||
for _, r in pairs(res.result or {}) do
|
||||
if r.edit then
|
||||
local enc = (vim.lsp.get_client_by_id(cid) or {}).offset_encoding or "utf-16"
|
||||
vim.lsp.util.apply_workspace_edit(r.edit, enc)
|
||||
end
|
||||
end
|
||||
end
|
||||
vim.lsp.buf.format({async = false})
|
||||
end
|
||||
'';
|
||||
}];
|
||||
|
||||
plugins = {
|
||||
bufferline.enable = true;
|
||||
web-devicons.enable = true;
|
||||
|
|
@ -188,6 +223,7 @@
|
|||
servers = {
|
||||
ts-ls.enable = true;
|
||||
nil-ls.enable = true;
|
||||
yamlls.enable = true;
|
||||
gopls.enable = true;
|
||||
};
|
||||
keymaps = {
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ in {
|
|||
unzip
|
||||
fzf
|
||||
sops
|
||||
lsof
|
||||
];
|
||||
|
||||
boot.kernel.sysctl = {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ in {
|
|||
# nonfree vscode required for dev containers
|
||||
"vscode"
|
||||
"steam-run"
|
||||
"postman"
|
||||
];
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
|
|
|
|||
14
nixos/programs/libvertd.nix
Normal file
14
nixos/programs/libvertd.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{config, ...}: let
|
||||
user = config.user;
|
||||
in
|
||||
{
|
||||
users.users.${user}.extraGroups = ["libvirtd" "kvm"];
|
||||
virtualisation.libvirtd = {
|
||||
enable = true;
|
||||
nss = {
|
||||
enable = true;
|
||||
enableGuest = true;
|
||||
};
|
||||
};
|
||||
programs.virt-manager.enable = true;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue