Compare commits
202 Commits
ef1d7d4100
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| ced4c6e050 | |||
| c3197b86a9 | |||
| aa3e1cedce | |||
| 26461fbf13 | |||
| 03aebab782 | |||
| d3266d1c1d | |||
| b693e9d02c | |||
| ac8850ae00 | |||
| 49e4f0e7ef | |||
| d4c4cd0d0a | |||
| f31ba5ad4d | |||
| 982f2aed1e | |||
| d099faf68a | |||
| 6804d95a08 | |||
| 29ca62316c | |||
| a289fcd072 | |||
| 4f448dd0ff | |||
| 82a87c6e15 | |||
| ebb83a7e8b | |||
| 74bf1dc059 | |||
| 0dc1ae58fb | |||
| c3ca6e4370 | |||
| 293622ac0d | |||
| 81c0da4b6c | |||
| c65ea98734 | |||
| cbc9e868ee | |||
| 4bb72ea758 | |||
| f9aba98533 | |||
| 21787c4516 | |||
| 7115f3c1dc | |||
| c52be4f71b | |||
| 70dac1dc0d | |||
| 23bbfad136 | |||
| d1e22cca12 | |||
| dc265d2f71 | |||
| 252d028560 | |||
| f1c81547c4 | |||
| bb19cc1377 | |||
| 521120022a | |||
| 2d30ca51f3 | |||
| 724477d290 | |||
| 61a3824820 | |||
| 7fa4fc1ef5 | |||
| 5d4d46eeb3 | |||
| 0180e6de9a | |||
| d93435f6d1 | |||
| be90521dee | |||
| ea50600722 | |||
| 22dc7f92a7 | |||
| e786ad0076 | |||
| 64b91f4982 | |||
| 6e4dc0dd2a | |||
| 3021fdde66 | |||
| 42a0947763 | |||
| 315f2eb7cb | |||
| 2cca48e010 | |||
| 92e42f092d | |||
| 1681978386 | |||
| e8c5e14dc3 | |||
| d9d0c50d20 | |||
| d3a0ec53b1 | |||
| 1ad98f78d1 | |||
| 6e6de421b6 | |||
| 714c0f8322 | |||
| d8a28ddd37 | |||
| 3fca95cdab | |||
| 54a1629e97 | |||
| 6fe4d10ac8 | |||
| 98982085c9 | |||
| 5ae278b58b | |||
| 6bc08fca07 | |||
| ca026aead8 | |||
| b84ca8ac24 | |||
| 775737fd18 | |||
| a9184cca42 | |||
| a6cc081e62 | |||
| fbf4d880ec | |||
| deae658c60 | |||
| 27bc6653a3 | |||
| 40565ea61a | |||
| 48adc7879c | |||
| b811bf5f8e | |||
| 361c676ce1 | |||
| 9fe3249220 | |||
| 1482b176aa | |||
| 50ba71d530 | |||
| 75b2b56009 | |||
| 5f65f56fec | |||
| 741e890444 | |||
| 452ddc397f | |||
| 7b38c92f2a | |||
| a7f55ef636 | |||
| 6beee0df24 | |||
| 44cbe2a778 | |||
| e7163f46b1 | |||
| 79882fbcb8 | |||
| 743ca7be8e | |||
| 677714a75c | |||
| 6764e45c2c | |||
| 0620179a05 | |||
| 17e5e7fb6d | |||
| eda38ee117 | |||
| 1e6cea18f6 | |||
| 450c8c6273 | |||
| 7a485c2bcf | |||
| 0d00351ce4 | |||
| 9c7e44700a | |||
| f650cce930 | |||
| 0e179c9a83 | |||
| d2790f3416 | |||
| 318694cff9 | |||
| 2203970d46 | |||
| 14899c85b9 | |||
| bc4ae9c889 | |||
| 73ece57244 | |||
| 2d31f5aee8 | |||
| 2ee628b4de | |||
| 6ae173cea8 | |||
| 607888f22f | |||
| 38f6040a1e | |||
| 9b8fc2e643 | |||
| bb2076a3a4 | |||
| 982a2628d1 | |||
| bee4f200b0 | |||
| bac836074f | |||
| 1e2c6c769b | |||
| f46e0f3d2e | |||
| 27521a8291 | |||
| 230ccd8e3b | |||
| 53065b1bd1 | |||
| cbeda61797 | |||
| 73ba346449 | |||
| 8415352b65 | |||
| 3c9fdf02ee | |||
| bd55d2fcca | |||
| dc91632284 | |||
| fcdb035f7a | |||
| 287fc2d83d | |||
| 944036b2bd | |||
| 6c36bde471 | |||
| 0a5ede0ad7 | |||
| 2e5e7ab499 | |||
| f79a08571a | |||
| b3d3596450 | |||
| b952b13664 | |||
| dd81a54403 | |||
| 622806ddef | |||
| a9312ed768 | |||
| 065f4ed0be | |||
| fbb83f412b | |||
| e93f318c2d | |||
| 93d0c3b471 | |||
| 5c6dec5e56 | |||
| 4a21ce48d0 | |||
| 40e8e8ff65 | |||
| 7874efb0d7 | |||
| 4549818099 | |||
| 0331d55c34 | |||
| 04e98c48d1 | |||
| 68effe3e29 | |||
| 75c06f5780 | |||
| 7ca8e843c2 | |||
| 104e49dbf9 | |||
| 6678bf626e | |||
| b513750c8d | |||
| 7bfcff1842 | |||
| 86efe1ff25 | |||
| aab3a4fbb2 | |||
| af8c622457 | |||
| f25c210340 | |||
| 2de5052495 | |||
| 330eec383e | |||
| d5ebefe3fb | |||
| ddb7502871 | |||
| 3a9d591341 | |||
| bdfe65f058 | |||
| 8d1990c726 | |||
| 924adfc94f | |||
| d4ddd2ce47 | |||
| 1e88f2f341 | |||
| ca52e2776f | |||
| 4d29ca7b6d | |||
| 0659912e38 | |||
| a322ff3ed7 | |||
| deb0815621 | |||
| 0ab662f9f9 | |||
| d71e5ca620 | |||
| db6d78ddab | |||
| beaf1a6ef2 | |||
| aee16558dc | |||
| 64c3dcad63 | |||
| ff208574ff | |||
| bfbfeb5fe8 | |||
| fd4412e765 | |||
| a1b2372ec6 | |||
| fb84b9a84a | |||
| 8ab45f3092 | |||
| c0ac4ef52c | |||
| 4f3805c1d5 | |||
| 17adfa4d5a | |||
| f559d970d3 | |||
| 81b8f46666 |
2
.gitignore
vendored
@@ -4,3 +4,5 @@ result/
|
||||
.DS_Store
|
||||
.pre-commit-config.yaml
|
||||
logs/
|
||||
avatar/pallete.*
|
||||
cache/
|
||||
|
||||
BIN
avatar/avatar.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
avatar/avatar_high.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
avatar/avatar_no_bg.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
avatar/avatar_talking.gif
Normal file
|
After Width: | Height: | Size: 23 MiB |
BIN
avatar/avatar_talking.mp4
Normal file
BIN
avatar/avatar_talking_no_bg.gif
Normal file
|
After Width: | Height: | Size: 20 MiB |
BIN
avatar/avatar_talking_no_bg.mp4
Normal file
4
darwin/brew_casks.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
alacritty
|
||||
font-roboto-mono
|
||||
openscad
|
||||
xquartz
|
||||
132
darwin/brew_packages.txt
Normal file
@@ -0,0 +1,132 @@
|
||||
aom
|
||||
bash
|
||||
brotli
|
||||
ca-certificates
|
||||
cairo
|
||||
capstone
|
||||
cdrtools
|
||||
clang-format
|
||||
cmake
|
||||
coreutils
|
||||
dtc
|
||||
fastfetch
|
||||
fish
|
||||
fontconfig
|
||||
freetype
|
||||
fribidi
|
||||
fzf
|
||||
gd
|
||||
gdk-pixbuf
|
||||
gettext
|
||||
giflib
|
||||
glib
|
||||
gmp
|
||||
gnutls
|
||||
graphite2
|
||||
graphviz
|
||||
gts
|
||||
harfbuzz
|
||||
highway
|
||||
htop
|
||||
icu4c@77
|
||||
imath
|
||||
jasper
|
||||
jpeg-turbo
|
||||
jpeg-xl
|
||||
jq
|
||||
json-glib
|
||||
krb5
|
||||
ldns
|
||||
libavif
|
||||
libcbor
|
||||
libdeflate
|
||||
libevent
|
||||
libfido2
|
||||
libidn2
|
||||
libkeccak
|
||||
liblinear
|
||||
libnghttp2
|
||||
libpng
|
||||
librsvg
|
||||
libslirp
|
||||
libssh
|
||||
libssh2
|
||||
libtasn1
|
||||
libtermkey
|
||||
libtiff
|
||||
libtool
|
||||
libtpms
|
||||
libunistring
|
||||
libusb
|
||||
libuv
|
||||
libvmaf
|
||||
libvterm
|
||||
libx11
|
||||
libxau
|
||||
libxcb
|
||||
libxcrypt
|
||||
libxdmcp
|
||||
libxext
|
||||
libxrender
|
||||
little-cms2
|
||||
llvm
|
||||
lmdb
|
||||
lua
|
||||
luajit
|
||||
luv
|
||||
lz4
|
||||
lzo
|
||||
m4
|
||||
mpdecimal
|
||||
msgpack
|
||||
navi
|
||||
ncurses
|
||||
neofetch
|
||||
neovim
|
||||
netpbm
|
||||
nettle
|
||||
ninja
|
||||
nmap
|
||||
ollama
|
||||
oniguruma
|
||||
openexr
|
||||
openjph
|
||||
openssh
|
||||
openssl@3
|
||||
p11-kit
|
||||
pango
|
||||
pcre2
|
||||
pipx
|
||||
pixman
|
||||
popt
|
||||
python@3.12
|
||||
python@3.13
|
||||
qemu
|
||||
readline
|
||||
samba
|
||||
screenresolution
|
||||
sdl2
|
||||
sha3sum
|
||||
snappy
|
||||
socat
|
||||
spicetify-cli
|
||||
sqlite
|
||||
swtpm
|
||||
talloc
|
||||
tdb
|
||||
tealdeer
|
||||
tevent
|
||||
tree
|
||||
tree-sitter
|
||||
unbound
|
||||
unibilium
|
||||
usbutils
|
||||
vde
|
||||
webp
|
||||
wget
|
||||
xorgproto
|
||||
xz
|
||||
yabai
|
||||
z3
|
||||
zstd
|
||||
zsync
|
||||
175
darwin/config.jsonc
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "kitty-icat",
|
||||
"source": "~/Pictures/Avatar/avatar_no_bg.png",
|
||||
//"height": 15,
|
||||
"width": 40,
|
||||
"padding": {
|
||||
"top": 0,
|
||||
"left": 0
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌──────────────────────Hardware──────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " PC",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "cpu",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "gpu",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "└ └",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌──────────────────────Software──────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "os",
|
||||
"key": " OS",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "bios",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": "└ └",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "de",
|
||||
"key": " DE",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "lm",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "wmtheme",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "terminal",
|
||||
"key": "└ └",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌─────────────────Uptime / Age / DT──────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"key": " OS Age ",
|
||||
"keyColor": "magenta",
|
||||
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " Uptime ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "datetime",
|
||||
"key": " DateTime ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌─────────────────────Networking─────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "publicip",
|
||||
"key": " Public ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "localip",
|
||||
"key": " Local ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "dns",
|
||||
"key": " DNS ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "netio",
|
||||
"key": " Net I/O ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
{
|
||||
"type": "colors",
|
||||
"paddingLeft": 2,
|
||||
"symbol": "circle"
|
||||
},
|
||||
"break",
|
||||
]
|
||||
}
|
||||
|
||||
267
darwin/config.lua
Normal file
@@ -0,0 +1,267 @@
|
||||
-- Basics
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Yank to system clipboard
|
||||
vim.keymap.set("n", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("v", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("n", "Y", '"+Y', { desc = "Yank line to clipboard" })
|
||||
|
||||
-- Also make delete operations use system clipboard
|
||||
vim.keymap.set("n", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("v", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("n", "D", '"+D', { desc = "Delete line to clipboard" })
|
||||
|
||||
-- Paste from system clipboard
|
||||
vim.keymap.set("n", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
vim.keymap.set("v", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
|
||||
-- Treesitter
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "nix", "python", "javascript", "rust", "rasi" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
parser_install_dir = vim.fn.stdpath("data") .. "/treesitter",
|
||||
})
|
||||
vim.opt.runtimepath:append(vim.fn.stdpath("data") .. "/treesitter")
|
||||
|
||||
-- Linting
|
||||
require("lint").linters_by_ft = {}
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Mason Setup
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"nil_ls",
|
||||
"rust_analyzer",
|
||||
"pylsp",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
-- LSP Config
|
||||
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 }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
|
||||
-- Setup language servers
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.nil_ls.setup({ capabilities = capabilities })
|
||||
lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||
lspconfig.pylsp.setup({ capabilities = capabilities })
|
||||
lspconfig.stylelint_lsp.setup({
|
||||
cmd = { "stylelint-lsp", "--stdio" },
|
||||
filetypes = { "css", "scss", "rasi" },
|
||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||
})
|
||||
|
||||
-- Conform
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
nix = { "nixfmt" },
|
||||
python = { "black" },
|
||||
rust = { "rustfmt" },
|
||||
rasi = { "prettierd" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Yazi
|
||||
require("yazi").setup({
|
||||
open_for_directories = true,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>fy", function()
|
||||
require("yazi").yazi(nil, vim.loop.cwd())
|
||||
end, { desc = "Open Yazi file manager" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", function()
|
||||
require("yazi").yazi(nil, vim.fn.expand("%:p:h"))
|
||||
end, { desc = "Open Yazi in current file directory" })
|
||||
|
||||
-- Telescope
|
||||
--require("telescope").setup()
|
||||
|
||||
--local telescope = require("telescope.builtin")
|
||||
--vim.keymap.set("n", "<leader>ff", telescope.find_files, { desc = "Telescope find files" })
|
||||
--vim.keymap.set("n", "<leader>fg", telescope.live_grep, { desc = "Telescope live grep" })
|
||||
--vim.keymap.set("n", "<leader>fb", telescope.buffers, { desc = "Telescope buffers" })
|
||||
--vim.keymap.set("n", "<leader>fh", telescope.help_tags, { desc = "Telescope help tags" })
|
||||
|
||||
-- Styling
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
term_colors = true,
|
||||
integration = {
|
||||
treesitter = true,
|
||||
mason = true,
|
||||
lsp_trouble = true,
|
||||
which_key = true,
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
nvimtree = true,
|
||||
dashboard = true,
|
||||
notify = true,
|
||||
indent_blankline = true,
|
||||
toggleterm = true, -- Important for transparent terminals
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
vim.opt.number = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.showmode = false
|
||||
vim.opt.syntax = "enable"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette("mocha")
|
||||
vim.api.nvim_set_hl(0, "LineNr", { fg = colors.text, bg = "NONE" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = colors.pink, bg = "NONE", bold = true })
|
||||
|
||||
-- ToggleTerm setup
|
||||
require("toggleterm").setup({
|
||||
size = 20,
|
||||
open_mapping = [[<c-\>]],
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "single",
|
||||
width = 200,
|
||||
height = 40,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>h", function()
|
||||
require("toggleterm").toggle(1, 10, vim.loop.cwd(), "horizontal")
|
||||
end, { desc = "Toggle terminal (horizontal)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>v", function()
|
||||
require("toggleterm").toggle(2, 60, vim.loop.cwd(), "vertical")
|
||||
end, { desc = "Toggle terminal (vertical)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", function()
|
||||
require("toggleterm").toggle(3, 20, vim.loop.cwd(), "float")
|
||||
end, { desc = "Toggle terminal (float)" })
|
||||
|
||||
vim.keymap.set("t", "<C-t>", "<Cmd>ToggleTerm<CR>", { desc = "Toggle terminal" })
|
||||
vim.keymap.set("t", "<C-v>", "<C-\\><C-n>v", { desc = "Exit terminal and enter visual mode" })
|
||||
|
||||
-- Statusline
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Dashboard
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽",
|
||||
"⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿",
|
||||
"⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿",
|
||||
"⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿",
|
||||
"⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿",
|
||||
"⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿",
|
||||
"⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿",
|
||||
"⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿",
|
||||
"⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿",
|
||||
"⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾",
|
||||
"⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿",
|
||||
"⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿",
|
||||
"⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿",
|
||||
"⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿",
|
||||
"⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿",
|
||||
"⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛",
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", "[+] New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("f", "[?] Find file", ":Telescope find_files <CR>"),
|
||||
dashboard.button("r", "[~] Recent files", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("y", "[Y] Yazi", ":Yazi<CR>"),
|
||||
dashboard.button("m", "[M] Mason", ":Mason<CR>"),
|
||||
dashboard.button("q", "[X] Quit", ":qa<CR>"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val = "Circuits hum in anticipation of your will."
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
if vim.fn.argc() == 0 then
|
||||
require("alpha").start()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
alpha.setup(dashboard.config)
|
||||
81
darwin/configuration.nix
Normal file
@@ -0,0 +1,81 @@
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./yabari.nix ];
|
||||
# System configuration for Intel Mac
|
||||
nixpkgs.hostPlatform = "x86_64-darwin"; # Essential for Intel Macs :cite[1]:cite[2]:cite[5]
|
||||
|
||||
# Enable flakes and nix-command experimental features
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
]; # Essential for flake support :cite[2]:cite[5]:cite[7]
|
||||
|
||||
# System packages (installed system-wide)
|
||||
environment.systemPackages = with pkgs; [ ];
|
||||
|
||||
system.primaryUser = "dergrumpf";
|
||||
users.users.dergrumpf = {
|
||||
name = "dergrumpf";
|
||||
home = "/Users/dergrumpf"; # Must match home.homeDirectory in home.nix :cite[10]
|
||||
shell = pkgs.fish;
|
||||
};
|
||||
|
||||
# Shell configuration
|
||||
programs.zsh.enable = true; # Default shell on macOS :cite[5]:cite[10]
|
||||
# Alternative: enable fish if preferred
|
||||
programs.fish.enable = true;
|
||||
|
||||
# System defaults for macOS
|
||||
system.defaults = {
|
||||
# Dock settings
|
||||
dock.autohide = false; # Auto-hide the dock :cite[8]:cite[10]
|
||||
dock.orientation = "left"; # Position dock on left :cite[8]:cite[10]
|
||||
dock.show-recents = false; # Don't show recent applications :cite[8]:cite[10]
|
||||
dock.mru-spaces = false; # Don't rearrange spaces based on most recent use :cite[5]
|
||||
|
||||
# Finder settings
|
||||
finder.AppleShowAllExtensions = true; # Show all file extensions :cite[5]:cite[8]:cite[10]
|
||||
finder.FXEnableExtensionChangeWarning = false; # Disable extension change warning :cite[8]:cite[10]
|
||||
finder.FXPreferredViewStyle = "clmv"; # Use column view :cite[5]:cite[8]
|
||||
finder.ShowPathbar = true; # Show path bar :cite[8]:cite[10]
|
||||
finder.ShowStatusBar = true; # Show status bar :cite[8]
|
||||
|
||||
# Screenshot settings
|
||||
screencapture.location = "~/Pictures/screenshots"; # Save screenshots to specific location :cite[5]:cite[8]
|
||||
|
||||
# Global domain settings
|
||||
NSGlobalDomain.AppleKeyboardUIMode = 3; # Full keyboard control :cite[8]:cite[10]
|
||||
NSGlobalDomain."com.apple.keyboard.fnState" = true; # Function keys behave as F1-F12 :cite[10]
|
||||
};
|
||||
|
||||
# Touch ID for sudo authentication (if supported by hardware)
|
||||
security.pam.services.sudo_local.touchIdAuth = true; # Enable Touch ID for sudo :cite[5]:cite[8]
|
||||
|
||||
# Font configuration
|
||||
fonts.packages = with pkgs; [
|
||||
nerd-fonts.fira-code
|
||||
];
|
||||
|
||||
# Nix garbage collection (automatic cleanup)
|
||||
nix.gc = {
|
||||
automatic = true; # Enable automatic garbage collection :cite[8]
|
||||
interval = {
|
||||
# Run weekly on Sunday at 3:15 AM :cite[8]
|
||||
Hour = 3;
|
||||
Minute = 15;
|
||||
Weekday = 7;
|
||||
};
|
||||
options = "--delete-older-than 7d"; # Delete packages older than 7 days :cite[8]
|
||||
};
|
||||
|
||||
# System version (for backwards compatibility)
|
||||
system.stateVersion = 6; # Important for configuration compatibility :cite[5]:cite[10]
|
||||
|
||||
# Optional: Configuration revision for tracking changes
|
||||
system.configurationRevision = inputs.self.rev or inputs.self.dirtyRev or null; # Track git revision :cite[5]:cite[7]
|
||||
}
|
||||
388
darwin/flake.lock
generated
Normal file
@@ -0,0 +1,388 @@
|
||||
{
|
||||
"nodes": {
|
||||
"catppuccin": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758270360,
|
||||
"narHash": "sha256-yqh6EEhlpVWRoKl85o1s+QZ72UHWTvornnc3C0Ls484=",
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"rev": "2e0aacdd6abbecd1b1c0511a2fcd1460a6bc6645",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "catppuccin",
|
||||
"repo": "nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"devshell": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1741473158,
|
||||
"narHash": "sha256-kWNaq6wQUbUMlPgw8Y+9/9wP0F8SHkjy24/mN3UAppg=",
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"rev": "7c9e793ebe66bcba8292989a68c0419b737a22a0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "devshell",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-compat": {
|
||||
"locked": {
|
||||
"lastModified": 1733328505,
|
||||
"narHash": "sha256-NeCCThCEP3eCl2l/+27kNNK7QrwZB1IJCrXfrbv5oqU=",
|
||||
"rev": "ff81ac966bb2cae68946d5ed5fc4994f96d0ffec",
|
||||
"revCount": 69,
|
||||
"type": "tarball",
|
||||
"url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.1.0/01948eb7-9cba-704f-bbf3-3fa956735b52/source.tar.gz"
|
||||
},
|
||||
"original": {
|
||||
"type": "tarball",
|
||||
"url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"
|
||||
}
|
||||
},
|
||||
"flake-parts": {
|
||||
"inputs": {
|
||||
"nixpkgs-lib": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751413152,
|
||||
"narHash": "sha256-Tyw1RjYEsp5scoigs1384gIg6e0GoBVjms4aXFfRssQ=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"rev": "77826244401ea9de6e3bac47c2db46005e1f30b5",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "flake-parts",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1731533236,
|
||||
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"git-hooks": {
|
||||
"inputs": {
|
||||
"flake-compat": [
|
||||
"nixvim",
|
||||
"flake-compat"
|
||||
],
|
||||
"gitignore": "gitignore",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750779888,
|
||||
"narHash": "sha256-wibppH3g/E2lxU43ZQHC5yA/7kIKLGxVEnsnVK1BtRg=",
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"rev": "16ec914f6fb6f599ce988427d9d94efddf25fe6d",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "cachix",
|
||||
"repo": "git-hooks.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"gitignore": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"git-hooks",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1709087332,
|
||||
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "hercules-ci",
|
||||
"repo": "gitignore.nix",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758375677,
|
||||
"narHash": "sha256-BLtD+6qWz7fQjPk2wpwyXQLGI0E30Ikgf2ppn2nVadI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "edc7468e12be92e926847cb02418e649b02b59dd",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1747688870,
|
||||
"narHash": "sha256-ypL9WAZfmJr5V70jEVzqGjjQzF0uCkz+AFQF7n9NmNc=",
|
||||
"owner": "nix-community",
|
||||
"repo": "home-manager",
|
||||
"rev": "d5f1f641b289553927b3801580598d200a501863",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "release-24.11",
|
||||
"repo": "home-manager",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"ixx": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"flake-utils"
|
||||
],
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nuschtosSearch",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1748294338,
|
||||
"narHash": "sha256-FVO01jdmUNArzBS7NmaktLdGA5qA3lUMJ4B7a05Iynw=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "ixx",
|
||||
"rev": "cc5f390f7caf265461d4aab37e98d2292ebbdb85",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"ref": "v0.0.8",
|
||||
"repo": "ixx",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1758387173,
|
||||
"narHash": "sha256-E5Ru709RoQEFl+Q0MHRXTIvbY0l6LSR1UHqwTulSeog=",
|
||||
"owner": "nix-darwin",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "7be9c1b136ef7083e60eb060be0a66dcb254e3ca",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-darwin",
|
||||
"ref": "master",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nix-darwin_2": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1743127615,
|
||||
"narHash": "sha256-+sMGqywrSr50BGMLMeY789mSrzjkoxZiu61eWjYS/8o=",
|
||||
"owner": "lnl7",
|
||||
"repo": "nix-darwin",
|
||||
"rev": "fc843893cecc1838a59713ee3e50e9e7edc6207c",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "lnl7",
|
||||
"ref": "nix-darwin-24.11",
|
||||
"repo": "nix-darwin",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1758035966,
|
||||
"narHash": "sha256-qqIJ3yxPiB0ZQTT9//nFGQYn8X/PBoJbofA7hRKZnmE=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "8d4ddb19d03c65a36ad8d189d001dc32ffb0306b",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1758262103,
|
||||
"narHash": "sha256-aBGl3XEOsjWw6W3AHiKibN7FeoG73dutQQEqnd/etR8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "12bd230118a1901a4a5d393f9f56b6ad7e571d01",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixvim": {
|
||||
"inputs": {
|
||||
"devshell": "devshell",
|
||||
"flake-compat": "flake-compat",
|
||||
"flake-parts": "flake-parts",
|
||||
"git-hooks": "git-hooks",
|
||||
"home-manager": "home-manager_2",
|
||||
"nix-darwin": "nix-darwin_2",
|
||||
"nixpkgs": [
|
||||
"nixpkgs"
|
||||
],
|
||||
"nuschtosSearch": "nuschtosSearch",
|
||||
"treefmt-nix": "treefmt-nix"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1751725553,
|
||||
"narHash": "sha256-bkvw8jXTdRBWRfO50IaxNuUIamnLllxfEFqUG/g3uwo=",
|
||||
"owner": "nix-community",
|
||||
"repo": "nixvim",
|
||||
"rev": "81d65e0cfb00df0269195b59f156c719cc045ab8",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"ref": "nixos-24.11",
|
||||
"repo": "nixvim",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nuschtosSearch": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"ixx": "ixx",
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1749730855,
|
||||
"narHash": "sha256-L3x2nSlFkXkM6tQPLJP3oCBMIsRifhIDPMQQdHO5xWo=",
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"rev": "8dfe5879dd009ff4742b668d9c699bc4b9761742",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NuschtOS",
|
||||
"repo": "search",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"catppuccin": "catppuccin",
|
||||
"home-manager": "home-manager",
|
||||
"nix-darwin": "nix-darwin",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"nixvim": "nixvim"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"treefmt-nix": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
"nixvim",
|
||||
"nixpkgs"
|
||||
]
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1750931469,
|
||||
"narHash": "sha256-0IEdQB1nS+uViQw4k3VGUXntjkDp7aAlqcxdewb/hAc=",
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"rev": "ac8e6f32e11e9c7f153823abc3ab007f2a65d3e1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "treefmt-nix",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
||||
68
darwin/flake.nix
Normal file
@@ -0,0 +1,68 @@
|
||||
{
|
||||
description = "Cyperpunk nix-darwin system flake";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||
|
||||
nix-darwin = {
|
||||
url = "github:nix-darwin/nix-darwin/master";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Editor
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-24.11";
|
||||
# If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-<version>"`
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nix-darwin,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
catppuccin,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
let
|
||||
system = "x86_64-darwin";
|
||||
specialArgs = { inherit inputs system; };
|
||||
in
|
||||
{
|
||||
darwinConfigurations = {
|
||||
"Phil-Mac" = nix-darwin.lib.darwinSystem {
|
||||
inherit system specialArgs;
|
||||
|
||||
modules = [
|
||||
# Main Config
|
||||
./configuration.nix
|
||||
|
||||
# home manager integration
|
||||
home-manager.darwinModules.home-manager
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
users.dergrumpf = import ./home.nix;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = specialArgs;
|
||||
sharedModules = [
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
205
darwin/home.nix
Normal file
@@ -0,0 +1,205 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [ ./sketchybar.nix ];
|
||||
|
||||
home.username = "dergrumpf";
|
||||
home.homeDirectory = "/Users/dergrumpf";
|
||||
|
||||
home.stateVersion = "23.11";
|
||||
home.file = {
|
||||
"Pictures/Avatar" = {
|
||||
source = ../avatar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
home.packages = with pkgs; [
|
||||
# Utilities
|
||||
coreutils
|
||||
direnv
|
||||
fd
|
||||
git
|
||||
ripgrep
|
||||
fzf
|
||||
zoxide
|
||||
starship
|
||||
trash-cli
|
||||
|
||||
# Miscellaneous
|
||||
fastfetch
|
||||
btop
|
||||
wget
|
||||
curl
|
||||
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
black
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
nodejs
|
||||
prettierd
|
||||
stylelint-lsp
|
||||
|
||||
# Mason Binarys
|
||||
lua-language-server
|
||||
nil
|
||||
rust-analyzer
|
||||
python3Packages.python-lsp-server
|
||||
|
||||
curl
|
||||
cargo
|
||||
yazi
|
||||
];
|
||||
|
||||
home.sessionVariables = {
|
||||
EDITOR = "nvim";
|
||||
VISUAL = "code";
|
||||
PAGER = "less";
|
||||
CLICOLOR = "1";
|
||||
LSCOLORS = "ExFxBxDxCxegedabagacad";
|
||||
TERM = "xterm-kitty";
|
||||
};
|
||||
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
#extraPackages = with pkgs; [ ];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter
|
||||
nvim-lint
|
||||
catppuccin-nvim
|
||||
mason-nvim
|
||||
mason-lspconfig-nvim
|
||||
nvim-lspconfig
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
luasnip
|
||||
lualine-nvim
|
||||
yazi-nvim
|
||||
alpha-nvim
|
||||
cheatsheet-nvim
|
||||
toggleterm-nvim
|
||||
|
||||
# Add conform.nvim as a custom plugin
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "conform-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "stable";
|
||||
sha256 = "sha256-pUF9F5QoDzCZuVRcJEF91M8Qjkh/xosMkf9tRavkmJs=";
|
||||
};
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
extraLuaConfig = builtins.readFile (./. + "/config.lua");
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
function fish_greeting
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
plugins = [
|
||||
{
|
||||
name = "forgit";
|
||||
src = pkgs.fishPlugins.forgit.src;
|
||||
}
|
||||
];
|
||||
shellAliases = {
|
||||
ll = "ls -l";
|
||||
la = "ls -la";
|
||||
gs = "git status";
|
||||
gp = "git push";
|
||||
};
|
||||
};
|
||||
|
||||
programs.kitty = {
|
||||
enable = true;
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
font.name = "FiraCode Nerd Font Mono";
|
||||
settings = {
|
||||
confirm_os_window_close = 0;
|
||||
dynamic_background_opacity = true;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
window_padding_width = 10;
|
||||
background_opacity = "0.9";
|
||||
# Ensure proper symbol rendering with Nerd Fonts
|
||||
symbol_map = "U+23FB-U+23FE U+2B58 U+E200-U+E2A9 U+E0A0-U+E0A3 U+E0B0-U+E0BF U+E0C0-U+E0C8 U+E0CC-U+E0CF U+E0D0-U+E0D2 U+E0D4 U+E700-U+E7C5 U+F000-U+F2E0 U+2665 U+26A1 U+F400-U+F4A8 U+F67C U+E000-U+E00A U+F300-U+F313 U+E5FA-U+E62B Symbols Nerd Font";
|
||||
};
|
||||
extraConfig = ''
|
||||
shell /run/current-system/sw/bin/fish
|
||||
'';
|
||||
};
|
||||
|
||||
programs.direnv = {
|
||||
enable = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
enable = true;
|
||||
userName = "DerGrumpf";
|
||||
userEmail = "p.keier@beyerstedt-it.de";
|
||||
aliases = {
|
||||
co = "checkout";
|
||||
ci = "commit";
|
||||
st = "status";
|
||||
br = "branch";
|
||||
};
|
||||
extraConfig = {
|
||||
init.defaultBranch = "main";
|
||||
pull.rebase = true;
|
||||
};
|
||||
};
|
||||
|
||||
programs.ssh = {
|
||||
enable = true;
|
||||
enableDefaultConfig = false;
|
||||
matchBlocks = {
|
||||
"example.com" = {
|
||||
user = "dergrumpf";
|
||||
identityFile = "~/.ssh/id_ed25519";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
enableFishIntegration = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
format = "$directory$git_branch$git_status$cmd_duration$line_break$character";
|
||||
};
|
||||
};
|
||||
|
||||
services = {
|
||||
gpg-agent = {
|
||||
enable = true;
|
||||
defaultCacheTtl = 1800;
|
||||
enableSshSupport = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
14
darwin/macbook.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# macOS-specific settings
|
||||
services.nix-daemon.enable = true;
|
||||
programs.zsh.enable = true;
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
];
|
||||
|
||||
# System settings
|
||||
system.stateVersion = 4;
|
||||
nixpkgs.hostPlatform = "aarch64-darwin";
|
||||
}
|
||||
19
darwin/macbook2019.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, pkgs, inputs, username, ... }:
|
||||
{
|
||||
networking.hostName = "macbook2019";
|
||||
services.nix-daemon.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
nixpkgs.hostPlatform = "x86_64-darwin"; # Intel Mac
|
||||
|
||||
# Required for backward compatibility
|
||||
system.stateVersion = "25.04";
|
||||
|
||||
# User configuration
|
||||
users.users.${username} = {
|
||||
name = username;
|
||||
home = "/Users/${username}";
|
||||
};
|
||||
|
||||
# Enable zsh (common on macOS)
|
||||
programs.zsh.enable = true;
|
||||
}
|
||||
11
darwin/nixos.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
users.users.dergrumpf = {
|
||||
# authorizedKeys
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCaLHfxVylghDMYR8t4QMUpeRRqXasNABQKBEy9MmhbUXCcWiPbPMSZH8FMHON34rm2OrXP1kY/8jQxqBJDA+SqpFR2AZ4Khk9iVMaq5GHxxpn2amZUjoBa+fB29WaiE1npV5JVJV3O0ylw6GtiCnpneE6fGx2MO1vOY/7zKrUX/OK7WfwkDpeEzZgV/j/md917HrzUVeZwdeTq3WCRO8Gew6R8Xs6FRjSiGuH0dq14D4Ow5Zf1cI1jx+JfD/5vGasw8HXPu1NdxsOE+6D7/22IKqGr+S74/lAoyyD5qqk0s05lw8UY/PXBLJaNLZu9Fwx0BqTHpJEvftpmvd9wUxgR3msx9VXtKNSrqivIbDgeU+3oGzzkrGZODl7FCp4XKGmbrX85Z6lKwEGgv5jez4MLZcmT86bxB7m1wIbqSbVtfhS+GI7yPTA/kLzzFa14Im/+LTj95pb8qs2ALMwTMP1j2f9A6D3RriOFihL+68qn+YbK58KuV1R0f+CQRmlfVbk= phil@web.cyperpunk.de"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
#extraGroups = [ "video" ];
|
||||
};
|
||||
}
|
||||
49
darwin/sketchybar.nix
Normal file
@@ -0,0 +1,49 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.sketchybar = {
|
||||
enable = true;
|
||||
config = ''
|
||||
# Define colors
|
||||
export ROSEWATER="0xf5e0dcff"
|
||||
export FLAMINGO="0xf2cdcdff"
|
||||
export PINK="0xf5c2e7ff"
|
||||
export MAUVE="0xcba6f7ff"
|
||||
export RED="0xf38ba8ff"
|
||||
export MAROON="0xeba0acff"
|
||||
export PEACH="0xfab387ff"
|
||||
export YELLOW="0xf9e2afff"
|
||||
export GREEN="0xa6e3a1ff"
|
||||
export TEAL="0x94e2d5ff"
|
||||
export SKY="0x89dcebff"
|
||||
export SAPPHIRE="0x74c7ecff"
|
||||
export BLUE="0x89b4faff"
|
||||
export LAVENDER="0xb4befeff"
|
||||
export TEXT="0xcdd6f4ff"
|
||||
export SUBTEXT1="0xbac2deff"
|
||||
export SUBTEXT2="0xa6adc8ff"
|
||||
export OVERLAY2="0x9399b2ff"
|
||||
export OVERLAY1="0x7f849cff"
|
||||
export OVERLAY0="0x6c7086ff"
|
||||
export SURFACE2="0x585b70ff"
|
||||
export SURFACE1="0x45475aff"
|
||||
export SURFACE0="0x313244ff"
|
||||
export BASE="0x1e1e2eff"
|
||||
export MANTLE="0x181825ff"
|
||||
export CRUST="0x11111bff"
|
||||
|
||||
# Configure bar
|
||||
sketchybar --bar height=32 \
|
||||
position=top \
|
||||
padding_left=10 \
|
||||
padding_right=10 \
|
||||
color=$CRUST
|
||||
|
||||
sketchybar --add item clock
|
||||
sketchybar --set clock \
|
||||
script="$(date +'%a %b %d, %I:%M %p')" \
|
||||
update_freq=10 \
|
||||
label.color=$TEXT \
|
||||
label.font.size=16
|
||||
'';
|
||||
};
|
||||
}
|
||||
70
darwin/yabari.nix
Normal file
@@ -0,0 +1,70 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.yabai = {
|
||||
enable = true;
|
||||
enableScriptingAddition = true;
|
||||
config = {
|
||||
focus_follows_mouse = "autoraise";
|
||||
mouse_follows_focus = "on";
|
||||
window_placement = "second_child";
|
||||
window_opacity = "off";
|
||||
window_opacity_duration = "0.0";
|
||||
active_window_opacity = "1.0";
|
||||
normal_window_opacity = "1.0";
|
||||
split_ratio = "0.50";
|
||||
auto_balance = "off";
|
||||
mouse_modifier = "fn";
|
||||
mouse_action1 = "move";
|
||||
mouse_action2 = "resize";
|
||||
layout = "bsp";
|
||||
top_padding = 5;
|
||||
bottom_padding = 5;
|
||||
left_padding = 5;
|
||||
right_padding = 5;
|
||||
window_gap = 5;
|
||||
};
|
||||
|
||||
extraConfig = ''
|
||||
yabai -m space 1 --label main
|
||||
yabai -m space 2 --label browser
|
||||
yabai -m space 3 --label terminal
|
||||
'';
|
||||
};
|
||||
|
||||
services.skhd = {
|
||||
enable = true;
|
||||
skhdConfig = ''
|
||||
# Focus workspace 1-9 with alt + number
|
||||
alt - 1 : yabai -m space --focus main
|
||||
alt - 2 : yabai -m space --focus browser
|
||||
alt - 3 : yabai -m space --focus terminal
|
||||
alt - 4 : yabai -m space --focus 4
|
||||
alt - 5 : yabai -m space --focus 5
|
||||
alt - 6 : yabai -m space --focus 6
|
||||
alt - 7 : yabai -m space --focus 7
|
||||
alt - 8 : yabai -m space --focus 8
|
||||
alt - 9 : yabai -m space --focus 9
|
||||
|
||||
# Move focused window to workspace 1-9 with alt + shift + number
|
||||
alt + shift - 1 : yabai -m window --space 1
|
||||
alt + shift - 2 : yabai -m window --space 2
|
||||
alt + shift - 3 : yabai -m window --space 3
|
||||
alt + shift - 4 : yabai -m window --space 4
|
||||
alt + shift - 5 : yabai -m window --space 5
|
||||
alt + shift - 6 : yabai -m window --space 6
|
||||
alt + shift - 7 : yabai -m window --space 7
|
||||
alt + shift - 8 : yabai -m window --space 8
|
||||
alt + shift - 9 : yabai -m window --space 9
|
||||
|
||||
# Focus windows alt + arrow keys
|
||||
alt - left : yabai -m window --focus west
|
||||
alt - right : yabai -m window --focus east
|
||||
|
||||
# Close focused window with alt + c
|
||||
alt - c : yabai -m window --close
|
||||
|
||||
# App Shortcuts
|
||||
ctrl - q : open -a kitty --args --directory="~"
|
||||
'';
|
||||
};
|
||||
}
|
||||
1019
flake.lock
generated
Normal file
200
flake.nix
@@ -0,0 +1,200 @@
|
||||
{
|
||||
description = "NixOS configuration of DerGrumpf";
|
||||
|
||||
# the nixConfig here only affects the flake itself, not the system configuration!
|
||||
nixConfig = {
|
||||
extra-substituters = [
|
||||
"https://nix-community.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
extra-trusted-public-keys = [
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
};
|
||||
|
||||
inputs = {
|
||||
# Core
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
|
||||
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
nur = {
|
||||
url = "github:nix-community/NUR";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Editor
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-24.11";
|
||||
# If using a stable channel you can use `url = "github:nix-community/nixvim/nixos-<version>"`
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# Desktop ENV
|
||||
hyprland.url = "github:hyprwm/Hyprland";
|
||||
hyprland-plugins = {
|
||||
url = "github:hyprwm/hyprland-plugins";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
};
|
||||
|
||||
# Customization
|
||||
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
|
||||
nixcord.url = "github:kaylorben/nixcord";
|
||||
catppuccin.url = "github:catppuccin/nix";
|
||||
|
||||
# User Config
|
||||
home-manager.url = "github:nix-community/home-manager/release-24.11";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
};
|
||||
|
||||
outputs =
|
||||
inputs@{
|
||||
self,
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
catppuccin,
|
||||
nixvim,
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# Common Configuration
|
||||
commonModules = [
|
||||
(
|
||||
{ config, ... }:
|
||||
{
|
||||
nix.settings = {
|
||||
accept-flake-config = true;
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
};
|
||||
|
||||
nix.gc = {
|
||||
automatic = true;
|
||||
dates = "weekly";
|
||||
options = "--delete-older-than 7d";
|
||||
};
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
commonHomeManagerConfig =
|
||||
{ username, monitorSetup }:
|
||||
{
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
backupFileExtension = "backup";
|
||||
extraSpecialArgs = {
|
||||
inherit inputs username monitorSetup;
|
||||
};
|
||||
users.${username} = import ./users/${username}/home.nix;
|
||||
sharedModules = [
|
||||
inputs.catppuccin.homeModules.catppuccin
|
||||
inputs.nixcord.homeModules.nixcord
|
||||
inputs.nixvim.homeManagerModules.nixvim
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# System Builder for NixOS
|
||||
mkSystem =
|
||||
{
|
||||
hostname,
|
||||
username,
|
||||
system ? "x86_64-linux",
|
||||
monitorSetup ? "single",
|
||||
containerization ? "none",
|
||||
extraModules ? [ ],
|
||||
}:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit
|
||||
inputs
|
||||
username
|
||||
monitorSetup
|
||||
containerization
|
||||
;
|
||||
};
|
||||
modules =
|
||||
commonModules
|
||||
++ [
|
||||
./hosts/${hostname}
|
||||
./users/${username}/nixos.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
(commonHomeManagerConfig { inherit username monitorSetup; })
|
||||
./modules/containerization
|
||||
]
|
||||
++ extraModules;
|
||||
|
||||
};
|
||||
|
||||
# ISO configuration
|
||||
mkIsoConfig =
|
||||
{ system }:
|
||||
nixpkgs.lib.nixosSystem {
|
||||
inherit system;
|
||||
modules = [
|
||||
(import (nixpkgs + "/nixos/modules/installer/cd-dvd/installation-cd-minimal.nix"))
|
||||
(
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
neovim
|
||||
git
|
||||
wget
|
||||
curl
|
||||
];
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
}
|
||||
)
|
||||
];
|
||||
};
|
||||
|
||||
in
|
||||
{
|
||||
# ISO Defaults
|
||||
packages.x86_64-linux.iso = self.nixosConfigurations.iso.config.system.build.isoImage;
|
||||
packages.x86_64-linux.default = self.packages.x86_64-linux.iso;
|
||||
|
||||
nixosConfigurations = {
|
||||
iso = mkIsoConfig { system = "x86_64-linux"; };
|
||||
|
||||
qemu = mkSystem {
|
||||
hostname = "qemu";
|
||||
username = "phil";
|
||||
monitorSetup = "single";
|
||||
containerization = "none";
|
||||
};
|
||||
|
||||
m920q = mkSystem {
|
||||
hostname = "m920q";
|
||||
username = "phil";
|
||||
monitorSetup = "dual";
|
||||
containerization = "podman";
|
||||
};
|
||||
|
||||
hp15-n028sg = mkSystem {
|
||||
hostname = "hp15-n028sg";
|
||||
username = "phil";
|
||||
monitorSetup = "single";
|
||||
containerization = "docker";
|
||||
};
|
||||
|
||||
cloud = mkSystem {
|
||||
hostname = "cluster.cyperpunk.de";
|
||||
username = "phil";
|
||||
monitorSetup = "none";
|
||||
containerization = "podman";
|
||||
};
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
77
hosts/hp15-n028sg/default.nix
Normal file
@@ -0,0 +1,77 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/system.nix
|
||||
../../modules/nix-settings.nix
|
||||
../../modules/vpn.nix
|
||||
../../modules/fonts.nix
|
||||
../../modules/firewall.nix
|
||||
../../modules/localisation.nix
|
||||
../../modules/openssh.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/services.nix
|
||||
../../modules/regreet/regreet.nix
|
||||
../../modules/plymouth.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Brightness Control
|
||||
# Enabled and Kernel patched to control screen Brightness on Notebook
|
||||
environment.systemPackages = with pkgs; [ brightnessctl ];
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="*", RUN+="${pkgs.coreutils}/bin/chmod a+w /sys/class/backlight/%k/brightness"
|
||||
'';
|
||||
|
||||
boot.loader = {
|
||||
systemd-boot.enable = true;
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nix-hp";
|
||||
#networkmanager.enable = true;
|
||||
|
||||
wireless = {
|
||||
enable = true;
|
||||
networks = {
|
||||
LANFRED.pskRaw = "36e2b41b51328800a9582be1a05f13f796f943569610ccdb61304803b86ce3da";
|
||||
};
|
||||
};
|
||||
|
||||
nameservers = [
|
||||
"1.1.1.1"
|
||||
"1.0.0.1"
|
||||
"8.8.8.8"
|
||||
"8.8.4.4"
|
||||
];
|
||||
};
|
||||
|
||||
nixpkgs.config.nvidia.acceptLicense = true;
|
||||
hardware.graphics.enable = true;
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
package = config.boot.kernelPackages.nvidiaPackages.legacy_470;
|
||||
modesetting.enable = true;
|
||||
open = false;
|
||||
powerManagement = {
|
||||
enable = false;
|
||||
finegrained = false;
|
||||
};
|
||||
nvidiaSettings = true;
|
||||
|
||||
prime = {
|
||||
intelBusId = "PCI:0:2:0";
|
||||
nvidiaBusId = "PCI:10:0:0";
|
||||
sync.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
56
hosts/hp15-n028sg/hardware-configuration.nix
Normal file
@@ -0,0 +1,56 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ehci_pci"
|
||||
"ahci"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
hardware.nvidia-container-toolkit.enable = true;
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
../../modules/system.nix
|
||||
../../modules/nix-settings.nix
|
||||
../../modules/vpn.nix
|
||||
../../modules/fonts.nix
|
||||
../../modules/firewall.nix
|
||||
../../modules/localisation.nix
|
||||
../../modules/openssh.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/services.nix
|
||||
../../modules/regreet/regreet.nix
|
||||
../../modules/plymouth.nix
|
||||
../../modules/file_managers/spacefm.nix
|
||||
../../modules/appimage.nix
|
||||
../../modules/qemu.nix
|
||||
../../modules/thunderbird.nix
|
||||
../../modules/canon_eos_550d.nix
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
efi.canTouchEfiVariables = true;
|
||||
systemd-boot.enable = true;
|
||||
};
|
||||
|
||||
networking = {
|
||||
hostName = "nix-desktop";
|
||||
networkmanager.enable = true;
|
||||
#useDHCP = lib.mkForce true;
|
||||
#dhcpcd.enable = true;
|
||||
interfaces = {
|
||||
eno1.ipv4.addresses = [
|
||||
{
|
||||
address = "192.168.2.40";
|
||||
prefixLength = 24;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
defaultGateway = {
|
||||
address = "192.168.2.1";
|
||||
interface = "eno1";
|
||||
};
|
||||
|
||||
nameservers = [
|
||||
"192.168.2.2"
|
||||
"1.1.1.1"
|
||||
"8.8.8.8"
|
||||
];
|
||||
};
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
|
||||
environment.systemPackages = [
|
||||
pkgs.onlyoffice-bin
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
@@ -1,28 +1,54 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "ata_piix" "floppy" "sd_mod" "sr_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usbhid"
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
boot.kernelModules = [
|
||||
"kvm-intel"
|
||||
"v4l2loopback"
|
||||
];
|
||||
boot.extraModulePackages = [ config.boot.kernelPackages.v4l2loopback.out ];
|
||||
boot.extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Camera"
|
||||
'';
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
};
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
fileSystems."/storage" = {
|
||||
device = "/dev/disk/by-label/STORAGE";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
@@ -31,7 +57,8 @@
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
|
||||
40
hosts/qemu/default.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
# Edit this configuration file to define what should be installed on
|
||||
# your system. Help is available in the configuration.nix(5) man page
|
||||
# and in the NixOS manual (accessible by running ‘nixos-help’).
|
||||
|
||||
{ lib, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
../../modules/system.nix
|
||||
../../modules/nix-settings.nix
|
||||
../../modules/vpn.nix
|
||||
../../modules/fonts.nix
|
||||
../../modules/firewall.nix
|
||||
../../modules/localisation.nix
|
||||
../../modules/openssh.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/services.nix
|
||||
../../modules/regreet/regreet.nix
|
||||
../../modules/plymouth.nix
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
||||
programs.geary.enable = true;
|
||||
|
||||
boot.loader = {
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "/dev/sda";
|
||||
};
|
||||
};
|
||||
|
||||
networking.hostName = "nix-qemu"; # Define your hostname.
|
||||
|
||||
hardware.graphics.enable = true;
|
||||
|
||||
system.stateVersion = "25.11"; # Did you read the comment?
|
||||
|
||||
}
|
||||
51
hosts/qemu/hardware-configuration.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports = [
|
||||
(modulesPath + "/profiles/qemu-guest.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
"ata_piix"
|
||||
"floppy"
|
||||
"sd_mod"
|
||||
"sr_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-label/NIXROOT";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-label/NIXBOOT";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0022"
|
||||
"dmask=0022"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.ens3.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
}
|
||||
7
modules/appimage.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.appimage = {
|
||||
enable = true;
|
||||
binfmt = true;
|
||||
};
|
||||
}
|
||||
21
modules/bluetooth.nix
Normal file
@@ -0,0 +1,21 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
powerOnBoot = true;
|
||||
settings = {
|
||||
General = {
|
||||
Enable = "Source,Sink,Media,Socket";
|
||||
Experimental = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.blueman.enable = true; # Graphical Manager
|
||||
|
||||
hardware.pulseaudio = {
|
||||
enable = true;
|
||||
package = pkgs.pulseaudioFull;
|
||||
extraModules = [ pkgs.pulseaudio-modules-bt ];
|
||||
};
|
||||
}
|
||||
25
modules/canon_eos_550d.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
|
||||
services.udev.extraRules = ''
|
||||
ACTION=="add", \
|
||||
SUBSYSTEM=="usb", \
|
||||
ATTR{idVendor}=="04a9", \
|
||||
ATTR{idProduct}=="31ea", \
|
||||
'';
|
||||
# RUN+="systemctl restart webcam"
|
||||
|
||||
systemd.services.webcam = {
|
||||
enable = true;
|
||||
script = ''
|
||||
${pkgs.gphoto2}/bin/gphoto2 --stdout --capture-movie |
|
||||
${pkgs.ffmpeg}/bin/ffmpeg \
|
||||
-i - \
|
||||
-vcodec rawvideo \
|
||||
-pix_fmt yuv420p \
|
||||
-f v4l2 \
|
||||
/dev/video0
|
||||
'';
|
||||
#wantedBy = [ "multi-user.target" ];
|
||||
};
|
||||
}
|
||||
41
modules/containerization/default.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
containerization ? "none",
|
||||
...
|
||||
}:
|
||||
|
||||
let
|
||||
# Import the appropriate containerization module based on the parameter
|
||||
containerModule =
|
||||
if containerization == "podman" then
|
||||
import ./podman.nix
|
||||
else if containerization == "docker" then
|
||||
import ./docker.nix
|
||||
else if containerization == "none" then
|
||||
{ }
|
||||
else
|
||||
throw "Unknown containerization type: ${containerization}. Valid options are: podman, docker, none";
|
||||
in
|
||||
|
||||
{
|
||||
imports = [ containerModule ];
|
||||
|
||||
# Common packages and configuration for all systems
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Remove the curly braces {}
|
||||
dive # docker layer viewer
|
||||
tailscale # VPN
|
||||
];
|
||||
|
||||
virtualisation.containers.enable = true;
|
||||
virtualisation.oci-containers.containers = {
|
||||
/*
|
||||
container-name = {
|
||||
image = "image";
|
||||
autoStart = true;
|
||||
ports = [ "127.0.0.1:1234:1234" ];
|
||||
};
|
||||
*/
|
||||
};
|
||||
}
|
||||
18
modules/containerization/docker.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
docker-compose
|
||||
lazydocker # docker tui
|
||||
];
|
||||
|
||||
virtualisation.docker = {
|
||||
enable = true;
|
||||
rootless = {
|
||||
enable = true;
|
||||
setSocketVariable = true;
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.backend = "docker";
|
||||
}
|
||||
17
modules/containerization/podman.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
podman-compose # docker-compose alternative
|
||||
podman-tui # status of containers in terminal
|
||||
podman-desktop # Desktop client
|
||||
];
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
defaultNetwork.settings.dns_enabled = true;
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.backend = "podman";
|
||||
}
|
||||
4
modules/file_managers/spacefm.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.spacefm.enable = true;
|
||||
}
|
||||
13
modules/file_managers/thunar.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.xfconf.enable = true;
|
||||
services.gvfs.enable = true;
|
||||
services.tumbler.enable = true;
|
||||
programs.thunar = {
|
||||
enable = true;
|
||||
plugins = with pkgs.xfce; [
|
||||
thunar-archive-plugin
|
||||
thunar-volman
|
||||
];
|
||||
};
|
||||
}
|
||||
7
modules/firewall.nix
Normal file
@@ -0,0 +1,7 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
networking.firewall.allowedTCPPorts = [ 57621 ];
|
||||
networking.firewall.allowedUDPPorts = [ 5353 ];
|
||||
# Or disable the firewall altogether.
|
||||
networking.firewall.enable = false;
|
||||
}
|
||||
40
modules/fonts.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
fonts = {
|
||||
packages = with pkgs; [
|
||||
# icon fonts
|
||||
material-icons
|
||||
material-black-colors
|
||||
material-design-icons
|
||||
icomoon-feather
|
||||
|
||||
# normal fonts
|
||||
noto-fonts
|
||||
noto-fonts-emoji
|
||||
|
||||
nerdfonts
|
||||
];
|
||||
|
||||
# use fonts specified by user rather than default ones
|
||||
enableDefaultPackages = false;
|
||||
|
||||
# user defined fonts
|
||||
# the reason there's Noto Color Emoji everywhere is to override DejaVu's
|
||||
# B&W emojis that would sometimes show instead of some Color emojis
|
||||
fontconfig.defaultFonts = {
|
||||
serif = [
|
||||
"Noto Serif"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
sansSerif = [
|
||||
"Noto Sans"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
monospace = [
|
||||
"JetBrainsMono Nerd Font"
|
||||
"Noto Color Emoji"
|
||||
];
|
||||
emoji = [ "Noto Color Emoji" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
20
modules/localisation.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ ... }:
|
||||
{
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
}
|
||||
50
modules/nix-settings.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# given the users in this list the right to specify additional substituters via:
|
||||
# 1. `nixConfig.substituers` in `flake.nix`
|
||||
# 2. command line args `--options substituers http://xxx`
|
||||
nix.settings.trusted-users = [ username ];
|
||||
|
||||
# customise /etc/nix/nix.conf declaratively via `nix.settings`
|
||||
nix.settings = {
|
||||
# enable flakes globally
|
||||
experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
auto-optimise-store = true;
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://hyprland.cachix.org"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
builders-use-substitutes = true;
|
||||
download-buffer-size = 524288000;
|
||||
};
|
||||
|
||||
# do garbage collection weekly to keep disk usage low
|
||||
nix.gc = {
|
||||
automatic = lib.mkDefault true;
|
||||
dates = lib.mkDefault "1 h";
|
||||
options = lib.mkDefault "--delete-older-than +3";
|
||||
};
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
nixpkgs.config.allowBroken = true;
|
||||
|
||||
nixpkgs.config.permittedInsecurePackages = [
|
||||
"dotnet-sdk-6.0.428"
|
||||
"dotnet-runtime-6.0.36"
|
||||
];
|
||||
|
||||
}
|
||||
13
modules/openssh.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
settings = {
|
||||
X11Forwarding = true;
|
||||
PermitRootLogin = "no"; # disable root login
|
||||
PasswordAuthentication = false; # disable password login
|
||||
};
|
||||
openFirewall = true;
|
||||
};
|
||||
}
|
||||
20
modules/pipewire.nix
Normal file
@@ -0,0 +1,20 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
# Enable sound with pipewire.
|
||||
#sound.enable = true;
|
||||
hardware.pulseaudio.enable = false;
|
||||
environment.systemPackages = with pkgs; [ pamixer ];
|
||||
services.pipewire = {
|
||||
enable = true;
|
||||
#alsa.enable = true;
|
||||
#alsa.support32Bit = true;
|
||||
#pulse.enable = true;
|
||||
# If you want to use JACK applications, uncomment this
|
||||
#jack.enable = true;
|
||||
|
||||
# use the example session manager (no others are packaged yet so this is enabled by default,
|
||||
# no need to redefine it in your config for now)
|
||||
#media-session.enable = true;
|
||||
};
|
||||
|
||||
}
|
||||
32
modules/plymouth.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
boot = {
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
theme = "pixels";
|
||||
themePackages = with pkgs; [
|
||||
# By default we would install all themes
|
||||
(adi1090x-plymouth-themes.override {
|
||||
selected_themes = [ "pixels" ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
# Enable "Silent boot"
|
||||
consoleLogLevel = 3;
|
||||
initrd.verbose = false;
|
||||
kernelParams = [
|
||||
"quiet"
|
||||
"splash"
|
||||
"boot.shell_on_fail"
|
||||
"udev.log_priority=3"
|
||||
"rd.systemd.show_status=auto"
|
||||
];
|
||||
# Hide the OS choice for bootloaders.
|
||||
# It's still possible to open the bootloader list by pressing any key
|
||||
# It will just not appear on screen unless a key is pressed
|
||||
loader.timeout = 0;
|
||||
|
||||
};
|
||||
}
|
||||
13
modules/qemu.nix
Normal file
@@ -0,0 +1,13 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
environment.systemPackages = with pkgs; [
|
||||
qemu
|
||||
quickemu
|
||||
nemu
|
||||
];
|
||||
systemd.tmpfiles.rules = [ "L+ /var/lib/qemu/firmware - - - - ${pkgs.qemu}/share/qemu/firmware" ];
|
||||
boot.binfmt.emulatedSystems = [
|
||||
"aarch64-linux"
|
||||
"riscv64-linux"
|
||||
];
|
||||
}
|
||||
94
modules/regreet/regreet.nix
Normal file
@@ -0,0 +1,94 @@
|
||||
{
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
{
|
||||
/*
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
user = username;
|
||||
command = "$HOME/.wayland-session";
|
||||
};
|
||||
};
|
||||
};
|
||||
*/
|
||||
|
||||
environment.etc = {
|
||||
"greetd/background.png".source = ../../wallpapers/lucy_with_cat.png;
|
||||
"greetd/environments".text = ''
|
||||
hyprland
|
||||
fish
|
||||
'';
|
||||
|
||||
/*
|
||||
"greetd/wayland-sessions/hyprland.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=Hyprland
|
||||
Comment=Hyprland WM
|
||||
Exec=Hyprland
|
||||
Type=Application
|
||||
'';
|
||||
|
||||
"greetd/wayland-sessions/niri.desktop".text = ''
|
||||
[Desktop Entry]
|
||||
Name=Niri
|
||||
Comment=Hyprland WM
|
||||
Exec=niri
|
||||
Type=Application
|
||||
'';
|
||||
*/
|
||||
};
|
||||
|
||||
programs.regreet = {
|
||||
enable = true;
|
||||
cageArgs = [
|
||||
"-s"
|
||||
"-m"
|
||||
"last"
|
||||
];
|
||||
settings = {
|
||||
background = {
|
||||
path = "/etc/greetd/background.png";
|
||||
fit = "Fill";
|
||||
};
|
||||
|
||||
env.SESSION_DIRS = "$HOME/.wayland-session";
|
||||
|
||||
GTK = {
|
||||
application_prefer_dark_theme = true;
|
||||
cursor_theme_name = "Adwaita";
|
||||
font_name = lib.mkForce "FiraCodeNerdFontProto 12";
|
||||
icon_theme_name = lib.mkForce "materialdesignicons";
|
||||
theme_name = "Adwaita";
|
||||
};
|
||||
|
||||
commands = {
|
||||
reboot = [
|
||||
"systemctl"
|
||||
"reboot"
|
||||
];
|
||||
poweroff = [
|
||||
"systemctl"
|
||||
"poweroff"
|
||||
];
|
||||
x11_prefix = [
|
||||
"startx"
|
||||
"/usr/bin/env"
|
||||
];
|
||||
};
|
||||
|
||||
appearance = {
|
||||
greeting_msg = "Hey there, Master!";
|
||||
};
|
||||
|
||||
widget.clock = {
|
||||
format = "%A %d.%m.%Y %T";
|
||||
resolution = "500ms";
|
||||
timezone = "Europe/Berlin";
|
||||
label_width = 150;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
63
modules/regreet/regreet.toml
Normal file
@@ -0,0 +1,63 @@
|
||||
# SPDX-FileCopyrightText: 2022 Harish Rajagopal <harish.rajagopals@gmail.com>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
[background]
|
||||
# Path to the background image
|
||||
path = "/etc/greetd/background.png"
|
||||
|
||||
# How the background image covers the screen if the aspect ratio doesn't match
|
||||
# Available values: "Fill", "Contain", "Cover", "ScaleDown"
|
||||
# Refer to: https://docs.gtk.org/gtk4/enum.ContentFit.html
|
||||
# NOTE: This is ignored if ReGreet isn't compiled with GTK v4.8 support.
|
||||
fit = "Fill"
|
||||
|
||||
# The entries defined in this section will be passed to the session as environment variables when it is started
|
||||
[env]
|
||||
SESSION_DIRS = "$HOME/.wayland-session"
|
||||
|
||||
#[GTK]
|
||||
# Whether to use the dark theme
|
||||
#application_prefer_dark_theme = true
|
||||
|
||||
# Cursor theme name
|
||||
#cursor_theme_name = "Adwaita"
|
||||
|
||||
# Font name and size
|
||||
#font_name = "FiraCodeNerdFontPropo 12"
|
||||
|
||||
# Icon theme name
|
||||
#icon_theme_name = "materialdesignicons"
|
||||
|
||||
# GTK theme name
|
||||
#theme_name = "Adwaita"
|
||||
|
||||
[commands]
|
||||
# The command used to reboot the system
|
||||
reboot = ["systemctl", "reboot"]
|
||||
|
||||
# The command used to shut down the system
|
||||
poweroff = ["systemctl", "poweroff"]
|
||||
|
||||
# The command prefix for X11 sessions to start the X server
|
||||
x11_prefix = [ "startx", "/usr/bin/env" ]
|
||||
|
||||
[appearance]
|
||||
# The message that initially displays on startup
|
||||
greeting_msg = "Welcome"
|
||||
|
||||
[widget.clock]
|
||||
# strftime format argument
|
||||
# See https://docs.rs/jiff/0.1.14/jiff/fmt/strtime/index.html#conversion-specifications
|
||||
format = "%A %T"
|
||||
|
||||
# How often to update the text
|
||||
resolution = "500ms"
|
||||
|
||||
# Override system timezone (IANA Time Zone Database name, aka /etc/zoneinfo path)
|
||||
# Remove to use the system time zone.
|
||||
timezone = "Europe/Berlin"
|
||||
|
||||
# Ask GTK to make the label at least this wide. This helps keeps the parent element layout and width consistent.
|
||||
# Experiment with different widths, the interpretation of this value is entirely up to GTK.
|
||||
label_width = 150
|
||||
24
modules/services.nix
Normal file
@@ -0,0 +1,24 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services = {
|
||||
dbus.packages = [ pkgs.gcr ];
|
||||
|
||||
# flatpak.enable = true;
|
||||
# xdg.portals.enable = true;
|
||||
geoclue2.enable = true;
|
||||
xserver.enable = true;
|
||||
|
||||
udev.packages = with pkgs; [ gnome-settings-daemon ];
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
printing.enable = true;
|
||||
|
||||
power-profiles-daemon.enable = true;
|
||||
logind.extraConfig = ''
|
||||
HandlePowerKey=ignore
|
||||
HandleSuspendKey=ignore
|
||||
HandleHibernateKey=ignore
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
4
modules/start-webcam.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
with import <nixpkgs> { };
|
||||
writeShellScriptBin = "start-webcam" ''
|
||||
systemctl restart webcam
|
||||
'';
|
||||
@@ -0,0 +1,105 @@
|
||||
{
|
||||
pkgs,
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# ============================= User related =============================
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.${username} = {
|
||||
isNormalUser = true;
|
||||
description = username;
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"podman"
|
||||
];
|
||||
};
|
||||
|
||||
programs.steam.enable = true;
|
||||
programs.dconf.enable = true;
|
||||
|
||||
# List packages installed in system profile. To search, run:
|
||||
# $ nix search wget
|
||||
environment.systemPackages = with pkgs; [
|
||||
# Bare minimum
|
||||
vim
|
||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||
wget
|
||||
git
|
||||
cmatrix
|
||||
tdf
|
||||
figlet
|
||||
tty-clock
|
||||
lolcat
|
||||
# System tools
|
||||
sysstat
|
||||
lm_sensors # for `sensors` command
|
||||
ethtool
|
||||
pciutils # lspci
|
||||
usbutils # lsusb
|
||||
lshw
|
||||
nvme-cli
|
||||
smartmontools
|
||||
bluez
|
||||
|
||||
# Graphics
|
||||
libGL
|
||||
glxinfo
|
||||
|
||||
# Rizz
|
||||
fastfetch
|
||||
cpufetch
|
||||
hyfetch
|
||||
ramfetch
|
||||
neofetch
|
||||
ghfetch
|
||||
libnotify
|
||||
|
||||
# Terminal
|
||||
yazi # file manager
|
||||
jq # JSON Parser
|
||||
yq-go # YAML Parser
|
||||
glow # Markdown Reader
|
||||
btop # system monitor
|
||||
iotop # iomonitor
|
||||
iftop # network monitor
|
||||
iperf3 # network tester
|
||||
nmap # network discovery
|
||||
eza # ls replacement
|
||||
curl
|
||||
dnsutils
|
||||
ldns
|
||||
file
|
||||
which
|
||||
tree
|
||||
gnused
|
||||
gnutar
|
||||
gawk
|
||||
zstd
|
||||
gnupg
|
||||
fzf
|
||||
|
||||
# nix related
|
||||
nix-index
|
||||
nix-tree
|
||||
nix-health
|
||||
|
||||
# Archives
|
||||
zip
|
||||
unzip
|
||||
p7zip
|
||||
xz
|
||||
|
||||
postman
|
||||
#teamspeak6-client
|
||||
];
|
||||
|
||||
security.polkit.enable = true;
|
||||
security.rtkit.enable = true;
|
||||
environment.sessionVariables = {
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
programs.ssh.startAgent = true;
|
||||
}
|
||||
|
||||
4
modules/thunderbird.nix
Normal file
@@ -0,0 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.thunderbird.enable = true;
|
||||
}
|
||||
8
modules/vpn.nix
Normal file
@@ -0,0 +1,8 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
services.tailscale = {
|
||||
enable = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
}
|
||||
14
programs/webcam.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
ffmpeg_6-full
|
||||
gphoto2
|
||||
v4l-utils
|
||||
];
|
||||
|
||||
programs.mpv = {
|
||||
enable = true;
|
||||
defaultProfiles = [ "gpu-hq" ];
|
||||
scripts = [ pkgs.mpvScripts.mpris ];
|
||||
};
|
||||
}
|
||||
16
programs/wm/common/audio.nix
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
# audio control
|
||||
pavucontrol
|
||||
playerctl
|
||||
pulsemixer
|
||||
];
|
||||
|
||||
services = {
|
||||
playerctld.enable = true;
|
||||
};
|
||||
}
|
||||
40
programs/wm/common/cava.nix
Normal file
@@ -0,0 +1,40 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
programs.cava = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
general = {
|
||||
framerate = 120;
|
||||
bars = 0;
|
||||
bar_width = 2;
|
||||
bar_spacing = 1;
|
||||
#bar_height = 32;
|
||||
sensitivity = 90;
|
||||
autosens = 1;
|
||||
};
|
||||
|
||||
input = {
|
||||
method = "pipewire";
|
||||
source = "auto";
|
||||
sample_rate = 44100;
|
||||
sample_bits = 16;
|
||||
};
|
||||
|
||||
output = {
|
||||
channels = "stereo";
|
||||
mono_option = "average";
|
||||
reverse = 0;
|
||||
waveform = 0;
|
||||
};
|
||||
|
||||
smoothing = {
|
||||
monstercat = 1;
|
||||
waves = 0;
|
||||
noise_reduction = 0.77;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
11
programs/wm/common/floorp.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
username,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.floorp = {
|
||||
enable = true;
|
||||
profiles.${username} = { };
|
||||
};
|
||||
|
||||
}
|
||||
112
programs/wm/common/kitty.nix
Normal file
@@ -0,0 +1,112 @@
|
||||
{ lib, ... }:
|
||||
{
|
||||
programs.kitty = lib.mkForce {
|
||||
enable = true;
|
||||
settings = {
|
||||
themeFile = "Catppuccin-Mocha";
|
||||
confirm_os_window_close = 0;
|
||||
dynamic_background_opacity = true;
|
||||
enable_audio_bell = false;
|
||||
mouse_hide_wait = "-1.0";
|
||||
window_padding_width = 10;
|
||||
background_opacity = "0.8";
|
||||
background_blur = 5;
|
||||
tab_bar_min_tabs = 1;
|
||||
tab_bar_edge = "bottom";
|
||||
tab_bar_style = "powerline";
|
||||
tab_powerline_style = "slanted";
|
||||
tab_title_template = "{title}{' :{}:'.format(num_windows) if num_windows > 1 else ''}";
|
||||
symbol_map =
|
||||
let
|
||||
mappings = [
|
||||
"U+23FB-U+23FE"
|
||||
"U+2B58"
|
||||
"U+E200-U+E2A9"
|
||||
"U+E0A0-U+E0A3"
|
||||
"U+E0B0-U+E0BF"
|
||||
"U+E0C0-U+E0C8"
|
||||
"U+E0CC-U+E0CF"
|
||||
"U+E0D0-U+E0D2"
|
||||
"U+E0D4"
|
||||
"U+E700-U+E7C5"
|
||||
"U+F000-U+F2E0"
|
||||
"U+2665"
|
||||
"U+26A1"
|
||||
"U+F400-U+F4A8"
|
||||
"U+F67C"
|
||||
"U+E000-U+E00A"
|
||||
"U+F300-U+F313"
|
||||
"U+E5FA-U+E62B"
|
||||
];
|
||||
in
|
||||
(builtins.concatStringsSep "," mappings) + " Symbols Nerd Font";
|
||||
};
|
||||
};
|
||||
|
||||
programs.starship = {
|
||||
enable = true;
|
||||
settings = {
|
||||
add_newline = true;
|
||||
command_timeout = 500;
|
||||
|
||||
format = "$username$hostname $directory $git_branch$git_status\n$character ";
|
||||
right_format = "$cmd_duration";
|
||||
|
||||
username = {
|
||||
style_user = "bold #cba6f7";
|
||||
style_root = "bold #f38ba8";
|
||||
format = "[┌](bold #a6e3a1)[$user]($style)";
|
||||
show_always = true;
|
||||
};
|
||||
|
||||
hostname = {
|
||||
style = "bold #74c7ec";
|
||||
format = "[@](bold #fab387)[$hostname]($style)";
|
||||
ssh_only = false;
|
||||
};
|
||||
|
||||
directory = {
|
||||
style = "bold #a6e3a1";
|
||||
truncation_length = 0;
|
||||
truncation_symbol = "";
|
||||
format = "[⤇ ](bold #f38ba8)[《$path》]($style)";
|
||||
};
|
||||
|
||||
git_branch = {
|
||||
format = "[⟦$branch⟧]($style)";
|
||||
style = "bold #f9e2af";
|
||||
};
|
||||
|
||||
# Git status module settings
|
||||
git_status = {
|
||||
format = "[[(*$conflicted$untracked$modified$staged$renamed$deleted)](red) ($ahead_behind$stashed)]($style)";
|
||||
style = "bold #a6e3a1";
|
||||
conflicted = "";
|
||||
untracked = "";
|
||||
modified = "";
|
||||
staged = "";
|
||||
renamed = "";
|
||||
deleted = "";
|
||||
};
|
||||
|
||||
# Command duration module
|
||||
cmd_duration = {
|
||||
format = "[$duration]($style)";
|
||||
style = "bold #cdd6f4";
|
||||
min_time = 5000; # Only show if command takes longer than 5 seconds
|
||||
};
|
||||
|
||||
# Character module (prompt symbol)
|
||||
character = {
|
||||
success_symbol = "[└──────⇴ ](bold #a6e3a1)";
|
||||
error_symbol = "[└──────⇴ ](bold #f38ba8)";
|
||||
};
|
||||
|
||||
nix_shell = {
|
||||
format = "[$symbol$state( \($name\))]($style)";
|
||||
symbol = "U+02744";
|
||||
style = "bold #89dceb";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
267
programs/wm/common/neovim/config.lua
Normal file
@@ -0,0 +1,267 @@
|
||||
-- Basics
|
||||
vim.g.mapleader = " "
|
||||
|
||||
-- Yank to system clipboard
|
||||
vim.keymap.set("n", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("v", "y", '"+y', { desc = "Yank to clipboard" })
|
||||
vim.keymap.set("n", "Y", '"+Y', { desc = "Yank line to clipboard" })
|
||||
|
||||
-- Also make delete operations use system clipboard
|
||||
vim.keymap.set("n", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("v", "d", '"+d', { desc = "Delete to clipboard" })
|
||||
vim.keymap.set("n", "D", '"+D', { desc = "Delete line to clipboard" })
|
||||
|
||||
-- Paste from system clipboard
|
||||
vim.keymap.set("n", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
vim.keymap.set("v", "p", '"+p', { desc = "Paste from clipboard" })
|
||||
|
||||
-- Treesitter
|
||||
require("nvim-treesitter.configs").setup({
|
||||
ensure_installed = { "lua", "nix", "python", "javascript", "rust", "rasi" },
|
||||
sync_install = false,
|
||||
auto_install = true,
|
||||
highlight = {
|
||||
enable = true,
|
||||
additional_vim_regex_highlighting = false,
|
||||
},
|
||||
|
||||
parser_install_dir = vim.fn.stdpath("data") .. "/treesitter",
|
||||
})
|
||||
vim.opt.runtimepath:append(vim.fn.stdpath("data") .. "/treesitter")
|
||||
|
||||
-- Linting
|
||||
require("lint").linters_by_ft = {}
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
require("lint").try_lint()
|
||||
end,
|
||||
})
|
||||
|
||||
-- Mason Setup
|
||||
require("mason").setup({
|
||||
ui = {
|
||||
icons = {
|
||||
package_installed = "✓",
|
||||
package_pending = "➜",
|
||||
package_uninstalled = "✗",
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
require("mason-lspconfig").setup({
|
||||
ensure_installed = {
|
||||
"lua_ls",
|
||||
"nil_ls",
|
||||
"rust_analyzer",
|
||||
"pylsp",
|
||||
},
|
||||
automatic_installation = true,
|
||||
})
|
||||
|
||||
-- LSP Config
|
||||
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 }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "nvim_lsp" },
|
||||
{ name = "luasnip" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
{ name = "path" },
|
||||
}),
|
||||
})
|
||||
|
||||
local lspconfig = require("lspconfig")
|
||||
local capabilities = require("cmp_nvim_lsp").default_capabilities()
|
||||
vim.keymap.set("n", "gd", vim.lsp.buf.definition, {})
|
||||
vim.keymap.set("n", "K", vim.lsp.buf.hover, {})
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, {})
|
||||
vim.keymap.set("n", "<leader>ca", vim.lsp.buf.code_action, {})
|
||||
|
||||
-- Setup language servers
|
||||
lspconfig.lua_ls.setup({
|
||||
capabilities = capabilities,
|
||||
settings = {
|
||||
Lua = {
|
||||
runtime = { version = "LuaJIT" },
|
||||
diagnostics = { globals = { "vim" } },
|
||||
workspace = { library = vim.api.nvim_get_runtime_file("", true) },
|
||||
telemetry = { enable = false },
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
lspconfig.nil_ls.setup({ capabilities = capabilities })
|
||||
lspconfig.rust_analyzer.setup({ capabilities = capabilities })
|
||||
lspconfig.pylsp.setup({ capabilities = capabilities })
|
||||
lspconfig.stylelint_lsp.setup({
|
||||
cmd = { "stylelint-lsp", "--stdio" },
|
||||
filetypes = { "css", "scss", "rasi" },
|
||||
capabilities = vim.lsp.protocol.make_client_capabilities(),
|
||||
})
|
||||
|
||||
-- Conform
|
||||
require("conform").setup({
|
||||
formatters_by_ft = {
|
||||
lua = { "stylua" },
|
||||
nix = { "nixfmt" },
|
||||
python = { "black" },
|
||||
rust = { "rustfmt" },
|
||||
rasi = { "prettierd" },
|
||||
},
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_fallback = true,
|
||||
},
|
||||
})
|
||||
|
||||
-- Yazi
|
||||
require("yazi").setup({
|
||||
open_for_directories = true,
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>fy", function()
|
||||
require("yazi").yazi(nil, vim.loop.cwd())
|
||||
end, { desc = "Open Yazi file manager" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fd", function()
|
||||
require("yazi").yazi(nil, vim.fn.expand("%:p:h"))
|
||||
end, { desc = "Open Yazi in current file directory" })
|
||||
|
||||
-- Telescope
|
||||
require("telescope").setup()
|
||||
|
||||
local telescope = require("telescope.builtin")
|
||||
vim.keymap.set("n", "<leader>ff", telescope.find_files, { desc = "Telescope find files" })
|
||||
vim.keymap.set("n", "<leader>fg", telescope.live_grep, { desc = "Telescope live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", telescope.buffers, { desc = "Telescope buffers" })
|
||||
vim.keymap.set("n", "<leader>fh", telescope.help_tags, { desc = "Telescope help tags" })
|
||||
|
||||
-- Styling
|
||||
require("catppuccin").setup({
|
||||
flavour = "mocha",
|
||||
transparent_background = true,
|
||||
term_colors = true,
|
||||
integration = {
|
||||
treesitter = true,
|
||||
mason = true,
|
||||
lsp_trouble = true,
|
||||
which_key = true,
|
||||
cmp = true,
|
||||
gitsigns = true,
|
||||
telescope = true,
|
||||
nvimtree = true,
|
||||
dashboard = true,
|
||||
notify = true,
|
||||
indent_blankline = true,
|
||||
toggleterm = true, -- Important for transparent terminals
|
||||
},
|
||||
})
|
||||
|
||||
vim.cmd.colorscheme("catppuccin")
|
||||
vim.opt.number = true
|
||||
vim.opt.cursorline = true
|
||||
vim.opt.showmode = false
|
||||
vim.opt.syntax = "enable"
|
||||
vim.opt.hlsearch = true
|
||||
vim.opt.incsearch = true
|
||||
vim.opt.tabstop = 4
|
||||
vim.opt.termguicolors = true
|
||||
|
||||
local colors = require("catppuccin.palettes").get_palette("mocha")
|
||||
vim.api.nvim_set_hl(0, "LineNr", { fg = colors.text, bg = "NONE" })
|
||||
vim.api.nvim_set_hl(0, "CursorLineNr", { fg = colors.pink, bg = "NONE", bold = true })
|
||||
|
||||
-- ToggleTerm setup
|
||||
require("toggleterm").setup({
|
||||
size = 20,
|
||||
open_mapping = [[<c-\>]],
|
||||
direction = "float",
|
||||
float_opts = {
|
||||
border = "single",
|
||||
width = 200,
|
||||
height = 40,
|
||||
},
|
||||
})
|
||||
|
||||
vim.keymap.set("n", "<leader>h", function()
|
||||
require("toggleterm").toggle(1, 10, vim.loop.cwd(), "horizontal")
|
||||
end, { desc = "Toggle terminal (horizontal)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>v", function()
|
||||
require("toggleterm").toggle(2, 60, vim.loop.cwd(), "vertical")
|
||||
end, { desc = "Toggle terminal (vertical)" })
|
||||
|
||||
vim.keymap.set("n", "<leader>ft", function()
|
||||
require("toggleterm").toggle(3, 20, vim.loop.cwd(), "float")
|
||||
end, { desc = "Toggle terminal (float)" })
|
||||
|
||||
vim.keymap.set("t", "<C-t>", "<Cmd>ToggleTerm<CR>", { desc = "Toggle terminal" })
|
||||
vim.keymap.set("t", "<C-v>", "<C-\\><C-n>v", { desc = "Exit terminal and enter visual mode" })
|
||||
|
||||
-- Statusline
|
||||
require("lualine").setup({
|
||||
options = {
|
||||
theme = "catppuccin",
|
||||
component_separators = { left = "|", right = "|" },
|
||||
section_separators = { left = "", right = "" },
|
||||
},
|
||||
})
|
||||
|
||||
-- Dashboard
|
||||
local alpha = require("alpha")
|
||||
local dashboard = require("alpha.themes.dashboard")
|
||||
|
||||
dashboard.section.header.val = {
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿",
|
||||
"⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽",
|
||||
"⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿",
|
||||
"⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿",
|
||||
"⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿",
|
||||
"⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿",
|
||||
"⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿",
|
||||
"⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿",
|
||||
"⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿",
|
||||
"⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿",
|
||||
"⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿",
|
||||
"⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾",
|
||||
"⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿",
|
||||
"⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿",
|
||||
"⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿",
|
||||
"⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿",
|
||||
"⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿",
|
||||
"⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛",
|
||||
}
|
||||
|
||||
dashboard.section.buttons.val = {
|
||||
dashboard.button("e", "[+] New file", ":ene <BAR> startinsert <CR>"),
|
||||
dashboard.button("f", "[?] Find file", ":Telescope find_files <CR>"),
|
||||
dashboard.button("r", "[~] Recent files", ":Telescope oldfiles <CR>"),
|
||||
dashboard.button("y", "[Y] Yazi", ":Yazi<CR>"),
|
||||
dashboard.button("m", "[M] Mason", ":Mason<CR>"),
|
||||
dashboard.button("q", "[X] Quit", ":qa<CR>"),
|
||||
}
|
||||
|
||||
dashboard.section.footer.val = "Circuits hum in anticipation of your will."
|
||||
|
||||
vim.api.nvim_create_autocmd("VimEnter", {
|
||||
callback = function()
|
||||
if vim.fn.argc() == 0 then
|
||||
require("alpha").start()
|
||||
end
|
||||
end,
|
||||
})
|
||||
|
||||
alpha.setup(dashboard.config)
|
||||
83
programs/wm/common/neovim/default.nix
Normal file
@@ -0,0 +1,83 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.neovim = {
|
||||
enable = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
defaultEditor = true;
|
||||
#extraPackages = with pkgs; [ ];
|
||||
|
||||
plugins = with pkgs.vimPlugins; [
|
||||
nvim-treesitter
|
||||
nvim-lint
|
||||
catppuccin-nvim
|
||||
mason-nvim
|
||||
mason-lspconfig-nvim
|
||||
nvim-lspconfig
|
||||
nvim-cmp
|
||||
cmp-nvim-lsp
|
||||
cmp-buffer
|
||||
cmp-path
|
||||
cmp-cmdline
|
||||
luasnip
|
||||
lualine-nvim
|
||||
yazi-nvim
|
||||
alpha-nvim
|
||||
cheatsheet-nvim
|
||||
toggleterm-nvim
|
||||
|
||||
# AI Stuff
|
||||
avante-nvim
|
||||
plenary-nvim
|
||||
nui-nvim
|
||||
dressing-nvim
|
||||
nvim-web-devicons
|
||||
img-clip-nvim
|
||||
render-markdown-nvim
|
||||
|
||||
# Add conform.nvim as a custom plugin
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "conform-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "stable";
|
||||
sha256 = "sha256-pUF9F5QoDzCZuVRcJEF91M8Qjkh/xosMkf9tRavkmJs=";
|
||||
};
|
||||
})
|
||||
|
||||
# Add telescope.vim as a custom plugin
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "telescope-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "nvim-telescope";
|
||||
repo = "telescope.nvim";
|
||||
rev = "0.1.8";
|
||||
sha256 = "sha256-e1ulhc4IIvUgpjKQrSqPY4WpXuez6wlxL6Min9U0o5Q=";
|
||||
};
|
||||
})
|
||||
|
||||
];
|
||||
|
||||
extraLuaConfig = builtins.readFile (./. + "/config.lua");
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
black
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
nodejs
|
||||
prettierd
|
||||
stylelint-lsp
|
||||
# Mason Binarys
|
||||
lua-language-server
|
||||
nil
|
||||
rust-analyzer
|
||||
python3Packages.python-lsp-server
|
||||
# Avante
|
||||
curl
|
||||
cargo
|
||||
];
|
||||
}
|
||||
331
programs/wm/common/neovim/default.nix.back1
Normal file
@@ -0,0 +1,331 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
programs.nixvim = {
|
||||
enable = true;
|
||||
defaultEditor = true;
|
||||
viAlias = true;
|
||||
vimAlias = true;
|
||||
|
||||
# ===================
|
||||
# Basic Options
|
||||
# ===================
|
||||
options = {
|
||||
number = true;
|
||||
cursorline = true;
|
||||
showmode = false;
|
||||
syntax = "enable";
|
||||
hlsearch = true;
|
||||
incsearch = true;
|
||||
tabstop = 4;
|
||||
termguicolors = true;
|
||||
};
|
||||
|
||||
globals.mapleader = " ";
|
||||
|
||||
keymaps = [
|
||||
# Clipboard
|
||||
{
|
||||
mode = "n";
|
||||
key = "y";
|
||||
action = "\"+y";
|
||||
options.desc = "Yank to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "y";
|
||||
action = "\"+y";
|
||||
options.desc = "Yank to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "Y";
|
||||
action = "\"+Y";
|
||||
options.desc = "Yank line to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "d";
|
||||
action = "\"+d";
|
||||
options.desc = "Delete to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "d";
|
||||
action = "\"+d";
|
||||
options.desc = "Delete to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "D";
|
||||
action = "\"+D";
|
||||
options.desc = "Delete line to clipboard";
|
||||
}
|
||||
{
|
||||
mode = "n";
|
||||
key = "p";
|
||||
action = "\"+p";
|
||||
options.desc = "Paste from clipboard";
|
||||
}
|
||||
{
|
||||
mode = "v";
|
||||
key = "p";
|
||||
action = "\"+p";
|
||||
options.desc = "Paste from clipboard";
|
||||
}
|
||||
];
|
||||
|
||||
# ===================
|
||||
# Plugins
|
||||
# ===================
|
||||
plugins = {
|
||||
# Treesitter
|
||||
treesitter = {
|
||||
enable = true;
|
||||
ensureInstalled = [
|
||||
"lua"
|
||||
"nix"
|
||||
"python"
|
||||
"javascript"
|
||||
"rust"
|
||||
"rasi"
|
||||
];
|
||||
};
|
||||
|
||||
# Lint
|
||||
lint.enable = true;
|
||||
|
||||
# Mason + LSP
|
||||
mason.enable = true;
|
||||
mason-lspconfig = {
|
||||
enable = true;
|
||||
ensureInstalled = [
|
||||
"lua_ls"
|
||||
"nil_ls"
|
||||
"rust_analyzer"
|
||||
"pylsp"
|
||||
"stylelint_lsp"
|
||||
];
|
||||
};
|
||||
|
||||
lsp = {
|
||||
enable = true;
|
||||
servers = {
|
||||
lua_ls.settings.Lua = {
|
||||
runtime.version = "LuaJIT";
|
||||
diagnostics.globals = [ "vim" ];
|
||||
telemetry.enable = false;
|
||||
};
|
||||
nil_ls.enable = true;
|
||||
rust_analyzer.enable = true;
|
||||
pylsp.enable = true;
|
||||
stylelint_lsp = {
|
||||
enable = true;
|
||||
filetypes = [
|
||||
"css"
|
||||
"scss"
|
||||
"rasi"
|
||||
];
|
||||
cmd = [
|
||||
"stylelint-lsp"
|
||||
"--stdio"
|
||||
];
|
||||
};
|
||||
};
|
||||
keymaps.lspBuf = {
|
||||
gd = "definition";
|
||||
K = "hover";
|
||||
"<leader>rn" = "rename";
|
||||
"<leader>ca" = "code_action";
|
||||
};
|
||||
};
|
||||
|
||||
# Completion
|
||||
cmp = {
|
||||
enable = true;
|
||||
sources = [
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "avante_commands"; }
|
||||
{ name = "avante_mentions"; }
|
||||
{ name = "buffer"; }
|
||||
{ name = "path"; }
|
||||
];
|
||||
};
|
||||
luasnip.enable = true;
|
||||
|
||||
# Conform
|
||||
conform-nvim = {
|
||||
enable = true;
|
||||
formattersByFt = {
|
||||
lua = [ "stylua" ];
|
||||
nix = [ "nixfmt" ];
|
||||
python = [ "black" ];
|
||||
rust = [ "rustfmt" ];
|
||||
rasi = [ "prettierd" ];
|
||||
};
|
||||
formatOnSave = {
|
||||
timeoutMs = 500;
|
||||
lspFallback = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Telescope
|
||||
telescope = {
|
||||
enable = true;
|
||||
keymaps = {
|
||||
"<leader>ff" = "find_files";
|
||||
"<leader>fg" = "live_grep";
|
||||
"<leader>fb" = "buffers";
|
||||
"<leader>fh" = "help_tags";
|
||||
};
|
||||
};
|
||||
|
||||
# Toggleterm
|
||||
toggleterm = {
|
||||
enable = true;
|
||||
settings = {
|
||||
size = 20;
|
||||
direction = "float";
|
||||
float_opts = {
|
||||
border = "single";
|
||||
width = 200;
|
||||
height = 40;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Statusline
|
||||
lualine = {
|
||||
enable = true;
|
||||
settings.options = {
|
||||
theme = "catppuccin";
|
||||
component_separators = {
|
||||
left = "|";
|
||||
right = "|";
|
||||
};
|
||||
section_separators = {
|
||||
left = "";
|
||||
right = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Dashboard (alpha)
|
||||
alpha = {
|
||||
enable = true;
|
||||
theme = "dashboard";
|
||||
layout.dashboard = {
|
||||
section.header.val = [
|
||||
"⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣯⣿⠿⣟⣷⣯⣛⢿⣿⣿⣾⣟⣿⣿⣿⣿⣿⣿⣿⣿⣿"
|
||||
"⣿⣿⣿⣿⣿⣿⣿⡿⣵⣿⡿⣴⣽⡟⣳⢿⢽⣽⣕⣽⢿⡿⣿⣟⣿⣿⣿⣿⣿⣿⣿"
|
||||
"⣿⣿⣿⣷⣿⣿⢟⣫⣿⢟⢟⣾⣾⣿⣿⣞⢳⣻⢞⣎⠿⢞⣊⣿⣞⣿⣿⣿⣿⣿⢽"
|
||||
"⣿⣿⣿⣿⣿⣏⢯⣿⣏⣏⠔⢇⣿⢢⢆⢀⢆⣧⣼⢻⢰⡧⢻⣝⣏⡸⣧⣾⣿⣿⣿"
|
||||
"⣿⣿⣿⣿⡟⣻⣿⣿⡾⡿⡼⢸⡝⣝⡳⢢⣧⢳⣳⢷⡇⣗⢺⡺⣿⡧⣿⣿⣿⢿⢿"
|
||||
"⣿⡿⣿⣼⡼⣿⣿⡗⡧⣧⠁⡝⣧⣳⠅⡾⠈⣎⢮⣧⣿⣿⣗⣷⣻⢷⣏⣼⢏⣺⣿"
|
||||
"⣿⣿⣿⣻⣿⣿⣿⢧⣿⢹⠉⢷⢿⣧⣲⡏⡀⡈⢆⠳⣿⡿⢿⣿⣱⢿⢫⣷⣝⣿⣿"
|
||||
"⣿⣿⣿⡯⡟⣿⣿⢽⣡⠟⢿⣮⠁⠙⠛⠈⡴⢿⣿⡷⣬⣽⢽⠧⣷⡏⣿⡇⣧⣽⣿"
|
||||
"⣿⠟⢻⡧⡇⣿⡇⣇⣆⢄⡜⢃⡀⡀⡀⡀⡀⢎⣁⠁⣸⣗⣸⣿⣧⣼⡿⢹⢿⢾⣿"
|
||||
"⣿⣷⣾⣿⢻⣿⢧⢻⣽⡀⡀⡀⡀⢄⡀⡀⡀⡀⡀⢀⣷⡸⡟⣿⣶⣻⣧⡛⡱⢝⣿"
|
||||
"⣿⣿⣿⣿⢸⡿⢚⡜⣿⣇⡀⡀⡀⡀⡀⡀⡀⡀⠚⢁⢣⣜⡿⣿⡇⢼⣿⠨⣸⣿⣿"
|
||||
"⣿⣄⣿⣗⢾⢻⣧⢿⣾⣿⣦⡀⡀⠑⠚⠉⡀⡀⣤⣿⢨⣿⠗⣻⢣⣿⢹⢈⣽⣿⣿"
|
||||
"⣿⣿⣿⣿⢎⡄⢿⣞⡇⣿⠹⣿⣶⣀⡀⣀⡴⡩⢸⢏⣿⣿⣶⢻⣾⢏⡞⠡⢽⣇⣾"
|
||||
"⣿⣿⣿⣮⣼⢬⣦⢿⣳⣌⠧⡉⠈⣇⣛⣁⣈⣼⣿⡸⠫⠛⠐⠛⠕⣙⣻⣬⣼⣿⣿"
|
||||
"⢟⢿⣿⣿⣿⡢⣃⣪⣭⣡⣤⣶⠟⡿⠿⠿⠿⠛⢁⣿⣿⢩⠉⡀⠈⠓⡝⣿⣿⣿⣿"
|
||||
"⣾⣿⣿⣿⣿⠞⢔⡣⡴⣾⣿⠓⣤⢧⡼⣉⠠⢤⣿⣿⠇⠃⡀⡀⡀⡀⡸⢿⣾⣿⣿"
|
||||
"⣿⣿⣿⡿⣺⡸⢗⢠⣇⣿⣿⠊⠃⡀⠉⡀⢠⣿⣿⠟⡸⡀⡀⡀⡀⡀⣃⣬⠽⠿⣿"
|
||||
"⣿⣿⣿⣿⡇⡏⢸⣿⠟⣽⡇⡀⡀⡀⡀⣴⣟⢭⣾⣿⡇⠎⣠⠒⠉⠈⢀⡀⢨⡋⣿"
|
||||
"⠛⠛⠛⠋⠃⠓⠚⠛⠘⠛⠃⡀⠊⡀⠛⠛⠛⠂⠛⠛⠓⠁⠚⡀⠂⠒⠒⠐⠒⠋⠛"
|
||||
];
|
||||
section.buttons.val = [
|
||||
{
|
||||
shortcut = "e";
|
||||
text = "[+] New file";
|
||||
command = ":ene <BAR> startinsert <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "f";
|
||||
text = "[?] Find file";
|
||||
command = ":Telescope find_files <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "r";
|
||||
text = "[~] Recent files";
|
||||
command = ":Telescope oldfiles <CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "y";
|
||||
text = "[Y] Yazi";
|
||||
command = ":Yazi<CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "m";
|
||||
text = "[M] Mason";
|
||||
command = ":Mason<CR>";
|
||||
}
|
||||
{
|
||||
shortcut = "q";
|
||||
text = "[X] Quit";
|
||||
command = ":qa<CR>";
|
||||
}
|
||||
];
|
||||
section.footer.val = "Circuits hum in anticipation of your will.";
|
||||
};
|
||||
};
|
||||
|
||||
# Colorscheme
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavour = "mocha";
|
||||
transparentBackground = true;
|
||||
integrations = {
|
||||
treesitter = true;
|
||||
mason = true;
|
||||
cmp = true;
|
||||
telescope = true;
|
||||
toggleterm = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# ===================
|
||||
# Plugins not in nixvim
|
||||
# ===================
|
||||
extraPlugins = with pkgs.vimPlugins; [
|
||||
yazi-nvim
|
||||
cheatsheet-nvim
|
||||
avante-nvim
|
||||
plenary-nvim
|
||||
nui-nvim
|
||||
dressing-nvim
|
||||
nvim-web-devicons
|
||||
img-clip-nvim
|
||||
render-markdown-nvim
|
||||
(pkgs.vimUtils.buildVimPlugin {
|
||||
name = "conform-nvim";
|
||||
src = pkgs.fetchFromGitHub {
|
||||
owner = "stevearc";
|
||||
repo = "conform.nvim";
|
||||
rev = "stable";
|
||||
sha256 = "sha256-pUF9F5QoDzCZuVRcJEF91M8Qjkh/xosMkf9tRavkmJs=";
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [
|
||||
nixfmt-rfc-style
|
||||
stylua
|
||||
black
|
||||
nodePackages.prettier
|
||||
rustfmt
|
||||
nodejs
|
||||
prettierd
|
||||
stylelint-lsp
|
||||
lua-language-server
|
||||
nil
|
||||
rust-analyzer
|
||||
python3Packages.python-lsp-server
|
||||
curl
|
||||
cargo
|
||||
];
|
||||
}
|
||||
19
programs/wm/common/notifier/mako.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.mako = {
|
||||
enable = true;
|
||||
font = "FiraCodeNerdFontPropo 12";
|
||||
borderSize = 4;
|
||||
borderRadius = 8;
|
||||
defaultTimeout = 5000;
|
||||
|
||||
extraConfig = ''
|
||||
[app-name=Spotify]
|
||||
border-color=#a6e3a1
|
||||
|
||||
[app-name=Thunderbird]
|
||||
border-color=#94e2d5
|
||||
'';
|
||||
|
||||
};
|
||||
}
|
||||
110
programs/wm/common/notifier/swaync.nix
Normal file
@@ -0,0 +1,110 @@
|
||||
{ ... }:
|
||||
{
|
||||
services.swaync = {
|
||||
enable = true;
|
||||
settings = {
|
||||
positionX = "center";
|
||||
positionY = "center";
|
||||
layer = "overlay";
|
||||
control-center-layer = "top";
|
||||
layer-shell = true;
|
||||
cssPriority = "user";
|
||||
control-center-margin-top = 100;
|
||||
control-center-margin-bottom = 200;
|
||||
control-center-margin-right = 0;
|
||||
control-center-margin-left = 0;
|
||||
notification-2fa-action = true;
|
||||
notification-inline-replies = false;
|
||||
notification-icon-size = 64;
|
||||
notification-body-image-height = 100;
|
||||
notification-body-image-width = 200;
|
||||
widgets = [
|
||||
"mpris"
|
||||
"volume"
|
||||
"inhibitors"
|
||||
"title"
|
||||
"dnd"
|
||||
"notifications"
|
||||
];
|
||||
widget-config = {
|
||||
|
||||
mpris = {
|
||||
blacklist = [ ];
|
||||
autohide = false;
|
||||
show-album-art = "always";
|
||||
loop-carousel = false;
|
||||
image-size = 96;
|
||||
image-radius = 12;
|
||||
};
|
||||
|
||||
volume = {
|
||||
label = "gain";
|
||||
show-per-app = false;
|
||||
empty-list-label = "Nothin' is playin'";
|
||||
expand-button-label = "⤢";
|
||||
collaps-button-label = "⤡";
|
||||
};
|
||||
|
||||
title = {
|
||||
text = "Hollerin'";
|
||||
clear-all-button = true;
|
||||
button-text = "Sheriff's Pardon";
|
||||
};
|
||||
|
||||
dnd = {
|
||||
text = "Let'er rest";
|
||||
};
|
||||
|
||||
menubar = {
|
||||
"menu#power" = {
|
||||
label = "Power";
|
||||
position = "right";
|
||||
animation-type = "slide_down";
|
||||
animation-duration = 250;
|
||||
actions = [
|
||||
{
|
||||
label = "Bolt It";
|
||||
command = "hyprlock";
|
||||
}
|
||||
{
|
||||
label = "Ride Out";
|
||||
command = "hyprctl dispatch exit";
|
||||
}
|
||||
{
|
||||
label = "Circle Back";
|
||||
command = "systemctl reboot";
|
||||
}
|
||||
{
|
||||
label = "Bet Down the Horses";
|
||||
command = "systemctl poweroff";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
"buttons#media" = {
|
||||
position = "left";
|
||||
actions = [
|
||||
{
|
||||
label = "Play/Pause";
|
||||
command = "playerctl play-pause";
|
||||
}
|
||||
{
|
||||
label = "Next";
|
||||
command = "playerctl next";
|
||||
}
|
||||
{
|
||||
label = "Previous";
|
||||
command = "playerctl previous";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
notifications = {
|
||||
vexpand = true;
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
BIN
programs/wm/common/rofi/configs/background.png
Normal file
|
After Width: | Height: | Size: 9.2 MiB |
170
programs/wm/common/rofi/configs/catppuccin-default.rasi
Normal file
@@ -0,0 +1,170 @@
|
||||
@import "catppuccin-mocha"
|
||||
|
||||
* {
|
||||
selected-active-foreground: @background;
|
||||
lightfg: @text;
|
||||
separatorcolor: @foreground;
|
||||
urgent-foreground: @red;
|
||||
alternate-urgent-background: @lightbg;
|
||||
lightbg: @mantle;
|
||||
background-color: transparent;
|
||||
border-color: @foreground;
|
||||
normal-background: @background;
|
||||
selected-urgent-background: @red;
|
||||
alternate-active-background: @lightbg;
|
||||
spacing: 2;
|
||||
alternate-normal-foreground: @foreground;
|
||||
urgent-background: @background;
|
||||
selected-normal-foreground: @lightbg;
|
||||
active-foreground: @blue;
|
||||
background: @base;
|
||||
selected-active-background: @blue;
|
||||
active-background: @background;
|
||||
selected-normal-background: @lightfg;
|
||||
alternate-normal-background: @lightbg;
|
||||
foreground: @text;
|
||||
selected-urgent-foreground: @background;
|
||||
normal-foreground: @foreground;
|
||||
alternate-urgent-foreground: @red;
|
||||
alternate-active-foreground: @blue;
|
||||
|
||||
}
|
||||
element {
|
||||
padding: 1px ;
|
||||
cursor: pointer;
|
||||
spacing: 5px ;
|
||||
border: 0;
|
||||
}
|
||||
element normal.normal {
|
||||
background-color: @normal-background;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: @urgent-background;
|
||||
text-color: @urgent-foreground;
|
||||
}
|
||||
element normal.active {
|
||||
background-color: @active-background;
|
||||
text-color: @active-foreground;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: @selected-urgent-background;
|
||||
text-color: @selected-urgent-foreground;
|
||||
}
|
||||
element selected.active {
|
||||
background-color: @selected-active-background;
|
||||
text-color: @selected-active-foreground;
|
||||
}
|
||||
element alternate.normal {
|
||||
background-color: @alternate-normal-background;
|
||||
text-color: @alternate-normal-foreground;
|
||||
}
|
||||
element alternate.urgent {
|
||||
background-color: @alternate-urgent-background;
|
||||
text-color: @alternate-urgent-foreground;
|
||||
}
|
||||
element alternate.active {
|
||||
background-color: @alternate-active-background;
|
||||
text-color: @alternate-active-foreground;
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
cursor: inherit;
|
||||
highlight: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
size: 1.0000em ;
|
||||
cursor: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
window {
|
||||
padding: 5;
|
||||
background-color: @background;
|
||||
border: 1;
|
||||
}
|
||||
mainbox {
|
||||
padding: 0;
|
||||
border: 0;
|
||||
}
|
||||
message {
|
||||
padding: 1px ;
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
textbox {
|
||||
text-color: @foreground;
|
||||
}
|
||||
listview {
|
||||
padding: 2px 0px 0px ;
|
||||
scrollbar: true;
|
||||
border-color: @separatorcolor;
|
||||
spacing: 2px ;
|
||||
fixed-height: 0;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
scrollbar {
|
||||
width: 4px ;
|
||||
padding: 0;
|
||||
handle-width: 8px ;
|
||||
border: 0;
|
||||
handle-color: @normal-foreground;
|
||||
}
|
||||
sidebar {
|
||||
border-color: @separatorcolor;
|
||||
border: 2px dash 0px 0px ;
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
button selected {
|
||||
background-color: @selected-normal-background;
|
||||
text-color: @selected-normal-foreground;
|
||||
}
|
||||
num-filtered-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
num-rows {
|
||||
expand: false;
|
||||
text-color: Gray;
|
||||
}
|
||||
textbox-num-sep {
|
||||
expand: false;
|
||||
str: "/";
|
||||
text-color: Gray;
|
||||
}
|
||||
inputbar {
|
||||
padding: 1px ;
|
||||
spacing: 0px ;
|
||||
text-color: @normal-foreground;
|
||||
children: [ "prompt","textbox-prompt-colon","entry","num-filtered-rows","textbox-num-sep","num-rows","case-indicator" ];
|
||||
}
|
||||
case-indicator {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
entry {
|
||||
text-color: @normal-foreground;
|
||||
cursor: text;
|
||||
spacing: 0;
|
||||
placeholder-color: Gray;
|
||||
placeholder: "Type to filter";
|
||||
}
|
||||
prompt {
|
||||
spacing: 0;
|
||||
text-color: @normal-foreground;
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
margin: 0px 0.3000em 0.0000em 0.0000em ;
|
||||
expand: false;
|
||||
str: ":";
|
||||
text-color: inherit;
|
||||
}
|
||||
29
programs/wm/common/rofi/configs/catppuccin-mocha.rasi
Normal file
@@ -0,0 +1,29 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
232
programs/wm/common/rofi/configs/custom.rasi
Normal file
@@ -0,0 +1,232 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
configuration {
|
||||
show-icons: true;
|
||||
modi: "window,drun,filebrowser";
|
||||
display-drun: "Apps";
|
||||
display-filebrowser: "Files";
|
||||
display-run: "RUN";
|
||||
display-window: "Active";
|
||||
drun-display-format: "{name}";
|
||||
window-format: "{w} · {c} · {t}";
|
||||
}
|
||||
|
||||
/* Main Window */
|
||||
window {
|
||||
/* properties for window widget */
|
||||
transparency: "real";
|
||||
location: center;
|
||||
anchor: center;
|
||||
fullscreen: false;
|
||||
width: 50%;
|
||||
height: 90%;
|
||||
x-offset: 0px;
|
||||
y-offset: 0px;
|
||||
|
||||
/* properties for all widgets */
|
||||
enabled: true;
|
||||
border-radius: 1px;
|
||||
cursor: "default";
|
||||
background-color: @base;
|
||||
|
||||
border: 4px;
|
||||
border-color: @yellow;
|
||||
}
|
||||
|
||||
/* Main Box */
|
||||
|
||||
mainbox {
|
||||
enabled: true;
|
||||
spacing: 0px;
|
||||
background-color: transparent;
|
||||
orientation: horizontal;
|
||||
children: [ "imagebox", "listbox" ];
|
||||
}
|
||||
|
||||
imagebox {
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/background.png", height);
|
||||
orientation: vertical;
|
||||
children: [ "inputbar", "weatherelement", "dummy", "mode-switcher" ];
|
||||
}
|
||||
|
||||
listbox {
|
||||
spacing: 20px;
|
||||
padding: 20px;
|
||||
background-color: transparent;
|
||||
orientation: vertical;
|
||||
children: [ "message", "listview" ];
|
||||
}
|
||||
|
||||
weatherelement {
|
||||
border-radius: 20px;
|
||||
background-color: transparent;
|
||||
text-color: @peach;
|
||||
str: "Hello This is text";
|
||||
}
|
||||
|
||||
dummy {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* Input */
|
||||
inputbar {
|
||||
enabled: true;
|
||||
spacing: 10px;
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
children: [ "textbox-prompt-colon", "entry" ];
|
||||
}
|
||||
textbox-prompt-colon {
|
||||
enabled: true;
|
||||
expand: false;
|
||||
str: "";
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
entry {
|
||||
enabled: true;
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
cursor: text;
|
||||
placeholder: "Search";
|
||||
placeholder-color: inherit;
|
||||
}
|
||||
|
||||
/* Mode Switcher */
|
||||
mode-switcher{
|
||||
enabled: true;
|
||||
spacing: 20px;
|
||||
background-color: transparent;
|
||||
text-color: @text;
|
||||
}
|
||||
button {
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @base;
|
||||
text-color: inherit;
|
||||
cursor: pointer;
|
||||
}
|
||||
button selected {
|
||||
background-color: @base;
|
||||
text-color: @pink;
|
||||
}
|
||||
|
||||
/* Listview */
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 1;
|
||||
lines: 8;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
|
||||
spacing: 10px;
|
||||
background-color: transparent;
|
||||
text-color: @text;
|
||||
cursor: "default";
|
||||
}
|
||||
|
||||
/* Elements */
|
||||
element {
|
||||
enabled: true;
|
||||
spacing: 15px;
|
||||
padding: 8px;
|
||||
border-radius: 10px;
|
||||
background-color: transparent;
|
||||
text-color: @mauve;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
element normal.normal {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
}
|
||||
element normal.urgent {
|
||||
background-color: inherit;
|
||||
text-color: @red;
|
||||
}
|
||||
element normal.active {
|
||||
background-color: inherit;
|
||||
text-color: @blue;
|
||||
}
|
||||
|
||||
element selected.normal {
|
||||
background-color: @crust;
|
||||
text-color: @pink;
|
||||
}
|
||||
element selected.urgent {
|
||||
background-color: @crust;
|
||||
text-color: @maroon;
|
||||
}
|
||||
element selected.active {
|
||||
background-color: @crust;
|
||||
text-color: @sky;
|
||||
}
|
||||
element-icon {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
size: 32px;
|
||||
cursor: inherit;
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
cursor: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.0;
|
||||
}
|
||||
|
||||
/* Message */
|
||||
message {
|
||||
background-color: transparent;
|
||||
}
|
||||
textbox {
|
||||
padding: 15px;
|
||||
border-radius: 10px;
|
||||
background-color: @overlay0;
|
||||
text-color: @peach;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.0;
|
||||
}
|
||||
|
||||
error-message {
|
||||
padding: 15px;
|
||||
border-radius: 20px;
|
||||
background-color: @surface0;
|
||||
text-color: @red;
|
||||
}
|
||||
BIN
programs/wm/common/rofi/configs/power.jpg
Normal file
|
After Width: | Height: | Size: 447 KiB |
163
programs/wm/common/rofi/configs/power.rasi
Normal file
@@ -0,0 +1,163 @@
|
||||
* {
|
||||
rosewater: #f5e0dc;
|
||||
flamingo: #f2cdcd;
|
||||
pink: #f5c2e7;
|
||||
mauve: #cba6f7;
|
||||
red: #f38ba8;
|
||||
maroon: #eba0ac;
|
||||
peach: #fab387;
|
||||
yellow: #f9e2af;
|
||||
green: #a6e3a1;
|
||||
teal: #94e2d5;
|
||||
sky: #89dceb;
|
||||
sapphire: #74c7ec;
|
||||
blue: #89b4fa;
|
||||
lavender: #b4befe;
|
||||
text: #cdd6f4;
|
||||
subtext1: #bac2de;
|
||||
subtext0: #a6adc8;
|
||||
overlay2: #9399b2;
|
||||
overlay1: #7f849c;
|
||||
overlay0: #6c7086;
|
||||
surface2: #585b70;
|
||||
surface1: #45475a;
|
||||
surface0: #313244;
|
||||
base: #1e1e2e;
|
||||
mantle: #181825;
|
||||
crust: #11111b;
|
||||
}
|
||||
|
||||
configuration {
|
||||
font: "Fira Code Bold 20px";
|
||||
show-icons: true;
|
||||
}
|
||||
|
||||
/*
|
||||
USE_BUTTONS=YES
|
||||
*/
|
||||
|
||||
/*****----- Main Window -----*****/
|
||||
window {
|
||||
transparency: "real";
|
||||
location: center;
|
||||
anchor: center;
|
||||
fullscreen: false;
|
||||
width: 1000px;
|
||||
x-offset: 0px;
|
||||
y-offset: 0px;
|
||||
|
||||
padding: 0px;
|
||||
border: 4px solid;
|
||||
border-radius: 2px;
|
||||
border-color: @blue;
|
||||
cursor: "default";
|
||||
background-color: @base;
|
||||
}
|
||||
|
||||
/*****----- Main Box -----*****/
|
||||
mainbox {
|
||||
enabled: true;
|
||||
spacing: 0px;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
border: 0px solid;
|
||||
border-radius: 0px;
|
||||
border-color: @blue;
|
||||
background-color: transparent;
|
||||
children: [ "inputbar", "listview", "message" ];
|
||||
}
|
||||
|
||||
|
||||
/*****----- Inputbar -----*****/
|
||||
inputbar {
|
||||
enabled: true;
|
||||
spacing: 20px;
|
||||
padding: 100px 40px;
|
||||
background-color: transparent;
|
||||
background-image: url("~/.config/rofi/power.jpg", width);
|
||||
children: [ "textbox-prompt-colon", "prompt"];
|
||||
}
|
||||
|
||||
dummy {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
textbox-prompt-colon {
|
||||
enabled: true;
|
||||
expand: false;
|
||||
str: " System";
|
||||
padding: 15px;
|
||||
border: 0px 0px 0px 10px;
|
||||
border-radius: 100% 100% 0px 100%;
|
||||
border-color: @blue;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
}
|
||||
prompt {
|
||||
enabled: true;
|
||||
padding: 15px;
|
||||
border: 0px;
|
||||
border-radius: 0px 100% 100% 100%;
|
||||
border-color: @blue;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
}
|
||||
|
||||
/*****----- Listview -----*****/
|
||||
listview {
|
||||
enabled: true;
|
||||
columns: 6;
|
||||
lines: 1;
|
||||
cycle: true;
|
||||
dynamic: true;
|
||||
scrollbar: false;
|
||||
layout: vertical;
|
||||
reverse: false;
|
||||
fixed-height: true;
|
||||
fixed-columns: true;
|
||||
|
||||
spacing: 30px;
|
||||
margin: 10px;
|
||||
background-color: transparent;
|
||||
cursor: "default";
|
||||
}
|
||||
|
||||
/*****----- Elements -----*****/
|
||||
element {
|
||||
enabled: true;
|
||||
padding: 10px;
|
||||
border-radius: 1%;
|
||||
background-color: @crust;
|
||||
text-color: @text;
|
||||
cursor: pointer;
|
||||
children: [ element-text ];
|
||||
}
|
||||
element-text {
|
||||
background-color: transparent;
|
||||
text-color: inherit;
|
||||
cursor: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
element selected.normal {
|
||||
background-color: @crust;
|
||||
text-color: @yellow;
|
||||
}
|
||||
|
||||
/*****----- Message -----*****/
|
||||
message {
|
||||
enabled: true;
|
||||
margin: 0px;
|
||||
padding: 15px;
|
||||
border-radius: 0px;
|
||||
background-color: @crust;
|
||||
text-color: @yellow;
|
||||
}
|
||||
textbox {
|
||||
background-color: inherit;
|
||||
text-color: inherit;
|
||||
vertical-align: 0.5;
|
||||
horizontal-align: 0.5;
|
||||
}
|
||||
|
||||
|
||||
28
programs/wm/common/rofi/default.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
|
||||
home.packages = with pkgs; [
|
||||
rofi-power-menu
|
||||
rofi-calc
|
||||
];
|
||||
|
||||
programs.rofi = {
|
||||
enable = true;
|
||||
cycle = false;
|
||||
package = pkgs.rofi-wayland;
|
||||
font = "FiraCode Nerd Font Mono 12";
|
||||
|
||||
location = "center";
|
||||
terminal = "${pkgs.kitty}/bin/kitty";
|
||||
|
||||
};
|
||||
|
||||
home.file.".config/rofi" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
}
|
||||
25
programs/wm/common/wallpaper/hyprpaper.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.packages = with pkgs; [
|
||||
hyprpaper
|
||||
];
|
||||
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
# Hyprpaper configuration
|
||||
services.hyprpaper = {
|
||||
enable = true;
|
||||
settings = {
|
||||
preload = [
|
||||
"Pictures/Wallpapers/tokio.png"
|
||||
];
|
||||
wallpaper = ", Pictures/Wallpapers/tokio.png";
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
11
programs/wm/common/wallpaper/swww.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.packages = with pkgs; [ swww ];
|
||||
}
|
||||
26
programs/wm/common/wallpaper/wpaperd.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ ... }:
|
||||
{
|
||||
home.file = {
|
||||
"Pictures/Wallpapers" = {
|
||||
source = ../../wallpapers;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
services.wpaperd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default = {
|
||||
duration = "30m";
|
||||
mode = "center";
|
||||
sorting = "ascending";
|
||||
};
|
||||
|
||||
any = {
|
||||
path = "/home/phil/Pictures/Wallpapers/girl.png";
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
185
programs/wm/common/waybar/common.nix
Normal file
@@ -0,0 +1,185 @@
|
||||
{
|
||||
widgets = {
|
||||
"group/media" = {
|
||||
orientation = "horizontal";
|
||||
|
||||
modules = [
|
||||
"mpris"
|
||||
"custom/cava"
|
||||
"wireplumber"
|
||||
];
|
||||
};
|
||||
|
||||
mpris = {
|
||||
format = "{player_icon}";
|
||||
format-paused = "{status_icon}";
|
||||
max-length = 100;
|
||||
player-icons = {
|
||||
default = "||";
|
||||
mpv = "||";
|
||||
};
|
||||
status-icons = {
|
||||
paused = "▶";
|
||||
};
|
||||
};
|
||||
|
||||
"custom/cava" = {
|
||||
exec = "sh ~/.config/waybar/cava.sh";
|
||||
format = "{} ♪";
|
||||
};
|
||||
|
||||
wireplumber = {
|
||||
format = "{volume}%";
|
||||
format-muted = "";
|
||||
max-volume = 110;
|
||||
scroll-step = 0.2;
|
||||
};
|
||||
|
||||
"group/hardware" = {
|
||||
orientation = "horizontal";
|
||||
modules = [
|
||||
"cpu"
|
||||
"network"
|
||||
"memory"
|
||||
"disk"
|
||||
"temperature"
|
||||
];
|
||||
};
|
||||
|
||||
network = {
|
||||
# Wifi
|
||||
tooltip = true;
|
||||
format-wifi = "{icon} ";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
rotate = 0;
|
||||
|
||||
# Ethernet
|
||||
format-ethernet = "ᯤ";
|
||||
tooltip-format = "Network: <big><b>{essid}</b></big>\nSignal strength: <b>{signaldBm}dBm ({signalStrength}%)</b>\nFrequency: <b>{frequency}MHz</b>\nInterface: <b>{ifname}</b>\nIP: <b>{ipaddr}/{cidr}</b>\nGateway: <b>{gwaddr}</b>\nNetmask: <b>{netmask}</b>\nCurrent : <b>{bandwidthTotalBits}</b>\nUp : <b>{bandwidthUpBits}</b>\nDown : <b>{bandwidthDownBits}</b>";
|
||||
format-linked = " {ifname} (No IP)";
|
||||
format-disconnected = " ";
|
||||
tooltip-format-disconnected = "Disconnected";
|
||||
on-click = "/usr/local/bin/ags -t ControlPanel";
|
||||
interval = 2;
|
||||
};
|
||||
|
||||
memory = {
|
||||
interval = 1;
|
||||
rotate = 270;
|
||||
format = "{icon}";
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
max-length = 10;
|
||||
};
|
||||
|
||||
cpu = {
|
||||
interval = 1;
|
||||
format = "{icon}";
|
||||
rotate = 270;
|
||||
format-icons = [
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
""
|
||||
];
|
||||
};
|
||||
|
||||
temperature = {
|
||||
format = "{temperatureC}°C ";
|
||||
thermal-zone = 0;
|
||||
hwmon-path = "/sys/class/hwmon/hwmon0/temp1_input";
|
||||
critical-threshold = 80;
|
||||
};
|
||||
|
||||
disk = {
|
||||
format = "{percentage_free}% ";
|
||||
tooltip = true;
|
||||
tooltip-format = "{free} / {total} ({percentage_free})";
|
||||
};
|
||||
|
||||
clock = {
|
||||
format = "{:%a %b %d, %I:%M %p}";
|
||||
rotate = 0;
|
||||
on-click = " ";
|
||||
tooltip-format = "<tt>{calendar}</tt>";
|
||||
calendar = {
|
||||
mode = "month";
|
||||
mode-mon-col = 3;
|
||||
on-scroll = 1;
|
||||
on-click-right = "mode";
|
||||
format = {
|
||||
months = "<span color='#cba6f7'><b>{}</b></span>";
|
||||
weekdays = "<span color='#74c7ec'><b>{}</b></span>";
|
||||
today = "<span color='#f38ba8'><b>{}</b></span>";
|
||||
};
|
||||
};
|
||||
actions = {
|
||||
on-click-right = "mode";
|
||||
on-click-forward = "tz_up";
|
||||
on-click-backward = "tz_down";
|
||||
on-scroll-up = "shift_up";
|
||||
on-scroll-down = "shift_down";
|
||||
};
|
||||
};
|
||||
|
||||
"custom/nixicon" = {
|
||||
format = "";
|
||||
on-click = "rofi -show drun -theme $HOME/.config/rofi/custom.rasi";
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/weather" = {
|
||||
format = "{}";
|
||||
exec = "curl -s 'wttr.in/52.281311,10.527029?format=2'";
|
||||
interval = 60;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/weather-side" = {
|
||||
format = "{}";
|
||||
exec = "curl -s 'wttr.in/52.281311,10.527029?format=1'";
|
||||
interval = 60;
|
||||
tooltip = false;
|
||||
};
|
||||
|
||||
"custom/notification" = {
|
||||
tooltip = false;
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
notification = "<span foreground='red'><sup></sup></span>";
|
||||
none = " ";
|
||||
dnd-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-none = " ";
|
||||
inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
inhibited-none = " ";
|
||||
dnd-inhibited-notification = "<span foreground='red'><sup></sup></span>";
|
||||
dnd-inhibited-none = " ";
|
||||
};
|
||||
return-type = "json";
|
||||
exec-if = "which swaync-client";
|
||||
exec = "swaync-client -swb";
|
||||
on-click = "swaync-client -t -sw";
|
||||
on-click-right = "swaync-client -d -sw";
|
||||
escape = true;
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
42
programs/wm/common/waybar/configs/cava.sh
Normal file
@@ -0,0 +1,42 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Not my own work. Credit to original author
|
||||
|
||||
#----- Optimized bars animation without much CPU usage increase --------
|
||||
bar="▁▂▃▄▅▆▇█"
|
||||
dict="s/;//g"
|
||||
|
||||
# Calculate the length of the bar outside the loop
|
||||
bar_length=${#bar}
|
||||
|
||||
# Create dictionary to replace char with bar
|
||||
for ((i = 0; i < bar_length; i++)); do
|
||||
dict+=";s/$i/${bar:$i:1}/g"
|
||||
done
|
||||
|
||||
# Create cava config
|
||||
config_file="/tmp/bar_cava_config"
|
||||
cat >"$config_file" <<EOF
|
||||
[general]
|
||||
# Older systems show significant CPU use with default framerate
|
||||
# Setting maximum framerate to 30
|
||||
# You can increase the value if you wish
|
||||
framerate = 60
|
||||
bars = 14
|
||||
|
||||
[input]
|
||||
method = pulse
|
||||
source = auto
|
||||
|
||||
[output]
|
||||
method = raw
|
||||
raw_target = /dev/stdout
|
||||
data_format = ascii
|
||||
ascii_max_range = 7
|
||||
EOF
|
||||
|
||||
# Kill cava if it's already running
|
||||
pkill -f "cava -p $config_file"
|
||||
|
||||
# Read stdout from cava and perform substitution in a single sed command
|
||||
cava -p "$config_file" | sed -u "$dict"
|
||||
26
programs/wm/common/waybar/configs/mocha.css
Normal file
@@ -0,0 +1,26 @@
|
||||
@define-color rosewater #f5e0dc;
|
||||
@define-color flamingo #f2cdcd;
|
||||
@define-color pink #f5c2e7;
|
||||
@define-color mauve #cba6f7;
|
||||
@define-color red #f38ba8;
|
||||
@define-color maroon #eba0ac;
|
||||
@define-color peach #fab387;
|
||||
@define-color yellow #f9e2af;
|
||||
@define-color green #a6e3a1;
|
||||
@define-color teal #94e2d5;
|
||||
@define-color sky #89dceb;
|
||||
@define-color sapphire #74c7ec;
|
||||
@define-color blue #89b4fa;
|
||||
@define-color lavender #b4befe;
|
||||
@define-color text #cdd6f4;
|
||||
@define-color subtext1 #bac2de;
|
||||
@define-color subtext0 #a6adc8;
|
||||
@define-color overlay2 #9399b2;
|
||||
@define-color overlay1 #7f849c;
|
||||
@define-color overlay0 #6c7086;
|
||||
@define-color surface2 #585b70;
|
||||
@define-color surface1 #45475a;
|
||||
@define-color surface0 #313244;
|
||||
@define-color base #1e1e2e;
|
||||
@define-color mantle #181825;
|
||||
@define-color crust #11111b;
|
||||
17
programs/wm/common/waybar/configs/side.css
Normal file
@@ -0,0 +1,17 @@
|
||||
@import "mocha.css";
|
||||
|
||||
/* -- Global rules -- */
|
||||
* {
|
||||
border: none;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @crust;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
160
programs/wm/common/waybar/configs/style.css
Normal file
@@ -0,0 +1,160 @@
|
||||
@import "mocha.css";
|
||||
|
||||
/* -- Global rules -- */
|
||||
* {
|
||||
border: none;
|
||||
font-family: "JetbrainsMono Nerd Font";
|
||||
font-size: 15px;
|
||||
min-height: 10px;
|
||||
}
|
||||
|
||||
window#waybar {
|
||||
background: @crust;
|
||||
}
|
||||
|
||||
window#waybar.hidden {
|
||||
opacity: 0.2;
|
||||
}
|
||||
|
||||
/* - Genera rules for visible modules -- */
|
||||
#media,
|
||||
#clock,
|
||||
#cpu,
|
||||
#memory,
|
||||
#disk,
|
||||
#temperature,
|
||||
#network {
|
||||
color: @crust;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
transition: none;
|
||||
}
|
||||
|
||||
/* Separation to the left */
|
||||
#custom-nixicon,
|
||||
#cpu {
|
||||
margin-left: 5px;
|
||||
border-top-left-radius: 10px;
|
||||
border-bottom-left-radius: 10px;
|
||||
}
|
||||
|
||||
/* Separation to the rigth */
|
||||
#clock,
|
||||
#temperature {
|
||||
margin-right: 20px;
|
||||
border-top-right-radius: 10px;
|
||||
border-bottom-right-radius: 10px;
|
||||
}
|
||||
|
||||
/* -- Specific styles -- */
|
||||
|
||||
#custom-nixicon {
|
||||
font-size: 20px;
|
||||
color: @sapphire;
|
||||
background: @overlay1;
|
||||
padding: 0px;
|
||||
padding-right: 15px;
|
||||
padding-left: 10px;
|
||||
margin-top: 6px;
|
||||
margin-bottom: 6px;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
/* Hardware Group */
|
||||
#clock {
|
||||
background: @yellow;
|
||||
}
|
||||
|
||||
#cpu {
|
||||
background: @blue;
|
||||
}
|
||||
|
||||
#memory {
|
||||
background: @red;
|
||||
}
|
||||
|
||||
#disk {
|
||||
background: @peach;
|
||||
}
|
||||
|
||||
#temperature {
|
||||
background: @sky;
|
||||
}
|
||||
|
||||
#network {
|
||||
background: @lavender;
|
||||
padding-right: 13px;
|
||||
}
|
||||
|
||||
/* Workspace */
|
||||
#workspaces {
|
||||
border-radius: 10px;
|
||||
margin: 6px 5px;
|
||||
padding: 0px 6px;
|
||||
}
|
||||
|
||||
#workspaces button {
|
||||
color: @text;
|
||||
background: transparent;
|
||||
padding: 4px 4px;
|
||||
transition: color 0.3s ease, text-shadow 0.3s ease, transform 0.3s ease;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button.occupied {
|
||||
color: @red;
|
||||
}
|
||||
|
||||
#workspaces button.active {
|
||||
color: @green;
|
||||
text-shadow: 0 0 4px @green;
|
||||
}
|
||||
|
||||
#workspaces button:hover {
|
||||
color: @teal;
|
||||
border: none;
|
||||
}
|
||||
|
||||
#workspaces button.active:hover {}
|
||||
|
||||
|
||||
|
||||
/* Media Group */
|
||||
#media {
|
||||
background: @overlay2;
|
||||
border-radius: 10px;
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
#custom-cava {
|
||||
color: @green;
|
||||
}
|
||||
|
||||
#wireplumber, #custom-cava, #mpris {
|
||||
margin-left: 10px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
#wireplumber {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* Weather */
|
||||
#custom-weather {
|
||||
background: @overlay2;
|
||||
border-radius: 10px;
|
||||
margin: 5px 20px;
|
||||
padding: 0px 10px;
|
||||
}
|
||||
|
||||
/* SwayNC */
|
||||
#custom-notification {
|
||||
font-family: "NotoSansMono Nerd Font";
|
||||
background: @green;
|
||||
border-radius: 10px;
|
||||
padding-left: 10px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
32
programs/wm/common/waybar/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
pkgs,
|
||||
monitorSetup,
|
||||
...
|
||||
}:
|
||||
{
|
||||
programs.waybar =
|
||||
{
|
||||
enable = true;
|
||||
package = pkgs.waybar;
|
||||
}
|
||||
// (
|
||||
if monitorSetup == "single" then
|
||||
import ./single.nix
|
||||
else if monitorSetup == "dual" then
|
||||
import ./dual.nix
|
||||
else if monitorSetup == "side" then
|
||||
import ./side.nix
|
||||
else
|
||||
{ }
|
||||
);
|
||||
|
||||
home.file.".config/waybar/cava.sh".source = ./configs/cava.sh;
|
||||
home.file.".config/waybar/mocha.css".source = ./configs/mocha.css;
|
||||
|
||||
home.file.".config/waybar" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
}
|
||||
47
programs/wm/common/waybar/dual.nix
Normal file
@@ -0,0 +1,47 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [ "DP-1" ];
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
"custom/notification"
|
||||
];
|
||||
modules-right = [
|
||||
"group/hardware"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
|
||||
secondBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
output = [ "HDMI-A-2" ];
|
||||
modules-left = [ "group/media" ];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [ "custom/weather" ];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
|
||||
}
|
||||
36
programs/wm/common/waybar/side.nix
Normal file
@@ -0,0 +1,36 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "left";
|
||||
#height = 30;
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
"custom/cava"
|
||||
"mpris"
|
||||
"wireplumber"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/weather-side"
|
||||
"cpu"
|
||||
"network"
|
||||
"memory"
|
||||
"disk"
|
||||
"temperature"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
}
|
||||
30
programs/wm/common/waybar/single.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
let
|
||||
common = import ./common.nix;
|
||||
wm = import ./wm.nix;
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
settings = {
|
||||
mainBar =
|
||||
{
|
||||
layer = "top";
|
||||
position = "top";
|
||||
height = 30;
|
||||
modules-left = [
|
||||
"custom/nixicon"
|
||||
"clock"
|
||||
"group/media"
|
||||
];
|
||||
modules-center = [
|
||||
"hyprland/workspaces"
|
||||
"niri/workspaces"
|
||||
];
|
||||
modules-right = [
|
||||
"custom/weather"
|
||||
"group/hardware"
|
||||
];
|
||||
}
|
||||
// common.widgets
|
||||
// wm.widgets;
|
||||
};
|
||||
}
|
||||
19
programs/wm/common/waybar/wm.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
widgets = {
|
||||
"hyprland/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
active = "";
|
||||
};
|
||||
};
|
||||
|
||||
"niri/workspaces" = {
|
||||
format = "{icon}";
|
||||
format-icons = {
|
||||
default = "";
|
||||
active = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
31
programs/wm/default.nix
Normal file
@@ -0,0 +1,31 @@
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./common/kitty.nix
|
||||
./common/waybar
|
||||
./common/cava.nix
|
||||
./common/rofi
|
||||
./xdg.nix
|
||||
./common/neovim
|
||||
./common/audio.nix
|
||||
];
|
||||
|
||||
gtk = {
|
||||
enable = true;
|
||||
|
||||
theme = {
|
||||
package = pkgs.flat-remix-gtk;
|
||||
name = "Flat-Remix-GTK-Grey-Darkest";
|
||||
};
|
||||
|
||||
iconTheme = {
|
||||
package = pkgs.adwaita-icon-theme;
|
||||
name = "Adwaita";
|
||||
};
|
||||
|
||||
font = {
|
||||
name = "Sans";
|
||||
size = 12;
|
||||
};
|
||||
};
|
||||
}
|
||||
78
programs/wm/hyprland/configs/mocha.conf
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
$rosewater = rgb(f5e0dc)
|
||||
$rosewaterAlpha = f5e0dc
|
||||
|
||||
$flamingo = rgb(f2cdcd)
|
||||
$flamingoAlpha = f2cdcd
|
||||
|
||||
$pink = rgb(f5c2e7)
|
||||
$pinkAlpha = f5c2e7
|
||||
|
||||
$mauve = rgb(cba6f7)
|
||||
$mauveAlpha = cba6f7
|
||||
|
||||
$red = rgb(f38ba8)
|
||||
$redAlpha = f38ba8
|
||||
|
||||
$maroon = rgb(eba0ac)
|
||||
$maroonAlpha = eba0ac
|
||||
|
||||
$peach = rgb(fab387)
|
||||
$peachAlpha = fab387
|
||||
|
||||
$yellow = rgb(f9e2af)
|
||||
$yellowAlpha = f9e2af
|
||||
|
||||
$green = rgb(a6e3a1)
|
||||
$greenAlpha = a6e3a1
|
||||
|
||||
$teal = rgb(94e2d5)
|
||||
$tealAlpha = 94e2d5
|
||||
|
||||
$sky = rgb(89dceb)
|
||||
$skyAlpha = 89dceb
|
||||
|
||||
$sapphire = rgb(74c7ec)
|
||||
$sapphireAlpha = 74c7ec
|
||||
|
||||
$blue = rgb(89b4fa)
|
||||
$blueAlpha = 89b4fa
|
||||
|
||||
$lavender = rgb(b4befe)
|
||||
$lavenderAlpha = b4befe
|
||||
|
||||
$text = rgb(cdd6f4)
|
||||
$textAlpha = cdd6f4
|
||||
|
||||
$subtext1 = rgb(bac2de)
|
||||
$subtext1Alpha = bac2de
|
||||
|
||||
$subtext0 = rgb(a6adc8)
|
||||
$subtext0Alpha = a6adc8
|
||||
|
||||
$overlay2 = rgb(9399b2)
|
||||
$overlay2Alpha = 9399b2
|
||||
|
||||
$overlay1 = rgb(7f849c)
|
||||
$overlay1Alpha = 7f849c
|
||||
|
||||
$overlay0 = rgb(6c7086)
|
||||
$overlay0Alpha = 6c7086
|
||||
|
||||
$surface2 = rgb(585b70)
|
||||
$surface2Alpha = 585b70
|
||||
|
||||
$surface1 = rgb(45475a)
|
||||
$surface1Alpha = 45475a
|
||||
|
||||
$surface0 = rgb(313244)
|
||||
$surface0Alpha = 313244
|
||||
|
||||
$base = rgb(1e1e2e)
|
||||
$baseAlpha = 1e1e2e
|
||||
|
||||
$mantle = rgb(181825)
|
||||
$mantleAlpha = 181825
|
||||
|
||||
$crust = rgb(11111b)
|
||||
$crustAlpha = 11111b
|
||||
50
programs/wm/hyprland/default.nix
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
imports = [
|
||||
./hyprland.nix
|
||||
./hypridle.nix
|
||||
./hyprlock.nix
|
||||
];
|
||||
home.packages = with pkgs; [
|
||||
grim
|
||||
slurp
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
home.file.".config/hypr" = {
|
||||
source = ./configs;
|
||||
# copy the scripts directory recursively
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file.".config/hypr/avatar" = {
|
||||
source = ../../../avatar;
|
||||
recursive = true;
|
||||
};
|
||||
|
||||
home.file = {
|
||||
"Pictures/Avatar" = {
|
||||
source = ../../../avatar;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
|
||||
home.pointerCursor = {
|
||||
gtk.enable = true;
|
||||
package = pkgs.bibata-cursors;
|
||||
name = "Bibata-Modern-Classic";
|
||||
size = 16;
|
||||
};
|
||||
|
||||
home.file.".config/hypr/hyprland.conf".enable = false;
|
||||
|
||||
# NOTE: this executable is used by greetd to start a wayland session when system boot up
|
||||
# with such a vendor-no-locking script, we can switch to another wayland compositor without modifying greetd's config in NixOS module
|
||||
home.file.".wayland-session" = {
|
||||
source = "${pkgs.hyprland}/bin/Hyprland";
|
||||
executable = true;
|
||||
};
|
||||
}
|
||||
35
programs/wm/hyprland/hypridle.nix
Normal file
@@ -0,0 +1,35 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hypridle
|
||||
];
|
||||
|
||||
# Hypridle configuration
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
before_sleep_cmd = ''
|
||||
notify-send -u critical "Hey master, I’m getting sleepy… I’ll see you in my code dreams 💖" --icon
|
||||
="$HOME/.config/hypr/avatar.png" --app-name="Hyprlock"'';
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 300;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 600;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
269
programs/wm/hyprland/hyprland.nix
Normal file
@@ -0,0 +1,269 @@
|
||||
{ pkgs, ... }:
|
||||
let
|
||||
package = pkgs.hyprland;
|
||||
super = "SUPER";
|
||||
terminal = "kitty";
|
||||
fileManager = "yazi";
|
||||
theme = "-theme $HOME/.config/rofi/custom.rasi";
|
||||
menu = "rofi -show drun ${theme}";
|
||||
filebrowser = "rofi -show filebrowser ${theme}";
|
||||
power = "rofi -show p -modi p:rofi-power-menu -theme $HOME/.config/rofi/power.rasi";
|
||||
apps = "rofi -show window ${theme}";
|
||||
in
|
||||
{
|
||||
|
||||
systemd.user.targets.hyprland-sessionn.Unit.Wants = [
|
||||
"xdg-desktop-autostart.target"
|
||||
];
|
||||
|
||||
wayland.windowManager.hyprland = {
|
||||
inherit package;
|
||||
enable = true;
|
||||
|
||||
xwayland.enable = true;
|
||||
|
||||
systemd = {
|
||||
enable = true;
|
||||
variables = [ "--all" ];
|
||||
enableXdgAutostart = true;
|
||||
};
|
||||
|
||||
plugins = [
|
||||
#inputs.hyprland-plugins.packages.${pkgs.stdenv.hostPlatform.system}.hyprbars
|
||||
];
|
||||
};
|
||||
|
||||
wayland.windowManager.hyprland.settings = {
|
||||
source = [
|
||||
"~/.config/hypr/mocha.conf"
|
||||
];
|
||||
|
||||
env = [
|
||||
"NIXOS_OZONE_WL,1"
|
||||
"MOZ_ENABLE_WAYLAND,1"
|
||||
"MOZ_WEBRENDER,1"
|
||||
"_JAVA_AWT_WM_NONREPARENTING,1"
|
||||
"QT_WAYLAND_DISABLE_WINDOWDECORATION,1"
|
||||
"QT_QPA_PLATFORM,wayland"
|
||||
"SDL_VIDEODRIVER,wayland"
|
||||
"GDK_BACKEND,wayland,x11"
|
||||
"XCURSOR_SIZE,24"
|
||||
"EDITOR,nvim"
|
||||
];
|
||||
|
||||
monitor = [
|
||||
"DP-1, 1920x1080@60, 1920x0, 1"
|
||||
"HDMI-A-2, 1920x1080@60, 0x0, 1"
|
||||
];
|
||||
|
||||
input = {
|
||||
kb_layout = "de";
|
||||
kb_variant = "mac";
|
||||
repeat_rate = 50;
|
||||
repeat_delay = 300;
|
||||
|
||||
accel_profile = "flat";
|
||||
follow_mouse = 1;
|
||||
mouse_refocus = false;
|
||||
sensitivity = 0; # -1.0 to 1.0, 0 means no modification.
|
||||
|
||||
numlock_by_default = 1;
|
||||
touchpad = {
|
||||
natural_scroll = true;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
general = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
gaps_in = 4;
|
||||
gaps_out = 0;
|
||||
border_size = 4;
|
||||
|
||||
"col.active_border" = "$green";
|
||||
"col.inactive_border" = "$red";
|
||||
|
||||
layout = "dwindle";
|
||||
|
||||
# Please see https://wiki.hyprland.org/Configuring/Tearing/ before you turn this on
|
||||
allow_tearing = false;
|
||||
};
|
||||
|
||||
decoration = {
|
||||
rounding = 1;
|
||||
|
||||
shadow = {
|
||||
enabled = false;
|
||||
range = 16;
|
||||
render_power = 4;
|
||||
ignore_window = true;
|
||||
color = "$green";
|
||||
color_inactive = "$red";
|
||||
};
|
||||
|
||||
blur = {
|
||||
enabled = true;
|
||||
size = 1;
|
||||
passes = 3;
|
||||
new_optimizations = 1;
|
||||
noise = 0.04;
|
||||
};
|
||||
};
|
||||
|
||||
animations = {
|
||||
enabled = "yes";
|
||||
bezier = "myBezier, 0.05, 0.9, 0.1, 1.05";
|
||||
animation = [
|
||||
"windows, 1, 7, myBezier"
|
||||
"windowsOut, 1, 7, default, popin 80%"
|
||||
"border, 1, 10, default"
|
||||
"borderangle, 1, 8, default"
|
||||
"fade, 1, 7, default"
|
||||
"workspaces, 1, 6, default"
|
||||
];
|
||||
};
|
||||
|
||||
layerrule = [
|
||||
"blur,gtk-layer-shell"
|
||||
"ignorezero,gtk-layer-shell"
|
||||
"blur,notifications"
|
||||
"ignorezero,notifications"
|
||||
"blur,rofi"
|
||||
"ignorezero,rofi"
|
||||
];
|
||||
|
||||
dwindle = {
|
||||
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
|
||||
pseudotile = "yes"; # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
|
||||
preserve_split = "yes"; # you probably want this
|
||||
};
|
||||
|
||||
gestures = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
workspace_swipe = "off";
|
||||
};
|
||||
|
||||
misc = {
|
||||
# See https://wiki.hyprland.org/Configuring/Variables/ for more
|
||||
force_default_wallpaper = 0; # Set to 0 or 1 to disable the anime mascot wallpapers
|
||||
};
|
||||
|
||||
# Example per-device config
|
||||
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
|
||||
device = {
|
||||
name = "epic-mouse-v1";
|
||||
sensitivity = -0.5;
|
||||
};
|
||||
|
||||
windowrulev2 = "suppressevent maximize, class:.*";
|
||||
|
||||
windowrule = [
|
||||
"opacity 0.0 override, class:^(xwaylandvideobridge)$"
|
||||
"noanim, class:^(xwaylandvideobridge)$"
|
||||
"noinitialfocus, class:^(xwaylandvideobridge)$"
|
||||
"maxsize 1 1, class:^(xwaylandvideobridge)$"
|
||||
"noblur, class:^(xwaylandvideobridge)$"
|
||||
"nofocus, class:^(xwaylandvideobridge)$"
|
||||
];
|
||||
|
||||
# See further https://wiki.hypr.land/Configuring/Workspace-Rules/
|
||||
exec-once = [
|
||||
"waybar &"
|
||||
#"hyprpaper &"
|
||||
#"wpaperd -d"
|
||||
"swww-daemon & disown"
|
||||
];
|
||||
|
||||
# Keybindings
|
||||
bind = [
|
||||
|
||||
# Application Bindings
|
||||
"${super}, Q, exec, ${terminal}"
|
||||
"${super}, E, exec, ${fileManager}"
|
||||
"${super}, O, exec, obsidian"
|
||||
"${super}, I, exec, floorp"
|
||||
"${super}, G, exec, thunderbird"
|
||||
|
||||
# Lock Screen
|
||||
"${super}, M, exit, "
|
||||
|
||||
# swaync
|
||||
"${super}, Y, exec, swaync-client -t -sw"
|
||||
|
||||
# Rofi bindings
|
||||
"${super}, F, exec, ${filebrowser}"
|
||||
"${super}, A, exec, ${apps}"
|
||||
"${super}, R, exec, ${menu}"
|
||||
"${super}, S, exec, ${power}"
|
||||
|
||||
# Move focus with mainMod + arrow keys
|
||||
"${super}, left, movefocus, l"
|
||||
"${super}, right, movefocus, r"
|
||||
"${super}, up, movefocus, u"
|
||||
"${super}, down, movefocus, d"
|
||||
|
||||
# Window Modifiers
|
||||
"${super}, P, pseudo, " # dwindle
|
||||
"${super}, J, togglesplit, " # dwindle
|
||||
"${super}, V, togglefloating, " # dwindle
|
||||
"${super}, C, killactive, "
|
||||
|
||||
# Switch workspaces with mainMod + [0-9]
|
||||
"${super}, 1, workspace, 1"
|
||||
"${super}, 2, workspace, 2"
|
||||
"${super}, 3, workspace, 3"
|
||||
"${super}, 4, workspace, 4"
|
||||
"${super}, 5, workspace, 5"
|
||||
"${super}, 6, workspace, 6"
|
||||
"${super}, 7, workspace, 7"
|
||||
"${super}, 8, workspace, 8"
|
||||
"${super}, 9, workspace, 9"
|
||||
"${super}, 0, workspace, 10"
|
||||
|
||||
# Move active window to a workspace with mainMod + SHIFT + [0-9]
|
||||
"${super} SHIFT, 1, movetoworkspace, 1"
|
||||
"${super} SHIFT, 2, movetoworkspace, 2"
|
||||
"${super} SHIFT, 3, movetoworkspace, 3"
|
||||
"${super} SHIFT, 4, movetoworkspace, 4"
|
||||
"${super} SHIFT, 5, movetoworkspace, 5"
|
||||
"${super} SHIFT, 6, movetoworkspace, 6"
|
||||
"${super} SHIFT, 7, movetoworkspace, 7"
|
||||
"${super} SHIFT, 8, movetoworkspace, 8"
|
||||
"${super} SHIFT, 9, movetoworkspace, 9"
|
||||
"${super} SHIFT, 0, movetoworkspace, 10"
|
||||
|
||||
# Example special workspace (scratchpad)
|
||||
#"${super}, S, togglespecialworkspace, magic"
|
||||
"${super} SHIFT, S, movetoworkspace, special:magic"
|
||||
|
||||
# Scroll through existing workspaces with mainMod + scroll
|
||||
"${super}, mouse_down, workspace, e+1"
|
||||
"${super}, mouse_up, workspace, e-1"
|
||||
|
||||
# Screenshot
|
||||
''${super}, Z, exec, grim -g "$(slurp)" $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
''${super}, U, exec, grim $HOME/Pictures/Screenshots/$(date +'%s_grim.png')''
|
||||
];
|
||||
|
||||
bindl = [
|
||||
#", XF86AudioMute, exec, amixer set Master toggle
|
||||
", XF86AudioMute, exec, pamixer -t"
|
||||
", XF86AudioPlay, exec, playerctl play-pause" # the stupid key is called play , but it toggles
|
||||
", XF86AudioNext, exec, playerctl next"
|
||||
", XF86AudioPrev, exec, playerctl previous"
|
||||
];
|
||||
|
||||
bindle = [
|
||||
# Multi Media Control
|
||||
", XF86AudioRaiseVolume, exec, pamixer -i 5"
|
||||
", XF86AudioLowerVolume, exec, pamixer -d 5"
|
||||
", XF86MonBrightnessUp, exec, brightnessctl set +5%"
|
||||
", XF86MonBrightnessDown, exec, brightnessctl set 5%-"
|
||||
];
|
||||
|
||||
bindm = [
|
||||
"${super}, mouse:272, movewindow"
|
||||
"${super}, mouse:273, resizewindow"
|
||||
];
|
||||
};
|
||||
}
|
||||
120
programs/wm/hyprland/hyprlock.nix
Normal file
@@ -0,0 +1,120 @@
|
||||
{ pkgs, catppuccin, ... }:
|
||||
|
||||
{
|
||||
# Hyprland and related packages
|
||||
home.packages = with pkgs; [
|
||||
hyprlock
|
||||
];
|
||||
|
||||
catppuccin.hyprlock.enable = false;
|
||||
|
||||
# Hyprlock configuration
|
||||
programs.hyprlock = {
|
||||
enable = true;
|
||||
settings = {
|
||||
|
||||
source = "$HOME/.config/hypr/mocha.conf";
|
||||
|
||||
"$accent" = "$mauve";
|
||||
"$accentAlpha" = "$mauveAlpha";
|
||||
"$font" = "JetBrainsMono Nerd Font";
|
||||
|
||||
general = {
|
||||
disable_loading_bar = true;
|
||||
hide_cursor = true;
|
||||
};
|
||||
|
||||
background = [
|
||||
{
|
||||
path = "~/Pictures/Wallpapers/lucy_with_cat.png";
|
||||
blur_passes = 1;
|
||||
blur_size = 5;
|
||||
}
|
||||
];
|
||||
|
||||
label = [
|
||||
# TIME
|
||||
{
|
||||
monitor = "";
|
||||
text = "$TIME";
|
||||
color = "$peach";
|
||||
font_size = 90;
|
||||
font_family = "$font";
|
||||
position = "0, -100";
|
||||
halign = "center";
|
||||
valign = "top";
|
||||
}
|
||||
|
||||
# DATE
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:43200000] date +"%A, %d %B %Y"'';
|
||||
color = "$peach";
|
||||
font_size = 25;
|
||||
font_family = "$font";
|
||||
position = "0, 100";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
|
||||
# Message
|
||||
{
|
||||
monitor = "";
|
||||
text = "Waiting for you...";
|
||||
color = "$peach";
|
||||
font_size = 20;
|
||||
font_family = "$font";
|
||||
position = "0, 200";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
|
||||
# Weather
|
||||
{
|
||||
monitor = "";
|
||||
text = ''cmd[update:60000] curl -s "wttr.in/52.281311,10.527029?format=1"'';
|
||||
color = "$peach";
|
||||
font_size = 20;
|
||||
font_family = "$font";
|
||||
position = "0, 50";
|
||||
halign = "center";
|
||||
valign = "bottom";
|
||||
}
|
||||
];
|
||||
|
||||
# INPUT FIELD
|
||||
input-field = {
|
||||
monitor = "";
|
||||
size = "300, 60";
|
||||
outline_thickness = 4;
|
||||
dots_size = 0.2;
|
||||
dots_spacing = 0.2;
|
||||
dots_center = "true";
|
||||
outer_color = "$red";
|
||||
inner_color = "$surface0";
|
||||
font_color = "$text";
|
||||
fade_on_empty = false;
|
||||
placeholder_text = ''<span foreground="##$textAlpha"><i> Logged in as </i><span foreground="##$accentAlpha">$USER</span></span>'';
|
||||
hide_input = false;
|
||||
check_color = "$accent";
|
||||
fail_color = "$red";
|
||||
fail_text = "<i>$FAIL <b>($ATTEMPTS)</b></i>";
|
||||
capslock_color = "$yellow";
|
||||
position = "0, -150";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
|
||||
image = {
|
||||
monitor = "";
|
||||
path = "~/.config/hypr/avatar/avatar.png";
|
||||
size = 300;
|
||||
border_color = "$teal";
|
||||
position = "0, 75";
|
||||
halign = "center";
|
||||
valign = "center";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
}
|
||||
110
programs/wm/niri/config.kdl
Normal file
@@ -0,0 +1,110 @@
|
||||
input {
|
||||
keyboard {
|
||||
xkb {
|
||||
layout "de"
|
||||
}
|
||||
}
|
||||
|
||||
touchpad {
|
||||
tap
|
||||
natural-scroll
|
||||
}
|
||||
}
|
||||
|
||||
output "DP-1" {
|
||||
position x=1920 y=0
|
||||
}
|
||||
|
||||
output "HDMI-A-2" {
|
||||
position x=0 y=0
|
||||
}
|
||||
|
||||
layout {
|
||||
gaps 16
|
||||
center-focused-column "always"
|
||||
|
||||
focus-ring {
|
||||
//off
|
||||
width 2
|
||||
active-color "#1e1e2e55"
|
||||
inactive-color "#11111b55"
|
||||
|
||||
}
|
||||
|
||||
border {
|
||||
off
|
||||
width 2
|
||||
active-color "#a6e3a1"
|
||||
inactive-color "#f38ba8"
|
||||
|
||||
}
|
||||
|
||||
shadow {
|
||||
//on
|
||||
softness 30
|
||||
spread 5
|
||||
offset x=0 y=5
|
||||
color "0007"
|
||||
}
|
||||
}
|
||||
|
||||
spawn-at-startup "waybar"
|
||||
spawn-at-startup "swaync"
|
||||
spawn-at-startup "while true; do sleep 300; $HOME/.config/hypr/rotate-wallpaper.sh"
|
||||
screenshot-path "~/Pictures/Screenshots/%Y-%m-%d_%H-%M-%S.png"
|
||||
|
||||
binds {
|
||||
// Special Keys
|
||||
XF86AudioMute { spawn "pamixer" "-t"; }
|
||||
XF86AudioPlay { spawn "playerctl" "play-pause"; }
|
||||
XF86AudioNext { spawn "playerctl" "next"; }
|
||||
XF86AudioPrev { spawn "playerctl" "previous"; }
|
||||
XF86AudioRaiseVolume { spawn "pamixer" "-i" "5"; }
|
||||
XF86AudioLowerVolume { spawn "pamixer" "-d" "5"; }
|
||||
XF86MonBrightnessUp { spawn "brightnessctl" "set" "+5%"; }
|
||||
XF86MonBrightnessDown { spawn "brightnessctl" "set" "5%-"; }
|
||||
|
||||
// Application Bindings
|
||||
Super+Q { spawn "kitty"; }
|
||||
Super+E { spawn "yazi"; }
|
||||
Super+O { spawn "obsidian"; }
|
||||
Super+I { spawn "floorp"; }
|
||||
Super+G { spawn "thunderbird"; }
|
||||
|
||||
// Lock Screen
|
||||
Super+M { quit; }
|
||||
|
||||
// Rofi Bindings
|
||||
Super+F { spawn "rofi" "-show" "filebrowser" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+A { spawn "rofi" "-show" "window" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+R { spawn "rofi" "-show" "drun" "-theme" ".config/rofi/custom.rasi"; }
|
||||
Super+S { spawn "rofi" "-show" "p" "-modi" "p:rofi-power-menu" "-theme" ".config/rofi/power.rasi"; }
|
||||
|
||||
// Screenshot
|
||||
Super+Z { screenshot-screen; }
|
||||
Super+U { screenshot-window; }
|
||||
|
||||
|
||||
// Window Keys
|
||||
Super+V { toggle-window-floating; }
|
||||
Super+Plus { set-column-width "+10%"; }
|
||||
Super+Minus { set-column-width "-10%"; }
|
||||
Super+Shift+Plus { set-window-height "+10%"; }
|
||||
Super+Shift+Minus { set-window-height "-10%"; }
|
||||
Super+C { close-window; }
|
||||
|
||||
// Switch Workspaces
|
||||
Super+1 { focus-workspace 1; }
|
||||
Super+2 { focus-workspace 2; }
|
||||
Super+3 { focus-workspace 3; }
|
||||
Super+4 { focus-workspace 4; }
|
||||
Super+5 { focus-workspace 5; }
|
||||
Super+6 { focus-workspace 6; }
|
||||
Super+7 { focus-workspace 7; }
|
||||
Super+8 { focus-workspace 8; }
|
||||
Super+9 { focus-workspace 9; }
|
||||
|
||||
// Focus Window
|
||||
Super+Shift+Left { focus-column-left; }
|
||||
Super+Shift+Right { focus-column-right; }
|
||||
}
|
||||
14
programs/wm/niri/default.nix
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
pkgs,
|
||||
...
|
||||
}:
|
||||
{
|
||||
# imports = [ ./niri-switcher.nix ];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
niri
|
||||
xwayland-satellite
|
||||
];
|
||||
|
||||
xdg.configFile."niri/config.kdl".source = ./config.kdl;
|
||||
}
|
||||
6
programs/wm/niri/niri-switcher.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ ... }:
|
||||
{
|
||||
programs.niriswitcher = {
|
||||
enable = true;
|
||||
};
|
||||
}
|
||||
92
programs/wm/xdg.nix
Normal file
@@ -0,0 +1,92 @@
|
||||
{ pkgs, config, ... }:
|
||||
let
|
||||
browser = [ "floorp.desktop" ];
|
||||
|
||||
# XDG MIME types
|
||||
associations = {
|
||||
"application/x-extension-htm" = browser;
|
||||
"application/x-extension-html" = browser;
|
||||
"application/x-extension-shtml" = browser;
|
||||
"application/x-extension-xht" = browser;
|
||||
"application/x-extension-xhtml" = browser;
|
||||
"application/xhtml+xml" = browser;
|
||||
"text/html" = browser;
|
||||
"x-scheme-handler/about" = browser;
|
||||
"x-scheme-handler/chrome" = [ "chromium-browser.desktop" ];
|
||||
"x-scheme-handler/ftp" = browser;
|
||||
"x-scheme-handler/http" = browser;
|
||||
"x-scheme-handler/https" = browser;
|
||||
"x-scheme-handler/unknown" = browser;
|
||||
|
||||
"audio/*" = [ "mpv.desktop" ];
|
||||
"video/*" = [ "mpv.dekstop" ];
|
||||
"image/*" = [ "kitty-icat.desktop" ];
|
||||
"application/json" = browser;
|
||||
"application/pdf" = [ "kitty-tdf.desktop" ];
|
||||
"x-scheme-handler/discord" = [ "discordcanary.desktop" ];
|
||||
"x-scheme-handler/spotify" = [ "spotify.desktop" ];
|
||||
"x-scheme-handler/tg" = [ "telegramdesktop.desktop" ];
|
||||
};
|
||||
in
|
||||
{
|
||||
xdg = {
|
||||
enable = true;
|
||||
cacheHome = config.home.homeDirectory + "/.local/cache";
|
||||
|
||||
mimeApps = {
|
||||
enable = true;
|
||||
defaultApplications = associations;
|
||||
};
|
||||
|
||||
desktopEntries = {
|
||||
kitty-icat = {
|
||||
name = "Kitty Icat";
|
||||
exec = "kitty +kitten icat %F";
|
||||
terminal = true;
|
||||
type = "Application";
|
||||
mimeType = [ "image/*" ];
|
||||
categories = [
|
||||
"Viewer"
|
||||
"Graphics"
|
||||
];
|
||||
};
|
||||
|
||||
kitty-tdf = {
|
||||
name = "TDF PDF Viewer";
|
||||
exec = "kitty -e tdf %F";
|
||||
terminal = false; # Set to false since we're explicitly calling kitty
|
||||
type = "Application";
|
||||
mimeType = [ "application/pdf" ];
|
||||
categories = [
|
||||
"Viewer"
|
||||
"Office"
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
userDirs = {
|
||||
enable = true;
|
||||
createDirectories = true;
|
||||
extraConfig = {
|
||||
XDG_SCREENSHOTS_DIR = "${config.xdg.userDirs.pictures}/Screenshots";
|
||||
};
|
||||
};
|
||||
|
||||
portal = {
|
||||
enable = true;
|
||||
xdgOpenUsePortal = true;
|
||||
config = {
|
||||
common.default = [ "gtk" ];
|
||||
hyprland.default = [
|
||||
"gtk"
|
||||
"hyprland"
|
||||
];
|
||||
};
|
||||
|
||||
extraPortals = [
|
||||
pkgs.xdg-desktop-portal-gtk
|
||||
pkgs.xdg-desktop-portal-hyprland
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
{username, ...}: {
|
||||
{ username, ... }:
|
||||
{
|
||||
# Home Manager needs a bit of information about you and the
|
||||
# paths it should manage.
|
||||
home = {
|
||||
175
users/phil/config.jsonc
Normal file
@@ -0,0 +1,175 @@
|
||||
{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {
|
||||
"type": "kitty-icat",
|
||||
"source": "~/Pictures/Avatar/avatar_no_bg.png",
|
||||
//"height": 15,
|
||||
"width": 40,
|
||||
"padding": {
|
||||
"top": 0,
|
||||
"left": 0
|
||||
}
|
||||
},
|
||||
"modules": [
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌──────────────────────Hardware──────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "host",
|
||||
"key": " PC",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "cpu",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "gpu",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "disk",
|
||||
"key": "│ ├",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "memory",
|
||||
"key": "└ └",
|
||||
"keyColor": "green"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌──────────────────────Software──────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "os",
|
||||
"key": " OS",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "kernel",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "bios",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "packages",
|
||||
"key": "│ ├",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
{
|
||||
"type": "shell",
|
||||
"key": "└ └",
|
||||
"keyColor": "yellow"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "de",
|
||||
"key": " DE",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "lm",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "wm",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "wmtheme",
|
||||
"key": "│ ├",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "terminal",
|
||||
"key": "└ └",
|
||||
"keyColor": "blue"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌─────────────────Uptime / Age / DT──────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "command",
|
||||
"key": " OS Age ",
|
||||
"keyColor": "magenta",
|
||||
"text": "birth_install=$(stat -c %W /); current=$(date +%s); time_progression=$((current - birth_install)); days_difference=$((time_progression / 86400)); echo $days_difference days"
|
||||
},
|
||||
{
|
||||
"type": "uptime",
|
||||
"key": " Uptime ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "datetime",
|
||||
"key": " DateTime ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
"break",
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m┌─────────────────────Networking─────────────────────┐"
|
||||
},
|
||||
{
|
||||
"type": "publicip",
|
||||
"key": " Public ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "localip",
|
||||
"key": " Local ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "dns",
|
||||
"key": " DNS ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "netio",
|
||||
"key": " Net I/O ",
|
||||
"keyColor": "magenta"
|
||||
},
|
||||
{
|
||||
"type": "custom",
|
||||
"format": "\u001b[90m└────────────────────────────────────────────────────┘"
|
||||
},
|
||||
{
|
||||
"type": "colors",
|
||||
"paddingLeft": 2,
|
||||
"symbol": "circle"
|
||||
},
|
||||
"break",
|
||||
]
|
||||
}
|
||||
|
||||
11
users/phil/darwin.nix
Normal file
@@ -0,0 +1,11 @@
|
||||
{ config, lib, pkgs, inputs, username, ... }:
|
||||
{
|
||||
# macOS-specific user configuration
|
||||
# You can import shared home configurations here
|
||||
imports = [
|
||||
../../home/programs/productivity/okular.nix
|
||||
];
|
||||
|
||||
# macOS-specific home-manager settings
|
||||
home.stateVersion = "24.05"; # Match your existing version
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
{
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
monitorSetup,
|
||||
...
|
||||
}:
|
||||
{
|
||||
##################################################################################################################
|
||||
#
|
||||
# All Phil's Home Manager Configuration
|
||||
#
|
||||
##################################################################################################################
|
||||
|
||||
imports = [
|
||||
../core.nix # Setup Home Manager
|
||||
inputs.spicetify-nix.homeManagerModules.default
|
||||
../../programs/wm
|
||||
../../programs/wm/hyprland
|
||||
../../programs/wm/niri
|
||||
../../programs/webcam.nix
|
||||
];
|
||||
|
||||
home.packages = with pkgs; [
|
||||
audacity
|
||||
blender
|
||||
slic3r
|
||||
okular
|
||||
obsidian
|
||||
element-desktop
|
||||
zapzap
|
||||
libsForQt5.okular
|
||||
|
||||
onlyoffice-desktopeditors
|
||||
openscad
|
||||
fstl
|
||||
sqlitebrowser
|
||||
|
||||
# Games
|
||||
lutris
|
||||
airshipper
|
||||
xonotic
|
||||
];
|
||||
|
||||
catppuccin = {
|
||||
enable = true;
|
||||
flavor = "mocha";
|
||||
};
|
||||
|
||||
programs = {
|
||||
git = {
|
||||
enable = true;
|
||||
userName = "DerGrumpf";
|
||||
userEmail = "p.keier@beyerstedt-it.de";
|
||||
};
|
||||
|
||||
nixcord = {
|
||||
enable = true;
|
||||
discord = lib.mkForce { enable = false; };
|
||||
vesktop.enable = true;
|
||||
|
||||
config = {
|
||||
useQuickCss = true;
|
||||
themeLinks = [
|
||||
"https://raw.githubusercontent.com/catppuccin/discord/refs/heads/main/themes/mocha.theme.css"
|
||||
];
|
||||
frameless = true;
|
||||
plugins = {
|
||||
betterFolders.enable = true;
|
||||
betterRoleContext.enable = true;
|
||||
mentionAvatars.enable = true;
|
||||
copyUserURLs.enable = true;
|
||||
fakeNitro.enable = true;
|
||||
decor.enable = true;
|
||||
#accountPanelServerProfile = true;
|
||||
copyFileContents.enable = true;
|
||||
fakeProfileThemes.enable = true;
|
||||
friendsSince.enable = true;
|
||||
implicitRelationships.enable = true;
|
||||
noTrack.enable = true;
|
||||
permissionsViewer.enable = true;
|
||||
serverInfo.enable = true;
|
||||
translate.enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
obs-studio = {
|
||||
enable = true;
|
||||
#enableVirtualCamera = true;
|
||||
plugins = with pkgs.obs-studio-plugins; [
|
||||
wlrobs
|
||||
obs-vkcapture
|
||||
obs-backgroundremoval
|
||||
obs-pipewire-audio-capture
|
||||
];
|
||||
};
|
||||
|
||||
spicetify =
|
||||
let
|
||||
spicePkgs = inputs.spicetify-nix.legacyPackages.${pkgs.system};
|
||||
in
|
||||
{
|
||||
enable = true;
|
||||
spotifyPackage = pkgs.spotify;
|
||||
theme = spicePkgs.themes.catppuccin;
|
||||
colorScheme = "mocha";
|
||||
|
||||
enabledExtensions = with spicePkgs.extensions; [
|
||||
bookmark
|
||||
fullAppDisplay
|
||||
keyboardShortcut
|
||||
popupLyrics
|
||||
shuffle
|
||||
autoVolume
|
||||
betterGenres
|
||||
adblock
|
||||
wikify
|
||||
songStats
|
||||
];
|
||||
|
||||
enabledCustomApps = with spicePkgs.apps; [
|
||||
lyricsPlus
|
||||
newReleases
|
||||
marketplace
|
||||
];
|
||||
|
||||
#enabledSnippets = with spicePkgs.snippets; [ ];
|
||||
|
||||
};
|
||||
};
|
||||
home.file.".config/fastfetch/config.jsonc".source = ./config.jsonc;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
##################################################################################################################
|
||||
#
|
||||
# NixOS Configuration
|
||||
#
|
||||
##################################################################################################################
|
||||
|
||||
users.users.phil = {
|
||||
# authorizedKeys
|
||||
openssh.authorizedKeys.keys = [
|
||||
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCaLHfxVylghDMYR8t4QMUpeRRqXasNABQKBEy9MmhbUXCcWiPbPMSZH8FMHON34rm2OrXP1kY/8jQxqBJDA+SqpFR2AZ4Khk9iVMaq5GHxxpn2amZUjoBa+fB29WaiE1npV5JVJV3O0ylw6GtiCnpneE6fGx2MO1vOY/7zKrUX/OK7WfwkDpeEzZgV/j/md917HrzUVeZwdeTq3WCRO8Gew6R8Xs6FRjSiGuH0dq14D4Ow5Zf1cI1jx+JfD/5vGasw8HXPu1NdxsOE+6D7/22IKqGr+S74/lAoyyD5qqk0s05lw8UY/PXBLJaNLZu9Fwx0BqTHpJEvftpmvd9wUxgR3msx9VXtKNSrqivIbDgeU+3oGzzkrGZODl7FCp4XKGmbrX85Z6lKwEGgv5jez4MLZcmT86bxB7m1wIbqSbVtfhS+GI7yPTA/kLzzFa14Im/+LTj95pb8qs2ALMwTMP1j2f9A6D3RriOFihL+68qn+YbK58KuV1R0f+CQRmlfVbk= phil@web.cyperpunk.de"
|
||||
];
|
||||
shell = pkgs.fish;
|
||||
extraGroups = [ "video" ];
|
||||
};
|
||||
|
||||
# Fix underlying System POSIX bugs
|
||||
programs.bash = {
|
||||
interactiveShellInit = ''
|
||||
if [[ $(${pkgs.procps}/bin/ps --no-header --pid=$PPID --format=comm) != "fish" && -z ''${BASH_EXECUTION_STRING} ]]
|
||||
then
|
||||
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=""
|
||||
exec ${pkgs.fish}/bin/fish $LOGIN_OPTION
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fish = {
|
||||
enable = true;
|
||||
interactiveShellInit = ''
|
||||
fish_config prompt choose disco
|
||||
starship init fish | source
|
||||
function fish_greeting
|
||||
fastfetch
|
||||
end
|
||||
'';
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
BIN
wallpapers/bike.gif
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
wallpapers/corner.gif
Normal file
|
After Width: | Height: | Size: 350 KiB |
BIN
wallpapers/daemon.gif
Normal file
|
After Width: | Height: | Size: 3.2 MiB |