system/nix/home.nix

140 lines
3 KiB
Nix

{ config, pkgs, ... }:
let
secrets = import ./secrets.nix;
in
{
imports = (import ./wm) ++ (import ./shell) ++ (import ./progs);
targets.genericLinux.enable = true;
# Home Manager needs a bit of information about you and the
# paths it should manage.
home.username = secrets.home.name;
home.homeDirectory = secrets.home.dir;
home.keyboard = {
model = "pc105";
layout = "us,ru";
variant = "dvorak,";
options = ["grp:win_space_toggle"];
};
home.packages = with pkgs; [
# TODO: move packages to separate modules
asciinema # record the terminal
neofetch # command-line system information
# tools
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
# haskell
stylish-haskell # formatter
# database
postgresql_12 # 🤷 I need only psql
# browser
librewolf # a fork of firefox, focused on privacy, security and freedom
];
# window manager
wm = {
xmonad.enable = true;
bar.polybar.enable = true;
};
# shell
shell = {
zsh.enable = true;
prompt.starship.enable = true;
};
# programs
progs = {
git = with secrets.git; {
enable = true;
inherit userName;
inherit userEmail;
gpgKey = gpgSigningKey;
};
# password manager
pass.enable = true;
# email manager
himalaya.enable = true;
# finance manager
hledger.enable = true;
# file manager
vifm.enable = true;
# editor
nvim = {
enable = true;
default = true;
};
# tools
exa.enable = true;
zoxide.enable = true;
};
accounts.email = {
# TODO: add module for email account
accounts = secrets.emailAccounts;
};
# TODO: add module for lock screen
services.screen-locker = {
enable = true;
lockCmd = "/bin/bash -c ${config.home.homeDirectory}/scripts/lock.sh";
inactiveInterval = 15;
};
home.file = {
"scripts" = {
source = ../scripts;
recursive = true;
};
"pictures/wallpapers" = {
source = ../wallpapers;
recursive = true;
};
};
xsession.initExtra = ''
xrandr --output HDMI-A-0 --rotate right --left-of DisplayPort-1
'';
xdg = {
enable = true;
configFile = {
# add config for alacritty terminal
"alacritty/alacritty.yml".source = ../programs/alacritty/alacritty.yml;
"stylish-haskell/config.yaml".source = ../programs/stylish-haskell/config.yml;
};
};
# 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";
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}