nix
This commit is contained in:
parent
9622e5b39e
commit
cc1cd41529
27 changed files with 241 additions and 177 deletions
10
.editorconfig
Normal file
10
.editorconfig
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
insert_final_newline = true
|
||||||
|
|
||||||
|
[*.nix]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 2
|
54
README.md
54
README.md
|
@ -1,46 +1,26 @@
|
||||||
## Configurations
|
## Dotfiles
|
||||||
|
|
||||||
- [Neovim Nightly](https://github.com/neovim/neovim)
|
- [Neovim Nightly](https://github.com/neovim/neovim)
|
||||||
- [Fish Shell](https://github.com/fish-shell/fish-shell)
|
- [Fish Shell](https://github.com/fish-shell/fish-shell)
|
||||||
- And more
|
- And more
|
||||||
|
|
||||||
Pick and choose - you might want to change some stuff (git config for example).
|
See [packages.nix]() for a list of programs that I use, which `home-manager`
|
||||||
|
installs automatically.
|
||||||
## Fonts
|
|
||||||
|
|
||||||
You will have to install the fonts I use in these dotfiles separately
|
|
||||||
|
|
||||||
- [ttf-jetbrains-mono-nerd](https://github.com/ryanoasis/nerd-fonts)
|
|
||||||
|
|
||||||
## Tools
|
|
||||||
|
|
||||||
- [ripgrep](https://github.com/BurntSushi/ripgrep) `grep` alternative (used by nvim)
|
|
||||||
- [fd](https://github.com/sharkdp/fd) - `find` alternative (used by nvim)
|
|
||||||
- [lsd](https://github.com/lsd-rs/lsd) - `ls` alternative
|
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
Either copy and paste anything you like, or use *Nix*
|
||||||
|
[home-manager](https://github.com/nix-community/home-manager) (recommended)
|
||||||
|
|
||||||
- Clone the repository (e.g into `~/.dotfiles`)
|
- Clone the repository (e.g into `~/.dotfiles`)
|
||||||
|
- `cd ~/.dotfiles`
|
||||||
```
|
- Install [Nix](https://nixos.org/download)
|
||||||
git clone https://git.nikos.gg/nikos/dotfiles.git ~/.dotfiles
|
- Enable `flakes`:
|
||||||
cd ~/.dotfiles
|
- Using your editor, open the nix configuration (`/etc/nix/nix.conf`)
|
||||||
```
|
- Add the following line: `experimental-features = nix-command flakes`
|
||||||
|
- Edit `flakes.nix`, `home.nix` and `packages.nix` to your liking (add/remove
|
||||||
- For automated dotfile linking use [just](https://github.com/casey/just)
|
packages, configs, etc.)
|
||||||
- Use `just add target` where target is the config directory
|
- **Double check your nix config**, you'll probably want to edit them for yourself,
|
||||||
|
especially things like the git config
|
||||||
```
|
- On your first run: `nix run home-manager/master -- switch --flake ~/.dotfiles`
|
||||||
cd ~/.dotfiles
|
- On subsequent runs: `home-manager switch --flake ~/.dotfiles`
|
||||||
just add fish
|
|
||||||
just add nvim
|
|
||||||
just add wezterm
|
|
||||||
```
|
|
||||||
|
|
||||||
- Or, manually link the directory you need
|
|
||||||
|
|
||||||
```
|
|
||||||
ln -s ~/.dotfiles/fish/dot-config/fish ~/.config/fish
|
|
||||||
ln -s ~/.dotfiles/nvim/dot-config/nvim ~/.config/nvim
|
|
||||||
ln -s ~/.dotfiles/wezterm/dot-config/wezterm ~/.config/wezterm
|
|
||||||
```
|
|
||||||
|
|
105
flake.lock
Normal file
105
flake.lock
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": "systems"
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1685518550,
|
||||||
|
"narHash": "sha256-o2d0KcvaXzTrPRIo0kOLV0/QXHhDQ5DTi+OxcjO8xqY=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "a1720a10a6cfe8234c0e93907ffe81be440f4cef",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"home-manager": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695550077,
|
||||||
|
"narHash": "sha256-xoxR/iY69/3lTnnZDP6gf3J46DUKPcf+Y1jH03tfZXE=",
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"rev": "a88df2fb101778bfd98a17556b3a2618c6c66091",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-community",
|
||||||
|
"repo": "home-manager",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"neovim": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"dir": "contrib",
|
||||||
|
"lastModified": 1695564269,
|
||||||
|
"narHash": "sha256-hawh5Z4NCiFV7KRLBZBAPNLUPqk/SGOJF/0d3jz8BW8=",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "neovim",
|
||||||
|
"rev": "61ecb3e16c22eec9cb8eb77f76d9e8ddfc3601bc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"dir": "contrib",
|
||||||
|
"owner": "neovim",
|
||||||
|
"repo": "neovim",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1695360818,
|
||||||
|
"narHash": "sha256-JlkN3R/SSoMTa+CasbxS1gq+GpGxXQlNZRUh9+LIy/0=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "e35dcc04a3853da485a396bdd332217d0ac9054f",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"home-manager": "home-manager",
|
||||||
|
"neovim": "neovim",
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
41
flake.nix
Normal file
41
flake.nix
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
{
|
||||||
|
description = "Home Manager configuration";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
home-manager = {
|
||||||
|
url = "github:nix-community/home-manager";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
neovim = {
|
||||||
|
url = "github:neovim/neovim?dir=contrib";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { nixpkgs, home-manager, neovim, ... }:
|
||||||
|
let
|
||||||
|
system = "x86_64-linux"; # change your system type here
|
||||||
|
user = "nikos"; # change your user here
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
homeConfigurations.${user} = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
|
||||||
|
# Specify your home configuration modules here, for example,
|
||||||
|
# the path to your home.nix.
|
||||||
|
modules = [
|
||||||
|
./home.nix
|
||||||
|
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(final: prev: {
|
||||||
|
neovim = neovim.packages.${system}.neovim;
|
||||||
|
})
|
||||||
|
];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
[user]
|
|
||||||
email = nikos@papadakis.xyz
|
|
||||||
name = Nikos Papadakis
|
|
||||||
signingkey = 78871F9905ADFF02
|
|
||||||
[pull]
|
|
||||||
rebase = true
|
|
||||||
[branch]
|
|
||||||
autosetuprebase = always
|
|
||||||
[gpg]
|
|
||||||
program = gpg2
|
|
||||||
[commit]
|
|
||||||
gpgsign = true
|
|
||||||
[init]
|
|
||||||
defaultBranch = main
|
|
61
home.nix
Normal file
61
home.nix
Normal file
|
@ -0,0 +1,61 @@
|
||||||
|
{ config, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
home.username = "nikos";
|
||||||
|
home.homeDirectory = "/home/nikos";
|
||||||
|
|
||||||
|
# This value determines the Home Manager release that your configuration is
|
||||||
|
# compatible with. This helps avoid breakage when a new Home Manager release
|
||||||
|
# introduces backwards incompatible changes.
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# release notes.
|
||||||
|
home.stateVersion = "23.05"; # Please read the comment before changing.
|
||||||
|
|
||||||
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
|
# plain files is through 'home.file'.
|
||||||
|
home.file = {
|
||||||
|
".config/nvim".source = ./nvim;
|
||||||
|
# ".config/fish".source = ./fish;
|
||||||
|
};
|
||||||
|
|
||||||
|
# The home.packages option allows you to install Nix packages into your
|
||||||
|
# environment.
|
||||||
|
home.packages = import ./packages.nix pkgs;
|
||||||
|
|
||||||
|
fonts.fontconfig.enable = true;
|
||||||
|
|
||||||
|
# You can also manage environment variables but you will have to manually
|
||||||
|
# source
|
||||||
|
#
|
||||||
|
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# /etc/profiles/per-user/nikos/etc/profile.d/hm-session-vars.sh
|
||||||
|
#
|
||||||
|
# if you don't want to manage your shell through Home Manager.
|
||||||
|
# home.sessionVariables = {
|
||||||
|
# # EDITOR = "emacs";
|
||||||
|
# };
|
||||||
|
|
||||||
|
programs.git = {
|
||||||
|
enable = true;
|
||||||
|
userName = "Nikos Papadakis";
|
||||||
|
userEmail = "nikos@papadakis.xyz";
|
||||||
|
signing.key = "78871F9905ADFF02";
|
||||||
|
signing.signByDefault = true;
|
||||||
|
includes = [
|
||||||
|
{
|
||||||
|
contents = {
|
||||||
|
init.defaultBranch = "main";
|
||||||
|
pull.rebase = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
# Let Home Manager install and manage itself.
|
||||||
|
programs.home-manager.enable = true;
|
||||||
|
}
|
7
packages.nix
Normal file
7
packages.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
pkgs: with pkgs; [
|
||||||
|
neovim # neovim nightly
|
||||||
|
ripgrep # "rg" cli, alternative to grep, used by nvim
|
||||||
|
fd # find alternative, used by nvim
|
||||||
|
lsd # "ls" alternative
|
||||||
|
(nerdfonts.override { fonts = [ "JetBrainsMono" ]; }) # nerdfonts jetbrains mono
|
||||||
|
]
|
|
@ -1,123 +0,0 @@
|
||||||
palette = "catppuccin_frappe"
|
|
||||||
|
|
||||||
[character]
|
|
||||||
success_symbol = "[[♥](green) ❯](maroon)"
|
|
||||||
error_symbol = "[❯](red)"
|
|
||||||
vicmd_symbol = "[❮](green)"
|
|
||||||
|
|
||||||
[directory]
|
|
||||||
truncation_length = 4
|
|
||||||
# Catppuccin 'lavender'
|
|
||||||
style = "bold lavender"
|
|
||||||
|
|
||||||
[palettes.catppuccin_macchiato]
|
|
||||||
rosewater = "#f4dbd6"
|
|
||||||
flamingo = "#f0c6c6"
|
|
||||||
pink = "#f5bde6"
|
|
||||||
mauve = "#c6a0f6"
|
|
||||||
red = "#ed8796"
|
|
||||||
maroon = "#ee99a0"
|
|
||||||
peach = "#f5a97f"
|
|
||||||
yellow = "#eed49f"
|
|
||||||
green = "#a6da95"
|
|
||||||
teal = "#8bd5ca"
|
|
||||||
sky = "#91d7e3"
|
|
||||||
sapphire = "#7dc4e4"
|
|
||||||
blue = "#8aadf4"
|
|
||||||
lavender = "#b7bdf8"
|
|
||||||
text = "#cad3f5"
|
|
||||||
subtext1 = "#b8c0e0"
|
|
||||||
subtext0 = "#a5adcb"
|
|
||||||
overlay2 = "#939ab7"
|
|
||||||
overlay1 = "#8087a2"
|
|
||||||
overlay0 = "#6e738d"
|
|
||||||
surface2 = "#5b6078"
|
|
||||||
surface1 = "#494d64"
|
|
||||||
surface0 = "#363a4f"
|
|
||||||
base = "#24273a"
|
|
||||||
mantle = "#1e2030"
|
|
||||||
crust = "#181926"
|
|
||||||
|
|
||||||
[palettes.catppuccin_frappe]
|
|
||||||
rosewater = "#f2d5cf"
|
|
||||||
flamingo = "#eebebe"
|
|
||||||
pink = "#f4b8e4"
|
|
||||||
mauve = "#ca9ee6"
|
|
||||||
red = "#e78284"
|
|
||||||
maroon = "#ea999c"
|
|
||||||
peach = "#ef9f76"
|
|
||||||
yellow = "#e5c890"
|
|
||||||
green = "#a6d189"
|
|
||||||
teal = "#81c8be"
|
|
||||||
sky = "#99d1db"
|
|
||||||
sapphire = "#85c1dc"
|
|
||||||
blue = "#8caaee"
|
|
||||||
lavender = "#babbf1"
|
|
||||||
text = "#c6d0f5"
|
|
||||||
subtext1 = "#b5bfe2"
|
|
||||||
subtext0 = "#a5adce"
|
|
||||||
overlay2 = "#949cbb"
|
|
||||||
overlay1 = "#838ba7"
|
|
||||||
overlay0 = "#737994"
|
|
||||||
surface2 = "#626880"
|
|
||||||
surface1 = "#51576d"
|
|
||||||
surface0 = "#414559"
|
|
||||||
base = "#303446"
|
|
||||||
mantle = "#292c3c"
|
|
||||||
crust = "#232634"
|
|
||||||
|
|
||||||
[palettes.catppuccin_latte]
|
|
||||||
rosewater = "#dc8a78"
|
|
||||||
flamingo = "#dd7878"
|
|
||||||
pink = "#ea76cb"
|
|
||||||
mauve = "#8839ef"
|
|
||||||
red = "#d20f39"
|
|
||||||
maroon = "#e64553"
|
|
||||||
peach = "#fe640b"
|
|
||||||
yellow = "#df8e1d"
|
|
||||||
green = "#40a02b"
|
|
||||||
teal = "#179299"
|
|
||||||
sky = "#04a5e5"
|
|
||||||
sapphire = "#209fb5"
|
|
||||||
blue = "#1e66f5"
|
|
||||||
lavender = "#7287fd"
|
|
||||||
text = "#4c4f69"
|
|
||||||
subtext1 = "#5c5f77"
|
|
||||||
subtext0 = "#6c6f85"
|
|
||||||
overlay2 = "#7c7f93"
|
|
||||||
overlay1 = "#8c8fa1"
|
|
||||||
overlay0 = "#9ca0b0"
|
|
||||||
surface2 = "#acb0be"
|
|
||||||
surface1 = "#bcc0cc"
|
|
||||||
surface0 = "#ccd0da"
|
|
||||||
base = "#eff1f5"
|
|
||||||
mantle = "#e6e9ef"
|
|
||||||
crust = "#dce0e8"
|
|
||||||
|
|
||||||
[palettes.catppuccin_mocha]
|
|
||||||
rosewater = "#f5e0dc"
|
|
||||||
flamingo = "#f2cdcd"
|
|
||||||
pink = "#f5c2e7"
|
|
||||||
mauve = "#cba6f7"
|
|
||||||
red = "#f38ba8"
|
|
||||||
maroon = "#eba0ac"
|
|
||||||
peach = "#fab387"
|
|
||||||
yellow = "#f9e2af"
|
|
||||||
green = "#a6e3a1"
|
|
||||||
teal = "#94e2d5"
|
|
||||||
sky = "#89dceb"
|
|
||||||
sapphire = "#74c7ec"
|
|
||||||
blue = "#89b4fa"
|
|
||||||
lavender = "#b4befe"
|
|
||||||
text = "#cdd6f4"
|
|
||||||
subtext1 = "#bac2de"
|
|
||||||
subtext0 = "#a6adc8"
|
|
||||||
overlay2 = "#9399b2"
|
|
||||||
overlay1 = "#7f849c"
|
|
||||||
overlay0 = "#6c7086"
|
|
||||||
surface2 = "#585b70"
|
|
||||||
surface1 = "#45475a"
|
|
||||||
surface0 = "#313244"
|
|
||||||
base = "#1e1e2e"
|
|
||||||
mantle = "#181825"
|
|
||||||
crust = "#11111b"
|
|
|
@ -1,3 +0,0 @@
|
||||||
indent_type = "Spaces"
|
|
||||||
indent_width = 4
|
|
||||||
no_call_parentheses = true
|
|
Loading…
Reference in a new issue