diff options
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/desktop/default.nix | 2 | ||||
| -rw-r--r-- | modules/desktop/kde/default.nix | 21 | ||||
| -rw-r--r-- | modules/desktop/labwc/default.nix | 152 | ||||
| -rw-r--r-- | modules/desktop/labwc/sfwbar.nix | 138 | ||||
| -rw-r--r-- | modules/programs/gemini.nix | 13 | ||||
| -rw-r--r-- | modules/programs/kitty.nix | 6 | ||||
| -rw-r--r-- | modules/programs/neovim/init.lua | 164 | ||||
| -rw-r--r-- | modules/programs/opencode.nix | 2 |
8 files changed, 400 insertions, 98 deletions
diff --git a/modules/desktop/default.nix b/modules/desktop/default.nix index 1a500e7..f3efbf5 100644 --- a/modules/desktop/default.nix +++ b/modules/desktop/default.nix @@ -7,5 +7,7 @@ ./waybar.nix ./gnome ./cinnamon + ./kde + ./labwc ]; } diff --git a/modules/desktop/kde/default.nix b/modules/desktop/kde/default.nix new file mode 100644 index 0000000..d2d37dd --- /dev/null +++ b/modules/desktop/kde/default.nix @@ -0,0 +1,21 @@ +{ + config, + lib, + pkgs, + ... +}: + +{ + + options.nx.desktop.kde.enable = lib.mkEnableOption "Enable kde"; + config = lib.mkIf config.nx.desktop.kde.enable { + services.displayManager.sddm.enable = true; + services.displayManager.sddm.wayland.enable = true; + services.desktopManager.plasma6.enable = true; + + environment.plasma6.excludePackages = with pkgs.kdePackages; [ + elisa + kate + ]; + }; +} diff --git a/modules/desktop/labwc/default.nix b/modules/desktop/labwc/default.nix new file mode 100644 index 0000000..9f15641 --- /dev/null +++ b/modules/desktop/labwc/default.nix @@ -0,0 +1,152 @@ +{ + config, + username, + pkgs, + lib, + ... +}: + +let + gruvbox-openbox = pkgs.stdenv.mkDerivation { + pname = "gruvbox-openbox"; + version = "0-unstable-2024-02-14"; + + src = pkgs.fetchFromGitHub { + owner = "nathanielevan"; + repo = "gruvbox-openbox"; + rev = "master"; + hash = "sha256-61BsD/DK6OOJLKwdY03HL1pCG1DJcIE9bsFPAVFfcIY="; + }; + + installPhase = '' + mkdir -p $out/share/themes + cp -r gruvbox-dark $out/share/themes/ + cp -r gruvbox-material-dark $out/share/themes/ + cp -r gruvbox-material-dark-blocks $out/share/themes/ + ''; + }; +in +{ + imports = [ + ./sfwbar.nix + ]; + + options.nx.desktop.labwc.enable = lib.mkEnableOption "Enable labwc"; + config = lib.mkIf config.nx.desktop.labwc.enable { + home-manager.users.${username} = { + home.packages = with pkgs; [ + labwc-tweaks + labwc-gtktheme + gruvbox-material-gtk-theme + gruvbox-dark-icons-gtk + swaybg + wl-clipboard + + gruvbox-openbox + ]; + + services.cliphist.enable = true; + + gtk = { + enable = true; + theme = { + name = "Gruvbox-Material-Dark"; + package = pkgs.gruvbox-material-gtk-theme; + }; + iconTheme = { + name = "Gruvbox-Dark"; + package = pkgs.gruvbox-dark-icons-gtk; + }; + cursorTheme = { + name = "Adwaita"; + package = pkgs.adwaita-icon-theme; + }; + gtk3.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + gtk4.extraConfig = { + gtk-application-prefer-dark-theme = 1; + }; + }; + + services.kanshi = { + enable = true; + profiles = { + home = { + outputs = [ + { + criteria = "DP-1"; + mode = "1920x1080@240"; + position = "1920,0"; + } + ]; + }; + }; + }; + + wayland.windowManager.labwc = { + enable = true; + autostart = [ + "${pkgs.sfwbar}/bin/sfwbar" + "${pkgs.swaybg}/bin/swaybg -m fill -i /home/${username}/Developer/nix/images/pond.jpg & disown" + ]; + environment = [ + "XKB_DEFAULT_LAYOUT=de" + "XCURSOR_SIZE=24" + "XDG_CURRENT_DESKTOP=wlroots" + ]; + + menu = [ + ]; + + rc = { + core = { + decoration = "server"; + gap = 5; + adaptiveSync = "no"; + reuseOutputMode = "yes"; + }; + + theme = { + # "gruvbox-dark", "gruvbox-material-dark", "gruvbox-material-dark-blocks" + name = "gruvbox-material-dark-blocks"; + }; + + keyboard = { + default = true; + keybind = [ + { + "@key" = "W-Return"; + action = { + "@name" = "Execute"; + "@command" = "kitty"; + }; + } + { + "@key" = "W-F4"; + action = { + "@name" = "None"; + }; + } + ]; + }; + + mouse = { + default = true; + context = { + "@name" = "Root"; + mousebind = { + "@button" = "Right"; + "@action" = "Press"; + action = { + "@name" = "ShowMenu"; + "@menu" = "root-menu"; + }; + }; + }; + }; + }; + }; + }; + }; +} diff --git a/modules/desktop/labwc/sfwbar.nix b/modules/desktop/labwc/sfwbar.nix new file mode 100644 index 0000000..62c4982 --- /dev/null +++ b/modules/desktop/labwc/sfwbar.nix @@ -0,0 +1,138 @@ +{ + config, + username, + pkgs, + lib, + ... +}: + +{ + options.nx.desktop.sfwbar.enable = lib.mkEnableOption "Enable sfwbar" // { + default = config.nx.desktop.labwc.enable; + }; + + config = lib.mkIf config.nx.desktop.sfwbar.enable { + home-manager.users.${username} = { + home.packages = with pkgs; [ + sfwbar + gtk-layer-shell + ]; + + # CONFIGURATION + xdg.configFile."sfwbar/sfwbar.config".text = '' + # Term setup + Set Term = "foot" + Set ThicknessHint = "20px" + + # Actions + TriggerAction "SIGRTMIN+1", SwitcherEvent "forward" + TriggerAction "SIGRTMIN+2", SwitcherEvent "back" + + # Initialization + Function("SfwbarInit") { + SetLayer "top" + SetMirror "*" + SetExclusiveZone "auto" + } + + # Placer (Window positioning) + placer { + xorigin = 5 + yorigin = 5 + xstep = 5 + ystep = 5 + children = true + } + + # Task Switcher + switcher { + interval = 700 + icons = true + labels = false + cols = 5 + } + + # Load Standard Library Winops + include("${pkgs.sfwbar}/share/sfwbar/winops.widget") + + # Main Layout + layout { + + # Start Menu + include("${pkgs.sfwbar}/share/sfwbar/startmenu.widget") + + # Show Desktop + include("${pkgs.sfwbar}/share/sfwbar/showdesktop.widget") + + # Taskbar + taskbar { + rows = 1 + icons = true + labels = false + sort = false + action[3] = Menu "winops" + action[Drag] = Focus + } + + # Spacer + label { + value = "" + style = "spacer" + } + + # Pager + pager { + rows = 1 + pins = "1","2","3","4" + preview = true + action[Drag] = WorkspaceActivate + } + + # System Monitors + #include("${pkgs.sfwbar}/share/sfwbar/cpu.widget") + #include("${pkgs.sfwbar}/share/sfwbar/memory.widget") + + # Tray + tray { + rows = 1 + } + + # --- MODULES --- + #include("${pkgs.sfwbar}/share/sfwbar/upower.widget") + #include("${pkgs.sfwbar}/share/sfwbar/battery-svg.widget") + + #include("${pkgs.sfwbar}/share/sfwbar/idle.widget") + #include("${pkgs.sfwbar}/share/sfwbar/backlight.widget") + include("${pkgs.sfwbar}/share/sfwbar/volume.widget") + #include("${pkgs.sfwbar}/share/sfwbar/network-module.widget") + #include("${pkgs.sfwbar}/share/sfwbar/sway-lang.widget") + + # Clock + grid { + style = "clock_grid" + label { + value = Time("%H:%M") + tooltip = Time("%H:%M\n%x") + } + } + } + #CSS + + #spacer { + -GtkWidget-hexpand: true; + } + + button#taskbar_item { + padding: 5px; + border-radius: 0px; + border-width: 0px; + -GtkWidget-hexpand: false; + } + + button#taskbar_item:hover { + background-color: rgba(255, 255, 255, 0.1); + } + ''; + }; + }; +} diff --git a/modules/programs/gemini.nix b/modules/programs/gemini.nix index 8c0e38a..70c5260 100644 --- a/modules/programs/gemini.nix +++ b/modules/programs/gemini.nix @@ -10,12 +10,13 @@ config = lib.mkIf config.nx.programs.gemini-cli.enable { home-manager.users."${username}".programs.gemini-cli = { enable = true; - settings = { - "ui.theme" = "Default"; - "general.preferredEditor" = "nvim"; - "general.disableAutoUpdate" = true; - "privacy.usageStatisticsEnabled" = false; - }; + # Cant store credentials due config read-only + #settings = { + # "ui.theme" = "Default"; + # "general.preferredEditor" = "nvim"; + # "general.disableAutoUpdate" = true; + # "privacy.usageStatisticsEnabled" = false; + #}; }; }; } diff --git a/modules/programs/kitty.nix b/modules/programs/kitty.nix index f48985f..619d1db 100644 --- a/modules/programs/kitty.nix +++ b/modules/programs/kitty.nix @@ -12,9 +12,11 @@ programs.kitty = { enable = true; enableGitIntegration = true; + font = { + name = "monospace"; + size = 11; + }; settings = { - font_size = 11; - cursor_shape = "underline"; cursor_blink_interval = "-1"; cursor_stop_blinking_after = "15.0"; diff --git a/modules/programs/neovim/init.lua b/modules/programs/neovim/init.lua index bd83eb9..79c49a5 100644 --- a/modules/programs/neovim/init.lua +++ b/modules/programs/neovim/init.lua @@ -20,38 +20,24 @@ map('n', '<leader>o', '<CMD>update<BAR>source %<CR>', { desc = 'Save & reload in map('n', '<leader>w', '<CMD>write<CR>') map('n', '<leader>q', '<CMD>quit<CR>') --- Bootstrap lazy.nvim -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", - lazypath, - }) -end -vim.opt.rtp:prepend(lazypath) - --- Plugin specifications -require("lazy").setup({ - { "ellisonleao/gruvbox.nvim" }, - { "echasnovski/mini.starter" }, - { "lewis6991/gitsigns.nvim" }, - { "windwp/nvim-autopairs" }, - { "nvim-telescope/telescope.nvim", dependencies = { "nvim-lua/plenary.nvim" } }, - { "j-hui/fidget.nvim" }, - { "nvim-treesitter/nvim-treesitter" }, - { "neovim/nvim-lspconfig" }, - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-nvim-lsp" }, - { "hrsh7th/cmp-buffer" }, - { "hrsh7th/cmp-path" }, - { "hrsh7th/cmp-cmdline" }, - { "L3MON4D3/LuaSnip" }, - { "saadparwaiz1/cmp_luasnip" }, - { "onsails/lspkind-nvim" } +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/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({ @@ -105,74 +91,75 @@ cmp.setup({ -- 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() + '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, + 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, }) local servers = { - nixd = { - settings = { - nixd = { - formatting = { - command = { "nixfmt" }, - }, - }, - }, - }, - lua_ls = { - 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, - }, - }, - }, - }, - pyright = {}, - tailwindcss = {}, - gopls = { - settings = { - gopls = { - analyses = { - unusedparams = true, - unusedwrite = true, - }, - staticcheck = true, - }, - }, - }, - rust_analyzer = {}, + nixd = { + settings = { + nixd = { + formatting = { + command = { "nixfmt" }, + }, + }, + }, + }, + lua_ls = { + 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, + }, + }, + }, + }, + pyright = {}, + tailwindcss = {}, + gopls = { + settings = { + gopls = { + analyses = { + unusedparams = true, + unusedwrite = true, + }, + staticcheck = true, + }, + }, + }, + rust_analyzer = {}, + ts_ls = {}, } local server_names = {} for server, config in pairs(servers) do - config.capabilities = capabilities - vim.lsp.config(server, config) - table.insert(server_names, server) + config.capabilities = capabilities + vim.lsp.config(server, config) + table.insert(server_names, server) end vim.lsp.enable(server_names) @@ -216,4 +203,3 @@ 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/opencode.nix b/modules/programs/opencode.nix index 00c55e7..3ceb6fb 100644 --- a/modules/programs/opencode.nix +++ b/modules/programs/opencode.nix @@ -13,7 +13,7 @@ settings = { theme = "system"; share = "disabled"; - autoUpdate = false; + autoupdate = false; }; }; }; |
