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

270 lines
5.8 KiB
Nix
Raw Normal View History

2023-09-24 20:25:02 +00:00
{ pkgs, lib, ... }@args:
2023-09-24 13:50:50 +00:00
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; });
homeDirectory = "/home/pim";
2023-10-01 11:40:26 +00:00
firefoxSettings = {
"browser.aboutConfig.showWarning" = false;
"browser.toolbars.bookmarks.visibility" = "always";
"browser.tabs.firefox-view" = false;
"browser.shell.checkDefaultBrowser" = false;
};
2023-09-24 13:50:50 +00:00
in
2023-09-24 12:57:48 +00:00
{
home = {
username = "pim";
homeDirectory = homeDirectory;
2023-09-24 13:50:50 +00:00
stateVersion = "23.05";
2023-09-24 12:57:48 +00:00
packages = with pkgs; [
keepassxc
moonlight-qt
2023-09-29 20:54:59 +00:00
vlc
nicotine-plus
2023-09-30 11:30:07 +00:00
logseq
signal-desktop
telegram-desktop
2023-09-30 12:01:36 +00:00
strawberry
tree
gimp
libreoffice
2023-09-24 12:57:48 +00:00
];
};
2023-09-24 19:09:47 +00:00
services = {
syncthing.enable = true;
2023-09-24 19:09:47 +00:00
};
2023-09-24 12:57:48 +00:00
programs = {
home-manager.enable = true;
2023-10-01 08:21:13 +00:00
chromium.enable = true;
2023-09-24 14:10:19 +00:00
2023-10-07 18:11:31 +00:00
neovim =
let
toLua = str: "lua << EOF\n${str}\nEOF\n";
toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n";
in
{
2023-09-24 12:57:48 +00:00
enable = true;
2023-10-07 18:11:31 +00:00
2023-09-24 12:57:48 +00:00
viAlias = true;
vimAlias = true;
vimdiffAlias = true;
2023-10-07 18:11:31 +00:00
extraPackages = with pkgs; [
luajitPackages.lua-lsp
rnix-lsp
xclip
wl-clipboard
];
2023-09-24 12:57:48 +00:00
plugins = with pkgs.vimPlugins; [
2023-10-07 18:11:31 +00:00
{
plugin = nvim-lspconfig;
config = toLuaFile ./nvim/plugin/lsp.lua;
}
{
plugin = comment-nvim;
config = toLua "require(\"Comment\").setup()";
}
{
plugin = gruvbox-nvim;
config = "colorscheme gruvbox";
}
neodev-nvim
nvim-cmp
{
plugin = nvim-cmp;
config = toLuaFile ./nvim/plugin/cmp.lua;
}
{
plugin = telescope-nvim;
config = toLuaFile ./nvim/plugin/telescope.lua;
}
telescope-fzf-native-nvim
cmp_luasnip
cmp-nvim-lsp
2023-10-07 18:11:31 +00:00
luasnip
friendly-snippets
2023-10-07 18:11:31 +00:00
lualine-nvim
nvim-web-devicons
{
plugin = (nvim-treesitter.withPlugins (p: [
p.tree-sitter-nix
p.tree-sitter-vim
p.tree-sitter-bash
p.tree-sitter-lua
p.tree-sitter-python
p.tree-sitter-json
]));
config = toLuaFile ./nvim/plugin/treesitter.lua;
}
vim-nix
# {
# plugin = vimPlugins.own-onedark-nvim;
# config = "colorscheme onedark";
# }
2023-09-24 12:57:48 +00:00
];
2023-10-07 18:11:31 +00:00
extraLuaConfig = ''
${builtins.readFile ./nvim/options.lua}
'';
2023-09-24 12:57:48 +00:00
};
2023-09-24 14:10:19 +00:00
2023-09-24 12:57:48 +00:00
alacritty = {
enable = true;
settings = import ./alacritty.nix;
2023-09-24 12:57:48 +00:00
};
firefox = {
enable = true;
profiles = {
default = {
id = 0;
isDefault = true;
2023-10-01 11:40:26 +00:00
settings = firefoxSettings;
extensions = firefox-addons.default;
};
sue = {
id = 1;
2023-10-01 11:40:26 +00:00
settings = firefoxSettings;
extensions = firefox-addons.sue;
2023-09-24 12:57:48 +00:00
};
};
};
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";
2023-09-24 13:04:17 +00:00
gs = "git status";
2023-09-24 12:57:48 +00:00
};
};
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;
};
2023-09-24 12:57:48 +00:00
};
2023-09-24 14:10:19 +00:00
fzf = {
enable = true;
enableBashIntegration = true;
};
2023-09-24 20:25:02 +00:00
ssh = {
enable = true;
2023-10-03 06:09:32 +00:00
extraConfig = "User root";
2023-09-24 20:25:02 +00:00
matchBlocks = {
gitlab-sue = lib.hm.dag.entryBefore [ "*" ] {
hostname = "gitlab.com";
identityFile = "~/.ssh/sue_ed25519";
identitiesOnly = true;
};
github = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "github.com";
user = "pizzapim";
identitiesOnly = true;
};
lewis = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "lewis.hyp";
};
atlas = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "atlas.hyp";
};
jefke = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "jefke.hyp";
};
hermes = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "hermes.dmz";
};
maestro = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "maestro.dmz";
};
bancomart = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "bancomart.dmz";
};
handjecontantje = lib.hm.dag.entryBefore [ "*" ] {
2023-09-24 20:25:02 +00:00
hostname = "handjecontantje.dmz";
};
};
};
2023-10-01 08:14:15 +00:00
thunderbird = {
enable = true;
profiles.default = {
isDefault = true;
};
};
2023-09-24 12:57:48 +00:00
};
# Let home-manager manage the X session
xsession = {
enable = true;
};
2023-10-01 10:23:09 +00:00
xdg = {
2023-10-01 12:05:51 +00:00
configFile = {
"keepassxc/keepassxc.ini".text = lib.generators.toINI {} (import ./keepassxc.nix);
"syncthing/config.xml".source = ./syncthing.xml;
};
userDirs = {
enable = true;
music = "${homeDirectory}/sync/Music";
};
2023-10-01 10:23:09 +00:00
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";
};
};
2023-09-24 12:57:48 +00:00
}