diff options
Diffstat (limited to 'modules/users')
29 files changed, 0 insertions, 1648 deletions
diff --git a/modules/users/browsers/default.nix b/modules/users/browsers/default.nix deleted file mode 100644 index 70a8be5..0000000 --- a/modules/users/browsers/default.nix +++ /dev/null @@ -1,6 +0,0 @@ -{ ... }: -{ - imports = [ - ./firefox - ]; -} diff --git a/modules/users/browsers/firefox/default.nix b/modules/users/browsers/firefox/default.nix deleted file mode 100644 index b5212a2..0000000 --- a/modules/users/browsers/firefox/default.nix +++ /dev/null @@ -1,276 +0,0 @@ -{ - pkgs, - inputs, - config, - lib, - ... -}: -let - - cfg = config.nx.browsers.firefox; - inherit (lib) - mkOption - types - mkIf - optionalString - optionalAttrs - ; -in -{ - - options.nx.browsers.firefox = { - enable = mkOption { - description = "mozilla firefox"; - type = types.bool; - default = false; - }; - blockGoogle = mkOption { - description = "blocks google banner and other"; - type = types.bool; - default = true; - }; - transparent = mkOption { - description = "make firefox transparent"; - type = types.bool; - default = false; - }; - cleanHome = mkOption { - description = "clean up firefox home"; - type = types.bool; - default = true; - }; - hideRecommendations = mkOption { - description = "hide firefox recommendations"; - type = types.bool; - default = true; - }; - disablePasswordManager = mkOption { - description = "disable built-in browser password manager"; - type = types.bool; - default = true; - }; - }; - - config = mkIf cfg.enable { - 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 = optionalString cfg.blockGoogle '' - ||accounts.google.com/gsi/* - ''; - }; - }; - - search = { - default = "DuckDuckGo"; - 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" ]; - }; - - bing.metaData.hidden = true; - google.metaData.alias = "@g"; - }; - force = true; - }; - - userChrome = optionalString cfg.transparent '' - /* 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 = optionalString cfg.transparent '' - @-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 = !cfg.disablePasswordManager; - OfferToSaveLogins = !cfg.disablePasswordManager; - DisplayBookmarksToolbar = "never"; - NoDefaultBookmarks = true; - - Homepage = optionalAttrs cfg.cleanHome { - URL = "about:blank"; - Locked = true; - StartPage = "homepage"; - }; - - NewTabPage = !cfg.cleanHome; - - PictureInPicture = { - Enabled = false; - }; - - EnableTrackingProtection = { - Value = true; - Locked = true; - Cryptomining = true; - Fingerprinting = true; - }; - - EncryptedMediaExtensions = { - Enabled = true; - Locked = true; - }; - - FirefoxHome = { - Search = true; - TopSites = true; - SponsoredTopSites = !cfg.cleanHome; - Highlights = true; - Pocket = !cfg.cleanHome; - SponsoredPocket = !cfg.cleanHome; - Locked = true; - }; - - UserMessaging = { - ExtensionRecommendations = !cfg.hideRecommendations; - FeatureRecommendations = !cfg.hideRecommendations; - Locked = true; - MoreFromMozilla = !cfg.hideRecommendations; - SkipOnboarding = true; - UrlbarInterventions = !cfg.hideRecommendations; - }; - - Preferences = { - # 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; - } - // optionalAttrs cfg.transparent { - # transparency - "toolkit.legacyUserProfileCustomizations.stylesheets" = true; - "browser.tabs.allow_transparent_browser" = true; - "gfx.webrender.all" = true; - }; - }; - }; - }; -} diff --git a/modules/users/cli/default.nix b/modules/users/cli/default.nix deleted file mode 100644 index 98fe1fb..0000000 --- a/modules/users/cli/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - imports = [ - ./tmux - ./opencode - ]; -} diff --git a/modules/users/cli/opencode/default.nix b/modules/users/cli/opencode/default.nix deleted file mode 100644 index 8c1071d..0000000 --- a/modules/users/cli/opencode/default.nix +++ /dev/null @@ -1,30 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.cli.opencode; - inherit (lib) mkOption types mkIf; -in -{ - - options.nx.cli.opencode = { - enable = mkOption { - description = "opencode open source ai coding agent"; - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - programs.opencode = { - enable = true; - settings = { - theme = "system"; - share = "disabled"; - autoupdate = false; - }; - }; - }; -} diff --git a/modules/users/cli/tmux/default.nix b/modules/users/cli/tmux/default.nix deleted file mode 100644 index 9259c0b..0000000 --- a/modules/users/cli/tmux/default.nix +++ /dev/null @@ -1,55 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - inherit (lib) mkOption types mkIf; - cfg = config.nx.tmux; - -in -{ - options.nx.tmux = { - enable = mkOption { - description = "tmux"; - type = types.bool; - default = config.nx.terminal.multiplexer == "tmux"; - }; - }; - config = mkIf cfg.enable { - programs.tmux = { - enable = true; - keyMode = "vi"; - secureSocket = true; - shell = "${pkgs.${config.nx.terminal.defaultShell}}/bin/${config.nx.terminal.defaultShell}"; - terminal = "xterm-256color"; - extraConfig = '' - 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 - ''; - }; - }; -} diff --git a/modules/users/default.nix b/modules/users/default.nix deleted file mode 100644 index 06999d5..0000000 --- a/modules/users/default.nix +++ /dev/null @@ -1,16 +0,0 @@ -{ ... }: - -{ - imports = [ - ./browsers - ./cli - ./editors - ./git - ./gpg - ./media - ./productivity - ./shells - ./terminal - ./zathura - ]; -} diff --git a/modules/users/editors/default.nix b/modules/users/editors/default.nix deleted file mode 100644 index 76f3b96..0000000 --- a/modules/users/editors/default.nix +++ /dev/null @@ -1,8 +0,0 @@ -{ ... }: -{ - imports = [ - ./neovim - ./vscode - ./zed - ]; -} diff --git a/modules/users/editors/neovim/default.nix b/modules/users/editors/neovim/default.nix deleted file mode 100644 index d6c8218..0000000 --- a/modules/users/editors/neovim/default.nix +++ /dev/null @@ -1,109 +0,0 @@ -{ - config, - username, - lib, - pkgs, - ... -}: - -let - inherit (lib) - mkOption - types - mkIf - optionals - ; - cfg = config.nx.editors.neovim; -in -{ - options.nx.editors.neovim = { - enable = mkOption { - description = "Neovim editor"; - type = types.bool; - default = true; - }; - - langs = { - python = mkOption { - description = "enable the python integration"; - type = types.bool; - default = false; - }; - go = mkOption { - description = "enable go integration"; - type = types.bool; - default = false; - }; - ts = mkOption { - description = "enable the js/ts integration"; - type = types.bool; - default = false; - }; - nix = mkOption { - description = "enable the nix integration"; - type = types.bool; - default = true; - }; - lua = mkOption { - description = "enable the lua integration"; - type = types.bool; - default = true; - }; - latex = mkOption { - description = "enable latex integration"; - type = types.bool; - default = false; - }; - }; - }; - - config = mkIf cfg.enable { - programs.neovim = { - defaultEditor = true; - enable = true; - package = pkgs.neovim-unwrapped; - extraPackages = - with pkgs; - [ - tree-sitter - git - ripgrep - fd - gcc - ] - ++ (optionals cfg.langs.ts [ pkgs.nodePackages.typescript-language-server ]) - ++ (optionals cfg.langs.python [ ]) - ++ (optionals cfg.langs.go [ pkgs.gopls ]) - ++ (optionals cfg.langs.nix [ - pkgs.nil - pkgs.nixfmt - ]) - ++ (optionals cfg.langs.lua [ pkgs.lua-language-server ]) - ++ (optionals cfg.langs.latex [ pkgs.texlab ]); - - plugins = with pkgs.vimPlugins; [ - gruvbox-nvim - mini-starter - gitsigns-nvim - nvim-autopairs - telescope-nvim - fidget-nvim - plenary-nvim - nvim-treesitter.withAllGrammars - nvim-lspconfig - nvim-cmp - cmp-nvim-lsp - cmp-buffer - cmp-path - cmp-cmdline - luasnip - cmp_luasnip - lspkind-nvim - ]; - - extraConfig = '' - luafile ${./init.lua} - ''; - }; - }; -} diff --git a/modules/users/editors/neovim/init.lua b/modules/users/editors/neovim/init.lua deleted file mode 100644 index efd021f..0000000 --- a/modules/users/editors/neovim/init.lua +++ /dev/null @@ -1,225 +0,0 @@ --- 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>') - - -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() - -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" }) - -hl(0, "Pmenu", { bg = "none" }) -hl(0, "PmenuSel", { bg = "none" }) -hl(0, "FloatBorder", { bg = "none" }) - -local status_ok, configs = pcall(require, "nvim-treesitter.configs") -if status_ok then - configs.setup({ - highlight = { enable = true }, - indent = { enable = true }, - }) -end - -local builtin = require('telescope.builtin') -local map = vim.keymap.set -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) - if 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 = '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() - -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - local opts = { buffer = ev.buf, noremap = true, silent = true } - vim.keymap.set('n', '<leader>lf', function() vim.lsp.buf.format { async = true } end, opts) - end, -}) - --- Native LSP setup (Neovim v0.11+) -vim.lsp.config('nixd', { - cmd = { 'nixd' }, - capabilities = capabilities, - settings = { - nixd = { - formatting = { - command = { "nixfmt" }, - }, - }, - }, -}) - -vim.lsp.config('nil_ls', { - cmd = { 'nil' }, - capabilities = capabilities, - settings = { - ['nil'] = { - nix = { - flake = { - autoArchive = true, - }, - }, - }, - }, -}) - -vim.lsp.config('lua_ls', { - cmd = { 'lua-language-server' }, - capabilities = capabilities, - settings = { - Lua = { - runtime = { - version = 'LuaJIT', - }, - diagnostics = { - globals = { 'vim', 'require' }, - }, - workspace = { - library = vim.api.nvim_get_runtime_file("", true), - }, - telemetry = { - enable = false, - }, - }, - }, -}) - -vim.lsp.config('pyright', { - cmd = { 'pyright-langserver', '--stdio' }, - capabilities = capabilities, -}) - -vim.lsp.config('tailwindcss', { - cmd = { 'tailwindcss-language-server', '--stdio' }, - capabilities = capabilities, -}) - -vim.lsp.config('gopls', { - cmd = { 'gopls' }, - capabilities = capabilities, - settings = { - gopls = { - analyses = { - unusedparams = true, - unusedwrite = true, - }, - staticcheck = true, - }, - }, -}) - -vim.lsp.config('rust_analyzer', { - cmd = { 'rust-analyzer' }, - capabilities = capabilities, -}) - -vim.lsp.config('ts_ls', { - cmd = { 'typescript-language-server', '--stdio' }, - capabilities = capabilities, -}) - --- Enable all configured servers -vim.lsp.enable('nixd') -vim.lsp.enable('nil_ls') -vim.lsp.enable('lua_ls') -vim.lsp.enable('pyright') -vim.lsp.enable('tailwindcss') -vim.lsp.enable('gopls') -vim.lsp.enable('rust_analyzer') -vim.lsp.enable('ts_ls') - -vim.diagnostic.config({ - virtual_text = { source = "if_many" }, - underline = true, - severity_sort = true, -}) diff --git a/modules/users/editors/vscode/default.nix b/modules/users/editors/vscode/default.nix deleted file mode 100644 index fe2c444..0000000 --- a/modules/users/editors/vscode/default.nix +++ /dev/null @@ -1,142 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -let - inherit (lib) - mkOption - types - mkIf - optionals - ; - cfg = config.nx.editors.vscode; -in -{ - options.nx.editors.vscode = { - enable = mkOption { - description = "vscode editor"; - type = types.bool; - default = false; - }; - - useVSCodium = mkOption { - description = "Use vscodium instead of vscode"; - type = types.bool; - default = false; - }; - - theme = mkOption { - description = "Theme to use for vscode"; - type = types.enum [ - "minimal" - "dark" - "light" - ]; - default = "minimal"; - }; - - langs = { - cmake = mkOption { - description = "enable cmake integration"; - type = types.bool; - default = false; - }; - docker = mkOption { - description = "enable docker integration"; - type = types.bool; - default = false; - }; - python = mkOption { - description = "enable python integration"; - type = types.bool; - default = false; - }; - go = mkOption { - description = "enable go integration"; - type = types.bool; - default = false; - }; - rust = mkOption { - description = "enable rust integration"; - type = types.bool; - default = false; - }; - java = mkOption { - description = "enable java integration"; - type = types.bool; - default = false; - }; - lua = mkOption { - description = "enable lua integration"; - type = types.bool; - default = false; - }; - tailwindcss = mkOption { - description = "enable tailwindcss integration"; - type = types.bool; - default = false; - }; - }; - }; - - config = mkIf cfg.enable { - programs.vscode = { - enable = true; - package = if cfg.useVSCodium then pkgs.vscodium else pkgs.vscode; - mutableExtensionsDir = false; - profiles.default = { - enableUpdateCheck = true; - enableExtensionUpdateCheck = true; - - userSettings = { - "update.mode" = "none"; - "workbench.colorTheme" = - if cfg.theme == "minimal" then - "Minimal" - else if cfg.theme == "dark" then - "Default Dark Modern" - else - "Default Light Modern"; - "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; - [ - github.copilot - adpyke.codesnap - esbenp.prettier-vscode - ] - ++ (optionals cfg.langs.cmake [ ms-vscode.cmake-tools ]) - ++ (optionals cfg.langs.docker [ ms-azuretools.vscode-docker ]) - ++ (optionals cfg.langs.python [ ms-python.python ]) - ++ (optionals cfg.langs.go [ golang.go ]) - ++ (optionals cfg.langs.rust [ rust-lang.rust-analyzer ]) - ++ (optionals cfg.langs.java [ vscjava.vscode-maven ]) - ++ (optionals cfg.langs.lua [ sumneko.lua ]) - ++ (optionals cfg.langs.tailwindcss [ bradlc.vscode-tailwindcss ]) - ++ (optionals (cfg.theme == "minimal") ( - pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "minimalist-dark"; - publisher = "nichabosh"; - version = "1.0.0"; - sha256 = "sha256-lw+Scfada6DycLdRT2Cz+Fd12JucglIrw3uRd2ZhabQ="; - } - ] - )); - }; - }; - }; -} diff --git a/modules/users/editors/zed/default.nix b/modules/users/editors/zed/default.nix deleted file mode 100644 index 5ff0714..0000000 --- a/modules/users/editors/zed/default.nix +++ /dev/null @@ -1,94 +0,0 @@ -{ - config, - lib, - ... -}: - -let - inherit (lib) - mkOption - types - mkIf - optionals - ; - cfg = config.nx.editors.zed-editor; -in -{ - options.nx.editors.zed-editor = { - enable = mkOption { - description = "Enable and setup zed editor"; - type = types.bool; - default = false; - }; - - langs = { - nix = mkOption { - description = "enable nix integration"; - type = types.bool; - default = true; - }; - python = mkOption { - description = "enable python integration"; - type = types.bool; - default = false; - }; - rust = mkOption { - description = "enable rust integration"; - type = types.bool; - default = false; - }; - go = mkOption { - description = "enable go integration"; - type = types.bool; - default = false; - }; - lua = mkOption { - description = "enable lua integration"; - type = types.bool; - default = false; - }; - docker = mkOption { - description = "enable docker integration"; - type = types.bool; - default = false; - }; - java = mkOption { - description = "enable java integration"; - type = types.bool; - default = false; - }; - cmake = mkOption { - description = "enable cmake integration"; - type = types.bool; - default = false; - }; - toml = mkOption { - description = "enable toml integration"; - type = types.bool; - default = false; - }; - }; - }; - - config = mkIf cfg.enable { - programs.zed-editor = { - enable = true; - extensions = - [ ] - ++ (optionals cfg.langs.nix [ "nix" ]) - ++ (optionals cfg.langs.python [ "python" ]) - ++ (optionals cfg.langs.rust [ "rust" ]) - ++ (optionals cfg.langs.go [ "go" ]) - ++ (optionals cfg.langs.lua [ "lua" ]) - ++ (optionals cfg.langs.docker [ "dockerfile" ]) - ++ (optionals cfg.langs.java [ "java" ]) - ++ (optionals cfg.langs.cmake [ "cmake" ]) - ++ (optionals cfg.langs.toml [ "toml" ]); - userSettings = { - telemetry = { - metrics = false; - }; - }; - }; - }; -} diff --git a/modules/users/git/default.nix b/modules/users/git/default.nix deleted file mode 100644 index f1f555e..0000000 --- a/modules/users/git/default.nix +++ /dev/null @@ -1,81 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.git; - inherit (lib) mkOption mkIf types; -in -{ - options.nx.git = { - enable = mkOption { - description = "Enable git"; - type = types.bool; - default = false; - }; - - userName = mkOption { - description = "Git username"; - type = types.str; - default = "Leander Scherer"; - }; - - userEmail = mkOption { - description = "Git email"; - type = types.str; - default = "leander@schererleander.de"; - }; - - signKey = mkOption { - description = "Sign key"; - type = types.nullOr types.str; - default = "A3502B180BC1D41A"; - }; - - signFlavor = mkOption { - description = "Sign key flavor"; - type = types.enum [ - "ssh" - "openpgp" - ]; - default = "openpgp"; - }; - }; - - config = mkIf cfg.enable { - programs.git = { - enable = true; - - signing = mkIf (cfg.signKey != null) { - key = cfg.signKey; - signByDefault = true; - }; - - ignores = [ - "*~" - ".DS_Store" - ".direnv" - ".envrc" - ]; - - settings = { - user.name = cfg.userName; - user.email = cfg.userEmail; - help.autocorrect = 20; - alias = { - st = "status"; - co = "checkout"; - br = "branch"; - }; - pull.rebase = true; - gpg.format = cfg.signFlavor; - url."git@github.com:".insteadOf = "https://github.com"; - }; - }; - programs.diff-highlight = { - enable = true; - enableGitIntegration = true; - }; - }; -} diff --git a/modules/users/gpg/default.nix b/modules/users/gpg/default.nix deleted file mode 100644 index d5714b0..0000000 --- a/modules/users/gpg/default.nix +++ /dev/null @@ -1,62 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -let - inherit (lib) - mkOption - types - mkIf - ; - cfg = config.nx.gpg; -in -{ - - options.nx.gpg = { - enable = mkOption { - description = "GNU Privacy Guard"; - type = types.bool; - default = config.nx.git.enable; - }; - - gpgKey = mkOption { - description = "default gpg key"; - type = types.nullOr types.str; - default = ""; - }; - - pinentry = mkOption { - description = "pinentry flavor"; - type = types.enum [ - "curses" - "gnome3" - "qt" - "mac" - ]; - default = if pkgs.stdenv.isDarwin then "mac" else "curses"; - }; - }; - - config = lib.mkIf cfg.enable { - programs.gpg = { - enable = true; - #settings.default-key = mkIf (cfg.gpgKey != null) cfg.gpgKey; - }; - - services.gpg-agent = { - enable = true; - pinentry.package = - if cfg.pinentry == "gnome3" then - pkgs.pinentry-gnome3 - else if cfg.pinentry == "qt" then - pkgs.pinentry-qt - else if cfg.pinentry == "mac" then - pkgs.pinentry_mac - else - pkgs.pinentry-curses; - }; - }; -} diff --git a/modules/users/media/default.nix b/modules/users/media/default.nix deleted file mode 100644 index 89daaba..0000000 --- a/modules/users/media/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - imports = [ - ./nixcord - ./spicetify - ]; -} diff --git a/modules/users/media/nixcord/default.nix b/modules/users/media/nixcord/default.nix deleted file mode 100644 index d421abf..0000000 --- a/modules/users/media/nixcord/default.nix +++ /dev/null @@ -1,40 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.media.nixcord; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.media.nixcord = { - enable = lib.mkOption { - description = "Enable nixcord and setup"; - type = types.bool; - default = false; - }; - frameless = mkOption { - description = "Make discord frameless"; - type = types.bool; - default = true; - }; - }; - config = mkIf cfg.enable { - programs.nixcord = { - enable = true; - config = { - themeLinks = [ - "https://refact0r.github.io/system24/theme/system24.theme.css" - ]; - frameless = cfg.frameless; - plugins = { - alwaysAnimate.enable = false; - imageLink.enable = true; - imageZoom.enable = true; - translate.enable = true; - }; - }; - }; - }; -} diff --git a/modules/users/media/spicetify/default.nix b/modules/users/media/spicetify/default.nix deleted file mode 100644 index e78b779..0000000 --- a/modules/users/media/spicetify/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - lib, - pkgs, - inputs, - ... -}: - -let - spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.stdenv.system}; - cfg = config.nx.media.spicetify; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.media.spicetify = { - enable = mkOption { - description = "Command-line tool to customize the official Spotify client"; - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - 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/users/productivity/anki/default.nix b/modules/users/productivity/anki/default.nix deleted file mode 100644 index 58d8f49..0000000 --- a/modules/users/productivity/anki/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.productivity.anki; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.productivity.anki = { - enable = mkOption { - description = "Anki free and open-source flashcard program"; - type = types.bool; - default = false; - }; - }; - config = mkIf cfg.enable { - programs.anki = { - enable = true; - #style = "native"; - #addons = with pkgs.ankiAddons; [ - # anki-connect - # review-heatmap - #]; - }; - }; -} diff --git a/modules/users/productivity/default.nix b/modules/users/productivity/default.nix deleted file mode 100644 index 9e05dde..0000000 --- a/modules/users/productivity/default.nix +++ /dev/null @@ -1,10 +0,0 @@ -{ ... }: -{ - imports = [ - ./anki - ./latex - ./obsidian - ./typst - ./nextcloud-client - ]; -} diff --git a/modules/users/productivity/latex/default.nix b/modules/users/productivity/latex/default.nix deleted file mode 100644 index 0720664..0000000 --- a/modules/users/productivity/latex/default.nix +++ /dev/null @@ -1,47 +0,0 @@ -{ - config, - options, - pkgs, - lib, - ... -}: -let - cfg = config.nx.productivity.latex; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.productivity.latex = { - enable = mkOption { - description = "LaTeX typesetting system"; - type = types.bool; - default = false; - }; - }; - - config = mkIf cfg.enable { - 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"; - }; - }; - }; -} diff --git a/modules/users/productivity/nextcloud-client/default.nix b/modules/users/productivity/nextcloud-client/default.nix deleted file mode 100644 index 1b92bb0..0000000 --- a/modules/users/productivity/nextcloud-client/default.nix +++ /dev/null @@ -1,28 +0,0 @@ -{ - config, - lib, - pkgs, - username, - ... -}: - -let - inherit (lib) mkOption types mkIf; - cfg = config.nx.productivity.nextcloud-client; -in -{ - options.nx.productivity.nextcloud-client = { - enable = mkOption { - description = "Client for nextcloud"; - type = types.bool; - default = false; - }; - }; - config = mkIf cfg.enable { - #home.packages = with pkgs; [ nextcloud-client ]; - services.nextcloud-client = { - enable = true; - startInBackground = true; - }; - }; -} diff --git a/modules/users/productivity/obsidian/default.nix b/modules/users/productivity/obsidian/default.nix deleted file mode 100644 index 21b3f34..0000000 --- a/modules/users/productivity/obsidian/default.nix +++ /dev/null @@ -1,23 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.productivity.obsidian; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.productivity.obsidian = { - enable = mkOption { - description = "Obsidian note-taking application"; - type = types.bool; - default = false; - }; - }; - config = mkIf cfg.enable { - programs.obsidian = { - enable = true; - }; - }; -} diff --git a/modules/users/productivity/typst/default.nix b/modules/users/productivity/typst/default.nix deleted file mode 100644 index f3e1981..0000000 --- a/modules/users/productivity/typst/default.nix +++ /dev/null @@ -1,25 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: -let - cfg = config.nx.productivity.typst; - inherit (lib) mkOption types mkIf; -in -{ - options.nx.productivity.typst = { - enable = mkOption { - description = "Typst markup-based typesetting system"; - type = types.bool; - default = false; - }; - }; - config = mkIf cfg.enable { - home.packages = with pkgs; [ - typst - typst-fmt - ]; - }; -} diff --git a/modules/users/shells/bash/default.nix b/modules/users/shells/bash/default.nix deleted file mode 100644 index d17ffc5..0000000 --- a/modules/users/shells/bash/default.nix +++ /dev/null @@ -1,43 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -let - inherit (lib) mkOption mkIf types; - cfg = config.nx.shells.bash; -in -{ - options.nx.shells.bash = { - enable = mkOption { - type = types.bool; - default = config.nx.terminal.defaultShell == "bash"; - }; - }; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - zoxide - ]; - - programs.bash = { - enable = true; - enableCompletion = true; - initExtra = '' - # view man pages with nvim - export MANPAGER="nvim +Man!" - - # vim keybindings - set -o vi - - # zoxide smarter cd command - eval "$(zoxide init bash)" - ''; - shellAliases = { - ls = "ls --color=auto"; - }; - }; - }; -} diff --git a/modules/users/shells/default.nix b/modules/users/shells/default.nix deleted file mode 100644 index 9abd804..0000000 --- a/modules/users/shells/default.nix +++ /dev/null @@ -1,7 +0,0 @@ -{ ... }: -{ - imports = [ - ./zsh - ./bash - ]; -} diff --git a/modules/users/shells/zsh/default.nix b/modules/users/shells/zsh/default.nix deleted file mode 100644 index 0b94c3d..0000000 --- a/modules/users/shells/zsh/default.nix +++ /dev/null @@ -1,69 +0,0 @@ -{ - config, - pkgs, - lib, - ... -}: - -let - inherit (lib) mkOption mkIf types; - cfg = config.nx.shells.zsh; -in -{ - options.nx.shells.zsh = { - enable = mkOption { - type = types.bool; - default = config.nx.terminal.defaultShell == "zsh"; - }; - }; - - config = mkIf cfg.enable { - home.packages = with pkgs; [ - zoxide - ]; - - 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 - - # zoxide smarter cmd command - eval "$(zoxide init zsh)" - ''; - shellAliases = { - ls = "ls --color=auto"; - }; - - 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"; } - ]; - }; - }; - }; -} diff --git a/modules/users/terminal/default.nix b/modules/users/terminal/default.nix deleted file mode 100644 index 937c086..0000000 --- a/modules/users/terminal/default.nix +++ /dev/null @@ -1,36 +0,0 @@ -{ - pkgs, - config, - lib, - ... -}: -let - inherit (lib) mkOption types; - cfg = config.nx.terminal; -in -{ - imports = [ - ./foot.nix - ./kitty.nix - ]; - options.nx.terminal = { - font = mkOption { - description = "default font"; - default = "Victor Mono"; - }; - - multiplexer = mkOption { - type = types.enum [ "tmux" ]; - default = "tmux"; - }; - - defaultShell = mkOption { - description = "default shell"; - type = types.enum [ - "bash" - "zsh" - ]; - default = "bash"; - }; - }; -} diff --git a/modules/users/terminal/foot.nix b/modules/users/terminal/foot.nix deleted file mode 100644 index fbaba8f..0000000 --- a/modules/users/terminal/foot.nix +++ /dev/null @@ -1,57 +0,0 @@ -{ - config, - lib, - pkgs, - ... -}: - -{ - options.nx.terminal.foot.enable = lib.mkEnableOption "Enable foot terminal"; - config = lib.mkIf config.nx.terminal.foot.enable { - 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"; - }; - }; - }; - }; -} diff --git a/modules/users/terminal/kitty.nix b/modules/users/terminal/kitty.nix deleted file mode 100644 index 02789cd..0000000 --- a/modules/users/terminal/kitty.nix +++ /dev/null @@ -1,33 +0,0 @@ -{ - config, - lib, - ... -}: - -{ - options.nx.programs.kitty.enable = lib.mkEnableOption "Enable kitty"; - config = lib.mkIf config.nx.programs.kitty.enable { - programs.kitty = { - enable = true; - shellIntegration.enableFishIntegration = true; - font = { - name = "monospace"; - size = 11; - }; - settings = { - cursor_shape = "underline"; - cursor_blink_interval = "-1"; - cursor_stop_blinking_after = "15.0"; - - background_opacity = "0.3"; - - enable_audio_bell = false; - bell_on_tab = false; - - window_border_width = "0"; - window_margin_width = "4"; - window_padding_width = "5"; - }; - }; - }; -} diff --git a/modules/users/zathura/default.nix b/modules/users/zathura/default.nix deleted file mode 100644 index f07707c..0000000 --- a/modules/users/zathura/default.nix +++ /dev/null @@ -1,41 +0,0 @@ -{ - config, - lib, - ... -}: -let - cfg = config.nx.programs.zathura; - inherit (lib) mkOption mkIf types; -in -{ - options.nx.programs.zathura = { - enable = mkOption { - default = false; - description = "zathura document viewer"; - type = types.bool; - }; - }; - - config = mkIf cfg.enable { - 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"; - }; - }; - }; -} |
