forked from nyanloutre/nixos-config
152 lines
2.6 KiB
Nix
152 lines
2.6 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
time.timeZone = "Europe/Paris";
|
|
|
|
programs.nixvim = {
|
|
enable = true;
|
|
viAlias = true;
|
|
vimAlias = true;
|
|
files = {
|
|
"ftplugin/nix.lua" = {
|
|
opts = {
|
|
tabstop = 8;
|
|
shiftwidth = 4;
|
|
softtabstop = 0;
|
|
expandtab = true;
|
|
smarttab = true;
|
|
background = "dark";
|
|
mouse = "";
|
|
};
|
|
};
|
|
};
|
|
plugins = {
|
|
lualine.enable = true;
|
|
lsp = {
|
|
enable = true;
|
|
servers = {
|
|
nixd.enable = true;
|
|
ruff.enable = true;
|
|
};
|
|
};
|
|
bufferline.enable = true;
|
|
telescope.enable = true;
|
|
which-key.enable = true;
|
|
treesitter.enable = true;
|
|
cmp = {
|
|
enable = true;
|
|
autoEnableSources = true;
|
|
settings.sources = [
|
|
{ name = "nvim_lsp"; }
|
|
{ name = "path"; }
|
|
{ name = "buffer"; }
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
environment.systemPackages = with pkgs; [
|
|
# Gestionnaires de version
|
|
tig
|
|
gitAndTools.hub
|
|
quilt
|
|
|
|
# Gestion de paquets
|
|
nix-prefetch-scripts
|
|
nox
|
|
nix-index
|
|
|
|
# Système
|
|
smartmontools
|
|
htop
|
|
lshw
|
|
usbutils
|
|
|
|
# Réseau
|
|
inetutils
|
|
rclone
|
|
lftp
|
|
nfs-utils
|
|
nmap
|
|
|
|
# Divers
|
|
fzf
|
|
file
|
|
ncdu
|
|
yt-dlp
|
|
tldr
|
|
starship
|
|
|
|
# Audio
|
|
beets
|
|
|
|
# Outils
|
|
borgbackup
|
|
binutils
|
|
bat
|
|
molly-guard
|
|
nix-template
|
|
lz4
|
|
|
|
# Développement
|
|
openssl
|
|
treefmt
|
|
nixfmt-rfc-style
|
|
];
|
|
|
|
users.defaultUserShell = pkgs.zsh;
|
|
programs = {
|
|
tmux = {
|
|
enable = true;
|
|
clock24 = true;
|
|
};
|
|
|
|
zsh = {
|
|
enable = true;
|
|
autosuggestions.enable = true;
|
|
enableCompletion = true;
|
|
syntaxHighlighting.enable = true;
|
|
interactiveShellInit = ''
|
|
source "$(${pkgs.fzf}/bin/fzf-share)/key-bindings.zsh"
|
|
eval "$(starship init zsh)"
|
|
'';
|
|
ohMyZsh = {
|
|
enable = true;
|
|
plugins = [
|
|
"git"
|
|
"colored-man-pages"
|
|
"command-not-found"
|
|
"extract"
|
|
"nix"
|
|
];
|
|
customPkgs = with pkgs; [
|
|
nix-zsh-completions
|
|
];
|
|
};
|
|
};
|
|
|
|
bash.interactiveShellInit = ''
|
|
eval "$(starship init bash)"
|
|
'';
|
|
|
|
git.enable = true;
|
|
};
|
|
|
|
environment.variables =
|
|
let
|
|
starshipConfToml = pkgs.writeText "starship.toml" ''
|
|
[[battery.display]]
|
|
threshold = 50
|
|
'';
|
|
in
|
|
{
|
|
EDITOR = "nvim";
|
|
STARSHIP_CONFIG = "${starshipConfToml}";
|
|
};
|
|
|
|
nix.gc.automatic = true;
|
|
nix.gc.options = "--delete-older-than 15d";
|
|
systemd.timers.nix-gc.timerConfig.Persistent = true;
|
|
|
|
}
|