2023-04-18 11:48:52 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2023-12-21 13:02:24 +00:00
|
|
|
let
|
2024-08-19 14:41:19 +00:00
|
|
|
# unstable = import
|
|
|
|
# (builtins.fetchTarball https://github.com/nixos/nixpkgs/tarball/7afa2c97ebb0585d00c64c112344483e89e00545)
|
|
|
|
# # reuse the current configuration
|
|
|
|
# { config = config.nixpkgs.config; };
|
|
|
|
#
|
2024-05-30 10:16:42 +00:00
|
|
|
#startupScript = pkgs.pkgs.writeShellScriptBin "hyprland-start" ''
|
|
|
|
# ${pkgs.waybar}/bin/waybar &
|
|
|
|
# ${pkgs.swww}/bin/swww init &
|
|
|
|
#
|
|
|
|
# sleep 1
|
2024-02-11 16:46:51 +00:00
|
|
|
|
2024-05-30 10:16:42 +00:00
|
|
|
# ${pkgs.swww}/bin/swww img /home/mrflos/Nextcloud/Images/Wallpapers/chihiro014.jpg &
|
|
|
|
# '';
|
2023-12-27 08:52:43 +00:00
|
|
|
in {
|
|
|
|
# TODO can we automate the installation of home-manager ?
|
2024-07-03 07:46:47 +00:00
|
|
|
# sudo nix-channel --add https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz home-manager
|
2024-02-15 19:36:26 +00:00
|
|
|
imports = [
|
2024-05-30 10:16:42 +00:00
|
|
|
#<home-manager/nixos>
|
|
|
|
<home-manager/nix-darwin>
|
2024-02-15 19:36:26 +00:00
|
|
|
];
|
2023-12-27 08:52:43 +00:00
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
users.users.mrflos = {
|
2024-05-30 10:16:42 +00:00
|
|
|
#isNormalUser = true;
|
2023-12-27 08:52:43 +00:00
|
|
|
description = "mrflos";
|
|
|
|
createHome = true;
|
2024-05-30 10:16:42 +00:00
|
|
|
#extraGroups = ["users" "docker" "libvirtd" "lxd" "networkmanager" "wheel" ];
|
2023-12-27 08:52:43 +00:00
|
|
|
uid = 1000;
|
|
|
|
shell = pkgs.zsh;
|
2024-05-30 10:16:42 +00:00
|
|
|
home = "/Users/mrflos";
|
2023-12-27 08:52:43 +00:00
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
nix.settings.trusted-users = [ "mrflos" ];
|
2024-05-30 10:16:42 +00:00
|
|
|
home-manager.backupFileExtension = "backup";
|
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
|
2024-05-30 10:16:42 +00:00
|
|
|
# swww
|
|
|
|
# grimblast
|
|
|
|
#swaylock
|
|
|
|
#waybar
|
2023-12-27 08:52:43 +00:00
|
|
|
yarn
|
2023-12-21 13:02:24 +00:00
|
|
|
];
|
2023-12-22 06:06:23 +00:00
|
|
|
|
2024-05-30 10:16:42 +00:00
|
|
|
#imports = [
|
|
|
|
# (plasma-manager + "/modules")
|
|
|
|
# ./home-plasma.nix
|
|
|
|
#];
|
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
|
|
|
};
|
2024-03-25 06:05:43 +00:00
|
|
|
home.sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
};
|
2024-07-03 07:02:15 +00:00
|
|
|
home.sessionPath = [
|
|
|
|
"$HOME/.local/bin"
|
|
|
|
"$HOME/go/bin"
|
|
|
|
];
|
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;
|
2024-04-07 10:02:04 +00:00
|
|
|
#tls.enable = true;
|
|
|
|
#tls.useStartTls = true;
|
2023-11-29 07:17:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
smtp = {
|
|
|
|
host = "mrflos.pw";
|
|
|
|
port = 587;
|
2024-04-07 10:02:04 +00:00
|
|
|
#tls.useStartTls = true;
|
2023-11-29 07:17:07 +00:00
|
|
|
};
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
|
2024-04-07 10:02:04 +00:00
|
|
|
smtp = {
|
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 465;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
"contact@yeswiki.net" = {
|
|
|
|
realName = "YesWiki.net";
|
|
|
|
userName = "contact@yeswiki.net";
|
|
|
|
address = "contact@yeswiki.net";
|
|
|
|
|
|
|
|
primary = false;
|
|
|
|
thunderbird = { enable = true; };
|
|
|
|
imap = {
|
|
|
|
host = "mail.infomaniak.com";
|
|
|
|
port = 993;
|
|
|
|
};
|
|
|
|
|
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";
|
2024-03-16 17:14:36 +00:00
|
|
|
aliases = {
|
|
|
|
fa = "fetch --all --tags --prune --recurse-submodules --force";
|
|
|
|
};
|
2023-12-27 08:52:43 +00:00
|
|
|
extraConfig = {
|
|
|
|
pull.rebase = true;
|
|
|
|
init.defaultBranch = "main";
|
2024-03-25 06:05:43 +00:00
|
|
|
core.editor = "nvim";
|
2023-12-27 08:52:43 +00:00
|
|
|
core.fileMode = false;
|
|
|
|
};
|
2023-04-18 11:48:52 +00:00
|
|
|
};
|
2024-08-19 14:41:19 +00:00
|
|
|
|
2023-12-27 08:52:43 +00:00
|
|
|
neovim = {
|
2024-07-03 07:46:47 +00:00
|
|
|
defaultEditor = true;
|
2023-12-27 08:52:43 +00:00
|
|
|
viAlias = true;
|
|
|
|
vimAlias = 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;
|
2024-07-03 07:46:47 +00:00
|
|
|
autosuggestion.enable = true;
|
2024-01-11 18:19:05 +00:00
|
|
|
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-04-07 10:02:04 +00:00
|
|
|
g = "lazygit";
|
2024-03-25 16:54:02 +00:00
|
|
|
kdenix = "nix run github:pjones/plasma-manager --extra-experimental-features nix-command --extra-experimental-features flakes > /home/mrflos/Developpements/nixos-config/modules/home-plasma.nix";
|
2024-01-11 18:19:05 +00:00
|
|
|
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-08-19 14:41:19 +00:00
|
|
|
socks = "ssh -N -f -C -D 9090 mrflos@yunohost.yeswiki.net -p 6742";
|
|
|
|
vi = "/run/current-system/sw/bin/nvim";
|
|
|
|
vim = "/run/current-system/sw/bin/nvim";
|
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-08-19 14:41:19 +00:00
|
|
|
export PHP_CS_FIXER_IGNORE_ENV=1
|
2024-01-23 19:28:11 +00:00
|
|
|
export PATH="$HOME/.local/bin:$BUN_INSTALL/bin:$PATH"
|
2024-07-28 09:10:46 +00:00
|
|
|
eval "$(atuin init zsh)"
|
2024-07-03 07:46:47 +00:00
|
|
|
eval "$(zoxide init zsh)"
|
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 = ''
|
2024-02-11 16:46:51 +00:00
|
|
|
zstyle :omz:plugins:ssh-agent helper ksshaskpass
|
|
|
|
zstyle :omz:plugins:ssh-agent agent-forwarding yes
|
2024-01-12 17:09:25 +00:00
|
|
|
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
|
|
|
|
2024-05-30 10:16:42 +00:00
|
|
|
#services.ssh-agent.enable = true;
|
|
|
|
#wayland.windowManager.hyprland.enable = true;
|
|
|
|
#wayland.windowManager.hyprland.settings = {
|
|
|
|
# exec-once = ''${startupScript}/bin/hyprland-start'';
|
|
|
|
# "$mod" = "SUPER";
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# assign apps
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$term" = "kitty";
|
|
|
|
# "$editor" = "nvim";
|
|
|
|
# "$file" = "dolphin";
|
|
|
|
# "$browser" = "firefox";
|
2024-02-11 16:46:51 +00:00
|
|
|
|
2024-05-30 10:16:42 +00:00
|
|
|
# bind = [
|
|
|
|
# ", Print, exec, grimblast copy area"
|
2024-02-11 16:46:51 +00:00
|
|
|
# Window/Session actions
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod, Q, killactive"
|
|
|
|
# "ALT, F4, killactive"
|
|
|
|
# "$mod, delete, exit" # kill hyperland session
|
|
|
|
# "$mod, W, togglefloating" # toggle the window on focus to float
|
|
|
|
# "$mod, G, togglegroup" # toggle the window on focus to float
|
|
|
|
# "ALT, return, fullscreen" # toggle the window on focus to fullscreen
|
|
|
|
# "$mod, L, exec, swaylock" # lock screen
|
2024-02-11 16:46:51 +00:00
|
|
|
# "$mod, backspace, exec, wlogout-launcher-hyprland 1" # logout menu
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$CONTROL, ESCAPE, exec, systemctl-toggle --user waybar.service"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Application shortcuts
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod, T, exec, $term" # open terminal
|
|
|
|
# "$mod, E, exec, $file" # open file manager
|
|
|
|
# "$mod, C, exec, $editor" # open vscode
|
|
|
|
# "$mod, F, exec, $browser" # open browser
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Move focus with mainMod + arrow keys
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod, left, movefocus, l"
|
|
|
|
# "$mod, right, movefocus, r"
|
|
|
|
# "$mod, up, movefocus, u"
|
|
|
|
# "$mod, down, movefocus, d"
|
|
|
|
# "ALT, Tab, movefocus, d"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Switch workspaces relative to the active workspace with mainMod + CTRL + [←→]
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod CTRL, right, workspace, r+1"
|
|
|
|
# "$mod CTRL, left, workspace, r-1"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# move to the first empty workspace instantly with mainMod + CTRL + [↓]
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod CTRL, down, workspace, empty"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Move active window to a relative workspace with mainMod + CTRL + ALT + [←→]
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod CTRL ALT, right, movetoworkspace, r+1"
|
|
|
|
# "$mod CTRL ALT, left, movetoworkspace, r-1"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Move active window around current workspace with mainMod + SHIFT + CTRL [←→↑↓]
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod SHIFT $CONTROL, left, movewindow, l"
|
|
|
|
# "$mod SHIFT $CONTROL, right, movewindow, r"
|
|
|
|
# "$mod SHIFT $CONTROL, up, movewindow, u"
|
|
|
|
# "$mod SHIFT $CONTROL, down, movewindow, d"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Scroll through existing workspaces with mainMod + scroll
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod, mouse_down, workspace, e+1"
|
|
|
|
# "$mod, mouse_up, workspace, e-1"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Special workspaces (scratchpad)
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod ALT, S, movetoworkspacesilent, special"
|
|
|
|
# "$mod, S, togglespecialworkspace,"
|
2024-02-11 16:46:51 +00:00
|
|
|
|
|
|
|
# Toggle Layout
|
2024-05-30 10:16:42 +00:00
|
|
|
# "$mod, J, togglesplit," # dwindle
|
|
|
|
# ]
|
|
|
|
# ++ (
|
2024-02-11 16:46:51 +00:00
|
|
|
# workspaces
|
|
|
|
# binds $mod + [shift +] {1..10} to [move to] workspace {1..10}
|
2024-05-30 10:16:42 +00:00
|
|
|
# builtins.concatLists (builtins.genList (
|
|
|
|
# x: let
|
|
|
|
# ws = let
|
|
|
|
# c = (x + 1) / 10;
|
|
|
|
# in
|
|
|
|
# builtins.toString (x + 1 - (c * 10));
|
|
|
|
# in [
|
|
|
|
# "$mod, ${ws}, workspace, ${toString (x + 1)}"
|
|
|
|
# "$mod SHIFT, ${ws}, movetoworkspace, ${toString (x + 1)}"
|
|
|
|
# "$mod ALT, ${ws}, movetoworkspacesilent, ${toString (x + 1)}" # Move window silently to workspace Super + Alt + [0-9]
|
|
|
|
# ]
|
|
|
|
# )
|
|
|
|
# 10)
|
|
|
|
# );
|
|
|
|
#
|
|
|
|
# # Move/Resize windows with mainMod + LMB/RMB and dragging
|
|
|
|
# bindm = [
|
|
|
|
# "$mod, mouse:272, movewindow"
|
|
|
|
# "$mod, mouse:273, resizewindow"
|
|
|
|
# ];
|
|
|
|
|
|
|
|
# # Resize windows
|
|
|
|
# binde = [
|
|
|
|
# "$mod SHIFT, right, resizeactive, 30 0"
|
|
|
|
# "$mod SHIFT, left, resizeactive, -30 0"
|
|
|
|
# "$mod SHIFT, up, resizeactive, 0 -30"
|
|
|
|
# "$mod SHIFT, down, resizeactive, 0 30"
|
|
|
|
# ];
|
|
|
|
# };
|
2024-01-11 18:19:05 +00:00
|
|
|
|
2023-04-14 20:51:52 +00:00
|
|
|
};
|
|
|
|
}
|