diff --git a/.gitignore b/.gitignore index 68c77b8..1be7493 100644 --- a/.gitignore +++ b/.gitignore @@ -1,54 +1,54 @@ -home/user/.config/zsh/plugins/* +configs/.config/zsh/plugins/* -home/user/.config/nvim/plugin -home/user/.config/nvim/spell +configs/.config/nvim/plugin +configs/.config/nvim/spell -home/user/.config/zsh/zshrc.d/* -!home/user/.config/zsh/zshrc.d/00_zhashd.sh +configs/.config/zsh/zshrc.d/* +!configs/.config/zsh/zshrc.d/00_zhashd.sh -home/user/.zshenv.d/* -!home/user/.zshenv.d/.gitkeep +configs/.zshenv.d/* +!configs/.zshenv.d/.gitkeep -home/user/.config/zsh/.zcalc_history +configs/.config/zsh/.zcalc_history .zcompdump *.zwc -home/user/.ssh/* -!home/user/.ssh/config +configs/.ssh/* +!configs/.ssh/config -home/user/.ipython/profile_default/* -!home/user/.ipython/profile_default/ipython_config.py +configs/.ipython/profile_default/* +!configs/.ipython/profile_default/ipython_config.py -home/user/.gnupg/* -!home/user/.gnupg/gpg.conf +configs/.gnupg/* +!configs/.gnupg/gpg.conf lazy-lock.json -home/user/.config/ranger/plugins -home/user/.termux/shell +configs/.config/ranger/plugins +configs/.termux/shell -home/user/.config/tmux/plugins -home/user/.config/tmux/local.conf +configs/.config/tmux/plugins +configs/.config/tmux/local.conf -home/user/.tmux/* -!home/user/.tmux/dotfiles -!home/user/.tmux/sandbox -!home/user/.tmux/ssh -!home/user/.tmux/example-background-job -!home/user/.tmux/system-update -!home/user/.tmux/music -!home/user/.tmux/landing +configs/.tmux/* +!configs/.tmux/dotfiles +!configs/.tmux/sandbox +!configs/.tmux/ssh +!configs/.tmux/example-background-job +!configs/.tmux/system-update +!configs/.tmux/music +!configs/.tmux/landing -home/user/.config/git/local +configs/.config/git/local -home/user/.config/sway/config.d/* -!home/user/.config/sway/config.d/.gitkeep +configs/.config/sway/config.d/* +!configs/.config/sway/config.d/.gitkeep -home/user/.config/sway/variables.d/* -!home/user/.config/sway/variables.d/.gitkeep +configs/.config/sway/variables.d/* +!configs/.config/sway/variables.d/.gitkeep -home/user/.config/alacritty/config.d/* -!home/user/.config/alacritty/config.d/.gitkeep +configs/.config/alacritty/config.d/* +!configs/.config/alacritty/config.d/.gitkeep -home/user/.config/yazi/plugins/ +configs/.config/yazi/plugins/ diff --git a/TARGETS.sh b/TARGETS.sh deleted file mode 100644 index 7d096a6..0000000 --- a/TARGETS.sh +++ /dev/null @@ -1,32 +0,0 @@ -readonly TARGETS="\ -colors:.config/terminal-colors.d -less:.lesskey .infokey -tmux:.config/tmux .tmux .config/systemd/user/tmux.service %copypasta -t: -note: -psw: -zsh:.config/zsh .zshenv .zshenv.d .inputrc %copypasta %colors -alacritty:.config/alacritty -nvim:.config/nvim .editorconfig .editrc .local/bin/vim_askpass_helper -ssh: -git:.config/git .local/bin/ga -ranger:.config/ranger -yazi:.config/yazi -gpg: -sway:.config/sway .config/waybar .config/mako .config/mimeapps.list .config/rofi .local/bin/screenshot .config/swaylock .Xresources .config/kanshi .local/bin/firefox_media %copypasta %pomodoro -pomodoro: -bat:.config/bat -font: -termux:.termux -arch: -psql:.psqlrc -docker:.docker/cli-plugins -ipython:.ipython/profile_default/ipython_config.py -gdb:.config/gdb -sandbox: -chromium:.local/bin/pchromium .local/share/applications/pchromium.desktop -scripts:.local/bin/httpstatus .local/bin/apco .local/bin/bb .local/bin/emoji .local/bin/mksh .local/bin/nato .local/bin/pastas .local/bin/timer .local/bin/tryna .local/bin/trynafail .local/bin/bak .local/bin/cleanup-directory .local/bin/cleanup-directory-log .local/bin/gobuild .local/bin/json .local/bin/open .local/bin/py .local/bin/sha .local/bin/showtips .local/bin/weather .local/bin/rmt .local/bin/scratch .local/bin/wake .local/bin/myip .local/bin/genpass .local/bin/gensalt .local/bin/django-create-project .local/bin/mirror-site .local/bin/split-file .local/bin/extract .local/bin/destroy .local/bin/serveit .local/bin/highlight-logs .local/bin/flipbit %copypasta -music:.local/bin/mpv-service.sh .config/systemd/user/mpv.service .local/bin/player -copypasta:.local/bin/copy .local/bin/pasta -starsector:.java/.userPrefs/com/fs/starfarer/prefs.xml .local/share/applications/starsector.desktop .local/bin/starsector -all:%less %t %note %tmux %zsh %nvim %git %yazi" diff --git a/home/user/.Xresources b/configs/.Xresources similarity index 100% rename from home/user/.Xresources rename to configs/.Xresources diff --git a/home/user/.config/alacritty/alacritty.toml b/configs/.config/alacritty/alacritty.toml similarity index 100% rename from home/user/.config/alacritty/alacritty.toml rename to configs/.config/alacritty/alacritty.toml diff --git a/home/user/.config/alacritty/config.d/.gitkeep b/configs/.config/alacritty/config.d/.gitkeep similarity index 100% rename from home/user/.config/alacritty/config.d/.gitkeep rename to configs/.config/alacritty/config.d/.gitkeep diff --git a/home/user/.config/bat/config b/configs/.config/bat/config similarity index 100% rename from home/user/.config/bat/config rename to configs/.config/bat/config diff --git a/home/user/.config/gdb/gdbinit b/configs/.config/gdb/gdbinit similarity index 100% rename from home/user/.config/gdb/gdbinit rename to configs/.config/gdb/gdbinit diff --git a/home/user/.config/git/aliases b/configs/.config/git/aliases similarity index 100% rename from home/user/.config/git/aliases rename to configs/.config/git/aliases diff --git a/home/user/.config/git/config b/configs/.config/git/config similarity index 100% rename from home/user/.config/git/config rename to configs/.config/git/config diff --git a/home/user/.config/git/ignore b/configs/.config/git/ignore similarity index 100% rename from home/user/.config/git/ignore rename to configs/.config/git/ignore diff --git a/home/user/.config/git/local.example b/configs/.config/git/local.example similarity index 100% rename from home/user/.config/git/local.example rename to configs/.config/git/local.example diff --git a/home/user/.config/git/url-aliases b/configs/.config/git/url-aliases similarity index 100% rename from home/user/.config/git/url-aliases rename to configs/.config/git/url-aliases diff --git a/home/user/.config/kanshi/config b/configs/.config/kanshi/config similarity index 100% rename from home/user/.config/kanshi/config rename to configs/.config/kanshi/config diff --git a/home/user/.config/mako/config b/configs/.config/mako/config similarity index 100% rename from home/user/.config/mako/config rename to configs/.config/mako/config diff --git a/home/user/.config/mimeapps.list b/configs/.config/mimeapps.list similarity index 100% rename from home/user/.config/mimeapps.list rename to configs/.config/mimeapps.list diff --git a/home/user/.config/nvim/after/ftplugin/cpp.lua b/configs/.config/nvim/after/ftplugin/cpp.lua similarity index 100% rename from home/user/.config/nvim/after/ftplugin/cpp.lua rename to configs/.config/nvim/after/ftplugin/cpp.lua diff --git a/home/user/.config/nvim/after/ftplugin/gitcommit.lua b/configs/.config/nvim/after/ftplugin/gitcommit.lua similarity index 100% rename from home/user/.config/nvim/after/ftplugin/gitcommit.lua rename to configs/.config/nvim/after/ftplugin/gitcommit.lua diff --git a/home/user/.config/nvim/after/ftplugin/go.lua b/configs/.config/nvim/after/ftplugin/go.lua similarity index 100% rename from home/user/.config/nvim/after/ftplugin/go.lua rename to configs/.config/nvim/after/ftplugin/go.lua diff --git a/home/user/.config/nvim/after/ftplugin/netrw.lua b/configs/.config/nvim/after/ftplugin/netrw.lua similarity index 100% rename from home/user/.config/nvim/after/ftplugin/netrw.lua rename to configs/.config/nvim/after/ftplugin/netrw.lua diff --git a/home/user/.config/nvim/after/ftplugin/python.lua b/configs/.config/nvim/after/ftplugin/python.lua similarity index 100% rename from home/user/.config/nvim/after/ftplugin/python.lua rename to configs/.config/nvim/after/ftplugin/python.lua diff --git a/home/user/.config/nvim/init.lua b/configs/.config/nvim/init.lua similarity index 100% rename from home/user/.config/nvim/init.lua rename to configs/.config/nvim/init.lua diff --git a/home/user/.config/nvim/lua/core/init.lua b/configs/.config/nvim/lua/core/init.lua similarity index 100% rename from home/user/.config/nvim/lua/core/init.lua rename to configs/.config/nvim/lua/core/init.lua diff --git a/home/user/.config/nvim/lua/core/lazy.lua b/configs/.config/nvim/lua/core/lazy.lua similarity index 100% rename from home/user/.config/nvim/lua/core/lazy.lua rename to configs/.config/nvim/lua/core/lazy.lua diff --git a/home/user/.config/nvim/lua/core/mappings/init.lua b/configs/.config/nvim/lua/core/mappings/init.lua similarity index 100% rename from home/user/.config/nvim/lua/core/mappings/init.lua rename to configs/.config/nvim/lua/core/mappings/init.lua diff --git a/home/user/.config/nvim/lua/core/mappings/mappings.lua b/configs/.config/nvim/lua/core/mappings/mappings.lua similarity index 100% rename from home/user/.config/nvim/lua/core/mappings/mappings.lua rename to configs/.config/nvim/lua/core/mappings/mappings.lua diff --git a/home/user/.config/nvim/lua/core/mappings/run-scripts.lua b/configs/.config/nvim/lua/core/mappings/run-scripts.lua similarity index 100% rename from home/user/.config/nvim/lua/core/mappings/run-scripts.lua rename to configs/.config/nvim/lua/core/mappings/run-scripts.lua diff --git a/home/user/.config/nvim/lua/core/options.lua b/configs/.config/nvim/lua/core/options.lua similarity index 100% rename from home/user/.config/nvim/lua/core/options.lua rename to configs/.config/nvim/lua/core/options.lua diff --git a/home/user/.config/nvim/lua/plugins/autocomplete.lua b/configs/.config/nvim/lua/plugins/autocomplete.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/autocomplete.lua rename to configs/.config/nvim/lua/plugins/autocomplete.lua diff --git a/home/user/.config/nvim/lua/plugins/coding.lua b/configs/.config/nvim/lua/plugins/coding.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/coding.lua rename to configs/.config/nvim/lua/plugins/coding.lua diff --git a/home/user/.config/nvim/lua/plugins/misc.lua b/configs/.config/nvim/lua/plugins/misc.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/misc.lua rename to configs/.config/nvim/lua/plugins/misc.lua diff --git a/home/user/.config/nvim/lua/plugins/telescope.lua b/configs/.config/nvim/lua/plugins/telescope.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/telescope.lua rename to configs/.config/nvim/lua/plugins/telescope.lua diff --git a/home/user/.config/nvim/lua/plugins/textobjects.lua b/configs/.config/nvim/lua/plugins/textobjects.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/textobjects.lua rename to configs/.config/nvim/lua/plugins/textobjects.lua diff --git a/home/user/.config/nvim/lua/plugins/ui.lua b/configs/.config/nvim/lua/plugins/ui.lua similarity index 100% rename from home/user/.config/nvim/lua/plugins/ui.lua rename to configs/.config/nvim/lua/plugins/ui.lua diff --git a/home/user/.config/ranger/rc.conf b/configs/.config/ranger/rc.conf similarity index 100% rename from home/user/.config/ranger/rc.conf rename to configs/.config/ranger/rc.conf diff --git a/home/user/.config/rofi/config.rasi b/configs/.config/rofi/config.rasi similarity index 100% rename from home/user/.config/rofi/config.rasi rename to configs/.config/rofi/config.rasi diff --git a/home/user/.config/sway/autostart.conf b/configs/.config/sway/autostart.conf similarity index 100% rename from home/user/.config/sway/autostart.conf rename to configs/.config/sway/autostart.conf diff --git a/home/user/.config/sway/bar.conf b/configs/.config/sway/bar.conf similarity index 100% rename from home/user/.config/sway/bar.conf rename to configs/.config/sway/bar.conf diff --git a/home/user/.config/sway/bindings.conf b/configs/.config/sway/bindings.conf similarity index 100% rename from home/user/.config/sway/bindings.conf rename to configs/.config/sway/bindings.conf diff --git a/home/user/.config/sway/config b/configs/.config/sway/config similarity index 100% rename from home/user/.config/sway/config rename to configs/.config/sway/config diff --git a/home/user/.config/sway/config.d/.gitkeep b/configs/.config/sway/config.d/.gitkeep similarity index 100% rename from home/user/.config/sway/config.d/.gitkeep rename to configs/.config/sway/config.d/.gitkeep diff --git a/home/user/.config/sway/other.conf b/configs/.config/sway/other.conf similarity index 100% rename from home/user/.config/sway/other.conf rename to configs/.config/sway/other.conf diff --git a/home/user/.config/sway/scripts/auto-alacritty.sh b/configs/.config/sway/scripts/auto-alacritty.sh similarity index 100% rename from home/user/.config/sway/scripts/auto-alacritty.sh rename to configs/.config/sway/scripts/auto-alacritty.sh diff --git a/home/user/.config/sway/scripts/lock-telegram.sh b/configs/.config/sway/scripts/lock-telegram.sh similarity index 100% rename from home/user/.config/sway/scripts/lock-telegram.sh rename to configs/.config/sway/scripts/lock-telegram.sh diff --git a/home/user/.config/sway/scripts/swap-workspaces.sh b/configs/.config/sway/scripts/swap-workspaces.sh similarity index 100% rename from home/user/.config/sway/scripts/swap-workspaces.sh rename to configs/.config/sway/scripts/swap-workspaces.sh diff --git a/home/user/.config/sway/variables.d/.gitkeep b/configs/.config/sway/variables.d/.gitkeep similarity index 100% rename from home/user/.config/sway/variables.d/.gitkeep rename to configs/.config/sway/variables.d/.gitkeep diff --git a/home/user/.config/swaylock/config b/configs/.config/swaylock/config similarity index 100% rename from home/user/.config/swaylock/config rename to configs/.config/swaylock/config diff --git a/home/user/.config/systemd/user/mpv.service b/configs/.config/systemd/user/mpv.service similarity index 100% rename from home/user/.config/systemd/user/mpv.service rename to configs/.config/systemd/user/mpv.service diff --git a/home/user/.config/systemd/user/ssh-proxy@.service b/configs/.config/systemd/user/ssh-proxy@.service similarity index 100% rename from home/user/.config/systemd/user/ssh-proxy@.service rename to configs/.config/systemd/user/ssh-proxy@.service diff --git a/home/user/.config/systemd/user/tmux.service b/configs/.config/systemd/user/tmux.service similarity index 100% rename from home/user/.config/systemd/user/tmux.service rename to configs/.config/systemd/user/tmux.service diff --git a/home/user/.config/systemd/user/x11vnc.service b/configs/.config/systemd/user/x11vnc.service similarity index 100% rename from home/user/.config/systemd/user/x11vnc.service rename to configs/.config/systemd/user/x11vnc.service diff --git a/home/user/.config/terminal-colors.d/cal.scheme b/configs/.config/terminal-colors.d/cal.scheme similarity index 100% rename from home/user/.config/terminal-colors.d/cal.scheme rename to configs/.config/terminal-colors.d/cal.scheme diff --git a/home/user/.config/tmux/aliases.conf b/configs/.config/tmux/aliases.conf similarity index 100% rename from home/user/.config/tmux/aliases.conf rename to configs/.config/tmux/aliases.conf diff --git a/home/user/.config/tmux/mappings.conf b/configs/.config/tmux/mappings.conf similarity index 100% rename from home/user/.config/tmux/mappings.conf rename to configs/.config/tmux/mappings.conf diff --git a/home/user/.config/tmux/options.conf b/configs/.config/tmux/options.conf similarity index 100% rename from home/user/.config/tmux/options.conf rename to configs/.config/tmux/options.conf diff --git a/home/user/.config/tmux/plugins.conf b/configs/.config/tmux/plugins.conf similarity index 100% rename from home/user/.config/tmux/plugins.conf rename to configs/.config/tmux/plugins.conf diff --git a/home/user/.config/tmux/remote.conf b/configs/.config/tmux/remote.conf similarity index 100% rename from home/user/.config/tmux/remote.conf rename to configs/.config/tmux/remote.conf diff --git a/home/user/.config/tmux/scripts/attach_session.sh b/configs/.config/tmux/scripts/attach_session.sh similarity index 100% rename from home/user/.config/tmux/scripts/attach_session.sh rename to configs/.config/tmux/scripts/attach_session.sh diff --git a/home/user/.config/tmux/scripts/kill_session.sh b/configs/.config/tmux/scripts/kill_session.sh similarity index 100% rename from home/user/.config/tmux/scripts/kill_session.sh rename to configs/.config/tmux/scripts/kill_session.sh diff --git a/home/user/.config/tmux/scripts/list_sessions.sh b/configs/.config/tmux/scripts/list_sessions.sh similarity index 100% rename from home/user/.config/tmux/scripts/list_sessions.sh rename to configs/.config/tmux/scripts/list_sessions.sh diff --git a/home/user/.config/tmux/scripts/start_projects.sh b/configs/.config/tmux/scripts/start_projects.sh similarity index 100% rename from home/user/.config/tmux/scripts/start_projects.sh rename to configs/.config/tmux/scripts/start_projects.sh diff --git a/home/user/.config/tmux/scripts/start_session.sh b/configs/.config/tmux/scripts/start_session.sh similarity index 100% rename from home/user/.config/tmux/scripts/start_session.sh rename to configs/.config/tmux/scripts/start_session.sh diff --git a/home/user/.config/tmux/style.conf b/configs/.config/tmux/style.conf similarity index 100% rename from home/user/.config/tmux/style.conf rename to configs/.config/tmux/style.conf diff --git a/home/user/.config/tmux/tmux.conf b/configs/.config/tmux/tmux.conf similarity index 100% rename from home/user/.config/tmux/tmux.conf rename to configs/.config/tmux/tmux.conf diff --git a/home/user/.config/waybar/config b/configs/.config/waybar/config similarity index 100% rename from home/user/.config/waybar/config rename to configs/.config/waybar/config diff --git a/home/user/.config/waybar/power_menu.xml b/configs/.config/waybar/power_menu.xml similarity index 100% rename from home/user/.config/waybar/power_menu.xml rename to configs/.config/waybar/power_menu.xml diff --git a/home/user/.config/waybar/scripts/builder.sh b/configs/.config/waybar/scripts/builder.sh similarity index 100% rename from home/user/.config/waybar/scripts/builder.sh rename to configs/.config/waybar/scripts/builder.sh diff --git a/home/user/.config/waybar/scripts/layout_change_handler.sh b/configs/.config/waybar/scripts/layout_change_handler.sh similarity index 100% rename from home/user/.config/waybar/scripts/layout_change_handler.sh rename to configs/.config/waybar/scripts/layout_change_handler.sh diff --git a/home/user/.config/waybar/style.css b/configs/.config/waybar/style.css similarity index 100% rename from home/user/.config/waybar/style.css rename to configs/.config/waybar/style.css diff --git a/home/user/.config/yazi/init.lua b/configs/.config/yazi/init.lua similarity index 100% rename from home/user/.config/yazi/init.lua rename to configs/.config/yazi/init.lua diff --git a/home/user/.config/yazi/keymap.toml b/configs/.config/yazi/keymap.toml similarity index 100% rename from home/user/.config/yazi/keymap.toml rename to configs/.config/yazi/keymap.toml diff --git a/home/user/.config/yazi/package.toml b/configs/.config/yazi/package.toml similarity index 100% rename from home/user/.config/yazi/package.toml rename to configs/.config/yazi/package.toml diff --git a/home/user/.config/yazi/theme.toml b/configs/.config/yazi/theme.toml similarity index 100% rename from home/user/.config/yazi/theme.toml rename to configs/.config/yazi/theme.toml diff --git a/home/user/.config/yazi/yazi.toml b/configs/.config/yazi/yazi.toml similarity index 100% rename from home/user/.config/yazi/yazi.toml rename to configs/.config/yazi/yazi.toml diff --git a/home/user/.config/zsh/.zlogout b/configs/.config/zsh/.zlogout similarity index 100% rename from home/user/.config/zsh/.zlogout rename to configs/.config/zsh/.zlogout diff --git a/home/user/.config/zsh/.zprofile b/configs/.config/zsh/.zprofile similarity index 100% rename from home/user/.config/zsh/.zprofile rename to configs/.config/zsh/.zprofile diff --git a/home/user/.config/zsh/.zshrc b/configs/.config/zsh/.zshrc similarity index 100% rename from home/user/.config/zsh/.zshrc rename to configs/.config/zsh/.zshrc diff --git a/home/user/.config/zsh/accept_line b/configs/.config/zsh/accept_line similarity index 100% rename from home/user/.config/zsh/accept_line rename to configs/.config/zsh/accept_line diff --git a/home/user/.config/zsh/aliases b/configs/.config/zsh/aliases similarity index 100% rename from home/user/.config/zsh/aliases rename to configs/.config/zsh/aliases diff --git a/home/user/.config/zsh/autoenv b/configs/.config/zsh/autoenv similarity index 100% rename from home/user/.config/zsh/autoenv rename to configs/.config/zsh/autoenv diff --git a/home/user/.config/zsh/completion b/configs/.config/zsh/completion similarity index 100% rename from home/user/.config/zsh/completion rename to configs/.config/zsh/completion diff --git a/home/user/.config/zsh/functions b/configs/.config/zsh/functions similarity index 100% rename from home/user/.config/zsh/functions rename to configs/.config/zsh/functions diff --git a/home/user/.config/zsh/history b/configs/.config/zsh/history similarity index 100% rename from home/user/.config/zsh/history rename to configs/.config/zsh/history diff --git a/home/user/.config/zsh/hosts/.gitkeep b/configs/.config/zsh/hosts/.gitkeep similarity index 100% rename from home/user/.config/zsh/hosts/.gitkeep rename to configs/.config/zsh/hosts/.gitkeep diff --git a/home/user/.config/zsh/mappings b/configs/.config/zsh/mappings similarity index 100% rename from home/user/.config/zsh/mappings rename to configs/.config/zsh/mappings diff --git a/home/user/.config/zsh/options b/configs/.config/zsh/options similarity index 100% rename from home/user/.config/zsh/options rename to configs/.config/zsh/options diff --git a/home/user/.config/zsh/other b/configs/.config/zsh/other similarity index 100% rename from home/user/.config/zsh/other rename to configs/.config/zsh/other diff --git a/home/user/.config/zsh/plugin b/configs/.config/zsh/plugin similarity index 100% rename from home/user/.config/zsh/plugin rename to configs/.config/zsh/plugin diff --git a/home/user/.config/zsh/prompt b/configs/.config/zsh/prompt similarity index 100% rename from home/user/.config/zsh/prompt rename to configs/.config/zsh/prompt diff --git a/home/user/.config/zsh/sourcer b/configs/.config/zsh/sourcer similarity index 100% rename from home/user/.config/zsh/sourcer rename to configs/.config/zsh/sourcer diff --git a/home/user/.config/zsh/zshrc.d/00_zhashd.sh b/configs/.config/zsh/zshrc.d/00_zhashd.sh similarity index 100% rename from home/user/.config/zsh/zshrc.d/00_zhashd.sh rename to configs/.config/zsh/zshrc.d/00_zhashd.sh diff --git a/home/user/.docker/cli-plugins/docker-health b/configs/.docker/cli-plugins/docker-health similarity index 100% rename from home/user/.docker/cli-plugins/docker-health rename to configs/.docker/cli-plugins/docker-health diff --git a/home/user/.docker/cli-plugins/docker-ips b/configs/.docker/cli-plugins/docker-ips similarity index 100% rename from home/user/.docker/cli-plugins/docker-ips rename to configs/.docker/cli-plugins/docker-ips diff --git a/home/user/.docker/cli-plugins/docker-shell b/configs/.docker/cli-plugins/docker-shell similarity index 100% rename from home/user/.docker/cli-plugins/docker-shell rename to configs/.docker/cli-plugins/docker-shell diff --git a/home/user/.editorconfig b/configs/.editorconfig similarity index 100% rename from home/user/.editorconfig rename to configs/.editorconfig diff --git a/home/user/.editrc b/configs/.editrc similarity index 100% rename from home/user/.editrc rename to configs/.editrc diff --git a/home/user/.gnupg/gpg.conf b/configs/.gnupg/gpg.conf similarity index 100% rename from home/user/.gnupg/gpg.conf rename to configs/.gnupg/gpg.conf diff --git a/home/user/.infokey b/configs/.infokey similarity index 100% rename from home/user/.infokey rename to configs/.infokey diff --git a/home/user/.inputrc b/configs/.inputrc similarity index 100% rename from home/user/.inputrc rename to configs/.inputrc diff --git a/home/user/.ipython/profile_default/ipython_config.py b/configs/.ipython/profile_default/ipython_config.py similarity index 100% rename from home/user/.ipython/profile_default/ipython_config.py rename to configs/.ipython/profile_default/ipython_config.py diff --git a/home/user/.java/.userPrefs/com/fs/starfarer/prefs.xml b/configs/.java/.userPrefs/com/fs/starfarer/prefs.xml similarity index 100% rename from home/user/.java/.userPrefs/com/fs/starfarer/prefs.xml rename to configs/.java/.userPrefs/com/fs/starfarer/prefs.xml diff --git a/home/user/.lesskey b/configs/.lesskey similarity index 100% rename from home/user/.lesskey rename to configs/.lesskey diff --git a/home/user/.local/bin/apco b/configs/.local/bin/apco similarity index 100% rename from home/user/.local/bin/apco rename to configs/.local/bin/apco diff --git a/home/user/.local/bin/bak b/configs/.local/bin/bak similarity index 100% rename from home/user/.local/bin/bak rename to configs/.local/bin/bak diff --git a/home/user/.local/bin/bb b/configs/.local/bin/bb similarity index 100% rename from home/user/.local/bin/bb rename to configs/.local/bin/bb diff --git a/home/user/.local/bin/beep_bigben.sh b/configs/.local/bin/beep_bigben.sh similarity index 100% rename from home/user/.local/bin/beep_bigben.sh rename to configs/.local/bin/beep_bigben.sh diff --git a/home/user/.local/bin/beep_imperial_march.sh b/configs/.local/bin/beep_imperial_march.sh similarity index 100% rename from home/user/.local/bin/beep_imperial_march.sh rename to configs/.local/bin/beep_imperial_march.sh diff --git a/home/user/.local/bin/beep_mario_win.sh b/configs/.local/bin/beep_mario_win.sh similarity index 100% rename from home/user/.local/bin/beep_mario_win.sh rename to configs/.local/bin/beep_mario_win.sh diff --git a/home/user/.local/bin/beep_nyancat.sh b/configs/.local/bin/beep_nyancat.sh similarity index 100% rename from home/user/.local/bin/beep_nyancat.sh rename to configs/.local/bin/beep_nyancat.sh diff --git a/home/user/.local/bin/cleanup-directory b/configs/.local/bin/cleanup-directory similarity index 100% rename from home/user/.local/bin/cleanup-directory rename to configs/.local/bin/cleanup-directory diff --git a/home/user/.local/bin/cleanup-directory-log b/configs/.local/bin/cleanup-directory-log similarity index 100% rename from home/user/.local/bin/cleanup-directory-log rename to configs/.local/bin/cleanup-directory-log diff --git a/home/user/.local/bin/copy b/configs/.local/bin/copy similarity index 100% rename from home/user/.local/bin/copy rename to configs/.local/bin/copy diff --git a/home/user/.local/bin/destroy b/configs/.local/bin/destroy similarity index 100% rename from home/user/.local/bin/destroy rename to configs/.local/bin/destroy diff --git a/home/user/.local/bin/django-create-project b/configs/.local/bin/django-create-project similarity index 100% rename from home/user/.local/bin/django-create-project rename to configs/.local/bin/django-create-project diff --git a/home/user/.local/bin/emoji b/configs/.local/bin/emoji similarity index 100% rename from home/user/.local/bin/emoji rename to configs/.local/bin/emoji diff --git a/home/user/.local/bin/extract b/configs/.local/bin/extract similarity index 100% rename from home/user/.local/bin/extract rename to configs/.local/bin/extract diff --git a/home/user/.local/bin/firefox_media b/configs/.local/bin/firefox_media similarity index 100% rename from home/user/.local/bin/firefox_media rename to configs/.local/bin/firefox_media diff --git a/home/user/.local/bin/flipbit b/configs/.local/bin/flipbit similarity index 100% rename from home/user/.local/bin/flipbit rename to configs/.local/bin/flipbit diff --git a/home/user/.local/bin/ga b/configs/.local/bin/ga similarity index 100% rename from home/user/.local/bin/ga rename to configs/.local/bin/ga diff --git a/home/user/.local/bin/genpass b/configs/.local/bin/genpass similarity index 100% rename from home/user/.local/bin/genpass rename to configs/.local/bin/genpass diff --git a/home/user/.local/bin/gensalt b/configs/.local/bin/gensalt similarity index 100% rename from home/user/.local/bin/gensalt rename to configs/.local/bin/gensalt diff --git a/home/user/.local/bin/gobuild b/configs/.local/bin/gobuild similarity index 100% rename from home/user/.local/bin/gobuild rename to configs/.local/bin/gobuild diff --git a/home/user/.local/bin/highlight-logs b/configs/.local/bin/highlight-logs similarity index 100% rename from home/user/.local/bin/highlight-logs rename to configs/.local/bin/highlight-logs diff --git a/home/user/.local/bin/httpstatus b/configs/.local/bin/httpstatus similarity index 100% rename from home/user/.local/bin/httpstatus rename to configs/.local/bin/httpstatus diff --git a/home/user/.local/bin/json b/configs/.local/bin/json similarity index 100% rename from home/user/.local/bin/json rename to configs/.local/bin/json diff --git a/home/user/.local/bin/mirror-site b/configs/.local/bin/mirror-site similarity index 100% rename from home/user/.local/bin/mirror-site rename to configs/.local/bin/mirror-site diff --git a/home/user/.local/bin/mksh b/configs/.local/bin/mksh similarity index 100% rename from home/user/.local/bin/mksh rename to configs/.local/bin/mksh diff --git a/home/user/.local/bin/mpv-service.sh b/configs/.local/bin/mpv-service.sh similarity index 100% rename from home/user/.local/bin/mpv-service.sh rename to configs/.local/bin/mpv-service.sh diff --git a/home/user/.local/bin/myip b/configs/.local/bin/myip similarity index 100% rename from home/user/.local/bin/myip rename to configs/.local/bin/myip diff --git a/home/user/.local/bin/nato b/configs/.local/bin/nato similarity index 100% rename from home/user/.local/bin/nato rename to configs/.local/bin/nato diff --git a/home/user/.local/bin/open b/configs/.local/bin/open similarity index 100% rename from home/user/.local/bin/open rename to configs/.local/bin/open diff --git a/home/user/.local/bin/pasta b/configs/.local/bin/pasta similarity index 100% rename from home/user/.local/bin/pasta rename to configs/.local/bin/pasta diff --git a/home/user/.local/bin/pastas b/configs/.local/bin/pastas similarity index 100% rename from home/user/.local/bin/pastas rename to configs/.local/bin/pastas diff --git a/home/user/.local/bin/pchromium b/configs/.local/bin/pchromium similarity index 100% rename from home/user/.local/bin/pchromium rename to configs/.local/bin/pchromium diff --git a/home/user/.local/bin/player b/configs/.local/bin/player similarity index 100% rename from home/user/.local/bin/player rename to configs/.local/bin/player diff --git a/home/user/.local/bin/py b/configs/.local/bin/py similarity index 100% rename from home/user/.local/bin/py rename to configs/.local/bin/py diff --git a/home/user/.local/bin/rmt b/configs/.local/bin/rmt similarity index 100% rename from home/user/.local/bin/rmt rename to configs/.local/bin/rmt diff --git a/home/user/.local/bin/scratch b/configs/.local/bin/scratch similarity index 100% rename from home/user/.local/bin/scratch rename to configs/.local/bin/scratch diff --git a/home/user/.local/bin/screenshot b/configs/.local/bin/screenshot similarity index 100% rename from home/user/.local/bin/screenshot rename to configs/.local/bin/screenshot diff --git a/home/user/.local/bin/serveit b/configs/.local/bin/serveit similarity index 100% rename from home/user/.local/bin/serveit rename to configs/.local/bin/serveit diff --git a/home/user/.local/bin/sha b/configs/.local/bin/sha similarity index 100% rename from home/user/.local/bin/sha rename to configs/.local/bin/sha diff --git a/home/user/.local/bin/showtips b/configs/.local/bin/showtips similarity index 100% rename from home/user/.local/bin/showtips rename to configs/.local/bin/showtips diff --git a/home/user/.local/bin/split-file b/configs/.local/bin/split-file similarity index 100% rename from home/user/.local/bin/split-file rename to configs/.local/bin/split-file diff --git a/home/user/.local/bin/starsector b/configs/.local/bin/starsector similarity index 100% rename from home/user/.local/bin/starsector rename to configs/.local/bin/starsector diff --git a/home/user/.local/bin/timer b/configs/.local/bin/timer similarity index 100% rename from home/user/.local/bin/timer rename to configs/.local/bin/timer diff --git a/home/user/.local/bin/tryna b/configs/.local/bin/tryna similarity index 100% rename from home/user/.local/bin/tryna rename to configs/.local/bin/tryna diff --git a/home/user/.local/bin/trynafail b/configs/.local/bin/trynafail similarity index 100% rename from home/user/.local/bin/trynafail rename to configs/.local/bin/trynafail diff --git a/home/user/.local/bin/vim_askpass_helper b/configs/.local/bin/vim_askpass_helper similarity index 100% rename from home/user/.local/bin/vim_askpass_helper rename to configs/.local/bin/vim_askpass_helper diff --git a/home/user/.local/bin/wake b/configs/.local/bin/wake similarity index 100% rename from home/user/.local/bin/wake rename to configs/.local/bin/wake diff --git a/home/user/.local/bin/weather b/configs/.local/bin/weather similarity index 100% rename from home/user/.local/bin/weather rename to configs/.local/bin/weather diff --git a/home/user/.local/share/applications/pchromium.desktop b/configs/.local/share/applications/pchromium.desktop similarity index 100% rename from home/user/.local/share/applications/pchromium.desktop rename to configs/.local/share/applications/pchromium.desktop diff --git a/home/user/.local/share/applications/starsector.desktop b/configs/.local/share/applications/starsector.desktop similarity index 100% rename from home/user/.local/share/applications/starsector.desktop rename to configs/.local/share/applications/starsector.desktop diff --git a/home/user/.mozilla/firefox/user.js b/configs/.mozilla/firefox/user.js similarity index 100% rename from home/user/.mozilla/firefox/user.js rename to configs/.mozilla/firefox/user.js diff --git a/home/user/.psqlrc b/configs/.psqlrc similarity index 100% rename from home/user/.psqlrc rename to configs/.psqlrc diff --git a/home/user/.screenlayout/default b/configs/.screenlayout/default similarity index 100% rename from home/user/.screenlayout/default rename to configs/.screenlayout/default diff --git a/home/user/.shortcuts/hideWorkspaces b/configs/.shortcuts/hideWorkspaces similarity index 100% rename from home/user/.shortcuts/hideWorkspaces rename to configs/.shortcuts/hideWorkspaces diff --git a/home/user/.shortcuts/suspendpc b/configs/.shortcuts/suspendpc similarity index 100% rename from home/user/.shortcuts/suspendpc rename to configs/.shortcuts/suspendpc diff --git a/home/user/.shortcuts/wakepc b/configs/.shortcuts/wakepc similarity index 100% rename from home/user/.shortcuts/wakepc rename to configs/.shortcuts/wakepc diff --git a/home/user/.sqliterc b/configs/.sqliterc similarity index 100% rename from home/user/.sqliterc rename to configs/.sqliterc diff --git a/home/user/.ssh/config b/configs/.ssh/config similarity index 100% rename from home/user/.ssh/config rename to configs/.ssh/config diff --git a/home/user/.termux/termux.properties b/configs/.termux/termux.properties similarity index 100% rename from home/user/.termux/termux.properties rename to configs/.termux/termux.properties diff --git a/home/user/.tmux/dotfiles b/configs/.tmux/dotfiles similarity index 100% rename from home/user/.tmux/dotfiles rename to configs/.tmux/dotfiles diff --git a/home/user/.tmux/example-background-job b/configs/.tmux/example-background-job similarity index 100% rename from home/user/.tmux/example-background-job rename to configs/.tmux/example-background-job diff --git a/home/user/.tmux/landing b/configs/.tmux/landing similarity index 100% rename from home/user/.tmux/landing rename to configs/.tmux/landing diff --git a/home/user/.tmux/sandbox b/configs/.tmux/sandbox similarity index 100% rename from home/user/.tmux/sandbox rename to configs/.tmux/sandbox diff --git a/home/user/.tmux/ssh b/configs/.tmux/ssh similarity index 100% rename from home/user/.tmux/ssh rename to configs/.tmux/ssh diff --git a/home/user/.tmux/system-update b/configs/.tmux/system-update similarity index 100% rename from home/user/.tmux/system-update rename to configs/.tmux/system-update diff --git a/home/user/.xprofile b/configs/.xprofile similarity index 100% rename from home/user/.xprofile rename to configs/.xprofile diff --git a/home/user/.zshenv b/configs/.zshenv similarity index 100% rename from home/user/.zshenv rename to configs/.zshenv diff --git a/home/user/.zshenv.d/.gitkeep b/configs/.zshenv.d/.gitkeep similarity index 100% rename from home/user/.zshenv.d/.gitkeep rename to configs/.zshenv.d/.gitkeep diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..1409b68 --- /dev/null +++ b/flake.nix @@ -0,0 +1,83 @@ +{ + description = "My NixOS configuration with flakes and home-manager"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + + home-manager = { + url = "github:nix-community/home-manager"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + + nixpkgs-stable.url = "github:NixOS/nixpkgs/nixos-24.11"; + + }; + + outputs = { self, nixpkgs, home-manager, ... }@inputs: + let + system = "x86_64-linux"; + + # Функция создания хоста + mkHost = { hostname, username, system ? "x86_64-linux", extraModules ? [ ] }: + nixpkgs.lib.nixosSystem { + inherit system; + + specialArgs = { + inherit inputs; + hostname = hostname; + username = username; + }; + + modules = [ + # Системные модули + ./hosts/default/configuration.nix + ./hosts/${hostname}/configuration.nix + + # Home Manager модуль + home-manager.nixosModules.home-manager + { + home-manager = { + useGlobalPkgs = true; + useUserPackages = true; + + # Конфигурация для пользователя + users.${username} = import ./home/users/${username}.nix; + + # Дополнительные аргументы для home-manager + extraSpecialArgs = { + inherit inputs; + hostname = hostname; + }; + }; + } + + # Собственные модули + ./modules/common + ./modules/desktop + + ] ++ extraModules; + }; + + in { + # Конфигурации для разных хостов + nixosConfigurations = { + # Основной рабочий ПК + desktop = mkHost { + hostname = "thek4n.ru"; + username = "thek4n"; + extraModules = [ + ./hosts/thek4n.ru/hardware.nix + ]; + }; + }; + + # Для удобства разработки + devShells.${system}.default = nixpkgs.legacyPackages.${system}.mkShell { + buildInputs = with nixpkgs.legacyPackages.${system}; [ + nixpkgs-fmt + nixd + git + ]; + }; + }; +} diff --git a/nix/hosts/thek4n/home.nix b/home/users/thek4n.nix similarity index 100% rename from nix/hosts/thek4n/home.nix rename to home/users/thek4n.nix diff --git a/nix/hosts/thek4n/default.nix b/hosts/default/configuration.nix similarity index 70% rename from nix/hosts/thek4n/default.nix rename to hosts/default/configuration.nix index a43e29c..05e4ea7 100644 --- a/nix/hosts/thek4n/default.nix +++ b/hosts/default/configuration.nix @@ -1,34 +1,35 @@ -{ config, pkgs, inputs, ... }: +{ config, pkgs, inputs, hostname, username, ... }: { imports = [ - ./hardware.nix + ../../modules/common/boot.nix + ../../modules/common/audio.nix + ../../modules/services/ssh.nix ]; - # Использование grub - boot.loader.grub.enable = true; - boot.loader.grub.device = "/dev/sda"; - boot.loader.grub.useOSProber = true; + # Имя хоста + networking.hostName = hostname; - networking.hostName = "thek4n"; - - networking.networkmanager.enable = true; - - time.timeZone = "Europe/Moscow"; - - i18n.defaultLocale = "en_US.UTF-8"; - - services.printing.enable = true; - - services.rtkit.enable = true; - services.pipewire = { - enable = true; - alsa.enable = true; - alsa.support32Bit = true; - pulse.enable = true; + # Пользователь + users.users.${username} = { + isNormalUser = true; + description = username; + extraGroups = [ "networkmanager" "wheel" "docker" "uucp" "input" "fuse" "audio" "video" ]; + initialPassword = "changeme"; + shell = pkgs.zsh; }; - services.openssh.enable = true; + environment.systemPackages = with pkgs; [ + git htop curl wget nixpkgs-fmt + alacritty bat brightnessctl ctags fd ffmpeg fzf glow + grim highlight imagemagick jq yq kanshi less lesspipe mako + man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp + socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug + waybar wget wl-clipboard wlr-randr wtype yazi ydotool zoxide + docker httpie exa zsh + ]; + + programs.firefox.enable = true; services.greetd = { enable = true; @@ -40,26 +41,6 @@ }; }; - users.user."thek4n" = { - isNormalUser = true; - description = "thek4n"; - extraGroups = [ "networkmanager" "wheel" "docker" "uucp" "input" "fuse" ]; - packages = with pkgs; [ ]; - initialPassword = "changeme"; - shell = pkgs.zsh; - }; - - environment.systemPackages = with pkgs; [ - alacritty bat brightnessctl ctags fd ffmpeg fzf glow - grim highlight imagemagick jq yq kanshi less lesspipe mako - man mpv noto-fonts p7zip poppler resvg ripgrep rofi slurp - socat sway swaybg swayidle swaylock tmux tree-sitter ueberzug - waybar wget wl-clipboard wlr-randr wtype yazi ydotool zoxide - docker httpie exa zsh - ]; - - programs.firefox.enable = true; - programs.sway = { enable = true; }; @@ -73,5 +54,16 @@ bindsym $mod+Return exec $term ''; }; + networking.networkmanager.enable = true; + + time.timeZone = "Europe/Moscow"; + + i18n.defaultLocale = "en_US.UTF-8"; + + services.printing.enable = true; + + services.rtkit.enable = true; + + # Системное состояние system.stateVersion = "26.05"; } diff --git a/nix/hosts/thek4n/hardware.nix b/hosts/thek4n/hardware.nix similarity index 100% rename from nix/hosts/thek4n/hardware.nix rename to hosts/thek4n/hardware.nix diff --git a/install b/install deleted file mode 100755 index f3707b4..0000000 --- a/install +++ /dev/null @@ -1,256 +0,0 @@ -#!/bin/sh -eu - -readonly TARGET_PATH="${HOME}" - - -_detect_current_script_real_directory() { - realpath -e -- "$(dirname -- "$(readlink -e -- "${0}")")" -} - -DOTFILES_ROOT="$(_detect_current_script_real_directory)" -readonly DOTFILES_ROOT - -readonly SUB="${DOTFILES_ROOT}/home/user" -export SUB - -. "${DOTFILES_ROOT}/TARGETS.sh" - - -_die() { - printf '%s: %s\n' "$(basename "${0}")" "${1}" >&2 - exit "${2}" -} - -string_get_first_char() ( - printf '%.1s' "${1}" -) - -string_exclude_first_char() ( - echo "${1}" | tail -c+2 -) - -map_get_value() ( - map="${1}" - key="${2}" - - echo "${map}" | grep "^${key}:" | cut -d ':' -f2 -) - -map_get_keys() ( - map="${1}" - - echo "${map}" | cut -d ':' -f1 -) - -map_key_exists() ( - map="${1}" - key="${2}" - - map_get_keys "${map}" | grep "^${2}" 1>/dev/null -) - -_link_files_in_sandbox() ( - for targetfile in "$@" - do - printf 'installing: %s\n' "${targetfile}" - if [ "$(string_get_first_char "${targetfile}")" = "%" ]; then - files="$(map_get_value "${TARGETS}" "$(string_exclude_first_char "${targetfile}")")" - #shellcheck disable=SC2086 - _link_files_in_sandbox ${files} - else - if [ ! "$(dirname "${targetfile}")" = "." ]; then - mkdir -p "${SANDBOX_PATH}/$(dirname "${targetfile}")" - fi - ln -sT "${SUB}/${targetfile}" "${SANDBOX_PATH}/${targetfile}" - fi - done -) - -_compare_sandbox_to_home() ( - comparisons="$(diff -rq "${SANDBOX_PATH}" "${TARGET_PATH}")" || true - echo "${comparisons}" | grep -vE "^Only in .+" || true -) - -_merge_sandbox_to_home() ( - cp -RTnP "${SANDBOX_PATH}" "${TARGET_PATH}" || true -) - -__install_from_sandbox() ( - comparisons="$(_compare_sandbox_to_home)" - - if [ -n "${comparisons}" ]; then - echo "${comparisons}" >&2 - _die "Found conflicting files. Exiting" 1 - fi - - echo "Merging to home..." - _merge_sandbox_to_home - echo "Successfully installed" -) - -_execute_hook_if_executable() ( - # all hooks gets SUB and SANDBOX_PATH env variables - target="${1}" - hook_name="${2}" - - hook_path="${DOTFILES_ROOT}/install-hooks/${target}/${hook_name}" - if [ -x "${hook_path}" ]; then - printf 'Executing %s for target "%s"\n' "${hook_name}" "${target}" - "${hook_path}" - fi -) - -execute_pre_hook() ( - _execute_hook_if_executable "${1}" "pre-install" -) - -recursive_execute_pre_hooks() ( - files="$(map_get_value "${TARGETS}" "${1}")" - - for targetfile in ${files} - do - if [ "$(string_get_first_char "${targetfile}")" = "%" ]; then - recursive_execute_pre_hooks "$(string_exclude_first_char "${targetfile}")" - execute_pre_hook "$(string_exclude_first_char "${targetfile}")" - fi - done -) - -execute_post_hook() ( - _execute_hook_if_executable "${1}" "post-install" -) - -recursive_execute_post_hooks() ( - files="$(map_get_value "${TARGETS}" "${1}")" - - for targetfile in ${files} - do - if [ "$(string_get_first_char "${targetfile}")" = "%" ]; then - recursive_execute_post_hooks "$(string_exclude_first_char "${targetfile}")" - execute_post_hook "$(string_exclude_first_char "${targetfile}")" - fi - done -) - -install_target() ( - target="${1}" - - files="$(map_get_value "${TARGETS}" "${target}")" - - execute_pre_hook "${target}" - recursive_execute_pre_hooks "${target}" - #shellcheck disable=SC2086 - _link_files_in_sandbox ${files} - __install_from_sandbox - recursive_execute_post_hooks "${target}" - execute_post_hook "${target}" -) - -is_target_installed() ( - target="${1}" - not_fully_installed=false - - files="$(map_get_value "${TARGETS}" "${target}")" - - for targetfile in ${files} - do - if [ "$(string_get_first_char "${targetfile}")" = "%" ]; then - is_target_installed "$(string_exclude_first_char "${targetfile}")" || not_fully_installed=true - else - if [ ! -e "${TARGET_PATH}/${targetfile}" ]; then - printf '%s not linked\n' "${targetfile}" - not_fully_installed=true - fi - fi - done - if ${not_fully_installed}; then - printf 'Target "%s" not fully installed\n\n' "${target}" - return 1 - fi - return 0 -) - -find_targets_that_depend_on() ( - for target in $(map_get_keys "${TARGETS}") - do - files="$(map_get_value "${TARGETS}" "${target}")" - - if map_key_exists "${TARGETS}" "%${1}"; then - printf '%s\n' "${target}" - fi - done -) - -die_if_installed_targets_depend_on() ( - for reverse_dependecy in $(find_targets_that_depend_on "${1}") - do - if is_target_installed "${reverse_dependecy}" >/dev/null; then - _die "target '${reverse_dependecy}' is depends on installed target '${1}'. Exiting..." 1 - fi - done -) - -cmd_unlink() ( - for target in "$@" - do - die_if_installed_targets_depend_on "${target}" - - files="$(map_get_value "${TARGETS}" "${target}")" - for targetfile in ${files} - do - if [ "$(string_get_first_char "${targetfile}")" = "%" ]; then - continue - fi - - if [ -e "${TARGET_PATH}/${targetfile}" ]; then - unlink "${TARGET_PATH}/${targetfile}" - fi - done - done -) - -cmd_no_target() ( - _die "TARGET '${1}' not exists" 1 -) - -cmd_list() ( - map_get_keys "${TARGETS}" -) - -target_exists() ( - target="${1}" - map_key_exists "${TARGETS}" "${target}" -) - -cmd_install() ( - for target in "$@" - do - if ! target_exists "${target}"; then - cmd_no_target "${target}" - fi - - SANDBOX_PATH="$(mktemp -td "${USER:-user}.dotfiles_XXXXXXX")" - export SANDBOX_PATH - install_target "${target}" - rm -rf "${SANDBOX_PATH}" - done -) - -cmd_help() ( - echo "Dotfiles installation script: -Usage: ./install TARGET... -Usage: ./install unlink TARGET... -Usage: ./install check TARGET -Usage: ./install list" -) - -readonly executed_command="${1}" - -case "${executed_command}" in - unlink) shift; cmd_unlink "$@" ;; - check) shift; is_target_installed "$@" ;; - list) shift; cmd_list "$@" ;; - help) shift; cmd_help "$@" ;; - *) shift; cmd_install "${executed_command}" "$@" ;; -esac -exit 0 diff --git a/modules/common/audio.nix b/modules/common/audio.nix new file mode 100644 index 0000000..0cad64b --- /dev/null +++ b/modules/common/audio.nix @@ -0,0 +1,10 @@ +{ config, pkgs, ... }: + +{ + services.pipewire = { + enable = true; + alsa.enable = true; + alsa.support32Bit = true; + pulse.enable = true; + }; +} diff --git a/modules/common/boot.nix b/modules/common/boot.nix new file mode 100644 index 0000000..622cddc --- /dev/null +++ b/modules/common/boot.nix @@ -0,0 +1,14 @@ +{ config, pkgs, ... }: + +{ + # Загрузчик + boot.loader = { + systemd-boot.enable = true; + efi.canTouchEfiVariables = true; + }; + + # Ядро + boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ]; + boot.kernelModules = [ ]; + boot.extraModulePackages = [ ]; +} diff --git a/modules/services/ssh.nix b/modules/services/ssh.nix new file mode 100644 index 0000000..ce45d48 --- /dev/null +++ b/modules/services/ssh.nix @@ -0,0 +1,36 @@ +{ config, pkgs, ... }: + +{ + services.openssh = { + enable = true; + + settings = { + Port = 22; + + PasswordAuthentication = false; + PermitRootLogin = "no"; + + Protocol = 2; + + X11Forwarding = true; + + LoginGraceTime = 30; + + MaxAuthTries = 3; + + PermitEmptyPasswords = false; + + IgnoreRhosts = true; + HostbasedAuthentication = false; + + LogLevel = "INFO"; + + ClientAliveInterval = 300; + ClientAliveCountMax = 2; + }; + + authorizedKeysFiles = [ ".ssh/authorized_keys" ]; + }; + + networking.firewall.allowedTCPPorts = [ 22 ]; +} diff --git a/nix/flake.nix b/nix/flake.nix deleted file mode 100644 index 6935b55..0000000 --- a/nix/flake.nix +++ /dev/null @@ -1,26 +0,0 @@ -{ - description = "NixOS configuration with flakes"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; - - home-manager = { - url = "github:nix-community/home-manager"; - inputs.nixpkgs.follows = "nixpkgs"; - }; - }; - - outputs = { self, nixpkgs, home-manager, ... }@inputs: { - nixosConfigurations.thek4n = nixpkgs.lib.nixosSystem { - system = "x86_64-linux"; - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/thek4n/default.nix - ./hosts/thek4n/home.nix - ]; - }; - - # `nixos-rebuild switch --flake .#thek4n` - default = self.nixosConfigurations.thek4n; - }; -}