mirror of
https://github.com/gburd/nix-config.git
synced 2024-10-03 12:16:57 +00:00
home-manager gburd builds
This commit is contained in:
parent
cfeed4b553
commit
37ba6126b7
10 changed files with 77 additions and 80 deletions
|
@ -13,7 +13,7 @@
|
||||||
./ranger.nix
|
./ranger.nix
|
||||||
./screen.nix
|
./screen.nix
|
||||||
./ssh.nix
|
./ssh.nix
|
||||||
# ./xpo.nix
|
# ./xpo.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
@ -40,6 +40,6 @@
|
||||||
|
|
||||||
tly # Tally counter
|
tly # Tally counter
|
||||||
|
|
||||||
inputs.nh.default # nixos-rebuild and home-manager CLI wrapper
|
# inputs.nh.default # nixos-rebuild and home-manager CLI wrapper
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ let
|
||||||
hasNeovim = config.programs.neovim.enable;
|
hasNeovim = config.programs.neovim.enable;
|
||||||
hasEmacs = config.programs.emacs.enable;
|
hasEmacs = config.programs.emacs.enable;
|
||||||
hasNeomutt = config.programs.neomutt.enable;
|
hasNeomutt = config.programs.neomutt.enable;
|
||||||
hasShellColor = config.programs.shellcolor.enable;
|
hasShellColor = if builtins.hasAttr "shellcolor" config.programs then config.programs.shellcolor.enable else false;
|
||||||
hasKitty = config.programs.kitty.enable;
|
hasKitty = config.programs.kitty.enable;
|
||||||
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
|
shellcolor = "${pkgs.shellcolord}/bin/shellcolor";
|
||||||
in
|
in
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
let
|
let
|
||||||
ssh = "${pkgs.openssh}/bin/ssh";
|
ssh = "${pkgs.openssh}/bin/ssh";
|
||||||
|
|
||||||
git-m7 = pkgs.writeShellScriptBin "git-m7" ''
|
git-gburd = pkgs.writeShellScriptBin "git-gburd" ''
|
||||||
repo="$(git remote -v | grep git@burd.me | head -1 | cut -d ':' -f2 | cut -d ' ' -f1)"
|
repo="$(git remote -v | grep git@burd.me | head -1 | cut -d ':' -f2 | cut -d ' ' -f1)"
|
||||||
# Add a .git suffix if it's missing
|
# Add a .git suffix if it's missing
|
||||||
if [[ "$repo" != *".git" ]]; then
|
if [[ "$repo" != *".git" ]]; then
|
||||||
|
@ -27,22 +27,59 @@ let
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
home.packages = [ git-m7 ];
|
home.packages = [ git-gburd ];
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.gitAndTools.gitFull;
|
package = pkgs.gitAndTools.gitFull;
|
||||||
aliases = {
|
aliases = {
|
||||||
pushall = "!git remote | xargs -L1 git push --all";
|
aa = "add --all";
|
||||||
graph = "log --decorate --oneline --graph";
|
|
||||||
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
|
add-nowhitespace = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -";
|
||||||
|
amend = "commit --amend";
|
||||||
|
ci = "commit";
|
||||||
|
co = "checkout";
|
||||||
|
dag = "log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order";
|
||||||
|
dc = "diff --cached";
|
||||||
|
di = "diff";
|
||||||
|
div = "divergence";
|
||||||
|
fa = "fetch --all";
|
||||||
fast-forward = "merge --ff-only";
|
fast-forward = "merge --ff-only";
|
||||||
|
ff = "merge --ff-only";
|
||||||
|
files = "show --oneline";
|
||||||
|
gn = "goodness";
|
||||||
|
gnc = "goodness --cached";
|
||||||
|
graph = "log --decorate --oneline --graph";
|
||||||
|
h = "!git head";
|
||||||
|
head = "!git l -1";
|
||||||
|
l = "log --graph --abbrev-commit --date=relative";
|
||||||
|
la = "!git l --all";
|
||||||
|
lastchange = "log -n 1 -p";
|
||||||
|
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||||
|
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
||||||
|
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
||||||
|
mend = "commit --amend --no-edit";
|
||||||
|
pom = "push origin master";
|
||||||
|
pullff = "pull --ff-only";
|
||||||
|
pushall = "!git remote | xargs -L1 git push --all";
|
||||||
|
r = "!git --no-pager l -20";
|
||||||
|
ra = "!git r --all";
|
||||||
|
st = "status --short";
|
||||||
|
subdate = "submodule update --init --recursive";
|
||||||
|
sync = "pull --rebase";
|
||||||
|
unadd = "reset --";
|
||||||
|
unedit = "checkout --";
|
||||||
|
unrm = "checkout --";
|
||||||
|
unstage = "reset HEAD";
|
||||||
|
unstash = "stash pop";
|
||||||
|
update = "merge --ff-only origin/master";
|
||||||
};
|
};
|
||||||
userName = "Greg Burd";
|
userName = "Greg Burd";
|
||||||
userEmail = "gburd@symas.com";
|
userEmail = "greg@burd.me";
|
||||||
|
signing = {
|
||||||
|
key = "D4BB42BE729AEFBD2EFEBF8822931AF7895E82DF";
|
||||||
|
signByDefault = true;
|
||||||
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
user.signing.key = "1FC1E7793410DE46";
|
|
||||||
commit.gpgSign = true;
|
|
||||||
gpg.program = "${config.programs.gpg.package}/bin/gpg2";
|
gpg.program = "${config.programs.gpg.package}/bin/gpg2";
|
||||||
};
|
};
|
||||||
lfs.enable = true;
|
lfs.enable = true;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, config, ... }:
|
{ pkgs, config, username, ... }:
|
||||||
let
|
let
|
||||||
pinentry =
|
pinentry =
|
||||||
if config.gtk.enable then {
|
if config.gtk.enable then {
|
||||||
|
@ -42,7 +42,7 @@ in
|
||||||
trust-model = "tofu+pgp";
|
trust-model = "tofu+pgp";
|
||||||
};
|
};
|
||||||
publicKeys = [{
|
publicKeys = [{
|
||||||
source = ../../pgp.asc;
|
source = ../users/${username}/pgp.asc;
|
||||||
trust = 5;
|
trust = 5;
|
||||||
}];
|
}];
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,15 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }:
|
||||||
|
let
|
||||||
|
pinentry =
|
||||||
|
if config.gtk.enable then {
|
||||||
|
packages = [ pkgs.pinentry-gnome pkgs.gcr ];
|
||||||
|
name = "gnome3";
|
||||||
|
} else {
|
||||||
|
packages = [ pkgs.pinentry-curses ];
|
||||||
|
name = "curses";
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
home = {
|
home = {
|
||||||
file = {
|
file = {
|
||||||
"${config.xdg.configHome}/neofetch/config.conf".text = builtins.readFile ./neofetch.conf;
|
"${config.xdg.configHome}/neofetch/config.conf".text = builtins.readFile ./neofetch.conf;
|
||||||
|
@ -7,10 +18,10 @@
|
||||||
neofetch
|
neofetch
|
||||||
];
|
];
|
||||||
sessionVariables = {
|
sessionVariables = {
|
||||||
EDITOR = "micro";
|
EDITOR = "vi";
|
||||||
MANPAGER = "sh -c 'col --no-backspaces --spaces | bat --language man'";
|
MANPAGER = "sh -c 'col --no-backspaces --spaces | bat --language man'";
|
||||||
SYSTEMD_EDITOR = "micro";
|
SYSTEMD_EDITOR = "vi";
|
||||||
VISUAL = "micro";
|
VISUAL = "vi";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -114,7 +125,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
aliases = {
|
aliases = {
|
||||||
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit";
|
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
push = {
|
push = {
|
||||||
|
@ -165,7 +176,7 @@
|
||||||
gpg-agent = {
|
gpg-agent = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableSshSupport = true;
|
enableSshSupport = true;
|
||||||
pinentryFlavor = "curses";
|
pinentryFlavor = pinentry.name;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,10 @@
|
||||||
{ config, pkgs, ... }:
|
{ config, pkgs, ... }:
|
||||||
let
|
|
||||||
color = pkgs.writeText "color.vim" (import ./theme.nix config.colorscheme);
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./lsp.nix
|
./lsp.nix
|
||||||
./syntaxes.nix
|
./syntaxes.nix
|
||||||
./ui.nix
|
./ui.nix
|
||||||
];
|
];
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
|
||||||
|
|
||||||
programs.neovim = {
|
programs.neovim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -16,9 +12,6 @@ in
|
||||||
extraConfig = /* vim */ ''
|
extraConfig = /* vim */ ''
|
||||||
"Use system clipboard
|
"Use system clipboard
|
||||||
set clipboard=unnamedplus
|
set clipboard=unnamedplus
|
||||||
"Source colorscheme
|
|
||||||
source ${color}
|
|
||||||
|
|
||||||
"Set fold level to highest in file
|
"Set fold level to highest in file
|
||||||
"so everything starts out unfolded at just the right level
|
"so everything starts out unfolded at just the right level
|
||||||
augroup initial_fold
|
augroup initial_fold
|
||||||
|
|
|
@ -138,52 +138,6 @@
|
||||||
speedtest = "speedtest-go";
|
speedtest = "speedtest-go";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
git = {
|
|
||||||
userEmail = "greg@burd.me";
|
|
||||||
userName = "Greg Burd";
|
|
||||||
signing = {
|
|
||||||
key = "D4BB42BE729AEFBD2EFEBF8822931AF7895E82DF";
|
|
||||||
signByDefault = true;
|
|
||||||
};
|
|
||||||
aliases = {
|
|
||||||
st = "status --short";
|
|
||||||
ci = "commit";
|
|
||||||
co = "checkout";
|
|
||||||
di = "diff";
|
|
||||||
dc = "diff --cached";
|
|
||||||
amend = "commit --amend";
|
|
||||||
aa = "add --all";
|
|
||||||
head = "!git l -1";
|
|
||||||
h = "!git head";
|
|
||||||
r = "!git --no-pager l -20";
|
|
||||||
ra = "!git r --all";
|
|
||||||
ff = "merge --ff-only";
|
|
||||||
pullff = "pull --ff-only";
|
|
||||||
l = "log --graph --abbrev-commit --date=relative";
|
|
||||||
la = "!git l --all";
|
|
||||||
div = "divergence";
|
|
||||||
gn = "goodness";
|
|
||||||
gnc = "goodness --cached";
|
|
||||||
fa = "fetch --all";
|
|
||||||
pom = "push origin master";
|
|
||||||
files = "show --oneline";
|
|
||||||
graph = "log --graph --decorate --all";
|
|
||||||
lol = "log --graph --decorate --pretty=oneline --abbrev-commit";
|
|
||||||
lola = "log --graph --decorate --pretty=oneline --abbrev-commit --all";
|
|
||||||
lg = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative";
|
|
||||||
sync = "pull --rebase";
|
|
||||||
update = "merge --ff-only origin/master";
|
|
||||||
mend = "commit --amend --no-edit";
|
|
||||||
unadd = "reset --";
|
|
||||||
unedit = "checkout --";
|
|
||||||
unstage = "reset HEAD";
|
|
||||||
unrm = "checkout --";
|
|
||||||
unstash = "stash pop";
|
|
||||||
lastchange = "log -n 1 -p";
|
|
||||||
dag = "log --graph --format='format:%C(yellow)%h%C(reset) %C(blue)\"%an\" <%ae>%C(reset) %C(magenta)%cr%C(reset)%C(auto)%d%C(reset)%n%s' --date-order";
|
|
||||||
subdate = "submodule update --init --recursive";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.user.tmpfiles.rules = [
|
systemd.user.tmpfiles.rules = [
|
||||||
|
@ -197,4 +151,5 @@
|
||||||
"d ${config.home.homeDirectory}/Websites 0755 ${username} users - -"
|
"d ${config.home.homeDirectory}/Websites 0755 ${username} users - -"
|
||||||
"L+ ${config.home.homeDirectory}/.config/obs-studio/ - - - - ${config.home.homeDirectory}/Studio/OBS/config/obs-studio/"
|
"L+ ${config.home.homeDirectory}/.config/obs-studio/ - - - - ${config.home.homeDirectory}/Studio/OBS/config/obs-studio/"
|
||||||
];
|
];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
pass-secret-service = import ./pass-secret-service.nix;
|
|
||||||
}
|
|
|
@ -1,4 +1,5 @@
|
||||||
{ inputs, lib, pkgs, ... }: {
|
{ inputs, lib, pkgs, ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
||||||
#inputs.nixos-hardware.nixosModules.common-gpu-nvidia
|
#inputs.nixos-hardware.nixosModules.common-gpu-nvidia
|
||||||
|
|
|
@ -6,13 +6,16 @@ let
|
||||||
});
|
});
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
# This one brings our custom packages from the 'pkgs' directory
|
# Add our custom packages from the 'pkgs' directory
|
||||||
additions = final: _prev: import ../pkgs { pkgs = final; };
|
additions = final: prev: import ../pkgs { pkgs = final; } // {
|
||||||
|
formats = prev.formats // import ../pkgs/formats { pkgs = final; };
|
||||||
|
vimPlugins = prev.vimPlugins // final.callPackage ../pkgs/vim-plugins { };
|
||||||
|
};
|
||||||
|
|
||||||
# This one contains whatever you want to overlay
|
# Modify existing packages; change versions, add patches, set compilation
|
||||||
# You can change versions, add patches, set compilation flags, anything really.
|
# flags, anything really.
|
||||||
# https://nixos.wiki/wiki/Overlays
|
# https://nixos.wiki/wiki/Overlays
|
||||||
modifications = final: prev: {
|
modifications = _final: prev: {
|
||||||
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
# example = prev.example.overrideAttrs (oldAttrs: rec {
|
||||||
# ...
|
# ...
|
||||||
# });
|
# });
|
||||||
|
|
Loading…
Reference in a new issue