mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-24 08:39:42 -04:00
v2
This commit is contained in:
parent
036db0b3b9
commit
203170a88f
66 changed files with 169 additions and 54 deletions
15
src/user/modules/gui/default.nix
Normal file
15
src/user/modules/gui/default.nix
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui;
|
||||
|
||||
in
|
||||
{ options.modules.gui = { enable = mkEnableOption "gui"; };
|
||||
imports = [ ./desktopEnvironments ];
|
||||
config = mkIf cfg.enable {
|
||||
modules = {
|
||||
sway.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
5
src/user/modules/gui/desktopEnvironments/default.nix
Normal file
5
src/user/modules/gui/desktopEnvironments/default.nix
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
imports = [
|
||||
./sway
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,69 @@
|
|||
{
|
||||
scrolling = {
|
||||
history = 10000;
|
||||
multiplier = 3;
|
||||
};
|
||||
|
||||
window = {
|
||||
opacity = 0.90;
|
||||
};
|
||||
|
||||
colors = {
|
||||
primary = {
|
||||
background = "#000000";
|
||||
foreground = "#cdd6f4";
|
||||
};
|
||||
|
||||
normal = {
|
||||
black = "#1e2127";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#abb2bf";
|
||||
};
|
||||
|
||||
bright = {
|
||||
black = "#5c6370";
|
||||
red = "#e06c75";
|
||||
green = "#98c379";
|
||||
yellow = "#d19a66";
|
||||
blue = "#61afef";
|
||||
magenta = "#c678dd";
|
||||
cyan = "#56b6c2";
|
||||
white = "#ffffff";
|
||||
};
|
||||
};
|
||||
|
||||
font = {
|
||||
size = 12;
|
||||
normal = {
|
||||
family = "Terminus";
|
||||
style = "Regular";
|
||||
};
|
||||
|
||||
bold = {
|
||||
family = "Terminus";
|
||||
style = "Bold";
|
||||
};
|
||||
|
||||
italic = {
|
||||
family = "Terminus";
|
||||
style = "Italic";
|
||||
};
|
||||
|
||||
bold_italic = {
|
||||
family = "Terminus";
|
||||
style = "Bold Italic";
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#cursor = {
|
||||
# shape = "Block";
|
||||
# blinking = "Always";
|
||||
# blink_interval = 750;
|
||||
#};
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
{ lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.alacritty;
|
||||
|
||||
in
|
||||
{ options.modules.gui.alacritty = { enable = mkEnableOption "gui.alacritty"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.alacritty = {
|
||||
enable = true;
|
||||
settings = import ./config/alacritty.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.browsers;
|
||||
|
||||
in
|
||||
{ options.modules.gui.browsers = { enable = mkEnableOption "gui.browsers"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.firefox.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
tor-browser
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.corn;
|
||||
|
||||
in
|
||||
{ options.modules.gui.corn = { enable = mkEnableOption "gui.corn"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
trezor-suite
|
||||
trezorctl
|
||||
trezord
|
||||
|
||||
electrum
|
||||
bisq-desktop
|
||||
|
||||
sparrow
|
||||
];
|
||||
|
||||
systemd.user.services = {
|
||||
trezord = {
|
||||
Unit = {
|
||||
Description = "Trezor Bridge";
|
||||
After = [ "network.target" ];
|
||||
Wants = [ "network.target" ];
|
||||
PartOf = [ "graphical-session.target" ];
|
||||
};
|
||||
Service = {
|
||||
ExecStart = "${pkgs.trezord}/bin/trezord-go";
|
||||
Restart = "always";
|
||||
};
|
||||
Install = {
|
||||
WantedBy = [ "default.target" ];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
11
src/user/modules/gui/desktopEnvironments/modules/default.nix
Normal file
11
src/user/modules/gui/desktopEnvironments/modules/default.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
imports = [
|
||||
./alacritty
|
||||
./browsers
|
||||
./corn
|
||||
./fun
|
||||
./utils
|
||||
./neovim
|
||||
./writing
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.fun;
|
||||
|
||||
in
|
||||
{ options.modules.gui.fun = { enable = mkEnableOption "gui.fun"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.obs-studio = {
|
||||
enable = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-pipewire-audio-capture
|
||||
input-overlay
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
spotify
|
||||
webcord
|
||||
showmethekey
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
-- bootstrap lazy.nvim, LazyVim and your plugins
|
||||
require("config.lazy")
|
||||
|
|
@ -0,0 +1,187 @@
|
|||
-- Autocmds are automatically loaded on the VeryLazy event
|
||||
-- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua
|
||||
-- Add any additional autocmds here
|
||||
|
||||
vim.g.autoformat = false
|
||||
vim.cmd([[
|
||||
au BufRead,BufNewFile *.purs set filetype=purescript
|
||||
]])
|
||||
|
||||
require("which-key").register({
|
||||
w = {
|
||||
d = {
|
||||
"<cmd>bd<CR> | close<CR>",
|
||||
"Delete window and buffer"
|
||||
},
|
||||
D = {
|
||||
"<cmd>close<CR>",
|
||||
"Delete window only",
|
||||
},
|
||||
},
|
||||
t = {
|
||||
"<cmd>:new | setlocal nonumber norelativenumber | resize 10 | set winfixheight | terminal<CR>",
|
||||
"Open Terminal",
|
||||
},
|
||||
}, {
|
||||
prefix = "<leader>",
|
||||
})
|
||||
|
||||
require("notify").setup({
|
||||
background_colour = "#000000",
|
||||
})
|
||||
|
||||
local lsp = require("lsp-zero").preset({})
|
||||
|
||||
--require("null-ls").setup({
|
||||
-- -- you can reuse a shared lspconfig on_attach callback here
|
||||
-- on_attach = function(client, bufnr)
|
||||
-- if client.supports_method("textDocument/formatting") then
|
||||
-- vim.api.nvim_clear_autocmds({ group = vim.api.nvim_create_augroup("LspFormatting", {}), buffer = bufnr })
|
||||
-- vim.api.nvim_create_autocmd("BufWritePre", {
|
||||
-- group = augroup,
|
||||
-- buffer = bufnr,
|
||||
-- callback = function()
|
||||
-- vim.lsp.buf.format({
|
||||
-- bufnr = bufnr,
|
||||
-- filter = function(client)
|
||||
-- return client.name == "null-ls"
|
||||
-- end,
|
||||
-- })
|
||||
-- vim.lsp.buf.formatting_sync()
|
||||
-- end,
|
||||
-- })
|
||||
-- end
|
||||
-- end,
|
||||
--})
|
||||
|
||||
-- https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md
|
||||
lsp.setup_servers({
|
||||
--"tsserver",
|
||||
"hls",
|
||||
"pyright",
|
||||
"nil_ls",
|
||||
"cssls",
|
||||
"html",
|
||||
"jsonls",
|
||||
"diagnosticls",
|
||||
"lua_ls",
|
||||
"marksman",
|
||||
"purescriptls",
|
||||
"tailwindcss",
|
||||
"bashls",
|
||||
"dhall_lsp_server",
|
||||
"volar",
|
||||
"clangd",
|
||||
})
|
||||
|
||||
require("lspconfig").lua_ls.setup(lsp.nvim_lua_ls())
|
||||
|
||||
lsp.setup()
|
||||
|
||||
local cmp_nvim_lsp = require "cmp_nvim_lsp"
|
||||
|
||||
require("lspconfig").clangd.setup {
|
||||
on_attach = on_attach,
|
||||
capabilities = cmp_nvim_lsp.default_capabilities(),
|
||||
cmd = {
|
||||
"clangd",
|
||||
"--offset-encoding=utf-16",
|
||||
},
|
||||
}
|
||||
|
||||
require("lspconfig").volar.setup({
|
||||
filetypes = { "typescript", "javascript", "javascriptreact", "typescriptreact", "vue", "json" },
|
||||
})
|
||||
|
||||
require("lspconfig").nil_ls.setup {
|
||||
settings = {
|
||||
["nil"] = {
|
||||
nix = {
|
||||
flake = {
|
||||
autoArchive = true,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local cmp = require("cmp")
|
||||
cmp.setup({
|
||||
snippet = {
|
||||
expand = function(args)
|
||||
require("luasnip").lsp_expand(args.body)
|
||||
end,
|
||||
},
|
||||
sources = {
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
-- other sources...
|
||||
},
|
||||
formatting = {
|
||||
format = function(entry, vim_item)
|
||||
vim_item.menu = ""
|
||||
return vim_item
|
||||
end,
|
||||
},
|
||||
-- other configurations...
|
||||
})
|
||||
|
||||
cmp.setup({
|
||||
enabled = function()
|
||||
-- disable completion in comments
|
||||
local context = require("cmp.config.context")
|
||||
-- keep command mode completion enabled when cursor is in a comment
|
||||
if vim.api.nvim_get_mode().mode == "c" then
|
||||
return true
|
||||
else
|
||||
return not context.in_treesitter_capture("comment") and not context.in_syntax_group("comment")
|
||||
end
|
||||
end,
|
||||
mapping = {
|
||||
["<C-p>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-n>"] = cmp.mapping.select_next_item(),
|
||||
-- ["<Down>"] = cmp.mapping.select_next_item(),
|
||||
-- ["<Up>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-d>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item()
|
||||
elseif cmp.completed then
|
||||
cmp.confirm({ select = true })
|
||||
else
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
["<S-Tab>"] = cmp.mapping.select_prev_item(),
|
||||
|
||||
["<CR>"] = cmp.mapping(function(fallback)
|
||||
fallback()
|
||||
end, { "i", "s" }),
|
||||
},
|
||||
})
|
||||
|
||||
local dap = require("dap")
|
||||
dap.adapters.haskell = {
|
||||
type = "executable",
|
||||
command = "haskell-debug-adapter",
|
||||
args = { "--hackage-version=0.0.33.0" },
|
||||
}
|
||||
dap.configurations.haskell = {
|
||||
{
|
||||
type = "haskell",
|
||||
request = "launch",
|
||||
name = "Debug",
|
||||
workspace = "${workspaceFolder}",
|
||||
startup = "${file}",
|
||||
stopOnEntry = true,
|
||||
logFile = vim.fn.stdpath("data") .. "/haskell-dap.log",
|
||||
logLevel = "WARNING",
|
||||
ghciEnv = vim.empty_dict(),
|
||||
ghciPrompt = "λ: ",
|
||||
-- Adjust the prompt to the prompt you see when you invoke the ghci command below
|
||||
ghciInitialPrompt = "λ: ",
|
||||
ghciCmd = "stack ghci --test --no-load --no-build --main-is TARGET --ghci-options -fprint-evld-with-show",
|
||||
},
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
-- Keymaps are automatically loaded on the VeryLazy event
|
||||
-- Default keymaps that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/keymaps.lua
|
||||
-- Add any additional keymaps here
|
||||
|
||||
vim.keymap.set("n", "<C-U>", "<C-U>zz", { silent = true })
|
||||
vim.keymap.set("n", "<C-D>", "<C-D>zz", { silent = true })
|
||||
vim.keymap.set("n", "H", ":bprev<CR>", { silent = true })
|
||||
vim.keymap.set("n", "L", ":bnext<CR>", { silent = true })
|
||||
|
|
@ -0,0 +1,44 @@
|
|||
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||
if not vim.loop.fs_stat(lazypath) then
|
||||
-- bootstrap lazy.nvim
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(vim.env.LAZY or lazypath)
|
||||
|
||||
require("lazy").setup({
|
||||
spec = {
|
||||
-- add LazyVim and import its plugins
|
||||
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
|
||||
-- import any extras modules here
|
||||
{ import = "lazyvim.plugins.extras.dap.core" },
|
||||
-- import/override with your plugins
|
||||
{ import = "plugins" },
|
||||
},
|
||||
defaults = {
|
||||
-- By default, only LazyVim plugins will be lazy-loaded. Your custom plugins will load during startup.
|
||||
-- If you know what you're doing, you can set this to `true` to have all your custom plugins lazy-loaded by default.
|
||||
lazy = false,
|
||||
-- It's recommended to leave version=false for now, since a lot the plugin that support versioning,
|
||||
-- have outdated releases, which may break your Neovim install.
|
||||
version = false, -- always use the latest git commit
|
||||
-- version = "*", -- try installing the latest stable version for plugins that support semver
|
||||
},
|
||||
install = { colorscheme = { "github-theme" } },
|
||||
checker = { enabled = true }, -- automatically check for plugin updates
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
-- "matchit",
|
||||
-- "matchparen",
|
||||
-- "netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"tutor",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
-- Options are automatically loaded before lazy.nvim startup
|
||||
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
|
||||
-- Add any additional options here
|
||||
|
||||
vim.opt.tabstop = 2
|
||||
vim.opt.shiftwidth = 2
|
||||
vim.opt.softtabstop = 2
|
||||
vim.opt.expandtab = true
|
||||
vim.opt.smartindent = true
|
||||
|
||||
vim.cmd([[
|
||||
autocmd FileType python setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
||||
]])
|
||||
|
||||
vim.cmd([[
|
||||
autocmd FileType haskell setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
||||
]])
|
||||
|
||||
vim.opt.ignorecase = true
|
||||
vim.opt.smartcase = true
|
||||
|
||||
vim.opt.swapfile = false
|
||||
vim.opt.backup = false
|
||||
vim.opt.undofile = true
|
||||
|
||||
vim.o.termguicolors = true
|
||||
vim.opt.guicursor = "n-v-c:block,i:block,r:block"
|
||||
|
||||
vim.cmd [[highlight PmenuSel guifg=#53565d guibg=#f0c981]]
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
return {
|
||||
{
|
||||
"olimorris/onedarkpro.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
config = function()
|
||||
require("onedarkpro").setup({
|
||||
colors = {
|
||||
bg = "#000000",
|
||||
fg = "#abb2bf",
|
||||
red = "#ef596f",
|
||||
orange = "#d19a66",
|
||||
yellow = "#e5c07b",
|
||||
green = "#89ca78",
|
||||
cyan = "#2bbac5",
|
||||
blue = "#61afef",
|
||||
purple = "#d55fde",
|
||||
white = "#abb2bf",
|
||||
black = "#000000",
|
||||
gray = "#434852",
|
||||
highlight = "#e2be7d",
|
||||
comment = "#7f848e",
|
||||
none = "NONE",
|
||||
},
|
||||
options = {
|
||||
transparency = true,
|
||||
},
|
||||
})
|
||||
vim.cmd("colorscheme onedark_dark")
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"VonHeikemen/lsp-zero.nvim",
|
||||
branch = "v2.x",
|
||||
dependencies = {
|
||||
{ "neovim/nvim-lspconfig" },
|
||||
|
||||
{ "hrsh7th/nvim-cmp" },
|
||||
{ "hrsh7th/cmp-buffer" },
|
||||
{ "hrsh7th/cmp-path" },
|
||||
{ "hrsh7th/cmp-nvim-lsp" },
|
||||
|
||||
{ "L3MON4D3/LuaSnip" },
|
||||
},
|
||||
},
|
||||
|
||||
--[[
|
||||
{
|
||||
"jackMort/ChatGPT.nvim",
|
||||
event = "VeryLazy",
|
||||
config = function()
|
||||
require("chatgpt").setup({
|
||||
api_key_cmd = "pass show api/chatgpt-apikey",
|
||||
})
|
||||
end,
|
||||
dependencies = {
|
||||
"MunifTanjim/nui.nvim",
|
||||
"nvim-lua/plenary.nvim",
|
||||
"nvim-telescope/telescope.nvim",
|
||||
},
|
||||
},
|
||||
]]
|
||||
|
||||
{
|
||||
"nvim-treesitter/nvim-treesitter-context",
|
||||
config = function()
|
||||
require("treesitter-context").setup({
|
||||
enable = true, -- Enable this plugin (Can be enabled/disabled later via commands)
|
||||
max_lines = 0, -- How many lines the window should span. Values <= 0 mean no limit.
|
||||
min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit.
|
||||
line_numbers = false,
|
||||
multiline_threshold = 20, -- Maximum number of lines to collapse for a single context line
|
||||
trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer'
|
||||
mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline'
|
||||
-- Separator between context and content. Should be a single character string, like '-'.
|
||||
-- When separator is set, the context will only show up when there are at least 2 lines above cursorline.
|
||||
separator = "-",
|
||||
zindex = 20, -- The Z-index of the context window
|
||||
on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"nvim-neo-tree/neo-tree.nvim",
|
||||
config = function()
|
||||
require("neo-tree").setup({
|
||||
window = {
|
||||
position = "left",
|
||||
width = 20,
|
||||
},
|
||||
})
|
||||
end,
|
||||
},
|
||||
|
||||
{ "williamboman/mason.nvim", enabled = false },
|
||||
{ "williamboman/mason-lspconfig.nvim", enabled = false },
|
||||
{ "jay-babu/mason-nvim-dap.nvim", enabled = false },
|
||||
{ "catppuccin/nvim", enabled = false },
|
||||
{ "folke/flash.nvim", enabled = false }
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
let
|
||||
lsp = with pkgs; [
|
||||
nil nixfmt
|
||||
marksman shfmt
|
||||
sumneko-lua-language-server stylua
|
||||
haskell-language-server hlint
|
||||
nodePackages."@tailwindcss/language-server"
|
||||
dhall-lsp-server
|
||||
];
|
||||
|
||||
lsp' = with pkgs.nodePackages; [
|
||||
vscode-langservers-extracted
|
||||
typescript-language-server
|
||||
bash-language-server
|
||||
diagnostic-languageserver
|
||||
pyright
|
||||
purescript-language-server
|
||||
volar
|
||||
];
|
||||
|
||||
in
|
||||
lsp ++ lsp'
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.neovim;
|
||||
|
||||
in
|
||||
{ options.modules.gui.neovim = { enable = mkEnableOption "gui.neovim"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
vimAlias = true;
|
||||
extraPackages = import ./config/servers.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
home.file.".config/nvim" = {
|
||||
source = ./config/lazyvim;
|
||||
recursive = true;
|
||||
};
|
||||
home.packages = with pkgs; [
|
||||
lazygit
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.utils;
|
||||
|
||||
in
|
||||
{ options.modules.gui.utils = { enable = mkEnableOption "gui.utils"; };
|
||||
config = mkIf cfg.enable {
|
||||
programs.btop.enable = true;
|
||||
home.packages = with pkgs; [
|
||||
gimp
|
||||
okular
|
||||
pdftk
|
||||
|
||||
teams-for-linux
|
||||
zoom-us
|
||||
exercism
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.gui.writing;
|
||||
|
||||
in
|
||||
{ options.modules.gui.writing = { enable = mkEnableOption "gui.writing"; };
|
||||
config = mkIf cfg.enable {
|
||||
home.packages = with pkgs; [
|
||||
mdbook
|
||||
texlive.combined.scheme-tetex
|
||||
pandoc
|
||||
asciidoctor
|
||||
];
|
||||
};
|
||||
}
|
||||
179
src/user/modules/gui/desktopEnvironments/sway/config/rofi.nix
Normal file
179
src/user/modules/gui/desktopEnvironments/sway/config/rofi.nix
Normal file
|
|
@ -0,0 +1,179 @@
|
|||
{ pkgs, config, ... }:
|
||||
let
|
||||
inherit (config.lib.formats.rasi) mkLiteral;
|
||||
|
||||
in
|
||||
{ enable = true;
|
||||
package = pkgs.rofi-wayland;
|
||||
location = "center";
|
||||
terminal = "\${pkgs.alacritty}/bin/alacritty";
|
||||
|
||||
theme = {
|
||||
"*" = {
|
||||
nord0 = mkLiteral "#2e3440";
|
||||
nord1 = mkLiteral "#3b4252";
|
||||
nord2 = mkLiteral "#434c5e";
|
||||
nord3 = mkLiteral "#4c566a";
|
||||
nord4 = mkLiteral "#d8dee9";
|
||||
nord5 = mkLiteral "#e5e9f0";
|
||||
nord6 = mkLiteral "#eceff4";
|
||||
nord7 = mkLiteral "#8fbcbb";
|
||||
nord8 = mkLiteral "#88c0d0";
|
||||
nord9 = mkLiteral "#81a1c1";
|
||||
nord10 = mkLiteral "#5e81ac";
|
||||
nord11 = mkLiteral "#bf616a";
|
||||
nord12 = mkLiteral "#d08770";
|
||||
nord13 = mkLiteral "#ebcb8b";
|
||||
nord14 = mkLiteral "#a3be8c";
|
||||
nord15 = mkLiteral "#b48ead";
|
||||
spacing = 2;
|
||||
background-color = mkLiteral "var(nord1)";
|
||||
background = mkLiteral "var(nord1)";
|
||||
foreground = mkLiteral "var(nord4)";
|
||||
normal-background = mkLiteral "var(background)";
|
||||
normal-foreground = mkLiteral "var(foreground)";
|
||||
alternate-normal-background = mkLiteral "var(background)";
|
||||
alternate-normal-foreground = mkLiteral "var(foreground)";
|
||||
selected-normal-background = mkLiteral "var(nord8)";
|
||||
selected-normal-foreground = mkLiteral "var(background)";
|
||||
active-background = mkLiteral "var(background)";
|
||||
active-foreground = mkLiteral "var(nord10)";
|
||||
alternate-active-background = mkLiteral "var(background)";
|
||||
alternate-active-foreground = mkLiteral "var(nord10)";
|
||||
selected-active-background = mkLiteral "var(nord10)";
|
||||
selected-active-foreground = mkLiteral "var(background)";
|
||||
urgent-background = mkLiteral "var(background)";
|
||||
urgent-foreground = mkLiteral "var(nord11)";
|
||||
alternate-urgent-background = mkLiteral "var(background)";
|
||||
alternate-urgent-foreground = mkLiteral "var(nord11)";
|
||||
selected-urgent-background = mkLiteral "var(nord11)";
|
||||
selected-urgent-foreground = mkLiteral "var(background)";
|
||||
};
|
||||
|
||||
element = {
|
||||
padding = mkLiteral "0px 0px 0px 7px";
|
||||
spacing = mkLiteral "5px";
|
||||
border = 0;
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
|
||||
"element normal.normal" = {
|
||||
background-color = mkLiteral "var(normal-background)";
|
||||
text-color = mkLiteral "var(normal-foreground)";
|
||||
};
|
||||
|
||||
"element normal.urgent" = {
|
||||
background-color = mkLiteral "var(urgent-background)";
|
||||
text-color = mkLiteral "var(urgent-foreground)";
|
||||
};
|
||||
|
||||
"element normal.active" = {
|
||||
background-color = mkLiteral "var(active-background)";
|
||||
text-color = mkLiteral "var(active-foreground)";
|
||||
};
|
||||
|
||||
"element selected.normal" = {
|
||||
background-color = mkLiteral "var(selected-normal-background)";
|
||||
text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
};
|
||||
|
||||
"element selected.urgent" = {
|
||||
background-color = mkLiteral "var(selected-urgent-background)";
|
||||
text-color = mkLiteral "var(selected-urgent-foreground)";
|
||||
};
|
||||
|
||||
"element selected.active" = {
|
||||
background-color = mkLiteral "var(selected-active-background)";
|
||||
text-color = mkLiteral "var(selected-active-foreground)";
|
||||
};
|
||||
|
||||
"element alternate.normal" = {
|
||||
background-color = mkLiteral "var(alternate-normal-background)";
|
||||
text-color = mkLiteral "var(alternate-normal-foreground)";
|
||||
};
|
||||
|
||||
"element alternate.urgent" = {
|
||||
background-color = mkLiteral "var(alternate-urgent-background)";
|
||||
text-color = mkLiteral "var(alternate-urgent-foreground)";
|
||||
};
|
||||
|
||||
"element alternate.active" = {
|
||||
background-color = mkLiteral "var(alternate-active-background)";
|
||||
text-color = mkLiteral "var(alternate-active-foreground)";
|
||||
};
|
||||
|
||||
"element-text" = {
|
||||
background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
text-color = mkLiteral "inherit";
|
||||
highlight = mkLiteral "inherit";
|
||||
cursor = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
"element-icon" = {
|
||||
background-color = mkLiteral "rgba(0, 0, 0, 0%)";
|
||||
size = mkLiteral "1.0000em";
|
||||
text-color = mkLiteral "inherit";
|
||||
cursor = mkLiteral "inherit";
|
||||
};
|
||||
|
||||
window = {
|
||||
padding = 0;
|
||||
border = 0;
|
||||
background-color = mkLiteral "var(background)";
|
||||
};
|
||||
|
||||
mainbox = {
|
||||
padding = 0;
|
||||
border = 0;
|
||||
};
|
||||
|
||||
message = {
|
||||
margin = mkLiteral "0px 7px";
|
||||
};
|
||||
|
||||
textbox = {
|
||||
text-color = mkLiteral "var(foreground)";
|
||||
};
|
||||
|
||||
listview = {
|
||||
margin = mkLiteral "0px 0px 5px";
|
||||
scrollbar = true;
|
||||
spacing = mkLiteral "2px";
|
||||
fixed-height = 0;
|
||||
};
|
||||
|
||||
scrollbar = {
|
||||
padding = 0;
|
||||
handle-width = mkLiteral "14px";
|
||||
border = 0;
|
||||
handle-color = mkLiteral "var(nord3)";
|
||||
};
|
||||
|
||||
button = {
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "var(normal-foreground)";
|
||||
cursor = mkLiteral "pointer";
|
||||
};
|
||||
|
||||
"button selected" = {
|
||||
background-color = mkLiteral "var(selected-normal-background)";
|
||||
text-color = mkLiteral "var(selected-normal-foreground)";
|
||||
};
|
||||
|
||||
inputbar = {
|
||||
padding = mkLiteral "7px";
|
||||
margin = mkLiteral "7px";
|
||||
spacing = 0;
|
||||
text-color = mkLiteral "var(normal-foreground)";
|
||||
background-color = mkLiteral "var(nord3)";
|
||||
children = [ "entry" ];
|
||||
};
|
||||
|
||||
entry = {
|
||||
spacing = 0;
|
||||
cursor = mkLiteral "text";
|
||||
text-color = mkLiteral "var(normal-foreground)";
|
||||
background-color = mkLiteral "var(nord3)";
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
''
|
||||
if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then
|
||||
exec sway
|
||||
fi
|
||||
''
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
modifier = config.wayland.windowManager.sway.config.modifier;
|
||||
|
||||
in
|
||||
{ enable = true;
|
||||
xwayland = true;
|
||||
wrapperFeatures.gtk = true;
|
||||
|
||||
extraSessionCommands = ''
|
||||
export _JAVA_AWT_WM_NONREPARENTING=1
|
||||
'';
|
||||
|
||||
config = {
|
||||
output = {
|
||||
HDMI-A-1 = {
|
||||
resolution = "1920x1080";
|
||||
position = "0,0";
|
||||
bg = "/etc/nixos/src/modules/gui/wallpapers/mountains.jpg fill";
|
||||
};
|
||||
DP-1 = {
|
||||
resolution = "1080x1920";
|
||||
position = "1920,0";
|
||||
transform = "90";
|
||||
bg = "/etc/nixos/src/modules/gui/wallpapers/mountains.jpg fill";
|
||||
};
|
||||
};
|
||||
modifier = "Mod1";
|
||||
menu = "rofi -show drun -show-icons -drun-icon-theme Qogir -font 'Noto Sans 14'";
|
||||
terminal = "alacritty";
|
||||
|
||||
input = {
|
||||
keyboard = {
|
||||
xkb_numlock = "enabled";
|
||||
xkb_layout = "us";
|
||||
};
|
||||
pointer = {
|
||||
accel_profile = "flat";
|
||||
pointer_accel = "0.65";
|
||||
};
|
||||
};
|
||||
|
||||
bars = [
|
||||
{
|
||||
position = "top";
|
||||
statusCommand = ''while :; do echo "$(free -h | awk '/^Mem/ {print $3}') '|' $(date +'%I:%M:%S %p') '|' $(date +'%m-%d-%Y')"; sleep 1; done'';
|
||||
fonts = {
|
||||
names = [ "Noto Sans" ];
|
||||
size = 10.0;
|
||||
};
|
||||
colors = {
|
||||
background = "#0A0E14";
|
||||
statusline = "#FFFFFF";
|
||||
};
|
||||
}
|
||||
];
|
||||
|
||||
gaps = {
|
||||
smartGaps = false;
|
||||
inner = 10;
|
||||
};
|
||||
|
||||
floating.border = 0;
|
||||
window.border= 0;
|
||||
|
||||
keybindings = lib.mkOptionDefault {
|
||||
"${modifier}+q" = "kill";
|
||||
"Print" = "exec grim ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"Shift+Print" = "exec grim -g \"$(slurp)\" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png";
|
||||
"${modifier}+Print" = ''exec sh -c 'grim -g "$(swaymsg -t get_tree | jq -j '"'"'.. | select(.type?) | select(.focused).rect | "\(.x),\(.y) \(.width)x\(.height)"'"'"')" ~/Pictures/screenshot-$(date +'%Y%m%d-%H%M%S').png' '';
|
||||
"${modifier}+Shift+f" = "exec alacritty -e sh -c 'EDITOR=nvim ranger'";
|
||||
"${modifier}+Shift+d" = "exec emote";
|
||||
};
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
for_window [app_id="one.alynx.showmethekey" title="Floating Window - Show Me The Key"] {
|
||||
floating enable
|
||||
sticky enable
|
||||
}
|
||||
exec_always ${pkgs.autotiling}/bin/autotiling
|
||||
'';
|
||||
}
|
||||
59
src/user/modules/gui/desktopEnvironments/sway/default.nix
Normal file
59
src/user/modules/gui/desktopEnvironments/sway/default.nix
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
{ pkgs, lib, config, ... }:
|
||||
|
||||
with lib;
|
||||
let
|
||||
cfg = config.modules.sway;
|
||||
|
||||
in
|
||||
{ options.modules.sway = { enable = mkEnableOption "sway"; };
|
||||
imports = [ ../modules ];
|
||||
config = mkIf cfg.enable {
|
||||
wayland.windowManager.sway = import ./config/sway.nix { inherit pkgs config lib; };
|
||||
programs.rofi = import ./config/rofi.nix { inherit pkgs config lib; };
|
||||
|
||||
programs.bash = {
|
||||
profileExtra = import ./config/shellHook.nix;
|
||||
shellAliases = {
|
||||
open = "xdg-open";
|
||||
};
|
||||
};
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
theme.package = pkgs.juno-theme;
|
||||
theme.name = "Juno-ocean";
|
||||
iconTheme.package = pkgs.qogir-icon-theme;
|
||||
iconTheme.name = "Qogir";
|
||||
};
|
||||
|
||||
qt = {
|
||||
enable = true;
|
||||
style.package = pkgs.juno-theme;
|
||||
platformTheme = "gtk";
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
xdg-utils
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
autotiling
|
||||
|
||||
ranger
|
||||
highlight
|
||||
|
||||
terminus-nerdfont
|
||||
noto-fonts
|
||||
noto-fonts-cjk
|
||||
noto-fonts-emoji
|
||||
|
||||
emote
|
||||
];
|
||||
|
||||
programs = {
|
||||
imv.enable = true;
|
||||
};
|
||||
|
||||
fonts.fontconfig.enable = true;
|
||||
};
|
||||
}
|
||||
BIN
src/user/modules/gui/wallpapers/mountains.jpg
Normal file
BIN
src/user/modules/gui/wallpapers/mountains.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 609 KiB |
Loading…
Add table
Add a link
Reference in a new issue