initial commit

This commit is contained in:
2023-09-05 04:35:35 +05:30
commit 92675f27bf
24 changed files with 1161 additions and 0 deletions

View File

@ -0,0 +1,29 @@
import:
- ~/.config/alacritty/rice-colors.yml
- ~/.config/alacritty/fonts.yml
window:
padding:
x: 15
y: 15
decorations: none
opacity: 1.0
dynamic_title: true
history: 10000
multiplier: 3
selection:
save_to_clipboard: false
cursor:
style:
shape: Block
blinking: On
unfocused_hollow: false
blink_interval: 550
live_config_reload: true

View File

@ -0,0 +1,14 @@
font:
normal:
family: JetBrainsMono Nerd Font
bold:
family: JetBrainsMono Nerd Font
italic:
family: JetBrainsMono Nerd Font
bold_italic:
family: JetBrainsMono Nerd Font
size: 10

View File

@ -0,0 +1,44 @@
schemes:
sirius: &sirius
primary:
background: "#000000"
foreground: "0xa6accd"
normal:
black: "0x1b1e28"
red: "0xd0679d"
green: "0x5de4c7"
yellow: "0xfffac2"
blue: "0x89ddff"
magenta: "0xfcc5e9"
cyan: "0xadd7ff"
white: "0xffffff"
bright:
black: "0xa6accd"
red: "0xd0679d"
green: "0x5de4c7"
yellow: "0xfffac2"
blue: "0xadd7ff"
magenta: "0xfae4fc"
cyan: "0x89ddff"
white: "0xffffff"
cursor:
cursor: "#bb9af7"
text: CellBackground
search:
matches:
foreground: "0x1b1e28"
background: "0xadd7ff"
focused_match:
foreground: "0x1b1e28"
background: "0xadd7ff"
footer_bar:
foreground: "0x1b1e28"
background: "0xadd7ff"
selection:
text: CellForeground
background: "0x303340"
vi_mode_cursor:
text: CellBackground
cursor: CellForeground
colors: *sirius

View File

@ -0,0 +1,9 @@
{ ... }:
{
programs.alacritty.enable = true;
xdg.configFile = {
"alacritty".source = ./config;
};
}

View File

@ -0,0 +1,54 @@
{ pkgs, username, ... }:
{
services.xserver.displayManager.sddm.enable = true;
services.xserver.displayManager.defaultSession = "none+bspwm";
services.xserver.displayManager.autoLogin.enable = true;
services.xserver.displayManager.autoLogin.user = "${username}";
services.xserver.windowManager.bspwm.enable = true;
environment.systemPackages = with pkgs; [
sxhkd
polybar
picom-jonaburg
papirus-icon-theme
rofi
dunst
tdrop
pavucontrol
libsForQt5.bismuth
nitrogen
feh
viewnior
networkmanager_dmenu
gvfs
weston
bibata-cursors
dracula-theme
dracula-icon-theme
eww
rustup
kitty
brightnessctl
lsd
jq
playerctl
mopidy
mopidy-mpd
mopidy-spotify
mopidy-mopify
ncmpcpp
xdotool
ueberzug
maim
pamixer
xdg-user-dirs
webp-pixbuf-loader
xorg.xprop
physlock
jetbrains-mono
terminus-nerdfont
inconsolata
joypixels
];
}

View File

@ -0,0 +1,9 @@
{ ... }:
{
hardware.bluetooth = {
enable = true;
};
services.blueman.enable = true;
}

View File

@ -0,0 +1,10 @@
{ ... }:
{
hardware = {
nvidia.prime.offload.enable = true;
opengl.enable = true;
};
services.xserver.videoDrivers = [ "nvidia" ];
}

View File

@ -0,0 +1,164 @@
# This is an example Hyprland config file.
#
# Refer to the wiki for more information.
#
# Please note not all available settings / options are set here.
# For a full list, see the wiki
#
# See https://wiki.hyprland.org/Configuring/Monitors/
monitor=,preferred,auto,auto
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
# Execute your favorite apps at launch
# exec-once = waybar & hyprpaper & firefox
# Source a file (multi-file configs)
# source = ~/.config/hypr/myColors.conf
# Some default env vars.
env = XCURSOR_SIZE,24
# For all categories, see https://wiki.hyprland.org/Configuring/Variables/
input {
kb_layout = us
kb_variant =
kb_model =
kb_options =
kb_rules =
follow_mouse = 1
touchpad {
natural_scroll = false
}
sensitivity = 0 # -1.0 - 1.0, 0 means no modification.
}
general {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
gaps_in = 5
gaps_out = 20
border_size = 2
col.active_border = rgba(33ccffee) rgba(00ff99ee) 45deg
col.inactive_border = rgba(595959aa)
layout = dwindle
}
decoration {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
rounding = 10
blur {
enabled = true
size = 3
passes = 1
}
drop_shadow = true
shadow_range = 4
shadow_render_power = 3
col.shadow = rgba(1a1a1aee)
}
animations {
enabled = true
# Some default animations, see https://wiki.hyprland.org/Configuring/Animations/ for more
bezier = myBezier, 0.05, 0.9, 0.1, 1.05
animation = windows, 1, 7, myBezier
animation = windowsOut, 1, 7, default, popin 80%
animation = border, 1, 10, default
animation = borderangle, 1, 8, default
animation = fade, 1, 7, default
animation = workspaces, 1, 6, default
}
dwindle {
# See https://wiki.hyprland.org/Configuring/Dwindle-Layout/ for more
pseudotile = true # master switch for pseudotiling. Enabling is bound to mainMod + P in the keybinds section below
preserve_split = true # you probably want this
}
master {
# See https://wiki.hyprland.org/Configuring/Master-Layout/ for more
new_is_master = true
}
gestures {
# See https://wiki.hyprland.org/Configuring/Variables/ for more
workspace_swipe = false
}
# Example per-device config
# See https://wiki.hyprland.org/Configuring/Keywords/#per-device-input-configs for more
device:epic-mouse-v1 {
sensitivity = -0.5
}
# Example windowrule v1
# windowrule = float, ^(kitty)$
# Example windowrule v2
# windowrulev2 = float,class:^(kitty)$,title:^(kitty)$
# See https://wiki.hyprland.org/Configuring/Window-Rules/ for more
# See https://wiki.hyprland.org/Configuring/Keywords/ for more
$mainMod = SUPER
# Example binds, see https://wiki.hyprland.org/Configuring/Binds/ for more
bind = $mainMod, Q, exec, alacritty
bind = $mainMod, C, killactive,
bind = $mainMod, M, exit,
bind = $mainMod, E, exec, dolphin
bind = $mainMod, V, togglefloating,
bind = $mainMod, R, exec, wofi --show drun
bind = $mainMod, P, pseudo, # dwindle
bind = $mainMod, J, togglesplit, # dwindle
# Move focus with mainMod + arrow keys
bind = $mainMod, left, movefocus, l
bind = $mainMod, right, movefocus, r
bind = $mainMod, up, movefocus, u
bind = $mainMod, down, movefocus, d
# Switch workspaces with mainMod + [0-9]
bind = $mainMod, 1, workspace, 1
bind = $mainMod, 2, workspace, 2
bind = $mainMod, 3, workspace, 3
bind = $mainMod, 4, workspace, 4
bind = $mainMod, 5, workspace, 5
bind = $mainMod, 6, workspace, 6
bind = $mainMod, 7, workspace, 7
bind = $mainMod, 8, workspace, 8
bind = $mainMod, 9, workspace, 9
bind = $mainMod, 0, workspace, 10
# Move active window to a workspace with mainMod + SHIFT + [0-9]
bind = $mainMod SHIFT, 1, movetoworkspace, 1
bind = $mainMod SHIFT, 2, movetoworkspace, 2
bind = $mainMod SHIFT, 3, movetoworkspace, 3
bind = $mainMod SHIFT, 4, movetoworkspace, 4
bind = $mainMod SHIFT, 5, movetoworkspace, 5
bind = $mainMod SHIFT, 6, movetoworkspace, 6
bind = $mainMod SHIFT, 7, movetoworkspace, 7
bind = $mainMod SHIFT, 8, movetoworkspace, 8
bind = $mainMod SHIFT, 9, movetoworkspace, 9
bind = $mainMod SHIFT, 0, movetoworkspace, 10
# Scroll through existing workspaces with mainMod + scroll
bind = $mainMod, mouse_down, workspace, e+1
bind = $mainMod, mouse_up, workspace, e-1
# Move/resize windows with mainMod + LMB/RMB and dragging
bindm = $mainMod, mouse:272, movewindow
bindm = $mainMod, mouse:273, resizewindow

View File

@ -0,0 +1,5 @@
{ pkgs, ... }:
{
programs.hyprland.enable = true;
}

15
modules/hyprland/home.nix Normal file
View File

@ -0,0 +1,15 @@
{ pkgs, ... }:
{
# imports = [ hyprland.homeManagerModules.default ];
xdg.configFile = {
"hypr".source = ./config;
};
# wayland.windowManager.hyprland = {
# enable = true;
# xwayland.enable = true;
# };
}

68
modules/nvim/home.nix Normal file
View File

@ -0,0 +1,68 @@
{ pkgs, astronvim, ... }:
{
xdg.configFile = {
"nvim".source = astronvim;
"astronvim/lua/user".source = ./user;
};
programs = {
neovim = {
enable = true;
defaultEditor = true;
viAlias = false;
vimAlias = true;
withPython3 = true;
withNodeJs = true;
};
};
home = {
packages = with pkgs; [
#-- python
nodePackages.pyright # python language server
python311Packages.black # python formatter
python311Packages.ruff-lsp
#-- nix
nil
rnix-lsp
statix # Lints and suggestions for the nix programming language
deadnix # Find and remove unused code in .nix source files
alejandra # Nix Code Formatter
#-- golang
go
gomodifytags
iferr # generate error handling code for go
impl # generate function implementation for go
gotools # contains tools like: godoc, goimports, etc.
gopls # go language server
delve # go debugger
#-- lua
stylua
lua-language-server
#-- bash
nodePackages.bash-language-server
shellcheck
shfmt
#-- javascript/typescript --#
nodePackages.typescript
nodePackages.typescript-language-server
#-- Misc
hadolint # Dockerfile linter
tree-sitter # common language parser/highlighter
nodePackages.prettier # common code formatter
#-- Optional Requirements:
gdu # disk usage analyzer, required by AstroNvim
ripgrep # fast search tool, required by AstroNvim's '<leader>fw'(<leader> is space key)
];
};
}

141
modules/nvim/user/init.lua Normal file
View File

@ -0,0 +1,141 @@
local M = {}
M.colorscheme = "poimandres"
M.icons = {
VimIcon = "",
ScrollText = "",
GitBranch = "",
GitAdd = "",
GitChange = "",
GitDelete = "",
}
M.heirline = {
separators = {
left = { "", "" },
right = { "", "" },
tab = { "", "" },
},
colors = function(hl)
local get_hlgroup = require("astronvim.utils").get_hlgroup
local comment_fg = get_hlgroup("Comment").fg
hl.git_branch_fg = comment_fg
hl.git_added = comment_fg
hl.git_changed = comment_fg
hl.git_removed = comment_fg
hl.blank_bg = get_hlgroup("Folded").fg
hl.file_info_bg = get_hlgroup("Visual").bg
hl.nav_icon_bg = get_hlgroup("String").fg
hl.nav_fg = hl.nav_icon_bg
hl.folder_icon_bg = get_hlgroup("Error").fg
return hl
end,
attributes = {
mode = { bold = true },
},
icon_highlights = {
file_icon = {
statusline = false,
},
},
}
M.plugins = {
{
"goolord/alpha-nvim",
opts = function(_, opts)
opts.section.header.val = {
"██████████████████████████████████████████████████",
"█░░░░░░░░░░░░░░█░░░░░░██░░░░░░█░░░░░░░░██░░░░░░░░█",
"█░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀░░██░░▄▀░░█░░▄▀▄▀░░██░░▄▀▄▀░░█",
"█░░░░░░▄▀░░░░░░█░░▄▀░░██░░▄▀░░█░░░░▄▀░░██░░▄▀░░░░█",
"█████░░▄▀░░█████░░▄▀░░██░░▄▀░░███░░░░▄▀▄▀▄▀░░░░███",
"█████░░▄▀░░█████░░▄▀░░██░░▄▀░░█████░░▄▀▄▀▄▀░░█████",
"█████░░▄▀░░█████░░▄▀░░██░░▄▀░░███░░░░▄▀▄▀▄▀░░░░███",
"█████░░▄▀░░█████░░▄▀░░░░░░▄▀░░█░░░░▄▀░░██░░▄▀░░░░█",
"█████░░▄▀░░█████░░▄▀▄▀▄▀▄▀▄▀░░█░░▄▀▄▀░░██░░▄▀▄▀░░█",
"█████░░░░░░█████░░░░░░░░░░░░░░█░░░░░░░░██░░░░░░░░█",
"██████████████████████████████████████████████████",
}
end,
},
"AstroNvim/astrocommunity",
{ import = "astrocommunity.utility.noice-nvim" },
{ import = "astrocommunity.pack.json" },
{ import = "astrocommunity.pack.bash" },
{ import = "astrocommunity.pack.lua" },
{ import = "astrocommunity.pack.python" },
{ import = "astrocommunity.pack.go" },
{ import = "astrocommunity.pack.typescript" },
{ import = "astrocommunity.pack.prisma" },
{ "olivercederborg/poimandres.nvim", name = "poimandres", opts = { disable_background = true } },
{
"rebelot/heirline.nvim",
opts = function(_, opts)
local status = require("astronvim.utils.status")
opts.statusline = {
hl = { fg = "fg", bg = "bg" },
status.component.mode({
mode_text = { icon = { kind = "VimIcon", padding = { right = 1, left = 1 } } },
surround = {
separator = "left",
color = function()
return { main = status.hl.mode_bg(), right = "blank_bg" }
end,
},
}),
status.component.builder({
{ provider = "" },
surround = { separator = "left", color = { main = "blank_bg", right = "file_info_bg" } },
}),
status.component.file_info({
file_icon = { padding = { left = 0 } },
filename = { fallback = "Empty" },
padding = { right = 1 },
surround = { separator = "left", condition = false },
}),
status.component.git_branch({ surround = { separator = "none" } }),
status.component.git_diff({ padding = { left = 1 }, surround = { separator = "none" } }),
status.component.fill(),
status.component.lsp({ lsp_client_names = false, surround = { separator = "none", color = "bg" } }),
status.component.fill(),
status.component.diagnostics({ surround = { separator = "right" } }),
status.component.lsp({ lsp_progress = false, surround = { separator = "right" } }),
{
status.component.builder({
{ provider = require("astronvim.utils").get_icon("FolderClosed") },
padding = { right = 1 },
hl = { fg = "bg" },
surround = { separator = "right", color = "folder_icon_bg" },
}),
status.component.file_info({
filename = {
fname = function(nr)
return vim.fn.getcwd(nr)
end,
padding = { left = 1 },
},
file_icon = false,
file_modified = false,
file_read_only = false,
surround = { separator = "none", color = "file_info_bg", condition = false },
}),
},
{
status.component.builder({
{ provider = require("astronvim.utils").get_icon("ScrollText") },
padding = { right = 1 },
hl = { fg = "bg" },
surround = { separator = "right", color = { main = "nav_icon_bg", left = "file_info_bg" } },
}),
status.component.nav({
percentage = { padding = { right = 1 } },
ruler = false,
scrollbar = false,
surround = { separator = "none", color = "file_info_bg" },
}),
},
}
return opts
end,
},
}
return M

View File

@ -0,0 +1,9 @@
{ username, ... }:
{
virtualisation = {
docker.enable = true;
};
users.users.${username}.extraGroups = [ "docker" ];
}

View File

@ -0,0 +1,13 @@
{ pkgs, username, ... }:
{
virtualisation = {
libvirtd.enable = true;
};
users.users.${username}.extraGroups = [ "libvirtd" ];
environment.systemPackages = with pkgs; [
virt-manager
];
}

View File

@ -0,0 +1,7 @@
{ ... }:
{
virtualisation = {
waydroid.enable = true;
};
}