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

View file

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

View file

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

View file

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

View file

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