Compare commits
10 commits
99ef28fe19
...
41f48aa208
Author | SHA1 | Date | |
---|---|---|---|
41f48aa208 | |||
50a709fae2 | |||
e2a58cf55a | |||
630daabbd8 | |||
5994859096 | |||
491c67e56b | |||
44d24230d4 | |||
c61d4e89bd | |||
0e22d1d36a | |||
70384e0f7f |
9 changed files with 142 additions and 25 deletions
21
flake.nix
21
flake.nix
|
@ -34,6 +34,7 @@ in {
|
||||||
pkgs.go-task
|
pkgs.go-task
|
||||||
pkgs.convco
|
pkgs.convco
|
||||||
pkgs.typos
|
pkgs.typos
|
||||||
|
pkgs.home-manager
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
@ -72,11 +73,7 @@ in {
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit stateVersion inputs;
|
inherit stateVersion inputs;
|
||||||
hostname = "luci";
|
|
||||||
username = "ephase";
|
|
||||||
hostConfig = {
|
|
||||||
desktop = true;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/default.nix
|
./nixos/default.nix
|
||||||
|
@ -99,6 +96,20 @@ in {
|
||||||
./home-manager/default.nix
|
./home-manager/default.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
work = home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
system = "x86_64-linux";
|
||||||
|
overlays = [ nixgl.overlay ];
|
||||||
|
};
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit stateVersion inputs;
|
||||||
|
hostname = "work";
|
||||||
|
username = "yorick-barbanneau";
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
./home-manager/default.nix
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,5 +15,4 @@
|
||||||
]++ lib.optional (
|
]++ lib.optional (
|
||||||
builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix
|
builtins.pathExists ../hosts/${hostname}/includes/home-manager.nix
|
||||||
) ../hosts/${hostname}/includes/home-manager.nix;
|
) ../hosts/${hostname}/includes/home-manager.nix;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
26
hosts/work/home-config.nix
Normal file
26
hosts/work/home-config.nix
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
{ ... }: {
|
||||||
|
config.modules = {
|
||||||
|
application = {
|
||||||
|
zathura.enable = true;
|
||||||
|
foot.enable = true;
|
||||||
|
};
|
||||||
|
audio.cmus.enable = true;
|
||||||
|
cli = {
|
||||||
|
direnv.enable = true;
|
||||||
|
ghq.enable = true;
|
||||||
|
git = {
|
||||||
|
enable = true;
|
||||||
|
userEmail = "ybarbanneau@sellsy.com";
|
||||||
|
};
|
||||||
|
neovim.enable = true;
|
||||||
|
starship.enable = true;
|
||||||
|
utils.enable = true;
|
||||||
|
vifm.enable = true;
|
||||||
|
zsh.enable = true;
|
||||||
|
};
|
||||||
|
web.firefox = {
|
||||||
|
enable = true;
|
||||||
|
enableNixGL = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
22
hosts/work/includes/home-manager.nix
Normal file
22
hosts/work/includes/home-manager.nix
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{ pkgs, ... }:
|
||||||
|
{
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
dejavu_fonts
|
||||||
|
font-awesome
|
||||||
|
lato
|
||||||
|
liberation_ttf
|
||||||
|
libertine
|
||||||
|
libnotify
|
||||||
|
(nerdfonts.override {
|
||||||
|
fonts = [
|
||||||
|
"FiraCode"
|
||||||
|
];
|
||||||
|
})
|
||||||
|
noto-fonts-emoji
|
||||||
|
noto-fonts-cjk
|
||||||
|
slurp
|
||||||
|
wl-clipboard
|
||||||
|
];
|
||||||
|
targets.genericLinux.enable = true;
|
||||||
|
xdg.mime.enable = true;
|
||||||
|
}
|
|
@ -9,36 +9,59 @@ process_args() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
#
|
||||||
filename=${file#*/}
|
escape(){
|
||||||
image=${file%/*}/cover.jpg
|
local string
|
||||||
[ -f "$image" ] && options="$options -i \"${image}\""
|
string=$1
|
||||||
|
string=${string//"<"/"<"}
|
||||||
|
string=${string//">"/">"}
|
||||||
|
string=${string//"&"/"&"}
|
||||||
|
printf "%s" "$string"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
main() {
|
||||||
|
options=( --app-name=cmus --transient -u low)
|
||||||
|
|
||||||
|
filename=${file##*/}
|
||||||
|
image=${file%/*}/cover.jpg
|
||||||
|
|
||||||
|
if [[ -f "$image" ]]; then
|
||||||
|
options+=( -i "${image}" )
|
||||||
|
fi
|
||||||
|
|
||||||
|
## Get title or filename
|
||||||
title=${title:-$filename}
|
title=${title:-$filename}
|
||||||
if [[ ${#title} -gt 25 ]]; then
|
if [[ ${#title} -gt 25 ]]; then
|
||||||
title="${title:0:24}…"
|
title="${title:0:24}…"
|
||||||
fi
|
fi
|
||||||
|
title="<b>$title</b>"
|
||||||
|
|
||||||
if [ -n "$artist" ]
|
if [ -n "$artist" ]
|
||||||
then
|
then
|
||||||
if [[ ${#artist} -gt 22 ]]; then
|
if [[ ${#artist} -gt 22 ]]; then
|
||||||
artist="<i>by</i> ${artist:0:21}…"
|
artist="${artist:0:21}…"
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -n "$album" ]
|
|
||||||
then
|
|
||||||
if [[ ${#album} -gt 19 ]]; then
|
|
||||||
album="${album:0:18}…"
|
|
||||||
fi
|
fi
|
||||||
|
printf -v l_artist "<span size='x-large'>by </span>%s" "$(escape "$artist")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$date" ]
|
if [ -n "$date" ]
|
||||||
then
|
then
|
||||||
date="${date%%-*}"
|
date="${date%%-*}"
|
||||||
fi
|
fi
|
||||||
printf -v body "%s\n%-19s <i>%s</i>" "${artist:-}" "${album:-}" "${date:-}"
|
|
||||||
notify-send --app-name=cmus -i "$image" "$title" "$body"
|
# Get Album
|
||||||
|
if [ -n "$album" ]
|
||||||
|
then
|
||||||
|
if [[ ${#album} -gt 19 ]]; then
|
||||||
|
album="${album:0:19}…"
|
||||||
|
fi
|
||||||
|
printf -v l_album "<span size='x-large'>on </span>%-20s <span size='x-large'>%s</span>" "$(escape "$album")" "${date:-}"
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf -v l_intro "<span variant='small-caps'>cmus:<b>%s</b></span>" "$(escape "$status")"
|
||||||
|
printf -v body "%s\n" "${l_intro:-}" "${title:-}" "${l_artist:-}" "${l_album:-}"
|
||||||
|
notify-send "${options[@]}" "unseless" "$body"
|
||||||
}
|
}
|
||||||
|
|
||||||
process_args "$@"
|
process_args "$@"
|
||||||
|
|
|
@ -52,5 +52,5 @@ set color_win_inactive_sel_fg=20
|
||||||
set color_win_dir=default
|
set color_win_dir=default
|
||||||
|
|
||||||
set status_display_program=~/.config/cmus/notify.sh
|
set status_display_program=~/.config/cmus/notify.sh
|
||||||
|
set format_current= %{?stream??} %t %{?a?by %a} %{?l?on %l}%= %y
|
||||||
add -l ~/medias/music
|
add -l ~/medias/music
|
||||||
|
|
|
@ -28,13 +28,17 @@ in
|
||||||
# LSP Servers
|
# LSP Servers
|
||||||
clang-tools
|
clang-tools
|
||||||
hadolint
|
hadolint
|
||||||
|
helm-ls
|
||||||
lua-language-server
|
lua-language-server
|
||||||
marksman
|
marksman
|
||||||
nil
|
nil
|
||||||
nodePackages.bash-language-server
|
nodePackages.bash-language-server
|
||||||
python3Packages.python-lsp-server
|
python3Packages.python-lsp-server
|
||||||
shellcheck
|
shellcheck
|
||||||
# yaml-language-server
|
|
||||||
|
terraform-lsp
|
||||||
|
tflint
|
||||||
|
yaml-language-server
|
||||||
|
|
||||||
# Formatters
|
# Formatters
|
||||||
nixfmt-rfc-style
|
nixfmt-rfc-style
|
||||||
|
@ -115,12 +119,15 @@ in
|
||||||
p.cpp
|
p.cpp
|
||||||
p.cmake
|
p.cmake
|
||||||
p.dockerfile
|
p.dockerfile
|
||||||
|
p.hcl
|
||||||
|
p.helm
|
||||||
p.latex
|
p.latex
|
||||||
p.lua
|
p.lua
|
||||||
p.llvm
|
p.llvm
|
||||||
p.markdown
|
p.markdown
|
||||||
p.markdown_inline
|
p.markdown_inline
|
||||||
p.python
|
p.python
|
||||||
|
p.terraform
|
||||||
p.vim
|
p.vim
|
||||||
p.yaml
|
p.yaml
|
||||||
])
|
])
|
||||||
|
@ -158,6 +165,7 @@ in
|
||||||
type = "lua";
|
type = "lua";
|
||||||
config = ( builtins.readFile ./files/whichkey.lua );
|
config = ( builtins.readFile ./files/whichkey.lua );
|
||||||
}
|
}
|
||||||
|
vim-helm
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -2,6 +2,21 @@ local lspconfig = require('lspconfig')
|
||||||
|
|
||||||
lspconfig.bashls.setup {}
|
lspconfig.bashls.setup {}
|
||||||
lspconfig.clangd.setup {}
|
lspconfig.clangd.setup {}
|
||||||
|
lspconfig.helm_ls.setup{
|
||||||
|
settings = {
|
||||||
|
['helm-ls'] = {
|
||||||
|
logLevel = "info",
|
||||||
|
valuesFiles = {
|
||||||
|
mainValuesFile = "values.yaml",
|
||||||
|
lintOverlayValuesFile = "values.lint.yaml",
|
||||||
|
additionalValuesFilesGlobPattern = "values*.yaml"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
yamlls = {
|
||||||
|
enabled = false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
lspconfig.lua_ls.setup {
|
lspconfig.lua_ls.setup {
|
||||||
single_file_support = true,
|
single_file_support = true,
|
||||||
flags = {
|
flags = {
|
||||||
|
@ -21,7 +36,18 @@ lspconfig.pylsp.setup {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lspconfig.yamlls.setup{}
|
lspconfig.terraformls.setup{}
|
||||||
|
lspconfig.tflint.setup{}
|
||||||
|
lspconfig.yamlls.setup{
|
||||||
|
settings = {
|
||||||
|
yaml = {
|
||||||
|
schemas = {
|
||||||
|
["https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/v1.30.0/all.json"] = {"k8s/**/*.yaml", "cluster/**/*.yaml",},
|
||||||
|
["https://taskfile.dev/schema.json"] = {"**/Taskfile.*", "**/taskfile.*",},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
vim.api.nvim_create_autocmd('LspAttach', {
|
vim.api.nvim_create_autocmd('LspAttach', {
|
||||||
desc = 'LSP actions',
|
desc = 'LSP actions',
|
||||||
|
|
|
@ -26,6 +26,7 @@ with lib;
|
||||||
maxIconSize = 64;
|
maxIconSize = 64;
|
||||||
layer = "overlay";
|
layer = "overlay";
|
||||||
anchor = "top-right";
|
anchor = "top-right";
|
||||||
|
format = ''<span font_scale="small-caps">%a</span>\n<b>%s</b>\n%b'';
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
[urgency="high"]
|
[urgency="high"]
|
||||||
border-color=#F268b3
|
border-color=#F268b3
|
||||||
|
@ -34,9 +35,10 @@ with lib;
|
||||||
border-size=1
|
border-size=1
|
||||||
default-timeout=7000
|
default-timeout=7000
|
||||||
group-by=app-name
|
group-by=app-name
|
||||||
|
format=%b
|
||||||
|
|
||||||
[app-name="cmus" grouped]
|
[app-name="cmus" grouped]
|
||||||
format=<b>%s</b>\n%b
|
format=%b
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue