Compare commits

...

6 commits

27 changed files with 283 additions and 245 deletions

View file

@ -1,12 +1,9 @@
{ ... }:
{
imports = [
./zsh.nix
./git.nix
./pass.nix
./gnupg.nix
./neovim
./vifm
./bat.nix
./eza.nix
./direnv.nix

View file

@ -1,122 +0,0 @@
{ pkgs, config, ... }:
let
nvim-spell-fr-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
};
nvim-spell-fr-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
};
in
{
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary;
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions;
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
extraPackages = with pkgs; [
# LSP Servers
clang-tools
lua-language-server
marksman
nil
nodePackages.bash-language-server
python3Packages.python-lsp-server
rnix-lsp
shellcheck
# Formatters
nixfmt
shfmt
];
extraLuaConfig = (builtins.readFile ./files/options.lua);
plugins = with pkgs.vimPlugins; [
{
plugin = nvim-autopairs;
type = "lua";
config = ''
local autopair = require("nvim-autopairs").setup {}
'';
}
{
plugin = nvim-base16;
type = "lua";
config = ''
vim.cmd.colorscheme 'base16-default-dark'
'';
}
{
plugin = nvim-cmp;
type = "lua";
config = (builtins.readFile ./files/cmp.lua);
}
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp-cmdline
cmp_luasnip
{
plugin = gitsigns-nvim;
type = "lua";
config = (builtins.readFile ./files/luasnip.lua);
}
{
plugin = indent-blankline-nvim;
type = "lua";
config =''
require("ibl").setup{
indent = { char = ""},
}
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = (builtins.readFile ./files/lspconfig.lua);
}
{
plugin = lualine-nvim;
type = "lua";
config = (builtins.readFile ./files/lualine.lua);
}
luasnip
{
plugin = neo-tree-nvim;
type = "lua";
config = (builtins.readFile ./files/neotree.lua);
}
nui-nvim
plenary-nvim
{
plugin = (nvim-treesitter.withPlugins (p: [
p.bash
p.c
p.cpp
p.cmake
p.dockerfile
p.latex
p.lua
p.llvm
p.markdown
p.markdown_inline
p.python
p.vim
p.yaml
])
);
type = "lua";
config = ( builtins.readFile ./files/treesitter.lua);
}
{
plugin = which-key-nvim;
type = "lua";
config = ( builtins.readFile ./files/whichkey.lua );
}
];
};
}

View file

@ -1,12 +0,0 @@
{ pkgs, ...}:
{
home.packages = with pkgs; [
vifm
chafa # Preview images
poppler_utils # Preview PDF file
];
home.file.".config/vifm/vifmrc".source = ./files/vifmrc;
home.file.".config/vifm/colors/base16-default-dark.vifm".source = ./files/base16-default-dark.vifm;
home.file.".config/vifm/devicons.vifm".source = ./files/devicons.vifm;
}

View file

@ -1,68 +0,0 @@
{ pkgs, ... }:
{
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
defaultKeymap = "viins";
enableCompletion = true;
history = {
ignoreAllDups = true;
save = 10000;
share = true;
path = "$HOME/.local/share/zsh/history";
};
historySubstringSearch = {
enable = true;
searchDownKey = "^[OB";
searchUpKey = "^[OA";
};
completionInit = ''
autoload -Uz compinit
for dump in ''${ZDOTDIR}/.zcompdump(N.mh+24); do
compinit
done
compinit -C
'';
plugins = [
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "sindresorhus";
repo = "pure";
rev = "v1.21.0";
hash = "sha256-YfasTKCABvMtncrfoWR1Su9QxzCqPED18/BTXaJHttg=";
};
}
{
name = "base16-shell";
src = pkgs.fetchFromGitHub {
owner = "chriskempson";
repo = "base16-shell";
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
hash = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
};
}
{
name = "fast-syntax-highlighting";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "v1.55";
hash = "sha256-DWVFBoICroKaKgByLmDEo4O+xo6eA8YO792g8t8R7kA=";
};
}
{
name = "history-search-multi-word";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "history-search-multi-word";
rev = "c4dcddc1cd17e7e0909471703f3526170db0f475";
hash = "sha256-KgKm9qzFnwXDXwmTruPgC0tjmiTY5AiGdrWW4zDWUF4=";
};
}];
localVariables = {
BASE16_THEME = "$HOME/.config/zsh/plugins/base16";
};
};
}

View file

@ -1,5 +1,7 @@
{ ... }: {
config.modules = {
cli.neovim.enable = true;
cli.vifm.enable = true;
video.kdenlive.enable = false;
web.firefox.enable = true;
web.qutebrowser.enable = true;

View file

@ -0,0 +1,128 @@
{ lib, pkgs, config, ... }:
with lib;
let
cfg = config.modules.cli.neovim;
nvim-spell-fr-utf8-dictionary = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.spl";
sha256 = "abfb9702b98d887c175ace58f1ab39733dc08d03b674d914f56344ef86e63b61";
};
nvim-spell-fr-utf8-suggestions = builtins.fetchurl {
url = "http://ftp.vim.org/vim/runtime/spell/fr.utf-8.sug";
sha256 = "0294bc32b42c90bbb286a89e23ca3773b7ef50eff1ab523b1513d6a25c6b3f58";
};
in
{
options.modules.cli.neovim = {
enable = mkEnableOption "enable Neovim text editor";
};
config = mkIf cfg.enable {
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.spl".source = nvim-spell-fr-utf8-dictionary;
home.file."${config.xdg.configHome}/nvim/spell/fr.utf-8.sug".source = nvim-spell-fr-utf8-suggestions;
programs.neovim = {
enable = true;
defaultEditor = true;
vimAlias = true;
withNodeJs = true;
withPython3 = true;
extraPackages = with pkgs; [
# LSP Servers
clang-tools
lua-language-server
marksman
nil
nodePackages.bash-language-server
python3Packages.python-lsp-server
rnix-lsp
shellcheck
# Formatters
nixfmt
shfmt
];
extraLuaConfig = (builtins.readFile ./files/options.lua);
plugins = with pkgs.vimPlugins; [
{
plugin = nvim-autopairs;
type = "lua";
config = ''
local autopair = require("nvim-autopairs").setup {}
'';
}
{
plugin = nvim-base16;
type = "lua";
config = ''
vim.cmd.colorscheme 'base16-default-dark'
'';
}
{
plugin = nvim-cmp;
type = "lua";
config = (builtins.readFile ./files/cmp.lua);
}
cmp-buffer
cmp-nvim-lsp
cmp-path
cmp-cmdline
cmp_luasnip
{
plugin = gitsigns-nvim;
type = "lua";
config = (builtins.readFile ./files/luasnip.lua);
}
{
plugin = indent-blankline-nvim;
type = "lua";
config =''
require("ibl").setup{
indent = { char = ""},
}
'';
}
{
plugin = nvim-lspconfig;
type = "lua";
config = (builtins.readFile ./files/lspconfig.lua);
}
{
plugin = lualine-nvim;
type = "lua";
config = (builtins.readFile ./files/lualine.lua);
}
luasnip
{
plugin = neo-tree-nvim;
type = "lua";
config = (builtins.readFile ./files/neotree.lua);
}
nui-nvim
plenary-nvim
{
plugin = (nvim-treesitter.withPlugins (p: [
p.bash
p.c
p.cpp
p.cmake
p.dockerfile
p.latex
p.lua
p.llvm
p.markdown
p.markdown_inline
p.python
p.vim
p.yaml
])
);
type = "lua";
config = ( builtins.readFile ./files/treesitter.lua);
}
{
plugin = which-key-nvim;
type = "lua";
config = ( builtins.readFile ./files/whichkey.lua );
}
];
};
};
}

View file

@ -0,0 +1,21 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.vifm;
in
{
options.modules.cli.vifm = {
enable = mkEnableOption "enable Vifm file browser";
};
config = mkIf cfg.enable {
home.packages = with pkgs; [
vifm
chafa # Preview images
poppler_utils # Preview PDF file
];
home.file.".config/vifm/vifmrc".source = ./files/vifmrc;
home.file.".config/vifm/colors/base16-default-dark.vifm".source = ./files/base16-default-dark.vifm;
home.file.".config/vifm/devicons.vifm".source = ./files/devicons.vifm;
};
}

View file

@ -0,0 +1,76 @@
{ lib, config, pkgs, ... }:
with lib;
let
cfg = config.modules.cli.zsh;
in
{
options.modules.cli.zsh = {
enable = mkEnableOption "enable Zsh configuration";
};
config = mkIf cfg.enable {
programs.zsh = {
enable = true;
dotDir = ".config/zsh";
defaultKeymap = "viins";
enableCompletion = true;
history = {
ignoreAllDups = true;
save = 10000;
share = true;
path = "$HOME/.local/share/zsh/history";
};
historySubstringSearch = {
enable = true;
searchDownKey = "^[OB";
searchUpKey = "^[OA";
};
completionInit = ''
autoload -Uz compinit
for dump in ''${ZDOTDIR}/.zcompdump(N.mh+24); do
compinit
done
compinit -C
'';
plugins = [
{
name = "pure";
src = pkgs.fetchFromGitHub {
owner = "sindresorhus";
repo = "pure";
rev = "v1.21.0";
hash = "sha256-YfasTKCABvMtncrfoWR1Su9QxzCqPED18/BTXaJHttg=";
};
}
{
name = "base16-shell";
src = pkgs.fetchFromGitHub {
owner = "chriskempson";
repo = "base16-shell";
rev = "588691ba71b47e75793ed9edfcfaa058326a6f41";
hash = "sha256-X89FsG9QICDw3jZvOCB/KsPBVOLUeE7xN3VCtf0DD3E=";
};
}
{
name = "fast-syntax-highlighting";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "fast-syntax-highlighting";
rev = "v1.55";
hash = "sha256-DWVFBoICroKaKgByLmDEo4O+xo6eA8YO792g8t8R7kA=";
};
}
{
name = "history-search-multi-word";
src = pkgs.fetchFromGitHub {
owner = "zdharma-continuum";
repo = "history-search-multi-word";
rev = "c4dcddc1cd17e7e0909471703f3526170db0f475";
hash = "sha256-KgKm9qzFnwXDXwmTruPgC0tjmiTY5AiGdrWW4zDWUF4=";
};
}];
localVariables = {
BASE16_THEME = "$HOME/.config/zsh/plugins/base16";
};
};
};
}

View file

@ -1,6 +1,9 @@
{ ... }:
{
imports = [
./cli/neovim
./cli/vifm
./cli/zsh
./desktop/sway
./gaming/lutris
./video/kdenlive

View file

@ -91,14 +91,14 @@ in
userDirs = {
enable = true;
createDirectories = true;
documents = "documents";
download = "downloads";
music = "medias/musics";
pictures = "medias/images";
videos = "medias/videos";
templates = "tmp";
desktop = "documents";
publicShare = "tmp/public";
documents = "${config.home.homeDirectory}/documents";
download = "${config.home.homeDirectory}/downloads";
music = "${config.home.homeDirectory}/medias/musics";
pictures = "${config.home.homeDirectory}/medias/images";
videos = "${config.home.homeDirectory}/medias/videos";
templates = "${config.home.homeDirectory}/tmp";
desktop = "${config.home.homeDirectory}/documents";
publicShare = "${config.home.homeDirectory}/tmp/public";
};
};
};

View file

@ -29,9 +29,6 @@
# Allow fullscreen in Firefox windows
"full-screen-api.ignore-widgets" = true;
# Download preferences
"browser.download.dir" = "~/downloads";
# About:config show warning
"browser.aboutConfig.showWarning" = false;

View file

@ -100,26 +100,9 @@
# from a web page, and it lets them know which part of the page had been selected.
"dom.event.clipboardevents.enabled" = false;
# Disable Search Suggestions
# Firefox suggests search terms in the search field. This will send everything
# typed or pasted in the search field to the chosen search engine, even when you
# did not press enter.
"browser.search.suggest.enabled" = true;
# Disable Search Keyword
# When you mistype some url, Firefox starts a search even from urlbar. This
# feature is useful for quick searching, but may harm your privacy, when it's
# unintended.
"keyword.enabled" = true;
# Disable Fixup URLs
# When you type "something" in the urlbar and press enter, Firefox tries
# "something.com", if Fixup URLs is enabled.
"browser.fixup.alternate.enabled" = true;
"browser.fixup.alternate.enabled" = false;
# Tracking protection
"privacy.trackingprotection.enabled" = true;
"privacy.trackingprotection.pbmode.enabled" = true;
"privacy.trackingprotection.cryptomining.enabled" = true;
"privacy.trackingprotection.fingerprinting.enabled" = true;
}

View file

@ -8,4 +8,17 @@
# serve advertisements.
"browser.urlbar.groupLabels.enabled" = false;
"browser.urlbar.quicksuggest.enabled" = false;
"browser.urlbar.suggest.addons" = false;
"browser.urlbar.suggest.mdn" = false;
"browser.urlbar.suggest.pocket" = false;
"browser.search.suggest.enabled" = false;
"browser.urlbar.suggest.trending" = false;
"browser.urlbar.suggest.weather" = false;
"browser.urlbar.suggest.searches" = false;
# Disable Search Keyword
# When you mistype some url, Firefox starts a search even from urlbar. This
# feature is useful for quick searching, but may harm your privacy, when it's
# unintended.
"keyword.enabled" = false;
}

View file

@ -19,16 +19,16 @@
"browser.preferences.moreFromMozilla" = false;
# Do not save my logins
"signon.rememberSignons" = true;
"signon.rememberSignons" = false;
# Do not suggest some research
"browser.urlbar.suggest.searches" = true;
"browser.search.suggest.enabled" = true;
# do not override startus page
# do not override status page
"startup.homepage_override_url" = "";
"startup.homepage_welcome_url" = "";
# do not show bookmark page
"browser.toolbars.bookmarks.visibility" = "never";
# disable funsking malwares
"browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts.havePinned" = "";
"browser.newtabpage.pinned" = "";
}

View file

@ -9,10 +9,6 @@ in
enable = mkEnableOption "enable Firefox web browser";
};
config = mkIf cfg.enable {
nixpkgs.overlays = [
inputs.nur.overlay
];
programs.browserpass = {
enable = true;
browsers = ["firefox"];
@ -42,6 +38,30 @@ in
search = {
force = true;
default = "DuckDuckGo";
engines = {
"Nix Packages" = {
urls = [{
template = "https://search.nixos.org/packages";
params = [
{ name = "type"; value = "packages"; }
{ name = "query"; value = "{searchTerms}"; }
];
}];
icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
definedAliases = [ "@np" ];
};
"NixOS Wiki" = {
urls = [{ template = "https://nixos.wiki/index.php?search={searchTerms}"; }];
iconUpdateURL = "https://nixos.wiki/favicon.png";
updateInterval = 24 * 60 * 60 * 1000; # every day
definedAliases = [ "@nw" ];
};
"Bing".metaData.hidden = true;
"Google".metaData.hidden = true;
"Amazon.fr".metaData.hidden = true;
};
};
settings = merge [
(import ./conf/doh.nix)

View file

@ -5,7 +5,7 @@ let
in
{
options.modules.web.qutebrowser = {
enable = mkEnableOption "enable Kdenlive video editor";
enable = mkEnableOption "enable Qutebrowser web browser";
};
config = mkIf cfg.enable {
programs.qutebrowser = {