aboutsummaryrefslogtreecommitdiff
path: root/modules/programs
diff options
context:
space:
mode:
authorschererleander <leander@schererleander.de>2025-11-03 00:19:09 +0100
committerschererleander <leander@schererleander.de>2025-11-03 00:19:09 +0100
commit03f03eee9f8417b540f0d1b0d1e8a4626d455ac3 (patch)
treebf7b8a76461e8a469b37197d9b6a78cb16dd2fb8 /modules/programs
parent9e2849e72a9a46515a9141226a0145fdbb5090c8 (diff)
chore: reorganize modules into subcategories
Diffstat (limited to 'modules/programs')
-rw-r--r--modules/programs/anki.nix21
-rw-r--r--modules/programs/default.nix20
-rw-r--r--modules/programs/firefox.nix248
-rw-r--r--modules/programs/foot.nix60
-rw-r--r--modules/programs/gh.nix17
-rw-r--r--modules/programs/git.nix39
-rw-r--r--modules/programs/gpg.nix25
-rw-r--r--modules/programs/latex.nix32
-rw-r--r--modules/programs/neovim/default.nix42
-rw-r--r--modules/programs/neovim/init.lua217
-rw-r--r--modules/programs/nixcord.nix32
-rw-r--r--modules/programs/opencode.nix22
-rw-r--r--modules/programs/spicetify.nix38
-rw-r--r--modules/programs/tmux.nix45
-rw-r--r--modules/programs/typst.nix19
-rw-r--r--modules/programs/vscode.nix63
-rw-r--r--modules/programs/zathura.nix34
-rw-r--r--modules/programs/zsh.nix74
18 files changed, 1048 insertions, 0 deletions
diff --git a/modules/programs/anki.nix b/modules/programs/anki.nix
new file mode 100644
index 0000000..4697273
--- /dev/null
+++ b/modules/programs/anki.nix
@@ -0,0 +1,21 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.anki.enable = lib.mkEnableOption "Enable anki";
+ config = lib.mkIf config.anki.enable {
+ #Wait for stable release
+ #home-manager.users.${username}.programs.anki = {
+ #enable = true;
+ #style = "native";
+ #addons = with pkgs.ankiAddons; [
+ # anki-connect
+ # review-heatmap
+ #];
+ #};
+ };
+}
diff --git a/modules/programs/default.nix b/modules/programs/default.nix
new file mode 100644
index 0000000..6df5649
--- /dev/null
+++ b/modules/programs/default.nix
@@ -0,0 +1,20 @@
+{ ... }:
+{
+ imports = [
+ ./anki.nix
+ ./foot.nix
+ ./git.nix
+ ./latex.nix
+ ./nixcord.nix
+ ./spicetify.nix
+ ./typst.nix
+ ./zathura.nix
+ ./firefox.nix
+ ./gh.nix
+ ./gpg.nix
+ ./neovim
+ ./tmux.nix
+ ./vscode.nix
+ ./zsh.nix
+ ];
+}
diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix
new file mode 100644
index 0000000..28bdfea
--- /dev/null
+++ b/modules/programs/firefox.nix
@@ -0,0 +1,248 @@
+{
+ config,
+ username,
+ lib,
+ pkgs,
+ inputs,
+ ...
+}:
+
+{
+ options.nx.programs.firefox.enable = lib.mkEnableOption "Setup firefox";
+ config = lib.mkIf config.nx.programs.firefox.enable {
+ home-manager.users.${username} = {
+ programs.firefox = {
+ enable = true;
+ profiles.default = {
+ extensions = {
+ packages = with inputs.firefox-addons.packages.${pkgs.system}; [
+ ublock-origin
+ istilldontcareaboutcookies
+ sponsorblock
+ decentraleyes
+ vimium-c
+ ];
+
+ force = true;
+
+ settings."uBlock0@raymondhill.net".settings = {
+ UserMessaging = {
+ uiTheme = "dark";
+ uiAccentCustom = true;
+ uiAccentCustom0 = "#2C2C2C";
+ cloudStorageEnabled = false;
+ contextMenuEnabled = false;
+ };
+ # Block annoying login with google banner
+ userFilters = ''
+ ||accounts.google.com/gsi/*
+ '';
+ };
+ };
+
+ search.engines = {
+ nix-packages = {
+ name = "Nix Packages";
+ urls = [
+ {
+ template = "https://search.nixos.org/packages";
+ params = [
+ {
+ name = "type";
+ value = "packages";
+ }
+ {
+ name = "query";
+ value = "{searchTerms}";
+ }
+ ];
+ }
+ ];
+
+ icon = "${pkgs.nixos-icons}/share/icons/hicolor/scalable/apps/nix-snowflake.svg";
+ definedAliases = [ "@np" ];
+ };
+
+ nixos-wiki = {
+ name = "NixOS Wiki";
+ urls = [ { template = "https://wiki.nixos.org/w/index.php?search={searchTerms}"; } ];
+ iconMapObj."16" = "https://wiki.nixos.org/favicon.ico";
+ definedAliases = [ "@nw" ];
+ };
+
+ startpage = {
+ name = "Startpage";
+ urls = [
+ {
+ template = "https://www.startpage.com/sp/search?query={searchTerms}";
+ }
+ ];
+ icon = "https://www.startpage.com/favicon.ico";
+ definedAliases = [ "@s" ];
+ };
+
+ bing.metaData.hidden = true;
+ google.metaData.alias = "@g";
+ };
+
+ search.default = "startpage";
+
+ settings = {
+ };
+
+ userChrome = ''
+ /* Hide Back, Forward, Reload, Stop, All Tabs, Firefox View buttons */
+ #back-button,
+ #forward-button,
+ #reload-button,
+ #stop-button,
+ #alltabs-button,
+ #firefox-view-button {
+ display: none !important;
+ }
+
+ .titlebar-buttonbox-container {
+ display: none;
+ }
+
+ #tabbrowser-tabs {
+ border-inline: none !important;
+ }
+
+ /* Transparent background tabs (above url bar) */
+ #navigator-toolbox {
+ -moz-appearance: -moz-vibrant-titlebar !important;
+ background: rgba(0, 0, 0, 0.8) !important;
+ }
+
+ /* Transparent background (behind url bar) */
+ #nav-bar {
+ background: none !important;
+ box-shadow: none !important;
+ border-top: 0px !important;
+ }
+
+ .tab-background[selected="true"] {
+ background-color: #393e43 !important;
+ background-image: none !important;
+ }
+
+ .tab-background {
+ background-color: var(--background) !important;
+ color: var(--foreground) !important;
+ box-shadow: none !important;;
+ }
+
+ .tab-background[selected] {
+ background-color: rgba(0, 0, 0, 0.30) !important;
+ color: var(--foreground) !important;
+ box-shadow: none !important;
+ }
+
+ /* Needed for transparency in general */
+ :root {
+ --tabpanel-background-color: transparent !important;
+ --chrome-content-separator-color: transparent !important;
+ --toolbar-bgcolor: rgba(0, 0, 0, 0.9) !important;
+ --newtab-background-color: rgba(0, 0, 0, 0.9) !important;
+ --newtab-background-color-secondary: transparent !important;
+ --toolbar-field-background-color: rgba(120, 120, 120, 0.10) !important;
+ }
+ '';
+ userContent = ''
+ @-moz-document url-prefix("about:"), url("about:home") {
+ /* Transparent about:settings about:config about:policies */
+ :root {
+ background: rgba(0, 0, 0, 0.0) !important;
+ }
+ }
+
+ /* Transparent about:home */
+ * {
+ --newtab-background-color: transparent !important;
+ --newtab-background-color-secondary: transparent !important;
+ }
+
+ /* Transparent elements in about:* */
+ * {
+ --in-content-page-background: transparent !important;
+ --background-color-box: rgba(0, 0, 0, 0.5) !important;
+ }
+ '';
+ };
+
+ policies = {
+ DisableTelemetry = true;
+ DisableFirefoxStudies = true;
+ #PasswordManagerEnabled = false;
+ OfferToSaveLogins = false;
+ DisablePocket = true;
+ DisplayBookmarksToolbar = "never";
+ NoDefaultBookmarks = true;
+
+ EnableTrackingProtection = {
+ Value = true;
+ Locked = true;
+ Cryptomining = true;
+ Fingerprinting = true;
+ };
+
+ EncryptedMediaExtensions = {
+ Enabled = true;
+ Locked = true;
+ };
+
+ FirefoxHome = {
+ Search = true;
+ TopSites = true;
+ SponsoredTopSites = false;
+ Highlights = true;
+ Pocket = false;
+ SponsoredPocket = false;
+ Snippets = false;
+ Locked = true;
+ };
+
+ UserMessaging = {
+ ExtensionRecommendations = false;
+ FeatureRecommendations = false;
+ Locked = true;
+ MoreFromMozilla = false;
+ SkipOnboarding = true;
+ UrlbarInterventions = false;
+ WhatsNew = false;
+ };
+
+ Preferences = {
+ "toolkit.legacyUserProfileCustomizations.stylesheets" = true;
+ "browser.toolbars.bookmarks.visibility" = "never";
+
+ # Disable fullscreen notification
+ "full-screen-api.warning.timeout" = "0";
+
+ # Disable annoying translation popup
+ "browser.translations.automaticallyPopup" = false;
+
+ # Enable all extensions automatically
+ "extensions.autoDisableScopes" = 0;
+
+ # Hide ctr-tab tab preview menu
+ "browser.ctrlTab.sortByRecentlyUsed" = false;
+
+ # Hide pip controls
+ "media.videocontrols.picture-in-picture.video-toggle.enabled" = false;
+
+ # Set homepage
+ "browser.startup.homepage" = "about:blank";
+ "browser.newtab.url" = "about:blank";
+ "browser.newtabpage.enabled" = false;
+
+ # transparency
+ "browser.tabs.allow_transparent_browser" = true;
+ "gfx.webrender.all" = true;
+ };
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/foot.nix b/modules/programs/foot.nix
new file mode 100644
index 0000000..866757b
--- /dev/null
+++ b/modules/programs/foot.nix
@@ -0,0 +1,60 @@
+{
+ config,
+ username,
+ lib,
+ pkgs,
+ ...
+}:
+
+{
+ options.nx.programs.foot.enable = lib.mkEnableOption "Enable foot terminal";
+ config = lib.mkIf config.nx.programs.foot.enable {
+ home-manager.users.${username} = {
+ home.packages = with pkgs; [
+ nerd-fonts.space-mono
+ ];
+
+ programs.foot = {
+ enable = true;
+ settings = {
+ main = {
+ pad = "10x10";
+ font = "SpaceMono Nerd Font Mono:size=10";
+ line-height = 12;
+ };
+
+ cursor = {
+ style = "underline";
+ unfocused-style = "unchanged";
+ blink = true;
+ };
+
+ colors = {
+ alpha = 0.9;
+ # Gruvbox Theme
+ background = "000000";
+ foreground = "ebdbb2";
+
+ regular0 = "282828";
+ regular1 = "cc241d";
+ regular2 = "98971a";
+ regular3 = "d79921";
+ regular4 = "458588";
+ regular5 = "b16286";
+ regular6 = "689d6a";
+ regular7 = "a89984";
+
+ bright0 = "928374";
+ bright1 = "fb4934";
+ bright2 = "b8bb26";
+ bright3 = "fabd2f";
+ bright4 = "83a598";
+ bright5 = "d3869b";
+ bright6 = "8ec07c";
+ bright7 = "ebdbb2";
+ };
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/gh.nix b/modules/programs/gh.nix
new file mode 100644
index 0000000..52a34e3
--- /dev/null
+++ b/modules/programs/gh.nix
@@ -0,0 +1,17 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.gh.enable = lib.mkEnableOption "Setup gh";
+ config = lib.mkIf config.nx.programs.gh.enable {
+ home-manager.users.${username} = {
+ programs.gh = {
+ enable = true;
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/git.nix b/modules/programs/git.nix
new file mode 100644
index 0000000..0b0d2eb
--- /dev/null
+++ b/modules/programs/git.nix
@@ -0,0 +1,39 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.git.enable = lib.mkEnableOption "Enable git" // {
+ default = true;
+ };
+ config = lib.mkIf config.nx.programs.git.enable {
+ home-manager.users.${username} = {
+ programs.git = {
+ enable = true;
+ userName = "schererleander";
+ userEmail = "leander@schererleander.de";
+ aliases = {
+ st = "status";
+ co = "checkout";
+ br = "branch";
+ };
+ signing = {
+ key = "506793F115464BB4";
+ signByDefault = true;
+ };
+ ignores = [
+ "*~"
+ ".DS_Store"
+ ];
+ diff-highlight.enable = true;
+ extraConfig = {
+ pull.rebase = true;
+ url."git@github.com:".insteadOf = "https://github.com";
+ };
+ };
+ };
+ };
+}
diff --git a/modules/programs/gpg.nix b/modules/programs/gpg.nix
new file mode 100644
index 0000000..cc3f45b
--- /dev/null
+++ b/modules/programs/gpg.nix
@@ -0,0 +1,25 @@
+{
+ config,
+ username,
+ pkgs,
+ lib,
+ ...
+}:
+
+let
+ pinentryPackage = if pkgs.stdenv.isDarwin then pkgs.pinentry_mac else pkgs.pinentry-curses;
+ pinentryProgram = if pkgs.stdenv.isDarwin then "pinentry-mac" else "pinentry-curses";
+in
+{
+ options.nx.programs.gpg.enable = lib.mkEnableOption "Setup gpg and agent";
+ config = lib.mkIf config.nx.programs.gpg.enable {
+ home-manager.users.${username} = {
+ programs.gpg.enable = true;
+ services.gpg-agent = {
+ enable = true;
+ pinentry.package = pinentryPackage;
+ pinentry.program = pinentryProgram;
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/latex.nix b/modules/programs/latex.nix
new file mode 100644
index 0000000..5a9f8b4
--- /dev/null
+++ b/modules/programs/latex.nix
@@ -0,0 +1,32 @@
+{
+ config,
+ username,
+ pkgs,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.latex.enable = lib.mkEnableOption "Setup latex";
+ config = lib.mkIf config.nx.programs.latex.enable {
+ home-manager.users.${username} = {
+ programs.texlive = {
+ enable = true;
+ # See https://mynixos.com/search?q=texlivepackages.collection for more collections
+ # and https://mynixos.com/search?q=texlivepackages for more individual packages.
+ extraPackages = tpkgs: { inherit (tpkgs) collection-basic collection-latex collection-latexrecommended biblatex; };
+ };
+
+ home.packages = with pkgs; [
+ biber
+ ];
+
+ programs.pandoc = {
+ enable = true;
+ defaults = {
+ pdf-engine = "pdfetex";
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/neovim/default.nix b/modules/programs/neovim/default.nix
new file mode 100644
index 0000000..9f6b963
--- /dev/null
+++ b/modules/programs/neovim/default.nix
@@ -0,0 +1,42 @@
+{
+ config,
+ username,
+ lib,
+ pkgs,
+ ...
+}:
+
+{
+ options.nx.programs.neovim.enable = lib.mkEnableOption "Setup neovim";
+ config = lib.mkIf config.nx.programs.neovim.enable {
+ home-manager.users.${username} = {
+ programs.neovim = {
+ enable = true;
+ package = pkgs.neovim;
+ extraConfig = ''
+ luafile ${./init.lua}
+ '';
+ };
+ home.packages = with pkgs; [
+ ripgrep
+
+ # github pilot
+ nodejs
+
+ # language servers
+ lua-language-server
+ nixd
+ pyright
+ gopls
+ java-language-server
+ typescript-language-server
+ rust-analyzer
+ tailwindcss-language-server
+
+ # formatter
+ nixfmt-rfc-style
+ luaformatter
+ ];
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/neovim/init.lua b/modules/programs/neovim/init.lua
new file mode 100644
index 0000000..7d0d918
--- /dev/null
+++ b/modules/programs/neovim/init.lua
@@ -0,0 +1,217 @@
+-- General settings
+vim.g.mapleader = " "
+vim.o.number = true
+vim.o.relativenumber = true
+vim.o.signcolumn = "yes"
+vim.o.termguicolors = true
+vim.o.wrap = false
+vim.o.tabstop = 2
+vim.o.shiftwidth = 2
+vim.o.updatetime = 250
+vim.o.timeoutlen = 300
+vim.o.swapfile = false
+vim.o.ignorecase = true
+vim.o.smartcase = true
+vim.o.winborder = "rounded"
+vim.o.clipboard = "unnamedplus"
+
+local map = vim.keymap.set
+map('n', '<leader>o', '<CMD>update<BAR>source %<CR>', { desc = 'Save & reload init.lua' })
+map('n', '<leader>w', '<CMD>write<CR>')
+map('n', '<leader>q', '<CMD>quit<CR>')
+map('n', '<leader>lf', vim.lsp.buf.format)
+
+vim.pack.add({
+ { src = "https://github.com/ellisonleao/gruvbox.nvim" },
+ { src = "https://github.com/echasnovski/mini.starter" },
+ { src = "https://github.com/lewis6991/gitsigns.nvim" },
+ { src = "https://github.com/windwp/nvim-autopairs" },
+ { src = "https://github.com/zbirenbaum/copilot.lua" },
+ { src = "https://github.com/zbirenbaum/copilot-cmp" },
+ { src = "https://github.com/nvim-telescope/telescope.nvim" },
+ { src = "https://github.com/j-hui/fidget.nvim" },
+ { src = "https://github.com/nvim-lua/plenary.nvim" },
+ { src = "https://github.com/nvim-treesitter/nvim-treesitter" },
+ { src = "https://github.com/neovim/nvim-lspconfig" },
+ { src = "https://github.com/hrsh7th/nvim-cmp" },
+ { src = "https://github.com/hrsh7th/cmp-nvim-lsp" },
+ { src = "https://github.com/hrsh7th/cmp-buffer" },
+ { src = "https://github.com/hrsh7th/cmp-path" },
+ { src = "https://github.com/hrsh7th/cmp-cmdline" },
+ { src = "https://github.com/L3MON4D3/LuaSnip" },
+ { src = "https://github.com/saadparwaiz1/cmp_luasnip" },
+ { src = "https://github.com/onsails/lspkind-nvim" }
+})
+
+require("nvim-treesitter.configs").setup({
+ ensure_installed = { "lua", "nix" },
+ highlight = { enable = true },
+})
+
+local builtin = require('telescope.builtin')
+map('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
+map('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
+map('n', '<leader>fb', builtin.buffers, { desc = 'Telescope buffers' })
+map('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })
+
+
+local cmp = require("cmp")
+cmp.setup({
+ snippet = {
+ expand = function(args)
+ require('luasnip').lsp_expand(args.body)
+ end,
+ },
+ mapping = cmp.mapping.preset.insert({
+ ['<C-b>'] = cmp.mapping.scroll_docs(-4),
+ ['<C-f>'] = cmp.mapping.scroll_docs(4),
+ ['<C-Space>'] = cmp.mapping.complete(),
+ ['<C-e>'] = cmp.mapping.abort(),
+ ['<CR>'] = cmp.mapping.confirm({ select = true }),
+ ['<Tab>'] = cmp.mapping(function(fallback)
+ local copilot = require('copilot.suggestion')
+ if copilot.is_visible() then
+ copilot.accept()
+ elseif cmp.visible() then
+ cmp.select_next_item()
+ else
+ fallback()
+ end
+ end, { 'i', 's' }),
+ ['<S-Tab>'] = cmp.mapping(function(fallback)
+ if cmp.visible() then
+ cmp.select_prev_item()
+ else
+ fallback()
+ end
+ end, { 'i', 's' }),
+ }),
+ sources = cmp.config.sources({
+ { name = 'copilot' },
+ { name = 'nvim_lsp' },
+ { name = 'luasnip' },
+ }, {
+ { name = 'buffer' },
+ })
+})
+
+-- Add parentheses after selecting function or method
+local cmp_autopairs = require('nvim-autopairs.completion.cmp')
+cmp.event:on(
+ 'confirm_done',
+ cmp_autopairs.on_confirm_done()
+)
+
+local capabilities = require('cmp_nvim_lsp').default_capabilities()
+
+require("lspconfig").nixd.setup({
+ capabilities = capabilities,
+ settings = {
+ nixd = {
+ formatting = {
+ command = { "nixfmt" },
+ },
+ },
+ },
+})
+
+require("lspconfig").lua_ls.setup({
+ capabilities = capabilities,
+ settings = {
+ lua_ls = {
+ formatting = {
+ command = { "luaformatter" },
+ },
+ },
+ Lua = {
+ runtime = {
+ version = 'LuaJIT',
+ },
+ diagnostics = {
+ globals = {
+ 'vim', 'require'
+ },
+ },
+ workspace = {
+ library = vim.api.nvim_get_runtime_file("", true),
+ },
+ telemetry = {
+ enable = false,
+ },
+ },
+ },
+})
+
+require("lspconfig").pyright.setup({
+ capabilities = capabilities,
+})
+
+require("lspconfig").ts_ls.setup({
+ capabilities = capabilities,
+})
+
+require("lspconfig").tailwindcss.setup({
+ capabilities = capabilities,
+})
+
+require("lspconfig").gopls.setup({
+ capabilities = capabilities,
+ settings = {
+ gopls = {
+ analyses = {
+ unusedparams = true,
+ unusedwrite = true,
+ },
+ staticcheck = true,
+ },
+ },
+})
+
+require("lspconfig").rust_analyzer.setup({
+ capabilities = capabilities,
+})
+
+vim.diagnostic.config({
+ virtual_text = { source = "if_many" },
+ underline = true,
+ severity_sort = true,
+})
+
+
+require("mini.starter").setup({
+ header = table.concat({
+ " /l、 ",
+ "(゚、 。 7 ",
+ " l ~ ヽ ",
+ " じしf_,)ノ ",
+ }, "\n"),
+ footer = "",
+ content_hooks = {
+ require("mini.starter").gen_hook.adding_bullet("» "),
+ require("mini.starter").gen_hook.aligning("center", "center"),
+ },
+})
+
+
+require("gitsigns").setup()
+require("nvim-autopairs").setup()
+require("fidget").setup()
+require("copilot").setup({
+ suggestion = { enabled = false },
+ panel = { enabled = false },
+})
+require("copilot_cmp").setup()
+
+vim.cmd("colorscheme gruvbox")
+
+local hl = vim.api.nvim_set_hl
+hl(0, 'Normal', { bg = 'none' })
+hl(0, 'NormalFloat', { bg = 'none' })
+hl(0, 'NormalNC', { bg = 'none' })
+hl(0, 'StatusLine', { bg = 'none' })
+hl(0, 'SignColumn', { bg = 'none' })
+hl(0, "DiagnosticError", { bg = "none" })
+hl(0, "DiagnosticSignError", { bg = "none" })
+hl(0, "DiagnosticSignHint", { bg = "none" })
+hl(0, "DiagnosticSignInfo", { bg = "none" })
+hl(0, "DiagnosticSignWarn", { bg = "none" })
diff --git a/modules/programs/nixcord.nix b/modules/programs/nixcord.nix
new file mode 100644
index 0000000..191dcfb
--- /dev/null
+++ b/modules/programs/nixcord.nix
@@ -0,0 +1,32 @@
+{
+ config,
+ lib,
+ inputs,
+ username,
+ ...
+}:
+
+{
+ options.nx.programs.nixcord.enable = lib.mkEnableOption "Enable nixcord and setup";
+ config = lib.mkIf config.nx.programs.nixcord.enable {
+ home-manager.users.${username} = { ... }: {
+ imports = [ inputs.nixcord.homeModules.nixcord ];
+
+ programs.nixcord = {
+ enable = true;
+ config = {
+ themeLinks = [
+ "https://refact0r.github.io/system24/theme/system24.theme.css"
+ ];
+ frameless = true;
+ plugins = {
+ alwaysAnimate.enable = false;
+ imageLink.enable = true;
+ imageZoom.enable = true;
+ translate.enable = true;
+ };
+ };
+ };
+ };
+ };
+}
diff --git a/modules/programs/opencode.nix b/modules/programs/opencode.nix
new file mode 100644
index 0000000..b4680f3
--- /dev/null
+++ b/modules/programs/opencode.nix
@@ -0,0 +1,22 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.opencode.enable = lib.mkEnableOption "Setup opencode";
+ config = lib.mkIf config.nx.programs.opencode.enable {
+ home-manager.users.${username} = {
+ programs.opencode = {
+ enable = true;
+ settings = {
+ theme = "system";
+ share = "disabled";
+ autoUpdate = true;
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/spicetify.nix b/modules/programs/spicetify.nix
new file mode 100644
index 0000000..0582f72
--- /dev/null
+++ b/modules/programs/spicetify.nix
@@ -0,0 +1,38 @@
+{
+ config,
+ lib,
+ pkgs,
+ inputs,
+ username,
+ ...
+}:
+
+let
+ spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system};
+in
+{
+ options.nx.programs.spicetify.enable = lib.mkEnableOption "Enable Spicetify integration";
+ config = lib.mkIf config.nx.programs.spicetify.enable {
+ home-manager.users.${username} = { ... }: {
+ imports = [ inputs.spicetify-nix.homeManagerModules.spicetify ];
+ nixpkgs.config.allowUnfree = true;
+ programs.spicetify = {
+ enable = true;
+ enabledSnippets = with spicePkgs.snippets; [
+ pointer
+ sonicDancing
+ modernScrollbar
+ nyanCatProgressBar
+ declutterNowPlayingBar
+ ];
+
+ enabledExtensions = with spicePkgs.extensions; [
+ keyboardShortcut
+ ];
+
+ theme = spicePkgs.themes.sleek;
+ colorScheme = "Coral";
+ };
+ };
+ };
+}
diff --git a/modules/programs/tmux.nix b/modules/programs/tmux.nix
new file mode 100644
index 0000000..41d6e22
--- /dev/null
+++ b/modules/programs/tmux.nix
@@ -0,0 +1,45 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.tmux.enable = lib.mkEnableOption "Enable and configure Tmux";
+ config = lib.mkIf config.nx.programs.tmux.enable {
+ home-manager.users.${username} = {
+ programs.tmux = {
+ enable = true;
+ extraConfig = ''
+ set -g default-terminal "xterm-256color"
+
+ unbind C-b
+ set-option -g prefix C-a
+ bind-key C-a send-prefix
+ bind -n M-Left select-pane -L
+ bind -n M-Right select-pane -R
+ bind -n M-Up select-pane -U
+ bind -n M-Down select-pane -D
+
+ # style
+ set -g status-position top
+ set -g status-justify absolute-centre
+ set -g status-style 'fg=color7 bg=default'
+ set -g status-right ""
+ # set -g status-right ' #(cd #{pane_current_path}; git rev-parse --abbrev-ref HEAD)'
+ # set -g status-right ""
+ set -g status-left '#S'
+ set -g status-left-style 'fg=color8'
+ set -g status-right-length 0
+ set -g status-left-length 100
+ setw -g window-status-current-style 'fg=colour6 bg=default bold'
+ setw -g window-status-current-format '#I:#W '
+ setw -g window-status-style 'fg=color8'
+
+ set -g mouse on
+ '';
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/typst.nix b/modules/programs/typst.nix
new file mode 100644
index 0000000..8af406b
--- /dev/null
+++ b/modules/programs/typst.nix
@@ -0,0 +1,19 @@
+{
+ config,
+ username,
+ pkgs,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.typst.enable = lib.mkEnableOption "Setup typst";
+ config = lib.mkIf config.nx.programs.typst.enable {
+ home-manager.users.${username} = {
+ home.packages = with pkgs; [
+ typst
+ typst-fmt
+ ];
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/vscode.nix b/modules/programs/vscode.nix
new file mode 100644
index 0000000..beb347c
--- /dev/null
+++ b/modules/programs/vscode.nix
@@ -0,0 +1,63 @@
+{
+ config,
+ username,
+ lib,
+ pkgs,
+ ...
+}:
+
+{
+ options.nx.programs.vscode.enable = lib.mkEnableOption "Enable vscode and setup";
+ config = lib.mkIf config.nx.programs.vscode.enable {
+ home-manager.users.${username} = {
+ programs.vscode = {
+ enable = true;
+ mutableExtensionsDir = false;
+ profiles.default = {
+ enableUpdateCheck = true;
+ enableExtensionUpdateCheck = true;
+
+ userSettings = {
+ "update.mode" = "none";
+ "workbench.colorTheme" = "Minimal";
+ "editor.fontFamily" = "monospace";
+ "editor.tabSize" = 2;
+ "editor.minimap.enabled" = false;
+ "terminal.integrated.cursorStyle" = "underline";
+ "terminal.integrated.cursorStyleInactive" = "underline";
+ "terminal.integrated.fontFamily" = "monospace";
+ "terminal.integrated.fontSize" = 13;
+ "git.autofetch" = true;
+ "window.controlsStyle" = "custom";
+ };
+
+ extensions = (
+ with pkgs.vscode-extensions;
+ [
+ ms-vscode.cmake-tools
+ ms-azuretools.vscode-docker
+ github.copilot
+ ms-python.python
+ golang.go
+ rust-lang.rust-analyzer
+ vscjava.vscode-maven
+ sumneko.lua
+ #fwcd.kotlin
+ bradlc.vscode-tailwindcss
+ adpyke.codesnap
+ esbenp.prettier-vscode
+ ]
+ ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [
+ {
+ name = "minimalist-dark";
+ publisher = "nichabosh";
+ version = "1.0.0";
+ sha256 = "sha256-lw+Scfada6DycLdRT2Cz+Fd12JucglIrw3uRd2ZhabQ=";
+ }
+ ]
+ );
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/zathura.nix b/modules/programs/zathura.nix
new file mode 100644
index 0000000..35304a4
--- /dev/null
+++ b/modules/programs/zathura.nix
@@ -0,0 +1,34 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+
+{
+ options.nx.programs.zathura.enable = lib.mkEnableOption "Enable zathura and setup";
+ config = lib.mkIf config.nx.programs.zathura.enable {
+ home-manager.users.${username} = {
+ programs.zathura = {
+ enable = true;
+ options = {
+ recolor-lightcolor = "rgba(0, 0, 0, 0)";
+ recolor-darkcolor = "rgba(255, 255, 255, 1)";
+ recolor = true;
+ adjust-open = "width";
+ guioptions = "none";
+ zoom-center = true;
+ page-padding = 0;
+ pages-per-row = 1;
+ scroll-page-aware = true;
+ };
+
+ mappings = {
+ i = "recolor";
+ j = "navigate previous";
+ k = "navigate next";
+ };
+ };
+ };
+ };
+} \ No newline at end of file
diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix
new file mode 100644
index 0000000..6edb1c0
--- /dev/null
+++ b/modules/programs/zsh.nix
@@ -0,0 +1,74 @@
+{
+ config,
+ username,
+ lib,
+ ...
+}:
+{
+ options.nx.programs.zsh.enable = lib.mkEnableOption "Configure zsh";
+ config = lib.mkIf config.nx.programs.zsh.enable {
+ home-manager.users.${username} = {
+ programs.zsh = {
+ enable = true;
+ enableCompletion = true;
+ autosuggestion.enable = true;
+ syntaxHighlighting.enable = true;
+ initContent = ''
+ # view man pages with nvim
+ export MANPAGER="nvim +Man!"
+
+ # Directory completion with trailing slash
+ zstyle ':completion:*' list-dirs-first true
+ zstyle ':completion:*' special-dirs true
+ zstyle ':completion:*' squeeze-slashes true
+ zstyle ':completion:*' add-space false
+
+ # Case-insensitive completion
+ zstyle ':completion:*' matcher-list 'm:{a-z}={A-Z}'
+ # vim keybindings
+ bindkey -v
+
+ # imagemagick wrapper function to remove background
+ remove_bg() {
+ if [[ $# -lt 2 ]]; then
+ echo 'Usage: remove_bg <input_file> <fuzz_percentage> [transparent_color] [output_file]'
+ return 1
+ fi
+ local input_file=$1
+ local fuzz=$2
+ local transparent_color=$3
+ local output_file=$4
+
+ magick "$input_file" \
+ -fuzz $fuzz -transparent "$transparent_color" \
+ -alpha on -channel A -blur 0x2 -level 5%,100% +channel \
+ "$output_file"
+
+ echo "Saved transparent image to: $output_file"
+ }
+
+ eval "$(zoxide init zsh)"
+ '';
+ shellAliases = {
+ ls = "ls --color=auto";
+ nixceck = "nix flake check --all-systems";
+ };
+ zplug = {
+ enable = true;
+ plugins = [
+ { name = "mafredri/zsh-async"; }
+ {
+ name = "sindresorhus/pure";
+ tags = [
+ "as:theme"
+ "use:pure.zsh"
+ ];
+ }
+ { name = "zdharma-continuum/fast-syntax-highlighting"; }
+ { name = "zsh-users/zsh-autosuggestions"; }
+ ];
+ };
+ };
+ };
+ };
+}