1
0
Fork 0

improvements

This commit is contained in:
Lukas Wurzinger 2024-03-08 22:46:46 +01:00
parent 48dcdc5a44
commit 9dffcd14b7
32 changed files with 640 additions and 623 deletions

View file

@ -1,5 +1,13 @@
{
services.atuin = {
enable = true;
};
lib,
pkgs,
...
}: let
package = pkgs.atuin;
in {
environment.systemPackages = [package];
programs.bash.interactiveShellInit = ''
eval "$(${lib.getExe package} init bash)"
'';
}

18
common/bash.nix Normal file
View file

@ -0,0 +1,18 @@
{
programs = {
command-not-found.enable = false;
bash = {
blesh.enable = true;
interactiveShellInit = ''
shopt -s globstar
shopt -s nullglob
shopt -s extglob
shopt -s checkwinsize
bind 'set show-mode-in-prompt off'
'';
};
};
}

3
common/bottom.nix Normal file
View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
environment.systemPackages = [pkgs.bottom];
}

View file

@ -1,59 +0,0 @@
{
config,
lib,
pkgs,
...
}: {
programs = {
command-not-found.enable = false;
git = {
enable = true;
lfs.enable = true;
};
nix-index = {
enable = true;
enableBashIntegration = true;
};
direnv.enable = true;
bash = {
promptInit = ''
if [[ -v SSH_CLIENT && -v SSH_CONNECTION && -v SSH_TTY ]]; then
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else
PS1='\[\033[01;34m\]\w\[\033[00m\]\$ '
fi
'';
interactiveShellInit = ''
shopt -s histappend
HISTCONTROL='ignoredups:ignorespace'
HISTSIZE=1000
HISTFILESIZE=10000
shopt -s globstar
shopt -s nullglob
shopt -s extglob
shopt -s checkwinsize
eval "$(${lib.getExe config.programs.direnv.package} hook bash)"
'';
};
};
environment = {
systemPackages = [
pkgs.bottom
pkgs.comma
pkgs.helix
];
variables = {
EDITOR = lib.getExe pkgs.helix;
VISUAL = lib.getExe pkgs.helix;
};
};
}

View file

@ -2,11 +2,15 @@
imports = [
./atuin.nix
./avahi.nix
./bash.nix
./boot.nix
./cli.nix
./bottom.nix
./dbus.nix
./direnv.nix
./fs.nix
./fwupd.nix
./git.nix
./myvim.nix
./nix.nix
./opengl.nix
./readline.nix

11
common/direnv.nix Normal file
View file

@ -0,0 +1,11 @@
{
config,
lib,
...
}: {
programs.direnv.enable = true;
programs.bash.interactiveShellInit = ''
eval "$(${lib.getExe config.programs.direnv.package} hook bash)"
'';
}

6
common/git.nix Normal file
View file

@ -0,0 +1,6 @@
{
programs.git = {
enable = true;
lfs.enable = true;
};
}

18
common/myvim.nix Normal file
View file

@ -0,0 +1,18 @@
{
lib,
inputs,
pkgs,
...
}: {
environment = let
package = inputs.myvim.packages.${pkgs.system}.default;
in {
systemPackages = [package];
variables = let
name = builtins.baseNameOf (lib.getExe package);
in {
EDITOR = name;
VISUAL = name;
};
};
}

View file

@ -10,6 +10,7 @@
nixPath = lib.mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
settings = {
trusted-users = ["@wheel"];
experimental-features = "nix-command flakes";
auto-optimise-store = true;
};

View file

@ -2,8 +2,6 @@
programs.starship = {
enable = true;
interactiveOnly = true;
settings = {
format = "$all";
};
settings.format = "$all";
};
}

View file

@ -3,6 +3,9 @@
users = {
mutableUsers = false;
groups.lukas = {};
users = {
root.hashedPassword = "!";
lukas = {

3
common/zellij.nix Normal file
View file

@ -0,0 +1,3 @@
{pkgs, ...}: {
environment.systemPackages = [pkgs.zellij];
}