Add nix native configs. Add dotfiles dir
This commit is contained in:
parent
7c37492c69
commit
9e58368444
3 changed files with 83 additions and 82 deletions
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader.grub.enable = true;
|
boot.loader.grub.enable = true;
|
||||||
boot.loader.grub.device = "/dev/sda";
|
boot.loader.grub.device = "/dev/vda";
|
||||||
boot.loader.grub.useOSProber = true;
|
boot.loader.grub.useOSProber = true;
|
||||||
|
|
||||||
networking.hostName = "nixos"; # Define your hostname.
|
networking.hostName = "nixos"; # Define your hostname.
|
||||||
|
|
@ -102,11 +102,9 @@
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
# wget
|
# wget
|
||||||
alacritty
|
# alacritty, neovim and gh come from Home Manager (home.nix) for user leo
|
||||||
curl
|
curl
|
||||||
gh
|
|
||||||
git
|
git
|
||||||
neovim
|
|
||||||
gnome-extension-manager
|
gnome-extension-manager
|
||||||
gnomeExtensions.dash-to-dock
|
gnomeExtensions.dash-to-dock
|
||||||
];
|
];
|
||||||
|
|
|
||||||
11
dotfiles/init.vim
Normal file
11
dotfiles/init.vim
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
" Neovim configuration, loaded by Home Manager
|
||||||
|
" (programs.neovim.extraConfig in ../home.nix)
|
||||||
|
|
||||||
|
set number
|
||||||
|
|
||||||
|
set noswapfile
|
||||||
|
|
||||||
|
" Indentation
|
||||||
|
set autoindent
|
||||||
|
set shiftwidth=4
|
||||||
|
set expandtab
|
||||||
148
home.nix
148
home.nix
|
|
@ -13,92 +13,67 @@
|
||||||
# release notes.
|
# release notes.
|
||||||
home.stateVersion = "26.05"; # Please read the comment before changing.
|
home.stateVersion = "26.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# Packages that have no Home Manager module (or that need no config).
|
||||||
# environment.
|
# Programs configured via `programs.<name>.enable` below are installed
|
||||||
|
# automatically, so they do not belong here.
|
||||||
home.packages = [
|
home.packages = [
|
||||||
pkgs.tmux
|
|
||||||
pkgs.gh
|
pkgs.gh
|
||||||
|
pkgs.pi-coding-agent
|
||||||
|
pkgs.proton-vpn
|
||||||
|
pkgs.vscodium
|
||||||
];
|
];
|
||||||
|
|
||||||
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
#############################################################################
|
||||||
# plain files is through 'home.file'.
|
# Terminal
|
||||||
home.file = {
|
#############################################################################
|
||||||
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
|
programs.alacritty = {
|
||||||
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
|
enable = true;
|
||||||
# # symlink to the Nix store copy.
|
# This attribute set is translated into ~/.config/alacritty/alacritty.toml
|
||||||
# ".screenrc".source = dotfiles/screenrc;
|
settings = {
|
||||||
"./.config/alacritty/alacritty.toml".text = ''
|
window = {
|
||||||
[window]
|
padding = { x = 5; y = 5; };
|
||||||
opacity = 0.75
|
decorations = "None";
|
||||||
padding = { x = 5, y = 5}
|
};
|
||||||
decorations = "None"
|
colors.primary.background = "#000000";
|
||||||
|
font.size = 11;
|
||||||
[colors.primary]
|
};
|
||||||
background = "#000000"
|
|
||||||
|
|
||||||
[font]
|
|
||||||
size = 11
|
|
||||||
'';
|
|
||||||
|
|
||||||
"./.config/nvim/init.vim".text = ''
|
|
||||||
set number
|
|
||||||
|
|
||||||
set noswapfile
|
|
||||||
|
|
||||||
" Indentation
|
|
||||||
set autoindent
|
|
||||||
set shiftwidth=4
|
|
||||||
'';
|
|
||||||
|
|
||||||
|
|
||||||
".tmux.conf".text = ''
|
|
||||||
#Add a mapping for reloading the conf file
|
|
||||||
bind r source-file ~/.tmux.conf \; display-message "RELOADING CONFIGURATION FILE…"
|
|
||||||
|
|
||||||
# remap prefix from 'C-b' to 'C-a'
|
|
||||||
unbind C-b
|
|
||||||
set-option -g prefix C-a
|
|
||||||
bind-key C-a send-prefix
|
|
||||||
|
|
||||||
# Enable mouse control (clickable windows, panes, resizable panes)
|
|
||||||
set -g mouse on
|
|
||||||
|
|
||||||
set -g status-style bg=white,fg=black
|
|
||||||
|
|
||||||
# List of plugins
|
|
||||||
set -g @plugin 'tmux-plugins/tpm'
|
|
||||||
|
|
||||||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
|
|
||||||
run '~/.tmux/plugins/tpm/tpm'
|
|
||||||
'';
|
|
||||||
|
|
||||||
# # You can also set the file content immediately.
|
|
||||||
# ".gradle/gradle.properties".text = ''
|
|
||||||
# org.gradle.console=verbose
|
|
||||||
# org.gradle.daemon.idletimeout=3600000
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
# Home Manager can also manage your environment variables through
|
#############################################################################
|
||||||
# 'home.sessionVariables'. These will be explicitly sourced when using a
|
# tmux
|
||||||
# shell provided by Home Manager. If you don't want to manage your shell
|
#############################################################################
|
||||||
# through Home Manager then you have to manually source 'hm-session-vars.sh'
|
programs.tmux = {
|
||||||
# located at either
|
enable = true;
|
||||||
#
|
prefix = "C-a"; # replaces the unbind C-b / set prefix dance
|
||||||
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
mouse = true;
|
||||||
#
|
extraConfig = ''
|
||||||
# or
|
# Home Manager writes the config to ~/.config/tmux/tmux.conf
|
||||||
#
|
bind r source-file ~/.config/tmux/tmux.conf \; display-message "RELOADING CONFIGURATION FILE…"
|
||||||
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
set -g status-style bg=white,fg=black
|
||||||
# or
|
'';
|
||||||
#
|
|
||||||
# /etc/profiles/per-user/leo/etc/profile.d/hm-session-vars.sh
|
|
||||||
#
|
|
||||||
home.sessionVariables = {
|
|
||||||
# EDITOR = "emacs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Neovim
|
||||||
|
#############################################################################
|
||||||
|
programs.neovim = {
|
||||||
|
enable = true;
|
||||||
|
viAlias = true;
|
||||||
|
vimAlias = true;
|
||||||
|
defaultEditor = true;
|
||||||
|
# The actual vimscript lives in dotfiles/init.vim so your editor can
|
||||||
|
# highlight it and no Nix string escaping is needed.
|
||||||
|
extraConfig = builtins.readFile ./dotfiles/init.vim;
|
||||||
|
plugins = with pkgs.vimPlugins; [
|
||||||
|
# vim-sensible
|
||||||
|
# telescope-nvim
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
#############################################################################
|
||||||
|
# Shell
|
||||||
|
#############################################################################
|
||||||
programs.bash = {
|
programs.bash = {
|
||||||
enable = true;
|
enable = true;
|
||||||
shellAliases = {
|
shellAliases = {
|
||||||
|
|
@ -107,4 +82,21 @@
|
||||||
count = "ls -1 | wc -l";
|
count = "ls -1 | wc -l";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Plain files that have no dedicated module can still be managed here, either
|
||||||
|
# inline with `.text` or - preferably - from a file in dotfiles/:
|
||||||
|
#
|
||||||
|
# home.file.".screenrc".source = ./dotfiles/screenrc;
|
||||||
|
# xdg.configFile."foo".source = ./dotfiles/foo; # whole directory
|
||||||
|
#
|
||||||
|
# For a config you tweak constantly, symlink to the working tree instead so
|
||||||
|
# edits apply without a rebuild:
|
||||||
|
#
|
||||||
|
# home.file.".config/nvim".source =
|
||||||
|
# config.lib.file.mkOutOfStoreSymlink "/home/leo/NixOS/dotfiles/nvim";
|
||||||
|
home.file = { };
|
||||||
|
|
||||||
|
home.sessionVariables = {
|
||||||
|
# EDITOR is set by programs.neovim.defaultEditor
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue