mirror of
https://github.com/davegallant/nix-config
synced 2025-08-06 03:13:38 +00:00
nixfmt *.nix
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
# config
|
||||
# nix-config
|
||||
|
||||
[](https://builtwithnix.org)
|
||||
|
||||
This repo stores nix expressions and other configuration.
|
||||
This repo stores nix expressions to manage my machines.
|
||||
|
||||
## Setup
|
||||
|
||||
@@ -11,7 +11,7 @@ This repo stores nix expressions and other configuration.
|
||||
Clone this as a bare repo to avoid the need for symlinking:
|
||||
|
||||
```console
|
||||
$ git clone --bare git@github.com:davegallant/config.git $HOME/.dotfiles
|
||||
$ git clone --bare git@github.com:davegallant/nix-config.git $HOME/.dotfiles
|
||||
$ alias config='git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME' # add alias to a .bashrc / .zshrc
|
||||
$ config config --local status.showUntrackedFiles no
|
||||
$ config checkout -f # this will overwrite any existing configs in the home directory
|
||||
|
71
nix/home.nix
71
nix/home.nix
@@ -5,9 +5,7 @@
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
home = {
|
||||
sessionVariables = {
|
||||
EDITOR = "vim";
|
||||
};
|
||||
sessionVariables = { EDITOR = "vim"; };
|
||||
packages = import ./packages.nix { inherit pkgs; };
|
||||
};
|
||||
|
||||
@@ -17,9 +15,6 @@
|
||||
defaultCacheTtl = 3600;
|
||||
defaultCacheTtlSsh = 3600;
|
||||
enableSshSupport = true;
|
||||
extraConfig = ''
|
||||
pinentry-program ${pkgs.pinentry-curses}/bin/pinentry
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
@@ -39,10 +34,11 @@
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
git = {
|
||||
enable = true;
|
||||
|
||||
userName = "Dave Gallant";
|
||||
|
||||
aliases = {
|
||||
"aa" = "add -A .";
|
||||
"br" = "branch";
|
||||
@@ -59,18 +55,18 @@
|
||||
"dic" = "diff --cached";
|
||||
"dicn" = "diff --cached --name-only";
|
||||
"din" = "diff --name-only";
|
||||
"l" = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
"l" =
|
||||
"log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
||||
"ms" = "merge --squash";
|
||||
"pb" = "pull --rebase";
|
||||
"po" = "push origin";
|
||||
"por" = "push origin HEAD:refs/for/$1";
|
||||
"st" = "status";
|
||||
"wip" = "for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
|
||||
"wip" =
|
||||
"for-each-ref --sort='authordate:iso8601' --format=' %(color:green)%(authordate:relative)%09%(color:white)%(refname:short)' refs/heads";
|
||||
};
|
||||
|
||||
includes = [
|
||||
{ path = "~/.gitconfig-work"; }
|
||||
];
|
||||
includes = [{ path = "~/.gitconfig-work"; }];
|
||||
|
||||
delta = {
|
||||
enable = true;
|
||||
@@ -100,13 +96,9 @@
|
||||
|
||||
settings = {
|
||||
add_newline = false;
|
||||
gcloud = {
|
||||
disabled = true;
|
||||
};
|
||||
gcloud = { disabled = true; };
|
||||
scan_timeout = 10;
|
||||
character = {
|
||||
error_symbol = "[✖](bold red)";
|
||||
};
|
||||
character = { error_symbol = "[✖](bold red)"; };
|
||||
|
||||
time = {
|
||||
time_format = "%T";
|
||||
@@ -130,16 +122,17 @@
|
||||
};
|
||||
|
||||
initExtra = ''
|
||||
export GPG_TTY=$(tty)
|
||||
export PATH=$PATH:~/.cargo/bin
|
||||
export PATH=$PATH:~/.local/bin
|
||||
export PATH=$PATH:~/.npm-packages/bin
|
||||
export PATH=$PATH:~/go/bin
|
||||
export CM_LAUNCHER=rofi
|
||||
|
||||
export LANG=en_US.UTF-8
|
||||
|
||||
eval "$(direnv hook zsh)"
|
||||
eval "$(_RFD_COMPLETE=source_zsh rfd)"
|
||||
eval "$(jira --completion-script-zsh)"
|
||||
|
||||
setopt noincappendhistory
|
||||
pfetch
|
||||
'';
|
||||
@@ -154,19 +147,13 @@
|
||||
|
||||
"oh-my-zsh" = {
|
||||
enable = true;
|
||||
plugins = [
|
||||
"fzf"
|
||||
"git"
|
||||
"last-working-dir"
|
||||
];
|
||||
plugins = [ "fzf" "git" "last-working-dir" ];
|
||||
};
|
||||
|
||||
plugins = [
|
||||
{
|
||||
plugins = [{
|
||||
name = "fast-syntax-highlighting";
|
||||
src = "${pkgs.zsh-fast-syntax-highlighting}/share/zsh/site-functions";
|
||||
}
|
||||
];
|
||||
}];
|
||||
};
|
||||
|
||||
alacritty = {
|
||||
@@ -186,12 +173,7 @@
|
||||
|
||||
shell = {
|
||||
program = "zsh";
|
||||
args = [
|
||||
"-l"
|
||||
"-c"
|
||||
"tmux"
|
||||
"u"
|
||||
];
|
||||
args = [ "-l" "-c" "tmux" "u" ];
|
||||
};
|
||||
|
||||
colors = {
|
||||
@@ -221,15 +203,26 @@
|
||||
};
|
||||
|
||||
key_bindings = [
|
||||
{ key = "Home"; mods = "Control"; action = "ResetFontSize"; }
|
||||
{ key = "Plus"; mods = "Control"; action = "IncreaseFontSize"; }
|
||||
{ key = "Minus"; mods = "Control"; action = "DecreaseFontSize"; }
|
||||
{
|
||||
key = "Home";
|
||||
mods = "Control";
|
||||
action = "ResetFontSize";
|
||||
}
|
||||
{
|
||||
key = "Plus";
|
||||
mods = "Control";
|
||||
action = "IncreaseFontSize";
|
||||
}
|
||||
{
|
||||
key = "Minus";
|
||||
mods = "Control";
|
||||
action = "DecreaseFontSize";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
go = {
|
||||
enable = true;
|
||||
goBin = "go/bin";
|
||||
|
@@ -5,4 +5,3 @@
|
||||
(import ./lastpass.nix)
|
||||
(import ./vpngate.nix)
|
||||
]
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
self: super:
|
||||
rec {
|
||||
self: super: rec {
|
||||
|
||||
lpass = with self; stdenv.mkDerivation rec {
|
||||
lpass = with self;
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lpass";
|
||||
version = "1.3.4-unreleased";
|
||||
|
||||
@@ -14,9 +14,7 @@ rec {
|
||||
|
||||
nativeBuildInputs = [ asciidoc cmake docbook_xsl pkgconfig ];
|
||||
|
||||
buildInputs = [
|
||||
bash-completion curl openssl libxml2 libxslt
|
||||
];
|
||||
buildInputs = [ bash-completion curl openssl libxml2 libxslt ];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
@@ -28,7 +26,8 @@ rec {
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Stores, retrieves, generates, and synchronizes passwords securely";
|
||||
description =
|
||||
"Stores, retrieves, generates, and synchronizes passwords securely";
|
||||
homepage = "https://github.com/lastpass/lastpass-cli";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.unix;
|
||||
|
@@ -1,11 +1,11 @@
|
||||
self: super:
|
||||
rec {
|
||||
self: super: rec {
|
||||
|
||||
python38 = with super; super.python38.override { };
|
||||
|
||||
pythonPackages = python38.pkgs;
|
||||
|
||||
rfd = with self; pythonPackages.buildPythonApplication rec {
|
||||
rfd = with self;
|
||||
pythonPackages.buildPythonApplication rec {
|
||||
pname = "rfd";
|
||||
version = "v0.6.0";
|
||||
|
||||
|
@@ -2,7 +2,8 @@ self: super:
|
||||
|
||||
rec {
|
||||
|
||||
vpngate = with self; buildGoModule rec {
|
||||
vpngate = with self;
|
||||
buildGoModule rec {
|
||||
pname = "vpngate";
|
||||
version = "v0.0.2";
|
||||
|
||||
|
@@ -5,6 +5,7 @@ with pkgs; [
|
||||
# utils
|
||||
bat
|
||||
bind
|
||||
binutils-unwrapped
|
||||
colordiff
|
||||
curl
|
||||
direnv
|
||||
@@ -85,6 +86,8 @@ with pkgs; [
|
||||
kubernetes-helm
|
||||
|
||||
# nix
|
||||
nix-index
|
||||
nixfmt
|
||||
nixpkgs-fmt
|
||||
nixpkgs-review
|
||||
rnix-lsp
|
||||
@@ -144,7 +147,8 @@ with pkgs; [
|
||||
zathura
|
||||
|
||||
# overlays
|
||||
rfd
|
||||
lpass
|
||||
rfd
|
||||
vpngate
|
||||
|
||||
]
|
||||
|
Reference in New Issue
Block a user