Initial commit

This commit is contained in:
Chris W 2024-01-16 14:08:19 -07:00
commit 431d9c6e61
17 changed files with 784 additions and 0 deletions

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

18
.gitignore vendored Normal file
View File

@ -0,0 +1,18 @@
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets
# Local History for Visual Studio Code
.history/
# Built Visual Studio Code Extensions
*.vsix
.direnv
result
.DS_Store
__pycache__
**.pyc

1
dotconfig/ghostty/config Normal file
View File

@ -0,0 +1 @@
theme = catppuccin-mocha

View File

@ -0,0 +1,7 @@
{
"default_options": [
"--follow",
"--max-redirects=3",
"--verify=no"
]
}

321
flake.lock Normal file
View File

@ -0,0 +1,321 @@
{
"nodes": {
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1673956053,
"narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1694529238,
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"ghostty": {
"inputs": {
"nixpkgs-stable": "nixpkgs-stable",
"nixpkgs-unstable": "nixpkgs-unstable",
"nixpkgs-zig-0-12": "nixpkgs-zig-0-12",
"zig": "zig",
"zls": "zls"
},
"locked": {
"lastModified": 1705388750,
"narHash": "sha256-qrnSnBC7oOwlR/XR3MZ7/P8NkY4JkBS8Gl5UpQyML4w=",
"ref": "refs/heads/main",
"rev": "771cbea0b050debfd60d7055df7e8c3dfc236b0a",
"revCount": 4689,
"type": "git",
"url": "ssh://git@github.com/mitchellh/ghostty"
},
"original": {
"type": "git",
"url": "ssh://git@github.com/mitchellh/ghostty"
}
},
"gitignore": {
"inputs": {
"nixpkgs": [
"ghostty",
"zls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1694102001,
"narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=",
"owner": "hercules-ci",
"repo": "gitignore.nix",
"rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "gitignore.nix",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1705408632,
"narHash": "sha256-/AhkReVocTli5BLWA5WXxUlGYXn3Agi/uzX76TNrsbo=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "37d6eeceee464adc03585404eebd68765b3c8615",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"langref": {
"flake": false,
"locked": {
"narHash": "sha256-mYdDCBdNEIeMbavdhSo8qXqW+3fqPC8BAich7W3umrI=",
"type": "file",
"url": "https://raw.githubusercontent.com/ziglang/zig/63bd2bff12992aef0ce23ae4b344e9cb5d65f05d/doc/langref.html.in"
},
"original": {
"type": "file",
"url": "https://raw.githubusercontent.com/ziglang/zig/63bd2bff12992aef0ce23ae4b344e9cb5d65f05d/doc/langref.html.in"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1705303754,
"narHash": "sha256-loWkd7lUzSvGBU9xnva37iPB2rr5ulq1qBLT44KjzGA=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "e0629618b4b419a47e2c8a3cab223e2a7f3a8f97",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable": {
"locked": {
"lastModified": 1702049175,
"narHash": "sha256-c/q2+tGHbmLgzT3sXyUKVJR98h1CTks2+nkVaoZPRM0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "b15508bd65870620f1df5864e8e861dffbc4e428",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "release-23.05",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1688221086,
"narHash": "sha256-cdW6qUL71cNWhHCpMPOJjlw0wzSRP0pVlRn2vqX/VVg=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "cd99c2b3c9f160cd004318e0697f90bbd5960825",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-zig-0-12": {
"locked": {
"lastModified": 1704769352,
"narHash": "sha256-qgRtwLlB1QePcFVrzGWVcL51NoYjVTsMlhG9JZTJVyU=",
"owner": "vancluever",
"repo": "nixpkgs",
"rev": "2e0fee0ad691025495254bf35a4fbe87dd8f2b92",
"type": "github"
},
"original": {
"owner": "vancluever",
"ref": "vancluever-zig-0-12",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"ghostty": "ghostty",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"zig": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
]
},
"locked": {
"lastModified": 1705333916,
"narHash": "sha256-+C/MsU+tuaXB7HYtdBdwAgSctLxQeY9zVWvEoVCJNkE=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "fec05994b32ee3f6d2708831d4d64c0fa9bdf647",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zig-overlay": {
"inputs": {
"flake-compat": "flake-compat_2",
"flake-utils": "flake-utils_3",
"nixpkgs": [
"ghostty",
"zls",
"nixpkgs"
]
},
"locked": {
"lastModified": 1701390337,
"narHash": "sha256-C+Lyio+GPl3B2IAZ6Nk5hAAE2g6a8bO9vMACUfOLC/g=",
"owner": "mitchellh",
"repo": "zig-overlay",
"rev": "1815ef2d0451b1121a6a91051da84906fcb06f99",
"type": "github"
},
"original": {
"owner": "mitchellh",
"repo": "zig-overlay",
"type": "github"
}
},
"zls": {
"inputs": {
"flake-utils": "flake-utils_2",
"gitignore": "gitignore",
"langref": "langref",
"nixpkgs": [
"ghostty",
"nixpkgs-stable"
],
"zig-overlay": "zig-overlay"
},
"locked": {
"lastModified": 1703036566,
"narHash": "sha256-GKw+ON8FcUVHxDzA35piev/W/YUvXv5aZ4hmIzNFWuc=",
"owner": "zigtools",
"repo": "zls",
"rev": "adaeabbe1ba888d74309d0a837d4abddc24cf638",
"type": "github"
},
"original": {
"owner": "zigtools",
"ref": "master",
"repo": "zls",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

33
flake.nix Normal file
View File

@ -0,0 +1,33 @@
{
description = "My Home Manager Flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
ghostty.url = "git+ssh://git@github.com/mitchellh/ghostty";
};
outputs = { nixpkgs, home-manager, ghostty, ... }: {
# For `nix run .` later
defaultPackage.x86_64-linux = home-manager.defaultPackage.x86_64-linux;
homeConfigurations = {
"watzon" = home-manager.lib.homeManagerConfiguration {
# Note: I am sure this could be done better with flake-utils or something
pkgs = import nixpkgs { system = "x86_64-linux"; };
modules = [
({ pkgs, ... }: {
home.packages = with pkgs; [
ghostty.packages.x86_64-linux.default
];
})
./home.nix
];
};
};
};
}

59
home.nix Normal file
View File

@ -0,0 +1,59 @@
{ config, pkgs, username, ... }:
{
imports = [
./nix/packages.nix
./nix/sh.nix
./nix/dconf.nix
./nix/vscode.nix
./nix/git.nix
./nix/fonts.nix
];
home.username = "watzon";
home.homeDirectory = "/home/watzon";
# 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.
home.stateVersion = "23.11";
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.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
# '';
".config/httpie/config.json".source = ./dotconfig/httpie/config.json;
".config/ghostty/config".source = ./dotconfig/ghostty/config;
};
home.sessionVariables = {
EDITOR = "nvim";
SUDO_EDITOR = "nvim";
SHELL = "${pkgs.zsh}/bin/zsh";
};
# Temporary fix for https://github.com/nix-community/home-manager/issues/1439
home.activation = {
linkDesktopApplications = {
after = [ "writeBoundary" "createXdgUserDirectories" ];
before = [ ];
data = ''
rm -rf ${config.xdg.dataHome}/"applications/home-manager"
mkdir -p ${config.xdg.dataHome}/"applications/home-manager"
cp -Lr ${config.home.homeDirectory}/.nix-profile/share/applications/* ${config.xdg.dataHome}/"applications/home-manager/"
'';
};
};
services.ssh-agent.enable = true;
programs.home-manager.enable = true;
}

75
nix/dconf.nix Normal file
View File

@ -0,0 +1,75 @@
{ config, lib, pkgs, ... }:
let
extensions = with pkgs.gnomeExtensions; [
dash-to-dock
user-themes
];
in {
home.packages = with extensions;
with pkgs; [
catppuccin-gtk
];
dconf.enable = true;
gtk = {
enable = true;
theme = {
name = "Catppuccin-Mocha-Compact-Teal-Dark";
package = pkgs.catppuccin-gtk.override {
accents = ["teal"];
size = "compact";
tweaks = ["rimless"];
variant = "mocha";
};
};
};
dconf.settings = {
"org/gnome/shell" = {
favorite-apps = [
"firefox.desktop"
"code.desktop"
"com.mitchellh.ghostty.desktop"
"obsidian.desktop"
"home-manager-XPipe.desktop"
"org.gnome.Nautilus.desktop"
"hu.kramo.Cartridges.desktop"
"org.gnome.Software.desktop"
];
enabled-extensions = [
"user-theme@gnome-shell-extensions.gcampax.github.com"
"dash-to-dock@micxgx.gmail.com"
"gSnap@micahosborne"
];
};
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
enable-hot-corners = true;
clock-format = "12h";
};
"org/gnome/desktop/wm/preferences" = {
workspace-names = [ "Main" ];
};
"org/gnome/desktop/background" = {
picture-uri = "file:///home/watzon/Pictures/wallpapers/Lofi-Girl-5120x2160.jpg";
picture-uri-dark = "file:///home/watzon/Pictures/wallpapers/Lofi-Girl-5120x2160.jpg";
};
"org/gnome/settings-daemon/plugins/power" = {
sleep-inactive-ac-type = "nothing";
};
"org/gnome/desktop/session" = {
idle-delay = lib.hm.gvariant.mkUint32 0;
};
"org/gtk/settings/file-chooser" = {
clock-format = "12h";
};
};
}

17
nix/fonts.nix Normal file
View File

@ -0,0 +1,17 @@
{ config, lib, pkgs, ... }:
{
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
monaspace
(nerdfonts.override {
fonts = [
"Hack"
"FiraCode"
"JetBrainsMono"
"OpenDyslexic"
];
})
];
}

31
nix/git.nix Normal file
View File

@ -0,0 +1,31 @@
{ config, lib, pkgs, ... }:
{
programs.gh = {
enable = true;
extensions = [
pkgs.gh-eco
];
};
programs.gh-dash = {
enable = true;
};
programs.git = {
enable = true;
userName = "Chris W";
userEmail = "cawatson1993@gmail.com";
extraConfig = {
pull = {
rebase = false;
};
init = {
defaultBranch = "main";
};
core = {
fileMode = false;
};
};
};
}

14
nix/nvim.nix Normal file
View File

@ -0,0 +1,14 @@
{ config, lib, pkgs, ... }:
{
programs.neovim = {
enable = true;
withRuby = true;
withPython3 = true;
withNodeJs = true;
viAlias = true;
vimAlias = true;
plugins = [];
};
}

54
nix/packages.nix Normal file
View File

@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.allowBroken = true;
nixpkgs.config.allowUnsupportedSystem = true;
nixpkgs.config.permittedInsecurePackages = [
"electron-25.9.0"
];
home.packages = with pkgs; [
# gui
firefox
obsidian
_1password-gui
bottles
protonup-qt
beekeeper-studio
chromium
# tools
btop
nvtop
neofetch
rnix-lsp
direnv
neovim
bat
eza
lazygit
aha
unzip
jq
ripgrep
fzf
httpie
# languages
nodejs yarn
crystal shards
pyenv poetry
nim
zig
bun
deno
# zsh stuff
zsh
spaceship-prompt
# xpipe
(import ./packages/xpipe.nix { inherit pkgs; })
];
}

7
nix/packages/xpipe.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs, ... }:
let xpipe-src = pkgs.fetchFromGitHub {
owner = "xpipe-io";
repo = "nixpkg";
rev = "08fefaf79b3a64aab3d2e84931612ade4936a421";
sha256 = "sha256-0UcW68SFmj6kZsB65KTSNc8/qe65m0lNn5jcWnMijIk=";
}; in pkgs.callPackage "${xpipe-src}/xpipe/1.7.14/default.nix" {}

89
nix/sh.nix Normal file
View File

@ -0,0 +1,89 @@
{ config, lib, pkgs, ... }:
let
aliases = {
cls = "printf '\\033c'; clear";
# vim = "nvim";
hm = "home-manager";
# ls = "eza -la --icons";
lg = "lazygit";
};
in
{
programs.zsh = {
enable = true;
autocd = true;
dotDir = ".config/zsh";
enableAutosuggestions = true;
enableCompletion = true;
shellAliases = aliases;
oh-my-zsh = {
enable = true;
plugins = [
"git"
"extract"
"httpie"
"gh"
"node"
"npm"
"yarn"
# "bun"
"deno"
"vscode"
# "zsh-interactive-cd"
];
custom = "${pkgs.spaceship-prompt}/share/zsh";
theme = "spaceship";
};
plugins = [
{
name = "zsh-nix-shell";
file = "nix-shell.plugin.zsh";
src = pkgs.fetchFromGitHub {
owner = "chisui";
repo = "zsh-nix-shell";
rev = "v0.8.0";
sha256 = "1lzrn0n4fxfcgg65v0qhnj7wnybybqzs4adz7xsrkgmcsr0ii8b7";
};
}
];
initExtra = ''
SHELL=${pkgs.zsh}/bin/zsh
SPACESHIP_HOST_SHOW="always"
SPACESHIP_TIME_SHOW=false
SPACESHIP_PROMPT_ORDER=(
time # Time stamps section
# user # Username section
dir # Current directory section
host # Hostname section
git # Git section (git_branch + git_status)
node # Node.js section
bun # Bun section
deno # Deno section
crystal # Crystal section
ruby # Ruby section
golang # Go section
php # PHP section
rust # Rust section
venv # virtualenv section
python # Python section
exec_time # Execution time
line_sep # Line break
# battery # Battery level and status
# vi_mode # Vi-mode indicator
jobs # Background jobs indicator
exit_code # Exit code section
char # Prompt character
sudo # sudo status
)
'';
};
programs.bash = {
enable = true;
shellAliases = aliases;
};
}

7
nix/shell.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs ? import <nixpkgs> { } }:
pkgs.mkShell {
buildInputs = with pkgs; [
rnix-lsp
];
}

11
nix/vscode.nix Normal file
View File

@ -0,0 +1,11 @@
{ config, lib, pkgs, ... }:
{
programs.vscode = {
enable = true;
extensions = [];
userSettings = {};
};
}

28
nix/watzon.asc Normal file
View File

@ -0,0 +1,28 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
xsFNBAAAAAABEACvsURCVe6Y8lN3tOOTEgmgvrLIZq1rIqqzbvEr8y3CBkN3JIGS
Ml3r2BaHRdZdUxq2W6PDw/CWad0XiwRBElHRfFyPXqMNQmVnxVWJgNNYXf+iz2ru
MxXM/XP1ELDenQ3U3C/zSeeABkXF+w5k4GG77KhKuWMt/u23mfIMnOFYELSOi6Q8
95JLz0in148n+tTXM/UU2edhihYO1HzfFQV/E5mC6/qNHarGp+7PuwmFaUpa90V9
MKKOB5cxl20PYzbMIkIWf5stTYeTbptBwiRiNpHZYPPyVMFMH1Yd3kfHLjdnSJQI
r4X1tc4HYpaHHD3wLGiuu3q+Cmq4muloXiiqH7x6zTn4tVuS7tKW24XSuTTnVJDK
OZQLFXxzy9C5NrHEXDb1S2f2Ui4a/TTey1xUKbLwlRE+Y+IOxnb/cagagHJIMhOB
x9CdsPze1CRKMg75SF7rDwN35pq03Q8Olh+T5iqM3q1GSBtIt4PrTM237mLDCsuX
QCUVFqQZiMIS1Q9Va1XeL+vBOr10JBXMToS0Ylk6JukIBDseN1l97+Tv/42/16NO
IxrLfCI2cibS9VnHyO8sqP9dnm04jnSH/pQQs61kN6jzF8ZCT9eSXAsPpz8Vh0xx
fXiWVx+u7SEVZL1jzePCXw1/Q02sIEUk6kbfSbWjxYirkxUQd1EolhHTHwARAQAB
zSlyb290IChJbXBvcnRlZCBmcm9tIFNTSCkgPHJvb3RAbG9jYWxob3N0PsLBYgQT
AQgAFgUCAAAAAAkQYKY8KlGK40sCGw8CGQEAAFjHEAAjttbGA3o+Wgsl1pQaiPlS
6ZcURd/7JlbIB6yZJnHroz8bZEtTN0942BzZuUGE+R02fhAbS/fqIS8P3qnxGdt7
tymciRVb5DUudjCY7ZcvnFOmECYzXgn3seDmlgL5b7T6F9qqV1MlU/iA+qAJzOwf
9KnciPC5N9Nl7DkTKN1xfiiYrebRv5/65KcAeqLwbuy/s80/i0xc5PdV+iTIkqMe
Osi9mucvSXDL1su10xtdGymK1+dwOaERUO1aYek0caPBAYrg7FyCyslICL1GXWc0
kyZa0kpFuOXYX3cyVRmkSRImpt8/XHQWtBpxd8Hg0bwQpRXwwaABUsPoBb5yVY35
nYpoaorgxpE9nU7Liho1zHDwV33FbCepMDX6f1LkfCPr4XSUagL4qf1JTeQOTYNU
XXag32rpdlxJU+HrAHPBUW0X4t3B4J4DFPcmdvsJyxLliCjR3JlkvOmhG+p7lIeM
j0/6YoXNVoWRxaNrtHq12v+NspmREiRw43nuHob1QG8YQOQtQc5R1wKSxisUZLvM
GSX7e0M+y4CjQO0WHCyq8Wk5Bjo7MmEPHlKSaspdR6QKetkDwjaGoBak9FSOOgs3
eTD5hBkdBqV4GcxGJ3EImwz4WoCdyuqfD99I/ey4DtMAgqD06/dK2bx/Vx1lwl6y
dgnPyS5XtNrWc4td0gHyqA==
=BCDu
-----END PGP PUBLIC KEY BLOCK-----