first working build of rewrite

This commit is contained in:
Steven Carpenter 2024-04-13 03:58:29 -04:00
commit 44a3f420c6
29 changed files with 1261 additions and 0 deletions

View file

@ -0,0 +1,73 @@
{ config, lib, pkgs, ... }:
{
options.speccon18.hm.alacritty.enable = lib.mkEnableOption "Enable Alacritty";
config = lib.mkIf config.speccon18.hm.alacritty.enable {
programs.alacritty = {
enable = true;
settings = {
cursor = {
style = {
shape = "Beam";
blinking = "On";
blink_interval = 75;
};
};
window = {
dimensions = {
columns = 120;
lines = 25;
};
decorations = "full";
opacity = 1.0;
title = "Alacritty";
};
font = {
normal = {
family = "SauceCodePro Nerd Font";
style = "Regular";
};
bold = {
family = "SauceCodePro Nerd Font";
style = "Bold";
};
italic = {
family = "SauceCodePro Nerd Font";
style = "Italic";
};
size = 14;
};
colors = {
primary = {
background = "#1d1f21";
foreground = "#c5c8c6";
};
cursor = {
text = "CellBackground";
cursor = "CellForeground";
};
normal = {
black = "#363537";
red = "#FC618D";
green = "#7BD88F";
yellow = "#FCE566";
blue = "#FD9353";
magenta = "#948AE3";
cyan = "#5AD4E6";
white = "#F7F1FF";
};
bright = {
black = "#69676C";
red = "#FC618D";
green = "#7BD88F";
yellow = "#FCE566";
blue = "#FD9353";
magenta = "#948AE3";
cyan = "#5AD4E6";
white = "#F7F1FF";
};
};
};
};
};
}

View file

@ -0,0 +1,11 @@
{inputs,config,pkgs,...}:{
imports = [
inputs.home-manager.nixosModules.home-manager
];
home-manager = {
# useGlobalPackages = true;
# useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
users.speccon18 = import ./home.nix;
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.direnv.enable = lib.mkEnableOption "enables direnv with zsh integration";
config = lib.mkIf config.speccon18.hm.direnv.enable {
programs.direnv = {
enable = true;
enableZshIntegration = lib.mkDefault true;
};
};
}

View file

@ -0,0 +1,15 @@
{pkgs, config, lib, ...}:{
options.speccon18.hm.git.enable = lib.mkEnableOption "enables specs personal git preferences";
config = lib.mkIf config.speccon18.hm.git.enable {
programs.git = {
enable = true;
userName = "specCon18";
userEmail = "steven.carpenter@skdevstudios.com";
extraConfig = {
init = {
defaultBranch = "main";
};
};
};
};
}

View file

@ -0,0 +1,146 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.helix.enable = lib.mkEnableOption "enables specs custom helix configuration";
config = lib.mkIf config.speccon18.hm.helix.enable {
home.packages = with pkgs; [
nodePackages_latest.yaml-language-server
nodePackages_latest.bash-language-server
nodePackages_latest.vscode-langservers-extracted
nodePackages_latest.dockerfile-language-server-nodejs
nodePackages_latest.typescript
nodePackages_latest.typescript-language-server
nodePackages_latest.svelte-language-server
nodePackages_latest.vls
python311Packages.python-lsp-server
# rnix-lsp is archived need to update to fix CVE-2024-27297
rust-analyzer
taplo
];
programs.helix = {
enable = true;
settings = {
theme = "monokai_pro_octagon";
editor = {
line-number = "relative";
shell = ["zsh" "-c"];
completion-trigger-len = 0;
scroll-lines = 1;
scrolloff = 5;
cursorline = true;
cursor-shape = {
normal = "block";
insert = "bar";
select = "underline";
};
color-modes = true;
indent-guides.render = true;
file-picker.hidden = false;
auto-pairs = true;
lsp = {
enable = true;
display-messages = true;
auto-signature-help = true;
display-signature-help-docs = true;
snippets = true;
goto-reference-include-declaration = true;
};
statusline = {
mode = {
normal = "NORMAL";
insert = "INSERT";
select = "SELECT";
};
left = [ "mode" "separator" "spinner" "separator" "file-name" ];
right = [ "diagnostics" "position" "file-encoding" ];
};
};
};
themes = {
monokai_pro_octagon = let
red = "#ff657a";
orange = "#ff9b5e";
yellow = "#ffd76d";
green = "#bad761";
blue = "#9cd1bb";
purple = "#c39ac9";
base0 = "#161821";
base1 = "#1e1f2b";
base2 = "#282a3a";
base3 = "#3a3d4b";
base4 = "#535763";
base5 = "#696d77";
base6 = "#767b81";
base7 = "#b2b9bd";
base8 = "#eaf2f1";
base8x0c = "#303342";
in {
"ui.linenr.selected" = { bg = base3; };
"ui.text.focus" = { fg = yellow; modifiers = ["bold"]; };
"ui.menu" = { fg = base8; bg = base3; };
"ui.menu.selected" = { fg = base2; bg = yellow; };
"ui.virtual.whitespace" = base5;
"ui.virtual.ruler" = { bg = base1; };
"info" = base8;
"hint" = base8;
"ui.background" = {};
"ui.statusline.inactive" = { fg = base8; bg = base8x0c; };
"ui.statusline" = { fg = base8; bg = base4; };
"ui.statusline.normal" = { fg = base4; bg = blue; };
"ui.statusline.insert" = { fg = base4; bg = green; };
"ui.statusline.select" = { fg = base4; bg = purple; };
"ui.popup" = { bg = base3; };
"ui.window" = { bg = base3; };
"ui.help" = { fg = base8; bg = base3; };
"ui.selection" = { bg = base4; };
"ui.cursor.match" = { bg = base4; };
"ui.cursorline" = { bg = base1; };
"comment" = { fg = base5; modifiers = ["italic"]; };
"ui.linenr" = { fg = base5; };
"ui.cursor.primary" = { fg = base7; modifiers = ["reversed"]; };
"attribute" = blue;
"variable" = base8;
"constant" = orange;
"variable.builtin" = red;
"constant.builtin" = red;
"namespace" = base8;
"ui.text" = { fg = base8; };
"punctuation" = base6;
"type" = green;
"type.builtin" = { fg = red; };
"label" = base8;
"constructor" = blue;
"function" = green;
"function.macro" = { fg = blue; };
"function.builtin" = { fg = "cyan"; };
"operator" = red;
"variable.other.member" = base8;
"keyword" = { fg = red; };
"keyword.directive" = blue;
"variable.parameter" = "#f59762";
"error" = red;
"special" = "#f59762";
"module" = "#f59762";
"warning" = "orange";
"constant.character.escape" = { fg = base8; };
"string" = yellow;
"constant.numeric" = purple;
"diff.plus" = green;
"diff.delta" = "orange";
"diff.minus" = red;
"diagnostic.warning" = { underline = { color = "orange"; style = "curl"; }; };
"diagnostic.error" = { underline = { color = red; style = "curl"; }; };
"diagnostic.info" = { underline = { color = base8; style = "curl"; }; };
"diagnostic.hint" = { underline = { color = base8; style = "curl"; }; };
"markup.heading" = green;
"markup.bold" = { fg = "orange"; modifiers = ["bold"]; };
"markup.italic" = { fg = "orange"; modifiers = ["italic"]; };
"markup.strikethrough" = { modifiers = ["crossed_out"]; };
"markup.link.url" = { fg = "orange"; modifiers = ["underlined"]; };
"markup.link.text" = yellow;
"markup.quote" = green;
};
};
};
};
}

View file

@ -0,0 +1,99 @@
{ config, pkgs, ... }:
{
imports = [
./alacritty.nix
./direnv.nix
./git.nix
./helix.nix
./ncspot.nix
./starship.nix
./syncthing.nix
./waybar.nix
./zellij.nix
./zoxide.nix
./zsh.nix
];
speccon18.hm.alacritty.enable = true;
speccon18.hm.direnv.enable = true;
speccon18.hm.git.enable = true;
speccon18.hm.helix.enable = true;
speccon18.hm.ncspot.enable = true;
speccon18.hm.starship.enable = true;
speccon18.hm.syncthing.enable = true;
speccon18.hm.waybar.enable = false;
speccon18.hm.zellij.enable = true;
speccon18.hm.zoxide.enable = true;
speccon18.hm.zsh.enable = true;
# Home Manager needs a bit of information about you and the paths it should
# manage.
home = {
username = "speccon18";
homeDirectory = "/home/speccon18";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
packages = [
# # Adds the 'hello' command to your environment. It prints a friendly
# # "Hello, world!" when run.
# pkgs.hello
# # It is sometimes useful to fine-tune packages, for example, by applying
# # overrides. You can do that directly here, just don't forget the
# # parentheses. Maybe you want to install Nerd Fonts with a limited number of
# # fonts?
# (pkgs.nerdfonts.override { fonts = [ "FantasqueSansMono" ]; })
# # You can also create simple shell scripts directly inside your
# # configuration. For example, this adds a command 'my-hello' to your
# # environment:
# (pkgs.writeShellScriptBin "my-hello" ''
# echo "Hello, ${config.home.username}!"
# '')
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/speccon18/etc/profile.d/hm-session-vars.sh
#
sessionVariables = {
# EDITOR = "emacs";
};
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -0,0 +1,10 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.ncspot.enable = lib.mkEnableOption "enable ncspot";
config = lib.mkIf config.speccon18.hm.ncspot.enable {
programs.ncspot = {
enable = true;
package = pkgs.ncspot;
};
};
}

View file

@ -0,0 +1,10 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.starship.enable = lib.mkEnableOption "enables specs custom starship config";
config = lib.mkIf config.speccon18.hm.starship.enable {
programs.starship = {
enable = true;
enableZshIntegration = true;
};
};
}

View file

@ -0,0 +1,10 @@
{config, lib, pkgs, modulesPath, ... }:
{
options.speccon18.hm.syncthing.enable = lib.mkEnableOption "enable syncthing";
config = lib.mkIf config.speccon18.hm.syncthing.enable {
services.syncthing = {
enable = true;
tray.enable = false;
};
};
}

View file

@ -0,0 +1,180 @@
* {
/* `otf-font-awesome` is required to be installed for icons */
font-family: FontAwesome, FiraCode, Helvetica, Arial, sans-serif;
font-size: 16px;
}
window#waybar {
background-color: rgba(68, 64, 60, 0.0);
color: #ffffff;
transition-property: background-color;
transition-duration: .5s;
}
window#waybar.hidden {
opacity: 0.2;
}
window#waybar.termite {
background-color: #3F3F3F;
}
window#waybar.chromium {
background-color: #000000;
border: none;
}
button {
/* Use box-shadow instead of border so the text isn't offset */
box-shadow: inset 0 -3px transparent;
/* Avoid rounded borders under each button name */
border: 0;
border-radius: 0;
}
/* https://github.com/Alexays/Waybar/wiki/FAQ#the-workspace-buttons-have-a-strange-hover-effect */
button:hover {
background: inherit;
}
#clock,
#battery,
#cpu,
#memory,
#disk,
#temperature,
#backlight,
#network,
#pulseaudio,
#wireplumber {
padding: 0 10px;
color: #030712;
}
#window {
margin: 0 4px;
}
#clock {
background-color: #ec6148;
border-radius: 24px;
}
#battery {
background-color: #ec6148;
color: #000000;
border-radius: 24px;
}
#battery.charging,
#battery.plugged {
color: #000000;
background-color: #ec6148;
}
@keyframes blink {
to {
background-color: #ec6148;
color: #000000;
}
}
#battery.critical:not(.charging) {
background-color: #f53c3c;
color: #ffffff;
animation-name: blink;
animation-duration: 0.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-direction: alternate;
}
label:focus {
background-color: #000000;
}
#cpu {
background-color: #ec6148;
color: #030712;
border-radius: 24px;
}
#memory {
background-color: #ec6148;
color: #030712;
border-radius: 24px;
}
#disk {
background-color: #ec6148;
border-radius: 24px;
}
#backlight {
background-color: #ec6148;
border-radius: 24px;
}
#network {
background-color: #ec6148;
color: #030712;
border-radius: 24px;
}
#network.disconnected {
background-color: #ec6148;
}
#pulseaudio {
background-color: #ec6148;
color: #030712;
border-radius: 24px;
}
#pulseaudio.muted {
background-color: #ec6148;
color: #2a5c45;
}
#wireplumber {
background-color: #ec6148;
color: #000000;
border-radius: 24px;
}
#wireplumber.muted {
background-color: #ec6148;
}
#temperature {
background-color: #ec6148;
border-radius: 24px;
}
#temperature.critical {
background-color: #ec6148;
}
#language {
background: #00b093;
color: #740864;
padding: 0 5px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state {
background: #97e1ad;
color: #000000;
padding: 0 0px;
margin: 0 5px;
min-width: 16px;
}
#keyboard-state>label {
padding: 0 5px;
}
#keyboard-state>label.locked {
background: rgba(0, 0, 0, 0.2);
}

View file

@ -0,0 +1,124 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.waybar.enable = lib.mkEnableOption "enable specs custom waybar for hyprland";
config = lib.mkIf config.speccon18.hm.waybar.enable {
programs.waybar = {
enable = true;
package = pkgs.waybar;
systemd = {
enable = true;
target = "hyprland-session.target";
};
settings = {
main_bar = {
layer = "top";
position = "top";
height = 40;
spacing = 8;
modules-left = [
"battery"
];
modules-center = [
"temperature"
];
modules-right = [
"backlight"
"cpu"
"memory"
"pulseaudio"
"network"
"clock"
];
keyboard-state = {
numlock = true;
capslock = true;
format = "{name} {icon}";
format-icons = {
locked = "";
unlocked = "";
};
};
clock = {
timezone = "America/Detroit";
tooltip-format = "<big>{:%Y %B}</big>\n<tt><small>{calendar}</small></tt>";
format-alt = "{:%d-%m-%Y}";
};
cpu = {
format = "{usage}% ";
tooltip = false;
};
memory = {
format = "{}% ";
};
temperature = {
thermal-zone = 2;
hwmon-path = "/sys/class/hwmon/hwmon2/temp1_input";
critical-threshold = 80;
format-critical = "{temperatureC}°C {icon}";
format = "{temperatureC}°C {icon}";
format-icons = ["" "" ""];
};
backlight = {
format = "{percent} {icon}";
format-icons = ["" "" "" "" "" "" "" "" ""];
};
battery = {
states = {
good = 95;
warning = 30;
critical = 15;
};
format = "{capacity}% {icon}";
format-charging = "{capacity}% ";
format-plugged = "{capacity}% ";
format-alt = "{time} {icon}";
format-good = "";
format-full = "";
format-icons = [
""
""
""
""
""
];
};
"battery#bat2" = {
bat = "BAT";
};
network = {
format-wifi = "{essid} ({signalStrength}%) ";
format-ethernet = "{ipaddr}/{cidr} ";
tooltip-format = "{ifname} via {gwaddr} ";
format-linked = "{ifname} (No IP) ";
format-disconnected = "Disconnected ";
format-alt = "{ifname}: {ipaddr}/{cidr}";
};
pulseaudio = {
scroll-step = 1;
format = "{volume}% {icon} {format_source}";
format-bluetooth = "{volume}% {icon} {format_source}";
format-bluetooth-muted = "{icon} {format_source}";
format-muted = " {format_source}";
format-source = "{volume}% ";
format-source-muted = "";
format-icons = {
headphone = "";
hands-free = "";
headset = "";
phone = "";
portable = "";
car = "";
default = [
""
""
""
];
};
on-click = "pavucontrol";
};
};
};
style = builtins.readFile ./waybar-style.css;
};
};
}

View file

@ -0,0 +1,10 @@
{pkgs,config,lib,...}:
{
options.speccon18.hm.zellij.enable = lib.mkEnableOption "enable zellij";
config = lib.mkIf config.speccon18.hm.zellij.enable {
programs.zellij = {
enable = true;
package = pkgs.zellij;
};
};
}

View file

@ -0,0 +1,10 @@
{pkgs,config,lib,...}:
{
options.speccon18.hm.zoxide.enable = lib.mkEnableOption "";
config = lib.mkIf config.speccon18.hm.zoxide.enable {
programs.zoxide = {
enable = true;
enableZshIntegration = lib.mkDefault true;
};
};
}

View file

@ -0,0 +1,26 @@
{ pkgs, config, lib, ...}:
{
options.speccon18.hm.zsh.enable = lib.mkEnableOption "enables specs zsh config";
config = lib.mkIf config.speccon18.hm.zsh.enable {
programs.zsh = {
enable = lib.mkDefault true;
dotDir = ".config/zsh";
history = {
path = "$ZDOTDIR/.zsh_history";
save = 10000000;
};
enableAutosuggestions = lib.mkDefault true;
enableCompletion = lib.mkDefault true;
syntaxHighlighting.enable = lib.mkDefault true;
shellAliases = {
ls = "eza -l";
lsa = "eza -al";
grep = "rg";
osrb = "sudo nixos-rebuild $1 --flake ~/code/nixos-config/#katana";
};
localVariables = {
EDITOR="hx";
};
};
};
}