Add home-manager config and dotfiles
This commit is contained in:
parent
070fd5231c
commit
7bf2c8aa84
|
@ -0,0 +1,48 @@
|
|||
{
|
||||
"nodes": {
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1697964592,
|
||||
"narHash": "sha256-fua0LKNLkYYK2Dgdm9P+VPdqrVgDXUIx+EkQAQByhuc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "219d268a69512ff520fe8da1739ac22d95d52355",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1697723726,
|
||||
"narHash": "sha256-SaTWPkI8a5xSHX/rrKzUe+/uVNy6zCGMXgoeMb7T9rg=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "7c9cc5a6e5d38010801741ac830a3f8fd667a7a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"home-manager": "home-manager",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
description = "Home Manager configuration of serge";
|
||||
|
||||
inputs = {
|
||||
# Specify the source of Home Manager and Nixpkgs.
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { nixpkgs, home-manager, ... }:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in {
|
||||
homeConfigurations."serge" = home-manager.lib.homeManagerConfiguration {
|
||||
inherit pkgs;
|
||||
|
||||
# Specify your home configuration modules here, for example,
|
||||
# the path to your home.nix.
|
||||
modules = [ ./home.nix ];
|
||||
|
||||
# Optionally use extraSpecialArgs
|
||||
# to pass through arguments to home.nix
|
||||
};
|
||||
};
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
theme = "everforest_dark"
|
||||
|
||||
[editor]
|
||||
line-number = "relative"
|
||||
cursorline = true
|
||||
auto-save = true
|
||||
bufferline = "multiple"
|
||||
color-modes = true
|
||||
|
||||
[editor.soft-wrap]
|
||||
enable = true
|
||||
|
||||
[editor.statusline]
|
||||
right = ["diagnostics", "selections", "position", "position-percentage", "file-encoding"]
|
||||
mode.normal = "NORMAL"
|
||||
mode.insert = "INSERT"
|
||||
mode.select = "SELECT"
|
||||
|
||||
[editor.cursor-shape]
|
||||
normal = "block"
|
||||
insert = "bar"
|
||||
select = "underline"
|
||||
|
||||
[editor.file-picker]
|
||||
hidden = false
|
|
@ -0,0 +1,260 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home.username = "serge";
|
||||
home.homeDirectory = "/home/serge";
|
||||
|
||||
# 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 = "22.11";
|
||||
|
||||
home.packages = with pkgs; [
|
||||
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
|
||||
# # You can also create simple shell scripts directly inside your
|
||||
# # configuration. For example, this adds a command 'my-hello' to your
|
||||
# # environment:
|
||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||
# echo "Hello, ${config.home.username}!"
|
||||
# '')
|
||||
gnomeExtensions.user-themes
|
||||
gnomeExtensions.caffeine
|
||||
];
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
|
||||
home.file = {
|
||||
# TODO: install language servers and figure out the best way to configure Helix
|
||||
".config/helix/".source = ./helix;
|
||||
};
|
||||
|
||||
# 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/serge/etc/profile.d/hm-session-vars.sh
|
||||
#
|
||||
# if you don't want to manage your shell through Home Manager.
|
||||
home.sessionVariables = {
|
||||
EDITOR = "hx";
|
||||
};
|
||||
|
||||
# Let Home Manager install and manage itself.
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
# Enable a plugin (here grc for colorized command output) from nixpkgs
|
||||
{ name = "tide"; src = pkgs.fishPlugins.tide.src; }
|
||||
# Manually packaging and enable a plugin
|
||||
{
|
||||
name = "z";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "jethrokuan";
|
||||
repo = "z";
|
||||
rev = "e0e1b9dfdba362f8ab1ae8c1afc7ccf62b89f7eb";
|
||||
sha256 = "0dbnir6jbwjpjalz14snzd3cgdysgcs3raznsijd6savad3qhijc";
|
||||
};
|
||||
}
|
||||
];
|
||||
# TODO: check your config from dotfiles
|
||||
};
|
||||
|
||||
# TODO: install keyd or another way to use CapsLock for Esc
|
||||
# TODO: color-scheme-monitor?
|
||||
# TODO: zellij?
|
||||
|
||||
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = {
|
||||
env.TERM = "xterm-256color";
|
||||
window.decorations = "full";
|
||||
font.normal.family = "FiraCode Nerd Font";
|
||||
font.normal.style = "Regular";
|
||||
font.bold.family = "FiraCode Nerd Font";
|
||||
font.bold.style = "Bold";
|
||||
font.italic.family = "FiraCode Nerd Font";
|
||||
font.italic.style = "MediumItalic";
|
||||
font.bold_italic.family = "FiraCode Nerd Font";
|
||||
font.bold_italic.style = "BoldItalic";
|
||||
font.size = 14.0;
|
||||
font.offset = {
|
||||
x = 0;
|
||||
y = 4;
|
||||
};
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
draw_bold_text_with_bright_colors = true;
|
||||
|
||||
shell = "${pkgs.fish}/bin/fish";
|
||||
# TODO: add theme
|
||||
# TODO: check wezterm for an alternative
|
||||
};
|
||||
};
|
||||
|
||||
programs.lazygit = {
|
||||
enable = true;
|
||||
settings = {
|
||||
git = {
|
||||
paging = {
|
||||
colorArg = "always";
|
||||
pager = "delta --dark --paging=never";
|
||||
};
|
||||
overrideGpg = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "Serhii Korzh";
|
||||
userEmail = "serge.korzh@pm.me";
|
||||
# TODO: check aliases that I'm used to and change email according to project used
|
||||
# TODO: add GPG signing
|
||||
delta = {
|
||||
enable = true;
|
||||
options = {
|
||||
navigate = true;
|
||||
syntax-theme = "base16-256";
|
||||
features = "side-by-side line-numbers decorations";
|
||||
whitespace-error-style = "22 reverse";
|
||||
decorations = {
|
||||
commit-decoration-style = "bold yellow box ul";
|
||||
file-style = "bold yellow ul";
|
||||
file-decoration-style = "none";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = {
|
||||
core = {
|
||||
whitespace = "space-before-tab, trailing-space";
|
||||
};
|
||||
credential = {
|
||||
helper = "cache --timeout=3600";
|
||||
};
|
||||
commit = {
|
||||
verbose = true;
|
||||
};
|
||||
diff = {
|
||||
algorithm = "histogram";
|
||||
renames = "copies";
|
||||
mnemonicprefix = true;
|
||||
colormoved = "default";
|
||||
};
|
||||
push = {
|
||||
default = "simple";
|
||||
autoSetupRemote = true;
|
||||
};
|
||||
merge = {
|
||||
conflictstyle = "zdiff3";
|
||||
};
|
||||
rerere = {
|
||||
enabled = 1;
|
||||
};
|
||||
pull = {
|
||||
rebase = true;
|
||||
};
|
||||
rebase = {
|
||||
autostash = true;
|
||||
updateRefs = true;
|
||||
};
|
||||
transfer = {
|
||||
credentialsInUrl = "warn";
|
||||
};
|
||||
absorb = {
|
||||
maxstack = 50;
|
||||
};
|
||||
};
|
||||
|
||||
aliases = {
|
||||
a = "add";
|
||||
ap = "add --patch";
|
||||
b = "branch -vv";
|
||||
bd = "branch -d";
|
||||
bdd = "branch -D";
|
||||
c = "commit";
|
||||
ca = "commit --amend";
|
||||
co = "checkout";
|
||||
cp = "cherry-pick";
|
||||
d = "diff";
|
||||
dc = "diff --cached";
|
||||
ds = "diff --staged";
|
||||
f = "fetch";
|
||||
fx = "commit --fixup";
|
||||
g = "grep -n";
|
||||
hrd = "reset --hard";
|
||||
l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %C(yellow)%an%Creset' --all --abbrev-commit --date=relative";
|
||||
ls = "log --stat --oneline"; # show log with filediffs only
|
||||
m = "merge";
|
||||
mm = "merge origin/master";
|
||||
p = "push";
|
||||
pf = "push --force-with-lease";
|
||||
pl = "pull --rebase";
|
||||
r = "rebase";
|
||||
ra = "rebase --abort";
|
||||
rc = "rebase --continue";
|
||||
ri = "rebase --interactive --autosquash";
|
||||
rom = "rebase origin/master";
|
||||
rs = "rebase --skip";
|
||||
s = "status";
|
||||
sh = "!git-sh";
|
||||
sq = "commit --squash";
|
||||
st = "diff-tree --no-commit-id --name-only -r"; # show file tree of commit
|
||||
sw = "show";
|
||||
w = "whatchanged";
|
||||
|
||||
undo = "reset --soft HEAD^";
|
||||
standup = "shortlog --since='1 week ago'";
|
||||
who = "shortlog -s -n --no-merges";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
programs.vscode = {
|
||||
enable = true;
|
||||
package = pkgs.vscodium;
|
||||
};
|
||||
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
iconTheme = {
|
||||
name = "Papirus-Dark";
|
||||
package = pkgs.papirus-icon-theme;
|
||||
};
|
||||
cursorTheme = {
|
||||
name = "Numix-Cursor";
|
||||
package = pkgs.numix-cursor-theme;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
name = "Numix-Cursor";
|
||||
package = pkgs.numix-cursor-theme;
|
||||
size = 36;
|
||||
x11.enable = true;
|
||||
};
|
||||
|
||||
dconf.settings = {
|
||||
"org/gnome/shell" = {
|
||||
disable-user-extensions = false;
|
||||
enabled-extensions = [
|
||||
"caffeine@patapon.info"
|
||||
"user-theme@gnome-shell-extensions.gcampax.github.com"
|
||||
];
|
||||
};
|
||||
"org/gnome/desktop/interface" = {
|
||||
enable-hot-corners = false;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
Loading…
Reference in New Issue