system/nix/home.nix

134 lines
2.9 KiB
Nix

{ config, pkgs, ... }:
let
secrets = import ./secrets.nix;
in
{
imports = [
./wm/xmonad.nix
./shell/zsh.nix
./progs/git.nix
./progs/pass.nix
./progs/himalaya.nix
./progs/nvim
./progs/exa.nix
./progs/zoxide.nix
./progs/hledger.nix
];
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
# 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;
# shell
shell.zsh.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;
# 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;
};
};
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;
}