This commit is contained in:
Aria Nolan 2023-10-20 20:49:53 -04:00
parent b94b080b04
commit f8d18dfb8b
11 changed files with 383 additions and 7 deletions

View file

@ -56,9 +56,16 @@
inherit pkgs; inherit pkgs;
modules = [ modules = [
./users/tacocat/home.nix ./users/tacocat/home.nix
# ./users/tacocat/programs
# ./users/tacocat/shell
# ./users/tacocat/helix
# ./users/tacocat/emacs
# this is awful why are you doing it like this
]; ];
}; };
extraSpecialArgs = { inherit inputs; }; # Pass flake inputs to our config
#outputs home-manager activation package for use on non-NixOS, i think? #outputs home-manager activation package for use on non-NixOS, i think?
packages.${system}."tacocat" = self.homeConfigurations."tacocat".activationPackage; packages.${system}."tacocat" = self.homeConfigurations."tacocat".activationPackage;
}; };

View file

@ -0,0 +1,101 @@
{pkgs, ...}: {
programs.emacs = {
enable = true;
package = pkgs.emacs29-gtk3;
extraConfig = ''
(menu-bar-mode -1)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(blink-cursor-mode 0)
;; scale headings in org-mode
(setq zenburn-scale-org-headlines t)
;; scale headings in outline-mode
(setq zenburn-scale-outline-headlines t)
(load-theme 'zenburn :no-confirm)
(add-to-list 'default-frame-alist
'(font . "Maple Mono-12"))
(global-set-key (kbd "C-c a") #'org-agenda)
(global-set-key (kbd "C-c f") #'recentf-open)
(global-hl-line-mode 1)
(global-visual-line-mode 1)
(setq evil-respect-visual-line-mode 1)
(require 'evil)
(evil-mode 1)
(require 'evil-org)
(add-hook 'org-mode-hook 'evil-org-mode)
(evil-org-set-key-theme '(textobjects insert navigation additional shift todo heading))
(require 'evil-org-agenda)
(evil-org-agenda-set-keys)
(require 'smooth-scrolling)
(smooth-scrolling-mode 1)
(setq org-startup-with-inline-images 1)
(setq org-startup-indented 1)
;;(global-display-line-numbers-mode 1)
;;(setq display-line-numbers-type 'visual)
(require 'org-download)
;; Drag-and-drop to `dired`
(add-hook 'dired-mode-hook 'org-download-enable)
(setq org-image-actual-width nil)
(setq ring-bell-function 'ignore)
(setq org-agenda-files '(
"~/sync/org/agenda.org"
"~/sync/org/school/agendas/"
))
(setq org-agenda-span 'fortnight)
(require 'ox-publish) (setq org-publish-project-alist
'(
;; ... add all the components here (see below)...
("org-notes"
:base-directory "~/sync/org/"
:base-extension "org"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
)
("org-static"
:base-directory "~/sync/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-publish-attachment
)
;; publish component
("org" :components ("org-notes" "org-static"))
))
''; # TODO move plugin setup into a seperate file to keep things organized
# also add autoloading so emacs starts faster
extraPackages = epkgs:
with epkgs; [
zenburn-theme
color-theme-tangotango
evil
evil-org
org-download
smooth-scrolling
ox-pandoc
];
};
}

View file

@ -0,0 +1,28 @@
(require 'ox-publish) (setq org-publish-project-alist
'(
;; ... add all the components here (see below)...
("org-notes"
:base-directory "~/sync/org/"
:base-extension "org"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-html-publish-to-html
:headline-levels 4 ; Just the default for this project.
:auto-preamble t
)
("org-static"
:base-directory "~/sync/org/"
:base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf"
:publishing-directory "~/public_html/"
:recursive t
:publishing-function org-publish-attachment
)
;; publish component
("org" :components ("org-notes" "org-static"))
))

View file

@ -0,0 +1,61 @@
{
# config,
pkgs,
inputs,
...
}: {
imports = [
./languages.nix
];
programs.helix = {
enable = true;
# package = inputs.helix.packages."x86_64-linux".default;
# package = inputs.helix.packages.${pkgs.system}.default.overrideAttrs (self: {
# makeWrapperArgs = with pkgs;
# self.makeWrapperArgs
# or []
# ++ [
# "--suffix"
# "PATH"
# ":"
# (lib.makeBinPath [
# clang-tools
# marksman
# nil
# nodePackages.bash-language-server
# shellcheck
# java-language-server
# ])
# ];
# });
settings = {
theme = "rose_pine_moon";
editor = {
line-number = "relative";
lsp.display-messages = true;
scrolloff = 5;
middle-click-paste = false;
cursorline = true;
auto-format = false;
idle-timeout = 400;
color-modes = true;
soft-wrap.enable = true;
whitespace = {
render = {
space = "none";
tab = "none";
newline = "none";
};
};
indent-guides = {
render = true;
character = "";
rainbow-option = "dim";
};
};
};
};
}

View file

@ -0,0 +1,56 @@
{
pkgs,
lib,
...
}: {
programs.helix.languages = {
language = [
{
name = "bash";
auto-format = false;
formatter = {
command = "${pkgs.shfmt}/bin/shfmt";
args = ["-i" "2"];
};
}
{
name = "java";
language-servers = [ "java-language-server" ];
}
];
language-server = {
bash-language-server = {
command = "${pkgs.nodePackages.bash-language-server}/bin/bash-language-server";
args = ["start"];
};
clangd = {
command = "${pkgs.clang-tools}/bin/clangd";
clangd.fallbackFlags = ["-std=c++2b"];
};
nil = {
command = lib.getExe pkgs.nil;
config.nil.formatting.command = ["${lib.getExe pkgs.alejandra}" "-q"];
};
texlab = {
command = "${pkgs.texlab}/bin/texlab";
config.texlab.executable = "${pkgs.tectonic}/bin/tectonic";
config.texlab.build.onSave = true;
config.texlab.args = [
"-X"
"compile"
"%f"
"--keep-logs"
"--keep-intermediates"
];
};
java-language-server = {
command = "${pkgs.java-language-server}/bin/java-language-server";
};
};
};
}

View file

@ -1,11 +1,4 @@
{pkgs, ...}: { {pkgs, ...}: {
modules = [
./programs
./helix
./shell
./emacs
];
home = { home = {
username = "tacocat"; username = "tacocat";
homeDirectory = "/home/tacocat"; homeDirectory = "/home/tacocat";
@ -68,4 +61,11 @@
# Let Home Manager install and manage itself. # Let Home Manager install and manage itself.
programs.home-manager.enable = true; programs.home-manager.enable = true;
imports = [
./programs
./shell
./helix
./emacs
];
} }

View file

@ -0,0 +1,5 @@
{
imports = [
./kitty.nix
];
}

View file

@ -0,0 +1,32 @@
{pkgs, ...}: {
programs.kitty = {
enable = true;
package = pkgs.runCommandLocal "no-kitty" {} "mkdir $out";
# use kitty provided by your distro's package manager
# can cause weird behaviour if anyhting depends on this package
font.name = "FiraCode Nerd Font Mono";
# font.package = pkgs.maple-mono-NF;
font.package = pkgs.nerdfonts.override {fonts = ["FiraCode"];};
font.size = 12.0;
shellIntegration.enableZshIntegration = true;
theme = "Rosé Pine Moon";
settings = {
cursor = "none";
cursor_shape = "block";
cursor_blink_interval = 0;
shell = "/home/tacocat/.nix-profile/bin/zsh";
shell_integration = "no-cursor";
background_opacity = "0.9";
tab_bar_style = "powerline";
tab_separator = " |";
tab_powerline_style = "slanted";
enable_audio_bell = "no";
# allow_remote_control = "password";
update_check_interval = 0;
linux_display_server = "wayland";
};
keybindings = {
"kitty_mod+b" = "select_tab";
};
};
}

View file

@ -0,0 +1,20 @@
{...}: {
programs.bash = {
enable = true;
enableCompletion = true;
bashrcExtra = ''
PS1='[\u@\h \W]\$ '
'';
profileExtra = ''
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/git_school
ssh-add ~/.ssh/git_personal
ssh-add ~/.ssh/id_ed25519
'';
};
}

View file

@ -0,0 +1,6 @@
{
imports = [
./zsh.nix
./bash.nix
];
}

View file

@ -0,0 +1,60 @@
{
config,
pkgs,
...
}: {
programs.zsh = {
enable = true;
enableAutosuggestions = true;
enableCompletion = true;
syntaxHighlighting.enable = true;
autocd = true;
defaultKeymap = null;
dotDir = "~/.config/zsh";
history = {
ignoreSpace = true;
path = "${config.xdg.dataHome}/zsh/zsh_history";
save = 10000;
};
historySubstringSearch.enable = true;
plugins = [
{
name = "powerlevel10k";
file = "powerlevel10k.zsh-theme";
src = pkgs.fetchFromGitHub {
owner = "romkatv";
repo = "powerlevel10k";
rev = "v1.19.0";
sha256 = "+hzjSbbrXr0w1rGHm6m2oZ6pfmD6UUDBfPd7uMg5l5c=";
};
}
{
name = "z.lua";
src = pkgs.fetchFromGitHub {
owner = "skywind3000";
repo = "z.lua";
rev = "1.8.16";
sha256 = "VVJXBVENXlJXVj831Hx4sa7AzGHXpsui6tga9uA6ZnE=";
};
}
{
name = "zsh-vi-mode";
src = pkgs.fetchFromGitHub {
owner = "jeffreytse";
repo = "zsh-vi-mode";
rev = "v0.10.0";
sha256 = "QE6ZwwM2X0aPqNnbVrj0y7w9hmuRf0H1j8nXYwyoLo4=";
};
}
];
initExtra = ''
source $HOME/.config/zsh/.p10k.zsh
'';
localVariables = {
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD = true;
};
};
home.file.".config/zsh/.p10k.zsh".source = ./.p10k.zsh;
}