update and add btop

This commit is contained in:
Niccolo Borgioli 2024-12-18 19:10:09 +01:00
parent 08e860823b
commit 7cc3345d92
2 changed files with 65 additions and 64 deletions

12
flake.lock generated
View File

@ -7,11 +7,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1731235328, "lastModified": 1734344598,
"narHash": "sha256-NjavpgE9/bMe/ABvZpyHIUeYF1mqR5lhaep3wB79ucs=", "narHash": "sha256-wNX3hsScqDdqKWOO87wETUEi7a/QlPVgpC/Lh5rFOuA=",
"owner": "nix-community", "owner": "nix-community",
"repo": "home-manager", "repo": "home-manager",
"rev": "60bb110917844d354f3c18e05450606a435d2d10", "rev": "83ecd50915a09dca928971139d3a102377a8d242",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -22,11 +22,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1731139594, "lastModified": 1734424634,
"narHash": "sha256-IigrKK3vYRpUu+HEjPL/phrfh7Ox881er1UEsZvw9Q4=", "narHash": "sha256-cHar1vqHOOyC7f1+tVycPoWTfKIaqkoe1Q6TnKzuti4=",
"owner": "nixos", "owner": "nixos",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "76612b17c0ce71689921ca12d9ffdc9c23ce40b2", "rev": "d3c42f187194c26d9f0309a8ecc469d6c878ce33",
"type": "github" "type": "github"
}, },
"original": { "original": {

117
home.nix
View File

@ -1,73 +1,74 @@
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
home.username = "root"; home.username = "root";
home.homeDirectory = "/root"; home.homeDirectory = "/root";
# #
# You should not change this value, even if you update Home Manager. If you do # You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager # want to update the value, then make sure to first check the Home Manager
# release notes. # release notes.
home.stateVersion = "24.05"; # Please read the comment before changing. home.stateVersion = "24.05"; # Please read the comment before changing.
home.packages = [ home.packages = [
pkgs.neovim pkgs.neovim
pkgs.tmux pkgs.tmux
pkgs.oh-my-posh pkgs.oh-my-posh
pkgs.git pkgs.git
pkgs.gnutar pkgs.gnutar
pkgs.btop
(pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) (pkgs.nerdfonts.override { fonts = [ "JetBrainsMono" ]; })
]; ];
home.file = { home.file = {
".config/omp/config.yaml".source= ./files/omp/config.yaml; ".config/omp/config.yaml".source = ./files/omp/config.yaml;
}; };
home.sessionVariables = { home.sessionVariables = {
EDITOR = "nvim"; EDITOR = "nvim";
}; };
programs.home-manager.enable = true; programs.home-manager.enable = true;
home.shellAliases = { home.shellAliases = {
l="ls -hal"; l = "ls -hal";
dc="docker compose"; dc = "docker compose";
rsync="rsync -az --info=progress2"; rsync = "rsync -az --info=progress2";
t="tmux new-session -A -s main"; t = "tmux new-session -A -s main";
e="nvim"; e = "nvim";
hms="home-manager switch --flake ~/nix#root -b backup"; hms = "home-manager switch --flake ~/nix#root -b backup";
}; };
programs.fish = { programs.fish = {
enable=true; enable = true;
shellInit='' shellInit = ''
oh-my-posh init fish --config ~/.config/omp/config.yaml | source oh-my-posh init fish --config ~/.config/omp/config.yaml | source
''; '';
}; };
programs.bash = { programs.bash = {
enable=true; enable = true;
}; };
programs.tmux = { programs.tmux = {
enable=true; enable = true;
clock24=true; clock24 = true;
mouse=true; mouse = true;
extraConfig= '' extraConfig = ''
# switch panes using Alt-arrow without prefix # switch panes using Alt-arrow without prefix
bind -n M-Left select-pane -L bind -n M-Left select-pane -L
bind -n M-Right select-pane -R bind -n M-Right select-pane -R
bind -n M-Up select-pane -U bind -n M-Up select-pane -U
bind -n M-Down select-pane -D bind -n M-Down select-pane -D
# switch panes using jkhl # switch panes using jkhl
bind h select-pane -L bind h select-pane -L
bind l select-pane -R bind l select-pane -R
bind j select-pane -U bind j select-pane -U
bind k select-pane -D bind k select-pane -D
''; '';
shell = "${pkgs.fish}/bin/fish"; shell = "${pkgs.fish}/bin/fish";
terminal = "tmux-256color"; terminal = "tmux-256color";
}; };
} }