2023-04-14 20:51:52 +00:00
|
|
|
# Inject the right home-manager config for the machine.
|
2023-04-18 11:48:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-12-21 13:02:24 +00:00
|
|
|
let
|
|
|
|
treesitterWithGrammars = (pkgs.vimPlugins.nvim-treesitter.withPlugins (p: [
|
|
|
|
p.bash
|
|
|
|
p.comment
|
|
|
|
p.css
|
|
|
|
p.dockerfile
|
|
|
|
p.fish
|
|
|
|
p.gitattributes
|
|
|
|
p.gitignore
|
|
|
|
p.go
|
|
|
|
p.gomod
|
|
|
|
p.gowork
|
|
|
|
p.hcl
|
2024-01-23 19:28:11 +00:00
|
|
|
p.html
|
2023-12-21 13:02:24 +00:00
|
|
|
p.php
|
|
|
|
p.javascript
|
|
|
|
p.jq
|
|
|
|
p.json5
|
|
|
|
p.json
|
|
|
|
p.lua
|
|
|
|
p.make
|
|
|
|
p.markdown
|
|
|
|
p.nix
|
|
|
|
p.python
|
|
|
|
p.rust
|
2024-01-23 19:28:11 +00:00
|
|
|
p.twig
|
2023-12-21 13:02:24 +00:00
|
|
|
p.toml
|
|
|
|
p.typescript
|
|
|
|
p.vue
|
|
|
|
p.yaml
|
|
|
|
]));
|
2023-12-27 08:52:43 +00:00
|
|
|
in {
|
|
|
|
# TODO can we automate the installation of home-manager ?
|
|
|
|
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
|
|
|
|
imports = [ <home-manager/nixos> ];
|
2023-04-18 11:48:52 +00:00
|
|
|
|
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
#programs.home-manager.enable = true;
|
2023-12-27 08:52:43 +00:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
|
|
|
|
users.users.mrflos = {
|
|
|
|
isNormalUser = true;
|
|
|
|
description = "mrflos";
|
|
|
|
createHome = true;
|
|
|
|
extraGroups = [ "docker" "libvirtd" "lxd" "networkmanager" "wheel" ];
|
|
|
|
uid = 1000;
|
|
|
|
shell = pkgs.zsh;
|
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
nix.settings.trusted-users = [ "mrflos" ];
|
|
|
|
|
2023-04-18 11:48:52 +00:00
|
|
|
home-manager.users.mrflos = { pkgs, ... }: {
|
2023-11-03 08:09:19 +00:00
|
|
|
home.stateVersion = "23.05";
|
2023-12-27 08:52:43 +00:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
gcc
|
|
|
|
cmake
|
|
|
|
ripgrep
|
|
|
|
fd
|
|
|
|
lua-language-server
|
|
|
|
rust-analyzer-unwrapped
|
|
|
|
php83Packages.composer
|
|
|
|
nodejs_20
|
|
|
|
yarn
|
2023-12-21 13:02:24 +00:00
|
|
|
];
|
2023-12-22 06:06:23 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
home.file = {
|
|
|
|
"./.config/kitty/" = {
|
2023-12-30 13:49:35 +00:00
|
|
|
source = ../dotfiles/kitty;
|
2023-12-27 08:52:43 +00:00
|
|
|
recursive = true;
|
|
|
|
};
|
2023-12-21 13:02:24 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
"./.config/nvim/" = {
|
2023-12-30 13:49:35 +00:00
|
|
|
source = ../dotfiles/nvim;
|
2023-12-27 08:52:43 +00:00
|
|
|
recursive = true;
|
|
|
|
};
|
2023-12-21 13:02:24 +00:00
|
|
|
|
2023-12-30 09:23:49 +00:00
|
|
|
"./.config/tmux/" = {
|
2023-12-30 13:49:35 +00:00
|
|
|
source = ../dotfiles/tmux;
|
2023-12-30 09:23:49 +00:00
|
|
|
recursive = true;
|
|
|
|
};
|
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
# Treesitter is configured as a locally developed module in lazy.nvim
|
|
|
|
# we hardcode a symlink here so that we can refer to it in our lazy config
|
|
|
|
"./.local/share/nvim/nix/nvim-treesitter/" = {
|
|
|
|
recursive = true;
|
|
|
|
source = treesitterWithGrammars;
|
|
|
|
};
|
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
|
|
|
|
accounts.email.accounts = {
|
|
|
|
"mrflos@chmok.net" = {
|
|
|
|
realName = "Florian Schmitt";
|
|
|
|
userName = "mrflos@chmok.net";
|
|
|
|
address = "mrflos@chmok.net";
|
|
|
|
|
|
|
|
primary = true;
|
2023-12-27 08:52:43 +00:00
|
|
|
thunderbird = { enable = true; };
|
2023-04-18 11:48:52 +00:00
|
|
|
imap = {
|
2023-12-01 06:41:02 +00:00
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 993;
|
2023-04-18 11:48:52 +00:00
|
|
|
};
|
|
|
|
|
2023-06-19 12:52:25 +00:00
|
|
|
smtp = {
|
2023-12-01 06:41:02 +00:00
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 465;
|
2023-06-19 12:52:25 +00:00
|
|
|
};
|
|
|
|
};
|
2023-12-21 10:02:18 +00:00
|
|
|
"mrflos@yeswiki.pro" = {
|
|
|
|
realName = "Florian Schmitt - Yeswiki.pro";
|
|
|
|
userName = "mrflos@yeswiki.pro";
|
|
|
|
address = "mrflos@yeswiki.pro";
|
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
thunderbird = { enable = true; };
|
2023-12-21 10:02:18 +00:00
|
|
|
imap = {
|
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 993;
|
|
|
|
};
|
|
|
|
|
|
|
|
smtp = {
|
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 465;
|
|
|
|
};
|
|
|
|
};
|
2023-11-29 07:17:07 +00:00
|
|
|
"mrflos@mrflos.pw" = {
|
|
|
|
realName = "Florian Schmitt";
|
|
|
|
userName = "mrflos";
|
|
|
|
address = "mrflos@mrflos.pw";
|
|
|
|
|
|
|
|
primary = false;
|
2023-12-27 08:52:43 +00:00
|
|
|
thunderbird = { enable = true; };
|
2023-11-29 07:17:07 +00:00
|
|
|
imap = {
|
|
|
|
host = "mrflos.pw";
|
|
|
|
port = 993;
|
|
|
|
tls.enable = true;
|
|
|
|
tls.useStartTls = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
smtp = {
|
|
|
|
host = "mrflos.pw";
|
|
|
|
port = 587;
|
|
|
|
tls.useStartTls = true;
|
|
|
|
};
|
|
|
|
};
|
2023-06-19 12:52:25 +00:00
|
|
|
"contact@yeswiki.pro" = {
|
|
|
|
realName = "YesWiki.pro";
|
|
|
|
userName = "contact@yeswiki.pro";
|
|
|
|
address = "contact@yeswiki.pro";
|
|
|
|
|
|
|
|
primary = false;
|
2023-12-27 08:52:43 +00:00
|
|
|
thunderbird = { enable = true; };
|
2023-06-19 12:52:25 +00:00
|
|
|
imap = {
|
2023-12-01 06:41:02 +00:00
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 993;
|
2023-06-19 12:52:25 +00:00
|
|
|
};
|
|
|
|
|
2023-04-18 11:48:52 +00:00
|
|
|
smtp = {
|
2023-12-01 06:41:02 +00:00
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 465;
|
2023-04-18 11:48:52 +00:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
programs = {
|
2024-01-03 17:29:16 +00:00
|
|
|
direnv = {
|
|
|
|
enable = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
nix-direnv.enable = true;
|
|
|
|
};
|
2024-01-03 18:38:59 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
git = {
|
|
|
|
enable = true;
|
|
|
|
userName = "Florian Schmitt";
|
|
|
|
userEmail = "mrflos@gmail.com";
|
|
|
|
extraConfig = {
|
|
|
|
pull.rebase = true;
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
core.fileMode = false;
|
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
};
|
2023-06-19 12:52:25 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
neovim = {
|
|
|
|
enable = true;
|
|
|
|
viAlias = true;
|
|
|
|
vimAlias = true;
|
|
|
|
coc.enable = false;
|
2023-06-19 12:52:25 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
plugins = [ treesitterWithGrammars ];
|
|
|
|
};
|
2023-05-11 14:03:37 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
password-store = {
|
|
|
|
enable = true;
|
|
|
|
package = pkgs.pass.withExtensions (exts: [ exts.pass-otp ]);
|
|
|
|
settings = {
|
|
|
|
PASSWORD_STORE_DIR = "$XDG_DATA_HOME/password-store";
|
|
|
|
PASSWORD_STORE_KEY = "How to Hide This ?";
|
|
|
|
PASSWORD_STORE_CLIP_TIME = "60";
|
|
|
|
};
|
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
thunderbird = {
|
|
|
|
enable = true;
|
|
|
|
profiles.default = { isDefault = true; };
|
|
|
|
};
|
2024-01-11 14:18:56 +00:00
|
|
|
|
2024-01-11 18:19:05 +00:00
|
|
|
starship = {
|
|
|
|
enable = true;
|
|
|
|
settings = with builtins; fromTOML (readFile ../dotfiles/starship/starship.toml);
|
|
|
|
};
|
|
|
|
|
|
|
|
zsh = {
|
|
|
|
enable = true;
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
enableCompletion = true;
|
|
|
|
shellAliases = {
|
|
|
|
#tmux = "tmux -f ~/.config/tmux/tmux.conf attach || tmux -f ~/.config/tmux/tmux.conf new";
|
2024-01-15 17:21:11 +00:00
|
|
|
bunx = "bun --bun x";
|
2024-01-11 18:19:05 +00:00
|
|
|
ls = "lsd --hyperlink=auto";
|
|
|
|
icat = "kitty +kitten icat";
|
|
|
|
nixedit = "vi /etc/nixos";
|
|
|
|
nixupdate = "sudo nix-channel --update && sudo nixos-rebuild switch";
|
|
|
|
nixclean = "sudo nix-env --delete-generations old --profile /nix/var/nix/profiles/system && sudo /nix/var/nix/profiles/system/bin/switch-to-configuration switch && sudo nix-store --gc";
|
2024-01-23 19:28:11 +00:00
|
|
|
yeswiki-updater = "cd /home/mrflos/Developpements/yeswiki-installer/ && sudo php yeswiki-updater.php";
|
2024-01-11 18:19:05 +00:00
|
|
|
};
|
|
|
|
initExtra = ''
|
|
|
|
export BUN_INSTALL="$HOME/.bun"
|
2024-01-23 19:28:11 +00:00
|
|
|
export PATH="$HOME/.local/bin:$BUN_INSTALL/bin:$PATH"
|
2024-01-11 18:19:05 +00:00
|
|
|
'';
|
2024-01-11 18:51:15 +00:00
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
2024-01-12 17:09:25 +00:00
|
|
|
extraConfig = ''
|
|
|
|
zstyle :omz:plugins:ssh-agent lazy yes
|
|
|
|
'';
|
2024-01-11 18:51:15 +00:00
|
|
|
plugins = [ "git" "ssh-agent" ];
|
2024-01-11 18:19:05 +00:00
|
|
|
# theme = "robbyrussell";
|
2024-01-11 18:51:15 +00:00
|
|
|
};
|
2024-01-11 18:19:05 +00:00
|
|
|
};
|
2023-12-27 08:52:43 +00:00
|
|
|
};
|
2024-01-11 18:19:05 +00:00
|
|
|
|
|
|
|
services.ssh-agent.enable = true;
|
|
|
|
|
2023-04-14 20:51:52 +00:00
|
|
|
};
|
|
|
|
}
|