1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-11 07:10:39 +02:00

feat: add lidswitch and some modules

This commit is contained in:
oddlama 2022-12-14 19:39:51 +01:00
parent 4b4268b537
commit 4db499a5d3
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
12 changed files with 222 additions and 47 deletions

View file

@ -1,17 +1,17 @@
{ pkgs, ... }: {
{pkgs, ...}: {
imports = [
./atuin.nix
./bash.nix
./btop.nix
./fish.nix
./git.nix
./htop.nix
./neovim
./ssh.nix
./starship.nix
./tmux.nix
./xdg.nix
./zsh.nix
#./atuin.nix
#./bash.nix
#./btop.nix
#./fish.nix
#./git.nix
#./htop.nix
#./neovim
#./ssh.nix
#./starship.nix
#./tmux.nix
#./xdg.nix
#./zsh.nix
];
home = {
@ -27,28 +27,29 @@
rclone
ripgrep
rsync
tree
];
shellAliases = {
l = "ls -lahF --group-directories-first --show-control-chars --quoting-style=escape --color=auto";
t="tree -F --dirsfirst -L 2"
tt="tree -F --dirsfirst -L 3 --filelimit 16"
ttt="tree -F --dirsfirst -L 6 --filelimit 16"
cpr="rsync -axHAWXS --numeric-ids --info=progress2"
t = "tree -F --dirsfirst -L 2";
tt = "tree -F --dirsfirst -L 3 --filelimit 16";
ttt = "tree -F --dirsfirst -L 6 --filelimit 16";
cpr = "rsync -axHAWXS --numeric-ids --info=progress2";
md="mkdir"
rmd="rm --one-file-system -d"
cp="cp -vi"
mv="mv -vi"
rm="rm --one-file-system -I"
chmod="chmod -c --preserve-root"
chown="chown -c --preserve-root"
md = "mkdir";
rmd = "rm --one-file-system -d";
cp = "cp -vi";
mv = "mv -vi";
rm = "rm --one-file-system -I";
chmod = "chmod -c --preserve-root";
chown = "chown -c --preserve-root";
vim="nvim"
ip="ip --color"
tmux="tmux -2"
rg="rg -S"
vim = "nvim";
ip = "ip --color";
tmux = "tmux -2";
rg = "rg -S";
p="cd ~/projects"
p = "cd ~/projects";
};
};
@ -60,7 +61,6 @@
bat.enable = true;
fzf.enable = true;
gpg.enable = true;
zoxide.enable = true;
};
xdg.configFile."nixpkgs/config.nix".text = "{ allowUnfree = true; }";

View file

@ -1,13 +1,18 @@
{ config, lib, pkgs, ... }:
with lib;
{
config,
lib,
pkgs,
...
}:
with lib; {
users.groups.myuser.gid = config.users.users.myuser.uid;
users.users.myuser = {
uid = 1000;
uid = 1000;
createHome = true;
group = "myuser";
extraGroups = [ "wheel" "input" "video" ]
++ optionals config.sound.enable [ "audio" ];
extraGroups =
["wheel" "input" "video"]
++ optionals config.sound.enable ["audio"];
isNormalUser = true;
shell = pkgs.zsh;
};
@ -17,13 +22,13 @@ with lib;
#impermanence.home-manager.impermanence
./core
./dev
#]
#++ optionals config.programs.sway.enable [
# ./graphical
# ./graphical/sway
#] ++ optionals config.services.xserver.windowManager.i3.enable [
# ./graphical
# ./graphical/i3
#]
#++ optionals config.programs.sway.enable [
# ./graphical
# ./graphical/sway
#] ++ optionals config.services.xserver.windowManager.i3.enable [
# ./graphical
# ./graphical/i3
];
home.username = config.users.users.myuser.name;

View file

@ -0,0 +1,39 @@
{
lib,
pkgs,
...
}: {
home = {
extraOutputsToInstall = ["doc" "devdoc"];
file.gdbinit = {
target = ".gdbinit";
text = ''
set auto-load safe-path /
'';
};
packages = with pkgs; [
git-lfs
nix-update
nixpkgs-review
];
};
programs = {
direnv = {
enable = true;
nix-direnv.enable = true;
stdlib = ''
: ''${XDG_CACHE_HOME:=$HOME/.cache}
declare -A direnv_layout_dirs
direnv_layout_dir() {
echo "''${direnv_layout_dirs[$PWD]:=$(
echo -n "$XDG_CACHE_HOME"/direnv/layouts/
echo -n "$PWD" | shasum | cut -d ' ' -f 1
)}"
}
'';
};
nix-index.enable = true;
};
}