Changed directory structure for nix flake

This commit is contained in:
Random936
2024-07-04 18:00:22 -07:00
parent 6699e4c271
commit 1eed0aa287
9 changed files with 6 additions and 52 deletions

21
home/darwin.nix Normal file
View File

@@ -0,0 +1,21 @@
{ inputs, lib, config, pkgs, ... }:
let
mypkgs = import ../packages/all-packages.nix {
inherit pkgs lib config;
};
in
{
home = {
username = "jadenmaxwell";
homeDirectory = "/Users/jadenmaxwell";
};
imports = [
./shared.nix
./emacs.nix
./zsh.nix
];
home.file.".tmux/plugins/tpm".source = "${mypkgs.tpm}";
}

43
home/emacs.nix Normal file
View File

@@ -0,0 +1,43 @@
{ inputs, config, pkgs, ... }: {
home.packages = with pkgs; [
# Build deps
cmake
# Additional packages for functionality
isync
ispell
ledger
texliveFull
mu
# Fonts
fira-code
fira-code-symbols
# LSP Servers
yaml-language-server
python311Packages.python-lsp-server
];
programs.emacs = {
enable = true;
package = pkgs.emacs29;
extraPackages = epkgs: with epkgs; [
mu4e
vterm
all-the-icons
nerd-icons
];
};
home.file = {
".emacs".source = ../dotfiles/.emacs;
".emacs.d/config.org".source = ../dotfiles/.emacs.d/config.org;
".emacs.d/terminal.org".source = ../dotfiles/.emacs.d/terminal.org;
".emacs.d/functions.org".source = ../dotfiles/.emacs.d/functions.org;
".emacs.d/email.org".source = ../dotfiles/.emacs.d/email.org;
".emacs.d/org.org".source = ../dotfiles/.emacs.d/org.org;
".emacs.d/lsp.org".source = ../dotfiles/.emacs.d/lsp.org;
".mbsyncrc".source = ../dotfiles/.mbsyncrc;
};
}

64
home/nixos.nix Normal file
View File

@@ -0,0 +1,64 @@
{ inputs, config, pkgs, ... }: {
home = {
username = "random";
homeDirectory = "/home/random";
};
imports = [
./shared.nix
./emacs.nix
./zsh.nix
];
home.packages = with pkgs; [
feh
dconf
docker
cdrkit
discord
wireshark
pavucontrol
google-chrome
seafile-client
bitwarden
];
services.emacs.enable = true;
dconf = {
enable = true;
settings = {
"org/gnome/desktop/interface" = {
color-scheme = "prefer-dark";
};
};
};
gtk = {
enable = true;
theme = {
name = "Materia-dark";
package = pkgs.materia-theme;
};
};
programs.obs-studio = {
enable = true;
plugins = with pkgs.obs-studio-plugins; [
obs-backgroundremoval
];
};
home.file = {
".Xresources".source = ../dotfiles/.Xresources;
".scripts/brightness.sh".source = ../dotfiles/.scripts/brightness.sh;
".scripts/autostart_desktop.sh".source = ../dotfiles/.scripts/autostart_desktop.sh;
".screenlayout/launch.sh".source = ../dotfiles/.screenlayout/launch.sh;
".screenlayout/wallpapers.sh".source = ../dotfiles/.screenlayout/wallpapers.sh;
".config/i3/config".source = ../dotfiles/.config/i3/config;
".config/rofi/config.rasi".source = ../dotfiles/.config/rofi/config.rasi;
".config/polybar/config.ini".source = ../dotfiles/.config/polybar/config.ini;
};
}

69
home/shared.nix Normal file
View File

@@ -0,0 +1,69 @@
{ inputs, config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
fonts.fontconfig.enable = true;
home.packages = with pkgs; [
# Nix specific utilities
manix
nix-tree
# Utilities
jq
bc
file
wget
curl
tmux
ncdu
btop
p7zip
ripgrep
fastfetch
bitwarden-cli
openvpn
# Dev tools
clang
clang-tools
cargo
python3
gnumake
# Hacking
yara
nmap
john
ffuf
nikto
sqlmap
thc-hydra
exploitdb
feroxbuster
(wordlists.override {
lists = with pkgs; [
rockyou
seclists
];
})
];
programs = {
home-manager.enable = true;
zoxide.enable = true;
eza.enable = true;
fzf.enable = true;
git = {
enable = true;
userName = "Random936";
userEmail = "randomdude936@gmail.com";
};
};
home.file = {
".functions.zsh".source = ../dotfiles/.functions.zsh;
};
home.stateVersion = "24.05";
}

54
home/zsh.nix Normal file
View File

@@ -0,0 +1,54 @@
{ inputs, config, pkgs, ... }: {
home.packages = with pkgs; [
meslo-lgs-nf
];
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
history.size = 100000000;
shellAliases = {
cd = "z";
ls = "eza";
update-darwin = "darwin-rebuild switch --flake ~/dotfiles";
update-conf = "sudo nixos-rebuild switch --flake ~/dotfiles";
update-home = "home-manager switch --flake ~/dotfiles";
update-all = "update-conf && update-home";
};
initExtra = ''
export PATH=$PATH:~/.cargo/bin
function .. { cd .. }
function ... { cd ../.. }
function .... { cd ../../.. }
function ..... { cd ../../../../.. }
function ...... { cd ../../../../../.. }
function ....... { cd ../../../../../../.. }
'';
plugins = [
{
name = "custom-functions";
src = ../dotfiles;
file = ".functions.zsh";
}
{
name = "powerlevel10k-config";
src = ../dotfiles;
file = ".p10k.zsh";
}
];
zplug = {
enable = true;
plugins = [
{ name = "romkatv/powerlevel10k"; tags = [ as:theme depth:1 ]; }
];
};
};
}