nix/home.nix
2023-04-14 16:36:53 +01:00

238 lines
5.1 KiB
Nix

{ config, pkgs, user, ... }:
# https://nix-community.github.io/home-manager/options.html
{
# don't change
home.stateVersion = "22.05";
programs.home-manager.enable = true;
home.username = "tristan";
home.homeDirectory = "/home/tristan";
xdg.userDirs.enable = true;
home.packages = with pkgs; [
exa
libnotify
du-dust
playerctl
gimp
logseq
quickemu
ansible
bitwarden
nextcloud-client
godot_4
ardour
blender
musescore
];
programs.fish = {
enable = true;
};
programs.git = {
enable = true;
userName = "tristan";
userEmail = "tristan@tristans.cloud";
aliases = {
graph = "log --oneline --all --graph";
};
};
programs.swaylock.settings = {
clock = true;
screenshots = true;
effect-scale = 0.5;
effect-blur = "10x10";
};
services.swayidle.enable = true;
services.swayidle.events = [
{ event = "before-sleep"; command = "${pkgs.swaylock}/bin/swaylock"; }
{ event = "lock"; command = "${pkgs.swaylock}/bin/swaylock"; }
];
programs.waybar.enable = true;
programs.waybar.settings = {
mainBar = {
layer = "top";
position = "top";
height = 30;
modules-left = [ "wlr/taskbar" "hyprland/window" ];
modules-right = [ "mpd" "pulseaudio" "clock" "tray" ];
clock = {
format = "📅 {:%a %b-%d %I:%M %p}";
};
pulseaudio = {
format-muted = "🔇 {volume}%";
format = "{icon} {volume}";
format-icons.default = ["🔈" "🔉" "🔊"];
on-click = "pavucontrol";
};
mpd = {
server = "192.168.1.2";
on-click = "foot -e ncmpcpp";
};
};
};
programs.waybar.systemd.enable = true;
services.udiskie = {
enable = true;
notify = true;
};
gtk = {
enable = true;
theme = {
name = "Materia-dark";
package = pkgs.materia-theme;
};
gtk3.bookmarks = [
"file:///home/tristan/Documents"
];
};
services.mako.enable = true;
programs.ncmpcpp.enable = true;
programs.ncmpcpp.settings.mpd_host = "music.local";
services.mpd-mpris.enable = true;
services.mpd-mpris.mpd = {
host = "music.local";
};
programs.mpv.enable = true;
programs.mpv.bindings = {
l = "seek 5";
h = "seek -5";
e = "add chapter 1";
b = "add chapter -1";
">" = "multiply speed 1.1";
"<" = "multiply speed 1/1.1";
"." = "frame-step";
"," = "frame-back-step";
"ctrl+n" = "playlist-next";
"ctrl+p" = "playlist-prev";
k = "add volume 2";
j = "add volume -2";
m = "cycle mute";
c = "cycle sub-visibility";
};
programs.foot.enable = true;
programs.foot.server.enable = true;
programs.foot.settings = {
main = {
term = "xterm-256color";
font = "mono:size=12";
};
colors = {
foreground="abb2bf";
background="282c34";
regular0="222222";
regular1="eb3a26";
regular2="7fbc59";
regular3="e9db65";
regular4="4781d1";
regular5="7d74bb";
regular6="50a2bd";
regular7="dcdccc";
bright0="666666";
bright1="e15d4e";
bright2="8fbd73";
bright3="e3d97e";
bright4="6791ce";
bright5="8f88be";
bright6="6caabf";
bright7="ffffff";
};
};
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs; [
vscode-extensions.asvetliakov.vscode-neovim
vscode-extensions.jnoortheen.nix-ide
];
userSettings = {
"vscode-neovim.neovimExecutablePaths.linux" = "/run/current-system/sw/bin/nvim";
};
};
services.nextcloud-client.enable = true;
services.nextcloud-client.startInBackground = true;
accounts.email.accounts."tristan@tristans.cloud" = {
notmuch.enable = true;
neomutt.enable = true;
mbsync.enable = true;
userName = "tristan@tristans.cloud";
realName = "Tristan";
address = "tristan@tristans.cloud";
primary = true;
passwordCommand = "rbw get privateemail";
smtp = {
host = "mail.privateemail.com";
port = 465;
tls.enable = true;
};
imap = {
host = "mail.privateemail.com";
port = 993;
tls.enable = true;
};
};
programs.notmuch.enable = true;
programs.neomutt = {
enable = true;
vimKeys = true;
sort = "reverse-date";
sidebar.enable = true;
};
programs.mbsync.enable = true;
services.mbsync.enable = true;
programs.rbw = {
enable = true;
settings = {
email = "tristan@tristans.cloud";
base_url = "https://vault.tristans.cloud";
};
};
programs.ssh.enable = true;
programs.ssh.matchBlocks = {
"git.tristans.cloud" = {
user = "git";
port = 2222;
};
};
programs.neovim.defaultEditor = true;
programs.lf.enable = true;
programs.lf.keybindings = {
D = "trash";
};
home.sessionPath = [
"$HOME/.local/scripts"
];
home.file.".local/scripts" = {
enable = true;
source = ./scripts;
executable = true;
recursive = true;
};
home.file.".config/hypr" = {
enable = true;
source = ./hyprland;
recursive = true;
};
}