Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
523c3df
commit ad24cc1
Showing
6 changed files
with
118 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,7 @@ | ||
#!/usr/bin/env sh | ||
|
||
set -x | ||
|
||
nix-channel --add https://nixos.org/channels/nixpkgs-unstable | ||
nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager | ||
nix-channel --update |
This file contains 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,21 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -x | ||
|
||
nix-shell '<home-manager>' -A install | ||
|
||
# use this as a template to replace ~/.config/nixpkgs/home.nix | ||
|
||
cat << EOF > ~/.config/nixpkgs/home.nix | ||
let | ||
imports = [ | ||
~/dotfiles/nix/home.nix | ||
]; | ||
in | ||
{ | ||
inherit imports; | ||
home.username = "$(whoami)"; | ||
home.homeDirectory = "$(echo $HOME)"; | ||
} | ||
EOF |
This file contains 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,3 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "nyy" | sh <(curl -L https://nixos.org/nix/install) --daemon |
This file contains 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,6 @@ | ||
#!/usr/bin/env sh | ||
|
||
cat << EOF > /etc/profile.d/user-shim-for-nix-path.sh | ||
# the filename is intentionally behind `nix.sh` | ||
export NIX_PATH=\${HOME}/.nix-defexpr/channels:\${NIX_PATH} | ||
EOF |
This file contains 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,31 @@ | ||
{ config, pkgs, ... }: | ||
|
||
let | ||
packages = import ./pkgs.nix {pkgs=pkgs;}; | ||
in | ||
{ | ||
# Let Home Manager install and manage itself. | ||
programs.home-manager.enable = true; | ||
|
||
# Home Manager needs a bit of information about you and the | ||
# paths it should manage. | ||
# | ||
# home.username = "my-user"; | ||
# home.homeDirectory = "/home/my-user"; | ||
# | ||
# to avoid having to check out username and home directory in dotfiles repo | ||
# set values like above in ~/.config/nixpkgs/home.nix | ||
# and import this file from ~/.config/nixpkgs/home.nix | ||
|
||
# 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 can update Home Manager without changing this value. See | ||
# the Home Manager release notes for a list of state version | ||
# changes in each release. | ||
home.stateVersion = "21.05"; | ||
|
||
home.packages = packages.toInstall; | ||
} |
This file contains 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,50 @@ | ||
{ pkgs }: | ||
|
||
{ | ||
toInstall = [ | ||
pkgs.htop | ||
pkgs.cowsay | ||
pkgs.fortune | ||
|
||
# essential | ||
pkgs.zsh # my favorite shell interface | ||
pkgs.git # to replace possible old git comes with OS | ||
pkgs.bash # use latest bash | ||
pkgs.tmux # terminal multiplexer | ||
pkgs.neovim # my favorite editor | ||
pkgs.starship # cross-shell prompt | ||
pkgs.fzf # A command-line fuzzy finder | ||
pkgs.direnv # auto loading env per dir | ||
pkgs.htop # resource monitoring | ||
pkgs.gnupg # GnuPG | ||
pkgs.wget # useful for downloading files | ||
|
||
# viewer | ||
pkgs.exa # modern ls | ||
pkgs.bat # cat with wings | ||
pkgs.glow # markdown render on cli | ||
pkgs.lf # terminal file manager | ||
pkgs.fx # json viewer | ||
|
||
# search | ||
pkgs.ripgrep # modern grep | ||
pkgs.fasd # Command-line productivity booster, offers quick access to files and directories | ||
pkgs.fd # mordern find | ||
|
||
# helper | ||
pkgs.tig # git helper | ||
pkgs.tldr # Simplified and community-driven man pages | ||
pkgs.watch # execute a program periodically | ||
pkgs.entr # Run arbitrary commands when files change | ||
# pkgs.taskell # CLI kanban | ||
pkgs.fpp # for tmux-fpp | ||
pkgs.extract_url # for tmux-urlview | ||
pkgs.jq # json processor | ||
pkgs.jsonnet # templating with json | ||
pkgs.gh # official Github CLI | ||
pkgs.pueue # long running task manager | ||
|
||
# misc | ||
pkgs.neofetch | ||
]; | ||
} |