-
Notifications
You must be signed in to change notification settings - Fork 63
refactor: align architecture with srid/nixos-config
#7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
srid
merged 25 commits into
juspay:main
from
cameronraysmith:refactor/like-nixos-config
Sep 10, 2023
Merged
Changes from 6 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
17f89c3
feat: add minimal just file
cameronraysmith 6a941a5
refactor: add default.nix to home
cameronraysmith c8612d9
feat: add starship config from srid/nixos-config
cameronraysmith ccaee29
refactor: migrate terminal config flake -> ./home
cameronraysmith c5c58a2
refactor: update flake to account for refactoring
cameronraysmith ac0f230
refactor: update flake.lock
cameronraysmith 1209e54
fix: remove disabled autojump deferring to zoxide
cameronraysmith f78bca9
fix: remove asciinema
cameronraysmith 9c7decc
fix: specify formatter in flake
cameronraysmith 092018a
fix: fully qualify references to all inputs
cameronraysmith 20f7b14
feat: add run target that refs lint and check
cameronraysmith 9635789
refactor: remove unused home.nix
cameronraysmith e3d5134
fix: update relative path to neovim in comment
cameronraysmith 65edb96
feat: io/update/build/clean targets for justfile
cameronraysmith 0fa764e
fix: point to nix-systems/default in comment
cameronraysmith c86c3be
fix: justfile indent spacing
cameronraysmith 9684441
refactor: make `./home` a home-manager module
cameronraysmith dfeee74
feat: add direnv to use flake
cameronraysmith 6edcef0
Add a devshell (since there is .envrc)
srid 3c26b7b
Simplify justfile default
srid 624181c
docs: update README
cameronraysmith b6e101d
fix: lint gitignore
cameronraysmith 90e7fae
chore: update flake lock
cameronraysmith bc51772
feat: add manual dev recipe to justfile
cameronraysmith 3b2419d
fix: spacing typo in README
cameronraysmith File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cameronraysmith marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ self, ... }: | ||
{ | ||
flake = { | ||
homeModules = { | ||
default = { | ||
imports = [ | ||
# This loads ./home/neovim/default.nix - neovim configured for Haskell dev, and other things. | ||
./neovim | ||
./starship.nix | ||
./terminal.nix | ||
# Add more of your home-manager modules here. | ||
]; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
# Starship configuration from this example: | ||
# https://github.com/srid/nixos-config/blob/f9cf0def19fbc7aa1e836be481ce50d214e34036/home/starship.nix#L4-L19 | ||
programs.starship = { | ||
enable = true; | ||
settings = { | ||
username = { | ||
style_user = "blue bold"; | ||
style_root = "red bold"; | ||
format = "[$user]($style) "; | ||
disabled = false; | ||
show_always = true; | ||
}; | ||
hostname = { | ||
ssh_only = false; | ||
ssh_symbol = "🌐 "; | ||
format = "on [$hostname](bold red) "; | ||
trim_at = ".local"; | ||
disabled = false; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ pkgs, ... }: | ||
|
||
# Platform-independent terminal setup | ||
{ | ||
# Nix packages to install to $HOME | ||
# | ||
# Search for packages here: https://search.nixos.org/packages | ||
home.packages = with pkgs; [ | ||
# Unix tools | ||
ripgrep # Better `grep` | ||
fd | ||
sd | ||
tree | ||
|
||
# Nix dev | ||
cachix | ||
nil # Nix language server | ||
nix-info | ||
nixpkgs-fmt | ||
nixci | ||
|
||
# Publishing | ||
asciinema | ||
|
||
cameronraysmith marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
# Dev | ||
gh | ||
just | ||
lazygit # Better git UI | ||
tmate | ||
]; | ||
|
||
home.shellAliases = rec { | ||
e = "nvim"; | ||
g = "git"; | ||
lg = "lazygit"; | ||
t = "tree"; | ||
}; | ||
|
||
# Programs natively supported by home-manager. | ||
programs = { | ||
bat.enable = true; | ||
autojump.enable = false; | ||
# Type `z <pat>` to cd to some directory | ||
zoxide.enable = true; | ||
cameronraysmith marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
# Type `<ctrl> + r` to fuzzy search your shell history | ||
fzf.enable = true; | ||
jq.enable = true; | ||
nix-index.enable = true; | ||
htop.enable = true; | ||
|
||
|
||
# on macOS, you probably don't need this | ||
bash = { | ||
enable = true; | ||
initExtra = '' | ||
# Make Nix and home-manager installed things available in PATH. | ||
export PATH=/run/current-system/sw/bin/:/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:$PATH | ||
''; | ||
}; | ||
|
||
# For macOS's default shell. | ||
zsh = { | ||
enable = true; | ||
envExtra = '' | ||
# Make Nix and home-manager installed things available in PATH. | ||
export PATH=/run/current-system/sw/bin/:/nix/var/nix/profiles/default/bin:$HOME/.nix-profile/bin:/etc/profiles/per-user/$USER/bin:$PATH | ||
''; | ||
}; | ||
|
||
# https://zero-to-flakes.com/direnv | ||
direnv = { | ||
enable = true; | ||
nix-direnv.enable = true; | ||
}; | ||
}; | ||
} |
cameronraysmith marked this conversation as resolved.
Show resolved
Hide resolved
cameronraysmith marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Like GNU `make`, but `just` rustier. | ||
# https://just.systems/man/en/chapter_19.html | ||
# run `just` from this directory to see available commands | ||
|
||
# Default command when 'just' is run without arguments | ||
# Run 'just <command>' to execute a command. | ||
default: help | ||
|
||
# Display help | ||
help: | ||
@printf "\nRun 'just -n <command>' to print what would be executed...\n\n" | ||
@just --list | ||
@echo "\n...by running 'just <command>'.\n" | ||
@echo "This message is printed by 'just help' and just 'just'.\n" | ||
|
||
# Lint nix files | ||
lint: | ||
nix run nixpkgs#nixpkgs-fmt -- . | ||
cameronraysmith marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.