2022-04-05 10:03:33 +03:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
secrets = import ./secrets.nix;
|
|
|
|
in
|
|
|
|
{
|
2022-04-06 14:15:34 +03:00
|
|
|
nixpkgs.overlays = [
|
|
|
|
(self: super: {
|
|
|
|
haskellPackages = super.haskellPackages.override {
|
|
|
|
overrides = hself: hsuper: {
|
|
|
|
xmonad = hsuper.xmonad_0_17_0;
|
|
|
|
xmonad-contrib = hsuper.xmonad-contrib_0_17_0;
|
|
|
|
xmonad-extras = hsuper.xmonad-extras_0_17_0;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-04-07 14:13:44 +03:00
|
|
|
targets.genericLinux.enable = true;
|
|
|
|
|
2022-04-05 10:03:33 +03:00
|
|
|
# Home Manager needs a bit of information about you and the
|
|
|
|
# paths it should manage.
|
2022-04-05 11:26:26 +03:00
|
|
|
home.username = secrets.home.name;
|
|
|
|
home.homeDirectory = secrets.home.dir;
|
2022-04-05 10:03:33 +03:00
|
|
|
|
2022-04-06 14:15:34 +03:00
|
|
|
home.keyboard = {
|
|
|
|
model = "pc105";
|
|
|
|
layout = "us,ru";
|
|
|
|
variant = "dvorak,";
|
|
|
|
options = ["grp:win_space_toggle"];
|
|
|
|
};
|
|
|
|
|
2022-04-05 10:03:33 +03:00
|
|
|
# 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 can update Home Manager without changing this value. See
|
|
|
|
# the Home Manager release notes for a list of state version
|
|
|
|
# changes in each release.
|
|
|
|
home.stateVersion = "21.11";
|
|
|
|
|
2022-04-06 14:15:34 +03:00
|
|
|
home.packages = with pkgs; [
|
|
|
|
dmenu # menu for x window system
|
|
|
|
xmobar # a minimalistic text based status bar
|
|
|
|
flameshot # powerful yet simple to use screenshot software
|
2022-04-05 17:47:31 +03:00
|
|
|
|
2022-04-06 14:15:34 +03:00
|
|
|
xh # friendly and fast tool for sending HTTP requests
|
|
|
|
fd # a simple, fast and user-friendly alternative to find
|
|
|
|
bat # a cat clone with syntax highlighting and git integration
|
|
|
|
|
|
|
|
postgresql_12 # 🤷 I need only psql
|
|
|
|
|
|
|
|
librewolf # a fork of firefox, focused on privacy, security and freedom
|
2022-04-05 17:18:23 +03:00
|
|
|
];
|
|
|
|
|
2022-04-05 17:47:31 +03:00
|
|
|
home.sessionVariables = {
|
|
|
|
EDITOR = "nvim";
|
|
|
|
};
|
|
|
|
|
2022-04-07 14:13:44 +03:00
|
|
|
xsession = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
windowManager.xmonad = {
|
|
|
|
enable = true;
|
|
|
|
enableContribAndExtras = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.trayer = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
|
|
|
SetDockType = true;
|
|
|
|
SetPartialStrut = true;
|
|
|
|
expand = true;
|
|
|
|
transparent = true;
|
|
|
|
alpha = 50;
|
|
|
|
edge = "top";
|
|
|
|
align = "right";
|
|
|
|
width = 4;
|
|
|
|
height = 24;
|
|
|
|
tint = "0x5f5f5f";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-04-05 10:03:33 +03:00
|
|
|
# Let Home Manager install and manage itself.
|
|
|
|
programs.home-manager.enable = true;
|
2022-04-05 10:42:47 +03:00
|
|
|
|
2022-04-05 17:18:23 +03:00
|
|
|
# enable z shell
|
2022-04-05 16:40:07 +03:00
|
|
|
programs.zsh = {
|
|
|
|
enable = true;
|
|
|
|
enableAutosuggestions = true;
|
|
|
|
defaultKeymap = "viins";
|
|
|
|
dotDir = ".config/zsh";
|
|
|
|
|
2022-04-05 17:02:37 +03:00
|
|
|
history = {
|
|
|
|
path = "${config.xdg.dataHome}/zsh/zsh_history";
|
|
|
|
expireDuplicatesFirst = true;
|
|
|
|
ignorePatterns = [
|
|
|
|
"rm *"
|
|
|
|
"kill *"
|
|
|
|
];
|
|
|
|
};
|
2022-04-05 16:40:07 +03:00
|
|
|
|
|
|
|
oh-my-zsh = {
|
|
|
|
enable = true;
|
|
|
|
theme = "robbyrussell";
|
|
|
|
};
|
2022-04-05 17:02:37 +03:00
|
|
|
|
|
|
|
initExtraFirst = ''
|
|
|
|
if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then
|
|
|
|
source $HOME/.nix-profile/etc/profile.d/nix.sh;
|
|
|
|
fi
|
|
|
|
|
|
|
|
source $HOME/.nix-profile/etc/profile.d/hm-session-vars.sh
|
|
|
|
|
|
|
|
export NIX_PATH=$HOME/.nix-defexpr/channels''${NIX_PATH:+:$NIX_PATH}
|
|
|
|
'';
|
2022-04-05 16:40:07 +03:00
|
|
|
};
|
|
|
|
|
2022-04-05 17:18:23 +03:00
|
|
|
# enable git VCS
|
2022-04-05 11:26:26 +03:00
|
|
|
programs.git = {
|
|
|
|
enable = true;
|
|
|
|
userName = secrets.git.name;
|
|
|
|
userEmail = secrets.git.email;
|
|
|
|
extraConfig = {
|
|
|
|
init.defaultBranch = "main";
|
|
|
|
pull.rebase = true;
|
|
|
|
};
|
2022-04-05 12:55:49 +03:00
|
|
|
aliases = {
|
|
|
|
co = "checkout";
|
|
|
|
st = "status -sb";
|
2022-04-07 14:26:29 +03:00
|
|
|
d = "diff";
|
|
|
|
dc = "diff --cached";
|
|
|
|
aa = "add .";
|
|
|
|
ai = "add -i";
|
|
|
|
c = "commit";
|
|
|
|
cm = "commit -m";
|
|
|
|
ca = "commit --amend";
|
|
|
|
cam = "commit --amend -m";
|
|
|
|
can = "commit --amend --no-edit";
|
|
|
|
p = "push";
|
|
|
|
pf = "push --force-with-lease";
|
|
|
|
rb = "rebase";
|
|
|
|
rbi = "rebase -i";
|
2022-04-05 12:55:49 +03:00
|
|
|
};
|
2022-04-05 11:26:26 +03:00
|
|
|
};
|
|
|
|
|
2022-04-05 17:18:23 +03:00
|
|
|
# replacement for 'ls' written in rust
|
2022-04-05 10:42:47 +03:00
|
|
|
programs.exa = {
|
|
|
|
enable = true;
|
2022-04-05 16:40:07 +03:00
|
|
|
enableAliases = true;
|
|
|
|
};
|
|
|
|
|
2022-04-05 17:18:23 +03:00
|
|
|
# a fast cd command that learns your habbits
|
|
|
|
programs.zoxide = {
|
|
|
|
enable = true;
|
|
|
|
enableZshIntegration = true;
|
|
|
|
};
|
|
|
|
|
2022-04-05 16:40:07 +03:00
|
|
|
xdg.configFile = {
|
2022-04-06 14:15:34 +03:00
|
|
|
# add config for alacritty terminal
|
2022-04-05 16:40:07 +03:00
|
|
|
"alacritty/alacritty.yml".source = ../programs/alacritty/alacritty.yml;
|
2022-04-06 14:15:34 +03:00
|
|
|
|
|
|
|
# add config for xmonad window manager
|
|
|
|
# "xmonad/xmonad.hs".source = ../programs/xmonad/xmonad.hs;
|
|
|
|
# "xmobar/xmobar.hs".source = ../programs/xmonad/xmobar.hs;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2022-04-05 10:03:33 +03:00
|
|
|
}
|