initial commit

This commit is contained in:
Wyatt J. Miller 2024-07-19 02:08:20 -04:00
commit d6690e87b7
18 changed files with 488 additions and 0 deletions

26
darwin/default.nix Normal file
View File

@ -0,0 +1,26 @@
{ pkgs, config, ... }:
{
homebrew = import ./homebrew.nix;
environment.systemPackages = with pkgs; [
vim
gnutls
ripgrep
];
nixpkgs.config.allowUnfree = true;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# The platform the configuration will be used on.
nixpkgs.hostPlatform = "aarch64-darwin";
}

19
darwin/homebrew.nix Normal file
View File

@ -0,0 +1,19 @@
{
onActivation.cleanup = "uninstall";
taps = [
# nothing here, yet
];
casks = [
# nothing here, yet
];
brews = [
# nothing here, yet
];
masApps = {
"Reeder 5." = 1529448980;
};
}

171
flake.lock Normal file
View File

@ -0,0 +1,171 @@
{
"nodes": {
"cl-nix-lite": {
"locked": {
"lastModified": 1717972076,
"narHash": "sha256-hnZEsDInTcsVSL5LBGDAZegAxVLBus/wiJh+sNM15zU=",
"owner": "hraban",
"repo": "cl-nix-lite",
"rev": "cc920bfb0a6402d3871f470c98d65266126973e4",
"type": "github"
},
"original": {
"owner": "hraban",
"repo": "cl-nix-lite",
"type": "github"
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1697816753,
"narHash": "sha256-40to80AEIyKCQI0xMKCeF5ePoIKTYgjVVCZeu4CnTxM=",
"owner": "hraban",
"repo": "flake-compat",
"rev": "6025bade1336a36014639bc3f67eacc853dab78f",
"type": "github"
},
"original": {
"owner": "hraban",
"ref": "fixed-output",
"repo": "flake-compat",
"type": "github"
}
},
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"id": "flake-utils",
"type": "indirect"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1721135958,
"narHash": "sha256-H548rpPMsn25LDKn1PCFmPxmWlClJJGnvdzImHkqjuY=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "afd2021bedff2de92dfce0e257a3d03ae65c603d",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"mac-app-util": {
"inputs": {
"cl-nix-lite": "cl-nix-lite",
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
},
"locked": {
"lastModified": 1719942949,
"narHash": "sha256-srSQac7dhXtisqu4XwPGrK8qcmT2rflJJ1mRIV9j0Qk=",
"owner": "hraban",
"repo": "mac-app-util",
"rev": "63f269f737cafb2219ba38780c1ecb1dc24bc4a2",
"type": "github"
},
"original": {
"owner": "hraban",
"repo": "mac-app-util",
"type": "github"
}
},
"nix-darwin": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1721270582,
"narHash": "sha256-MdZmYPPExntE5rJu88IhJSy8Um4UyZCTXhOwvzbjDVI=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "a3e4a7b8ffc08c7dc1973822a77ad432e1ec3dec",
"type": "github"
},
"original": {
"owner": "LnL7",
"repo": "nix-darwin",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1717868076,
"narHash": "sha256-c83Y9t815Wa34khrux81j8K8ET94ESmCuwORSKm2bQY=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9",
"type": "github"
},
"original": {
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "cd18e2ae9ab8e2a0a8d715b60c91b54c0ac35ff9",
"type": "github"
}
},
"nixpkgs_2": {
"locked": {
"lastModified": 1721303309,
"narHash": "sha256-/+Yw4tW/mcTRKmkEAO64ObzCQClpSUZpk2flUD9GDHE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7e2fb8e0eb807e139d42b05bf8e28da122396bed",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"mac-app-util": "mac-app-util",
"nix-darwin": "nix-darwin",
"nixpkgs": "nixpkgs_2"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

39
flake.nix Normal file
View File

@ -0,0 +1,39 @@
{
description = "Wyatt's configuration";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
mac-app-util.url = "github:hraban/mac-app-util";
};
outputs = inputs@{ self, nix-darwin, home-manager, nixpkgs, mac-app-util }:
let configuration = { pkgs, ... }: { };
in {
# Build darwin flake using:
# $ darwin-rebuild build --flake .#sephiroth
darwinConfigurations."sephiroth" = nix-darwin.lib.darwinSystem {
modules = [
./hosts/sephiroth/configuration.nix
mac-app-util.darwinModules.default
home-manager.darwinModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.verbose = true;
home-manager.users.wyatt.imports = [ ./hosts/sephiroth/home.nix mac-app-util.homeManagerModules.default ];
}
];
};
# Expose the package set, including overlays, for convenience.
darwinPackages = self.darwinConfigurations."sephiroth".pkgs;
};
}

9
home/atuin/default.nix Normal file
View File

@ -0,0 +1,9 @@
{ lib, config, ... }:
{
programs.atuin = {
enable = true;
enableFishIntegration = true;
};
}

7
home/bat/default.nix Normal file
View File

@ -0,0 +1,7 @@
{ lib, config, ... }:
{
programs.bat = {
enable = true;
};
}

43
home/default.nix Normal file
View File

@ -0,0 +1,43 @@
{ config, pkgs, lib, home-manager, ... }:
{
imports = [
./atuin
./bat
./direnv
./eza
./fish
./git
./lazygit
./neovim
./starship
];
config = {
home.stateVersion = "24.05";
home.packages = with pkgs; [
discord
obsidian
zoxide
wget
nerdfonts
jdk
prismlauncher
iterm2
zed
vscode
nodejs
cargo
gcc
python3
];
home.sessionVariables = {
EDITOR = "nvim";
};
fonts.fontconfig.enable = true;
programs.home-manager.enable = true;
};
}

13
home/direnv/default.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, ... }:
{
programs.direnv = {
enable = true;
config = {
global = {
hide_env_diff = true;
};
};
};
}

13
home/eza/default.nix Normal file
View File

@ -0,0 +1,13 @@
{ lib, config, ... }:
{
programs.eza = {
enable = true;
enableFishIntegration = true;
extraOptions = [
# "--group-directories-first"
];
};
}

21
home/fish/aliases.nix Normal file
View File

@ -0,0 +1,21 @@
{ lib, config, ... }:
{
programs.fish = {
shellAliases = {
# ls aliases
ls = "eza --color $argv";
la = "eza -l -all --color $argv";
ll = "eza -l --color $argv";
lt = "eza -l --color --git $argv";
# lazygit alias
lg = "lazygit";
# cat, less, more alias
cat = "bat $argv";
less = "bat $argv";
more = "bat $argv";
};
};
}

12
home/fish/default.nix Normal file
View File

@ -0,0 +1,12 @@
{ lib, config, ...}:
{
imports = [
./aliases.nix
./functions.nix
];
programs.fish = {
enable = true;
};
}

33
home/fish/functions.nix Normal file
View File

@ -0,0 +1,33 @@
{ lib, config, ... }:
{
programs.fish = {
functions = {
fish_greeting = {
body = ''
set memes \
"Crazy? I was crazy once. They locked me in a room. A rubber room. A rubber room with rats. And rats make me crazy." \
"Daddy, chill!" \
"What the hell is even that?!" \
"Road work ahead? Yeah, I sure hope it does!" \
"Look at all those chickens!" \
"I smell like beef" \
"Say, Coloardo - I'M A GIRAFFE" \
"I didn't get no sleep cause of y'all, y'all not gone get any sleep cause of me!" \
"This is the dollar store, how good can it be?" \
"That was legitness" \
"Deez nuts" \
"I wanna be a cowboy baby" \
"Can I get a waffle? Can I please get a waffle?" \
"I'm lesbian. I thought you were American."
set choose_meme (random)"%"(count $memes)
set choose_meme $memes[(math $choose_meme"+1")]
printf (set_color F90)"%s\n" $choose_meme
'';
onEvent = "fish_greeting";
};
};
};
}

21
home/git/default.nix Normal file
View File

@ -0,0 +1,21 @@
{ ... }:
{
programs.git = {
enable = true;
userName = "Wyatt J. Miller";
userEmail = "wyatt@wyattjmiller.com";
ignores = [
".DS_Store"
".direnv"
".idea"
];
extraConfig = {
init.defaultBranch = "master";
# push.autoSetupRemote = true;
};
};
}

22
home/lazygit/default.nix Normal file
View File

@ -0,0 +1,22 @@
{ lib, config, ... }:
{
programs.lazygit = {
enable = true;
settings = {
gui.theme = {
activeBorderColor = ["#a6e3a1" "bold"];
inactiveBorderColor = ["#a6adc8"];
optionsTextColor = ["#89b4fa"];
selectedLineBgColor = ["#313244"];
selectedRangeBgColor = ["#313244"];
cherryPickedCommitBgColor = ["#45475a"];
cherryPickedCommitFgColor = ["#a6e3a1"];
unstagedChangesColor = ["#f38ba8"];
defaultFgColor = ["#cdd6f4"];
searchingActiveBorderColor = ["#f9e2af"];
};
};
};
}

7
home/neovim/default.nix Normal file
View File

@ -0,0 +1,7 @@
{ lib, config, ... }:
{
programs.neovim = {
enable = true;
};
}

11
home/starship/default.nix Normal file
View File

@ -0,0 +1,11 @@
{ lib, config, ... }:
{
programs.starship = {
enable = true;
enableFishIntegration = true;
settings = { };
};
}

View File

@ -0,0 +1,14 @@
{ pkgs, home-manager, ... }:
{
imports = [
../../darwin
];
users.users.wyatt = {
home = "/Users/wyatt";
shell = pkgs.fish;
};
security.pam.enableSudoTouchIdAuth = true;
}

7
hosts/sephiroth/home.nix Normal file
View File

@ -0,0 +1,7 @@
{ pkgs, ... }:
{
imports = [
../../home
];
}