added direnv and actually changed username and email in git

This commit is contained in:
Gerg-L 2023-02-08 21:11:45 -05:00
parent c5d0fd4cbf
commit f2e6e564b5
7 changed files with 35 additions and 12 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
./direnv

12
flake.lock generated
View file

@ -53,11 +53,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1675673983,
"narHash": "sha256-8hzNh1jtiPxL5r3ICNzSmpSzV7kGb3KwX+FS5BWJUTo=",
"lastModified": 1675763311,
"narHash": "sha256-bz0Q2H3mxsF1CUfk26Sl9Uzi8/HFjGFD/moZHz1HebU=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "5a350a8f31bb7ef0c6e79aea3795a890cf7743d4",
"rev": "fab09085df1b60d6a0870c8a89ce26d5a4a708c2",
"type": "github"
},
"original": {
@ -75,11 +75,11 @@
]
},
"locked": {
"lastModified": 1675828746,
"narHash": "sha256-LvvvmBPmtQs55mDavpgnOw6X1EKBOtPGfjtDeMS7ies=",
"lastModified": 1675907028,
"narHash": "sha256-bxBBes14/bWtSD3ULf318hHIsx4zCh/Iv9ETgODjNlc=",
"owner": "Gerg-L",
"repo": "nvim-config",
"rev": "b5c5b25d1401a2e7dd8d3d6bcc911ced8543e4f1",
"rev": "aca37d04ab549dc0fe02a6bcecad169fea93b2cf",
"type": "github"
},
"original": {

View file

@ -45,13 +45,14 @@
};
in {
formatter.${system} = pkgs.alejandra;
devShells.${system} = {
devShells.${system} = rec {
nix = pkgs.mkShell {
packages = with pkgs; [nil alejandra deadnix statix];
};
rust = pkgs.mkShell {
packages = with pkgs; [rust-analyzer rustc cargo rustfmt clippy];
};
default = nix;
};
nixosConfigurations = {
gerg-desktop = lib.nixosSystem {

View file

@ -4,12 +4,15 @@
package = pkgs.gitMinimal;
config = {
user = {
name = "ISnortPennies";
email = "ISnortPennies@protonmail.com";
name = "Gerg-L";
email = "GregLeyda@proton.me";
};
init = {
defaultBranch = "master";
};
push = {
autoSetupRemote = true;
};
};
};
}

View file

@ -1,4 +1,7 @@
{pkgs, ...}: rec {
#put:
#source /run/current-system/sw/share/nix-direnv/direnvrc
#in ~/.direnvrc
environment = {
systemPackages = with pkgs; [
dash
@ -8,6 +11,8 @@
st
exa
fetch-rs
direnv
(pkgs.nix-direnv.override {enableFlakes = true;})
];
binsh = "${pkgs.dash}/bin/dash"; #use dash for speed
variables = {
@ -17,6 +22,7 @@
SYSTEMD_PAGERSECURE = "true";
TERMINAL = "st";
NIX_BUILD_SHELL = "zsh";
DIRENV_LOG_FORMAT = "";
};
shellAliases = {
#make sudo use aliases
@ -45,6 +51,9 @@
lt = "exa --tree --level=2";
};
interactiveShellInit = "fetch-rs";
pathsToLink = [
"/share/nix-direnv"
];
};
security.sudo = {
enable = true;
@ -66,13 +75,16 @@
syntaxHighlighting = {
enable = true;
};
shellInit = ''
eval "$(direnv hook zsh)"
'';
};
#starship
starship = {
enable = true;
settings = {
add_newline = false;
format = "$sudo$cmd_duration \n $directory$git_branch$character";
format = "$sudo\${custom.direnv} $cmd_duration \n $directory$git_branch$character";
character = {
success_symbol = "[ ](#9ece6a bold)";
error_symbol = "[ ](#db4b4b bold)";
@ -91,6 +103,11 @@
min_time = 5000;
style = "bold #9ece6a";
};
custom.direnv = {
format = "[\\[direnv\\]]($style)";
style = "#36c692";
detect_folders = [".direnv"];
};
};
};
};

View file

@ -29,8 +29,8 @@
auto-optimise-store = true;
warn-dirty = false;
flake-registry = builtins.toFile "empty-flake-registry.json" ''{"flakes":[],"version":2}'';
keep-outputs = false;
keep-derivations = false;
keep-outputs = true;
keep-derivations = true;
};
};
environment.etc."booted-system".source = self;