{ 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; }); homeDirectory = "/home/pim"; firefoxSettings = { "browser.aboutConfig.showWarning" = false; "browser.toolbars.bookmarks.visibility" = "always"; "browser.tabs.firefox-view" = false; "browser.shell.checkDefaultBrowser" = false; }; in { home = { username = "pim"; homeDirectory = homeDirectory; stateVersion = "23.05"; packages = with pkgs; [ keepassxc moonlight-qt vlc nicotine-plus logseq signal-desktop telegram-desktop strawberry tree gimp libreoffice ]; }; services = { syncthing.enable = true; }; programs = { home-manager.enable = true; chromium.enable = true; neovim = let toLua = str: "lua << EOF\n${str}\nEOF\n"; toLuaFile = file: "lua << EOF\n${builtins.readFile file}\nEOF\n"; in { enable = true; viAlias = true; vimAlias = true; vimdiffAlias = true; extraPackages = with pkgs; [ luajitPackages.lua-lsp rnix-lsp xclip wl-clipboard ]; plugins = with pkgs.vimPlugins; [ { 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 luasnip friendly-snippets 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"; # } ]; extraLuaConfig = '' ${builtins.readFile ./nvim/options.lua} ''; }; alacritty = { enable = true; settings = import ./alacritty.nix; }; firefox = { enable = true; profiles = { default = { id = 0; isDefault = true; settings = firefoxSettings; extensions = firefox-addons.default; }; sue = { id = 1; settings = firefoxSettings; 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; extraConfig = "User root"; matchBlocks = { gitlab-sue = lib.hm.dag.entryBefore [ "*" ] { hostname = "gitlab.com"; identityFile = "~/.ssh/sue_ed25519"; identitiesOnly = true; }; github = 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"; }; }; }; 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); "syncthing/config.xml".source = ./syncthing.xml; }; userDirs = { enable = true; music = "${homeDirectory}/sync/Music"; }; 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"; }; }; }