This repository has been archived on 2023-10-08. You can view files and clone it, but cannot push or open issues or pull requests.
nixos-home/home.nix

180 lines
4 KiB
Nix

{ pkgs, lib, ... }@args:
let
nurpkgs = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") { inherit pkgs; };
firefox-addons = import ./firefox-addons (args // {inherit nurpkgs; });
in
{
home = {
username = "pim";
homeDirectory = "/home/pim";
stateVersion = "23.05";
packages = with pkgs; [
keepassxc
nil
moonlight-qt
vlc
nicotine-plus
logseq
signal-desktop
telegram-desktop
strawberry
tree
];
};
services = {
syncthing.enable = true;
};
programs = {
home-manager.enable = true;
chromium.enable = true;
neovim = {
enable = true;
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
defaultEditor = true;
plugins = with pkgs.vimPlugins; [
nvim-lspconfig
gruvbox-nvim
leap-nvim
telescope-nvim
vim-commentary
vim-sleuth
gitsigns-nvim
];
extraLuaConfig = builtins.readFile ./neovim.lua;
};
alacritty = {
enable = true;
settings = import ./alacritty.nix;
};
firefox = {
enable = true;
profiles = {
default = {
id = 0;
isDefault = true;
settings = {
"browser.aboutConfig.showWarning" = false;
"browser.toolbars.bookmarks.visibility" = "always";
};
extensions = firefox-addons.default; # TODO: recursive
};
sue = {
id = 1;
extensions = firefox-addons.sue;
};
};
};
bash = {
enable = true;
shellAliases = {
htop = "btop";
gp = "git push";
gco = "git checkout";
gd = "git diff";
gc = "git commit";
gpl = "git pull";
gb = "git branch";
ga = "git add";
gl = "git log";
gs = "git status";
};
};
direnv = {
enable = true;
enableBashIntegration = true;
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "Pim Kunis";
userEmail = "pim@kunis.nl";
extraConfig = {
core.editor = "nvim";
push.autoSetupRemote = true;
};
};
fzf = {
enable = true;
enableBashIntegration = true;
};
ssh = {
enable = true;
matchBlocks = {
"github.com" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "github.com";
user = "pizzapim";
identitiesOnly = true;
};
"lewis" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "lewis.hyp";
};
"atlas" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "atlas.hyp";
};
"jefke" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "jefke.hyp";
};
"hermes" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "hermes.dmz";
};
"maestro" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "maestro.dmz";
};
"bancomart" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "bancomart.dmz";
};
"handjecontantje" = lib.hm.dag.entryBefore [ "*" ] {
hostname = "handjecontantje.dmz";
};
};
extraConfig = "User root";
};
thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
};
};
};
# Let home-manager manage the X session
xsession = {
enable = true;
};
xdg = {
configFile."keepassxc/keepassxc.ini".text = lib.generators.toINI {} (import ./keepassxc.nix);
desktopEntries.firefox-sue = {
categories = [ "Network" "WebBrowser" ];
exec = "firefox -P sue --name firefox %U";
genericName = "Web Browser";
icon = "firefox";
mimeType = [
"text/html"
"text/xml"
"application/xhtml+xml"
"application/vnd.mozilla.xul+xml"
"x-scheme-handler/http"
"x-scheme-handler/https"
];
name = "Firefox | Sue";
startupNotify = true;
terminal = false;
type = "Application";
};
};
}