This commit is contained in:
sadan 2024-11-26 17:01:58 -05:00
parent 59ee516926
commit 5a3af882ec
No known key found for this signature in database
61 changed files with 705 additions and 562 deletions

View file

@ -9,6 +9,7 @@
# Include the results of the hardware scan.
./hardware-configuration.nix
../../common/systemModules/boot.nix
../../common/systemModules/kernel.nix
../../common/systemModules/audio.nix
../../common/systemModules/kde.nix
../../common/systemModules/tailscale.nix
@ -44,11 +45,11 @@
environment.systemPackages = with pkgs; [
ddcutil
clinfo
i2c-tools
fuse
ifuse
ddcutil
i2c-tools
gcc
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
curl

View file

@ -7,131 +7,74 @@
{
imports = [
inputs.sops-nix.nixosModules.sops
../../common/users/meyer-wsl
../../common/systemModules/wsl.nix
../../common/systemModules/kernel.nix
../../common/systemModules/crypt.nix
../../common/systemModules/stylix.nix
];
sops.defaultSopsFile = ../../secrets.yaml;
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/meyer/.config/sops/age/keys.txt";
sops.secrets.password.neededForUsers = true;
wsl.enable = true;
wsl.defaultUser = "meyer";
# Use the systemd-boot EFI boot loader.
users.users.meyer = {
isNormalUser = true;
hashedPasswordFile = config.sops.secrets.password.path;
extraGroups = [
"wheel" # Enable sudo for the user.
"input"
"tty"
];
shell = pkgs.zsh;
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"meyer" = import ./home.nix;
};
};
boot.kernelPackages = pkgs.linuxPackages_zen;
hardware.i2c.enable = true;
networking.hostName = "nix-wsl"; # Define your hostname.
hardware.i2c.enable = true;
networking.hostName = "arm-laptop-evo4b5"; # Define your hostname.
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Set your time zone.
time.timeZone = "America/New_York";
# Select internationalisation properties.
# i18n.defaultLocale = "en_US.UTF-8";
# console = {
# font = "Lat2-Terminus16";
# keyMap = "us";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
# servives.desktopManager.plasma6.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# Enable CUPS to print documents.
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Enable sound.
# hardware.pulseaudio.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs.zsh.enable = true;
nixpkgs.config.allowUnfree = true;
# networking.nameservers = ["10.0.0.97" "1.1.1.1"];
networking.nameservers = [ "10.0.0.97" ];
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
ddcutil
i2c-tools
# python311
# python311Packages.evdev
# python311Packages.xlib
fuse
gcc
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
curl
wget
git
ripgrep
tldr
gnupg
openssh
pinentry-curses
pinentry
libnotify
file
];
#LD fix
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
pkgs.curlWithGnuTls
libGL
alsa-lib
expat
mesa
libxkbcommon
xorg.libxcb
xorg.libXrandr
xorg.libXfixes
xorg.libXext
xorg.libXdamage
xorg.libXcomposite
xorg.libX11
cairo
pango
gtk3
libdrm
cups
at-spi2-atk
lzo
dbus
nspr
nss
glib
curlWithGnuTls
fuse
fuse3
mimalloc
libstdcxx5
];
programs.ssh.startAgent = true;
# programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";
programs.gnupg.agent = {
enable = true;
};
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
# List services that you want to enable:
# Enable the OpenSSH daemon.
# services.openssh.enable = true;
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
# system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#

View file

@ -1,99 +0,0 @@
{ config, lib, pkgs, inputs, ... }:
let
_s1 = import ../../common/sops.nix {inherit config; };
files = import ../../common/files.nix { inherit config; };
shell = import ../../common/shell.nix { inherit config pkgs; };
p = import ../../common/pkgs.nix { inherit pkgs config; };
_p1 = p.dev ++ p.general ++ p.scripts ++ p.wsl;
zshInitArgs = [
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
"[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh"
"setopt globstarshort"
];
_z1 = lib.concatMapStrings (x: x + "\n") zshInitArgs;
in
{
imports = [
inputs.sops-nix.homeManagerModules.sops
];
sops = _s1;
programs.zsh.enable = true;
programs.zsh.oh-my-zsh.enable = true;
programs.zsh.initExtra = builtins.trace _z1 _z1;
programs.java.enable = true;
programs.java.package = pkgs.temurin-bin-17;
programs.zoxide.enable = true;
programs.zoxide.enableZshIntegration = true;
programs.git.enable = true;
programs.git.userName = "sadan";
programs.git.userEmail = "117494111+sadan4@users.noreply.github.com";
programs.git.extraConfig = {
gpg.format = "ssh";
user = {
signingkey = "~/.ssh/id_ed25519";
};
commit.gpgsign = true;
core.autocrlf = "input";
pull.rebase = true;
push.autoSetupRemote = true;
init.defaultBranch = "main";
rerere.enabled = true;
};
nixpkgs.config.allowUnfreePredicate = (pkg: true);
# Home Manager needs a bit of information about you and the paths it should
# nixpkg.config.allowUnfree = true;
# manage.
home.username = "meyer";
home.homeDirectory = "/home/meyer";
services = {
flameshot = {
enable = true;
settings.General.showDesktopNotification = false;
settings.General.startupLaunch = false;
# settings.Shortcuts.TYPE_IMAGEUPLOADER = "";
# settings.Shortcuts.TYPE_COPY = "Return";
};
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = _p1;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = files;
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. If you don't want to manage your shell through Home
# Manager then you have to manually source 'hm-session-vars.sh' located at
# either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/meyer/etc/profile.d/hm-session-vars.sh
#
home.shellAliases = shell.dev.aliases;
home.sessionPath = shell.dev.path;
home.sessionVariables = shell.dev.env;
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,60 +0,0 @@
{
config,
cpkg,
}:
let
in
{
lazygit = {
recursive = true;
source = ../dotfiles/lazygit;
target = "./.config/lazygit";
};
kitty = {
recursive = true;
source = ../dotfiles/kitty;
target = "./.config/kitty";
};
eslint_d_config = {
source = ../dotfiles/eslintrc.json;
target = "./.config/.eslintrc.json";
};
gh = {
source = ../dotfiles/gh/config.yml;
target = "./.config/gh/config.yml";
};
btop = {
recursive = true;
source = ../dotfiles/btop;
target = "./.config/btop";
};
nvim = {
recursive = true;
source = config.lib.file.mkOutOfStoreSymlink "${config.home.homeDirectory}/nixos/dotfiles/nvim";
target = "./.config/nvim";
};
p10k = {
recursive = true;
source = ../dotfiles/.p10k.zsh;
target = ".p10k.zsh";
};
rofi = {
recursive = true;
source = ../dotfiles/rofi;
target = "./.config/rofi";
};
scripts = {
source = "${cpkg.scripts}";
target = ".scripts";
};
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
}

View file

@ -1,211 +0,0 @@
{
pkgs,
config,
inputs,
cpkg,
}:
let
pinned = import ./pinned.nix { inherit pkgs config; };
in
{
dev = with pkgs; [
meson
nixfmt-rfc-style
nil
deno
rustup
android-studio-tools
vscode-langservers-extracted
cmake
nodePackages_latest.typescript-language-server
lua
go
eslint_d
typescript
php
clang
gnumake
gradle
lazygit
linuxHeaders
eslint
nodePackages.nodemon
nodePackages.ts-node
nodePackages.pnpm
corepack_22
prisma
prisma-engines
nodePackages.live-server
gh
glib
glibc
(python312.withPackages (
ps: with ps; [
pytesseract
pillow
pyzbar
pygobject3
nanoid
loguru
evdev
setuptools
xlib
]
))
nodejs_22
];
gui = with pkgs; [
cpkg.frog
legcord
obsidian
bottles
parsec-bin
jadx
android-studio
wireshark
pinned.vscode
pinned.etcher
insomnia
teamviewer
davinci-resolve
warp-terminal
gnome.gnome-calculator
libsForQt5.kcolorchooser
python312Packages.openai-whisper
firefox-devedition
cinny-desktop
element-desktop
protonvpn-gui
xclicker
polychromatic
jellyfin-media-player
arrpc
filezilla
virt-manager
qemu_full
shotcut
pinta
gimp
inkscape
#OCR ENGINE
tesseract4
(pkgs.discord.override {
withVencord = true;
})
vesktop
xsel
spotify
pulseaudioFull
pavucontrol
# jetbrains.pycharm-community
jbeap.idea-ultimate
google-chrome
bitwarden
nerdfonts
# vscodium
kitty
rofi
thunderbird
vlc
jellyfin-web
obs-studio
tokyo-night-gtk
ksshaskpass
libsForQt5.kinit
];
general = with pkgs; [
imagemagick
onefetch
p7zip
dig
bat
usbutils
tree
ffmpeg
yt-dlp
neofetch
sops
hyfetch
fzf
zsh-powerlevel10k
zsh-syntax-highlighting
jq
unzip
btop
];
gaming = with pkgs; [
(prismlauncher.override {
jdks = [
jdk8
jdk17
jdk22
];
})
protontricks
lutris
];
scripts = [
(pkgs.writeShellScriptBin "hashi18n" ''
xsel -ob | node ${cpkg.scripts}/hash.js | tr -d '\n' | xsel -ib
'')
(pkgs.writeShellScriptBin "paste" ''
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
xsel -ob && exit 0
fi
command -v wslclip > /dev/null
if [[ $? -eq 0 ]]; then
wslclip -g && exit 0
fi
'')
(pkgs.writeShellScriptBin "http2ssh" ''
set -eo pipefail
if [[ -z $1 ]]; then
echo "You need to provide a remote name";
echo "Avilable remotes";
git remote -v;
exit 1;
fi
URL=''$(git remote get-url $1);
URL=''${URL/https:\/\//git@};
URL=''${URL/\//:};
git remote set-url $1 $URL;
'')
(pkgs.writeShellScriptBin "copy" ''
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
xsel -ib $@ && exit 0
fi
command -v wslclip > /dev/null
if [[ $? -eq 0 ]]; then
wslclip $@ && exit 0
fi
'')
(pkgs.writeShellScriptBin "git_fetchAll" ''
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "''${remote#origin/}" "$remote"; done
git fetch --all
git pull --all
'')
(pkgs.writeShellScriptBin "install_eslint" ''
set -x
cp /home/${config.home.username}/.config/.eslintrc.json .
pkgs=("@stylistic/eslint-plugin" "@typescript-eslint/eslint-plugin")
if [[ -z $1 ]]; then
echo please specify npm, pnpm, or yarn
exit 1
fi
for i in "''${pkgs[@]}"; do
`$1 i -D $i`
done
'')
(pkgs.writeShellScriptBin "math" ''
set -e
python3 -c "print($*)"
'')
];
wsl = with pkgs; [
wslu
];
}

View file

@ -1,13 +0,0 @@
{ pkgs, config }: {
polychromatic = {
Unit = {
Description = "razer chroma applet/daemon";
};
Install = {
WantedBy = [ "default.target" ];
};
Service = {
ExecStart = "${pkgs.polychromatic}/bin/polychromatic-tray-applet";
};
};
}

View file

@ -1,36 +0,0 @@
{ config, pkgs, cpkg }:
rec {
dev = {
env = common.env // {
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
};
path = common.path ++ [
];
aliases = common.aliases // {
lg = "lazygit";
sd = ''lsusb | grep Elgato | grep --perl-regexp "(?<=Device 0{0,10})[1-9]+" --only-matching | xargs printf "usb.device_address eq %s" | copy'';
};
};
common = {
env = {
LG_CONFIG_FILE = "/home/${config.home.username}/.config/lazygit/tokyonight_night.conf";
BAT_THEME = "Dracula";
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
MADWIDTH = "999";
SSH_ASKPASS_REQUIRE = "prefer";
};
path = [
"$HOME/.local/bin"
];
aliases = {
# paste = "xsel -ob || wslclip -g";
# copy = "xsel -ib || wslclip";
b = "/home/${config.home.username}/nixos/build";
};
};
}

View file

@ -9,6 +9,5 @@
efiInstallAsRemovable = true;
};
};
kernelPackages = pkgs.linuxPackages_latest;
};
}

View file

@ -0,0 +1,5 @@
{pkgs, ...}: {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
};
}

View file

@ -1,4 +1,8 @@
{ NAME }: { ... }: {
environment.systemPackages = with pkgs; [
polychromatic
];
hardware = {
openrazer = {
enable = true;

View file

@ -3,6 +3,9 @@
imports = [
inputs.stylix.nixosModules.stylix
];
environment.systemPackages = with pkgs; [
nerdfonts
];
stylix = {
enable = true;
image = ./wallpaper.jpg;

View file

@ -0,0 +1,6 @@
{pkgs, ...}: {
wsl = {
enable = true;
defaultUser = "meyer";
}
}

View file

@ -1,5 +1,11 @@
{ ... }:
{
{pkgs, ...}: {
home = {
packages = with pkgs; [
spotify
pulseaudioFull
pavucontrol
];
};
xdg = {
desktopEntries = {
spotifyOpen = {
@ -14,4 +20,4 @@
};
};
};
}
}

View file

@ -0,0 +1,14 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
btop
];
file = {
btop = {
recursive = true;
source = ../dotfiles/btop;
target = "./.config/btop";
};
}
}
}

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
meson
cmake
clang
glib
glibc
llvmPackages_19.clang-tools
];
file = {
eslint_d_config = {
source = ../dotfiles/eslintrc.json;
target = "./.config/.eslintrc.json";
};
};
};
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
gnumake
linuxHeaders
];
};
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
go
];
};
}

View file

@ -0,0 +1,12 @@
{pkgs, config, ...}:
let
pinned = import ../pinned.nix { inherit pkgs config; };
in {
home = {
packages = with pkgs; [
pinned.vscode
# codium
zed-editor
];
};
}

View file

@ -0,0 +1,5 @@
{...}: {
imports = [
./idea.nix
];
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
jetbrains.idea-ultimate
];
};
}

View file

@ -0,0 +1,22 @@
{pkgs, ...}: {
imports = [
../prisma.nix
]
home = {
packages = with pkgs; [
deno
eslint_d
vscode-langservers-extracted
nodePackages_latest.typescript-language-server
typescript
eslint
corepack_22
nodejs_22
] ++ (with pkgs.nodePackages; [
nodemon
ts-node
pnpm
live-server
]);
}
}

View file

@ -0,0 +1,19 @@
{ pkgs, ... }: {
home = {
packages = with pkgs; [
android-studio-tools
gradle
jadx
android-studio
jetbrains.idea-ultimate
# jbeap.idea-ultimate
# jetbrains.pycharm-community
];
};
programs = {
java = {
enable = true;
package = pkgs.temurin-bin-17;
};
};
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
lua
];
};
}

View file

@ -0,0 +1,8 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
nixfmt-rfc-style
nil
];
}
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
php
];
};
}

View file

@ -0,0 +1,20 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
(python312.withPackages (
ps: with ps; [
pytesseract
pillow
pyzbar
pygobject3
nanoid
loguru
evdev
setuptools
xlib
]
))
python312Packages.openai-whisper
];
};
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
rustup
];
};
}

View file

@ -0,0 +1,11 @@
{pkgs, inputs, ...}:
let
cpkg = import ../../../customPackages { inherit pkgs inputs; };
in
{
home = {
packages = [
cpkg.frog
];
};
}

View file

@ -0,0 +1,17 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
xclicker
bottles
(prismlauncher.override {
jdks = [
jdk8
jdk17
jdk22
];
})
protontricks
lutris
];
};
}

View file

@ -1,4 +1,28 @@
{ ... }: {
{ pkgs, ... }: {
home = {
packages = with pkgs; [
git
lazygit
gh
];
file = {
lazygit = {
recursive = true;
source = ../dotfiles/lazygit;
target = "./.config/lazygit";
};
gh = {
source = ../dotfiles/gh/config.yml;
target = "./.config/gh/config.yml";
};
};
shellAliases = {
lg = "lazygit";
}
sessionVariables {
LG_CONFIG_FILE = "/home/${config.home.username}/.config/lazygit/tokyonight_night.conf";
};
}
programs = {
git = {
enable = true;

View file

@ -1,8 +0,0 @@
{ pkgs, ... }: {
programs = {
java = {
enable = true;
package = pkgs.temurin-bin-17;
};
};
}

View file

@ -0,0 +1,11 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
ksshaskpass
xsel
libsForQt5.kinit
libsForQt5.kcolorchooser
gnome.gnome-calculator
];
}
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
imagemagick
ffmpeg
yt-dlp
];
}
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
davinci-resolve
];
};
}

View file

@ -0,0 +1,6 @@
{...}: {
imports = [
./cli.nix
./gui.nix
];
}

View file

@ -0,0 +1,11 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
shotcut
pinta
gimp
inkscape
obs-studio
];
}
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
parsec-bin
protonvpn-gui
insomnia
teamviewer
filezilla
bitwarden
];
};
}

View file

@ -0,0 +1,19 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
neovim
];
file = {
nvim = {
recursive = true;
source = pkgs.lib.file.mkOutOfStoreSymlink "${pkgs.home.homeDirectory}/nixos/dotfiles/nvim";
target = "./.config/nvim";
};
};
sessionVariables = {
EDITOR = "nvim";
MANPAGER = "nvim +Man!";
MANWIDTH = "999";
};
}
}

View file

@ -0,0 +1,7 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
obsidian
];
};
}

View file

@ -0,0 +1,13 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
prisma
prisma-engines
];
sessionVariables = {
PRISMA_QUERY_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/query-engine";
PRISMA_SCHEMA_ENGINE_BINARY = "${pkgs.prisma-engines}/bin/schema-engine";
PRISMA_QUERY_ENGINE_LIBRARY = "${pkgs.prisma-engines}/lib/libquery_engine.node";
};
};
}

View file

@ -0,0 +1,14 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
rofi
];
file = {
rofi = {
recursive = true;
source = ../dotfiles/rofi;
target = "./.config/rofi";
};
};
};
}

View file

@ -0,0 +1,8 @@
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
xsel -ib $@ && exit 0
fi
command -v wslclip > /dev/null
if [[ $? -eq 0 ]]; then
wslclip $@ && exit 0
fi

View file

@ -0,0 +1,62 @@
{pkgs, lib, inputs, ...}:
let
cpkg = import ../../../customPackages { inherit pkgs inputs; };
# https://discourse.nixos.org/t/how-to-create-a-script-with-dependencies/7970/6
mkScript = { name, version ? "0.0.1", file, env ? [ ] }:
pkgs.writeTextFile {
name = "${name}-${version}";
executable = true;
destination = "/bin/${name}";
text = ''
for i in ${lib.concatStringsSep " " env}; do
export PATH="$i/bin:$PATH"
done
exec ${bash}/bin/bash ${file} $@
'';
};
in
{
home = {
packages = with pkgs; [
# env for clipboard command will be required by their respective environemnts
(mkScript {
name = "paste";
file = ./paste.sh;
})
(mkScript {
name = "copy";
file = ./copy.sh;
})
(mkScript {
name = "http2ssh";
file = ./http2ssh.sh;
env = [git];
})
(mkScript {
name = "git_fetchAll";
file = ./git_fetchAll.sh;
env = [git];
})
(mkScript {
name = "install_eslint";
file = ./install_eslint.sh;
})
(mkScript {
name = "math";
file = ./math.sh;
env = [python3];
})
(mkScript {
name = "hashi18n";
file = ./hashi18n.sh;
})
];
file = {
scripts = {
source = "${cpkg.scripts}";
target = ".scripts";
};
};
};
}

View file

@ -0,0 +1,3 @@
git branch -r | grep -v '\->' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | while read remote; do git branch --track "${remote#origin/}" "$remote"; done
git fetch --all
git pull --all

View file

@ -0,0 +1 @@
xsel -ob | node $HOME/.scripts/hash.js | tr -d '\n' | xsel -ib

View file

@ -0,0 +1,12 @@
set -eo pipefail
if [[ -z $1 ]]; then
echo "You need to provide a remote name";
echo "Avilable remotes";
git remote -v;
exit 1;
fi
URL=$(git remote get-url $1);
URL=${URL/https:\/\//git@};
URL=${URL/\//:};
git remote set-url $1 $URL;

View file

@ -0,0 +1,10 @@
set -x
cp $HOME/.config/.eslintrc.json .
pkgs=("@stylistic/eslint-plugin" "@typescript-eslint/eslint-plugin")
if [[ -z $1 ]]; then
echo please specify npm, pnpm, or yarn
exit 1
fi
for i in "${pkgs[@]}"; do
`$1 i -D $i`
done

View file

@ -0,0 +1,2 @@
set -e
python3 -c "print($*)"

View file

@ -0,0 +1,8 @@
command -v xsel > /dev/null
if [[ $? -eq 0 ]]; then
xsel -ob && exit 0
fi
command -v wslclip > /dev/null
if [[ $? -eq 0 ]]; then
wslclip -g && exit 0
fi

View file

@ -0,0 +1,16 @@
{pkgs, ...}: {
imports = [
./arrpc.nix
];
home = {
packages = with pkgs;[
legcord
cinny-desktop
element-desktop
(pkgs.discord.override {
withVencord = true;
})
vesktop
];
};
}

View file

@ -0,0 +1,18 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
warp-terminal
kitty
onefetch
hyfetch
neofetch
];
file = {
kitty = {
recursive = true;
source = ../dotfiles/kitty;
target = "./.config/kitty";
};
};
}
}

View file

@ -0,0 +1,22 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
p7zip
dig
bat
usbutils
tree
sops
fzf
jq
unzip
];
sessionVariables = {
BAT_THEME = "Dracula";
SSH_ASKPASS_REQUIRE = "prefer";
};
sessionPath = [
"$HOME/.local/bin"
];
};
}

View file

@ -0,0 +1,9 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
bottles
virt-manager
qemu_full
];
};
}

View file

@ -0,0 +1,12 @@
{pkgs, ...}: {
home = {
packages = with pkgs; [
firefox-devedition
google-chrome
thunderbird
jellyfin-web
jellyfin-media-player
vlc
];
};
}

View file

@ -1,6 +1,7 @@
{ lib, pkgs, ... }:
let
# TODO: make these modular
_ = [
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
@ -12,6 +13,19 @@ let
zshInitArgs = lib.concatMapStrings (x: x + "\n") _;
in
{
home = {
packages = with pkgs; [
zsh-powerlevel10k
zsh-syntax-highlighting
];
file = {
p10k = {
recursive = true;
source = ../dotfiles/.p10k.zsh;
target = ".p10k.zsh";
};
};
};
programs = {
zoxide = {
enable = true;

View file

@ -0,0 +1,33 @@
{ pkgs, inputs, ... }:
let
NAME = "meyer";
in
{
imports = [
(import ../../systemModules/sops.nix { inherit NAME; })
(import ../../systemModules/nixHelper.nix { inherit NAME; })
];
users = {
users = {
"${NAME}" = {
isNormalUser = true;
extraGroups = [
"wheel" # Enable sudo for the user.
"audio"
"sound"
"video"
"input"
"tty"
"plugdev"
];
shell = pkgs.zsh;
};
};
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"${NAME}" = import ./home.nix;
};
};
}

View file

@ -0,0 +1,44 @@
{
config,
pkgs,
inputs,
...
}:
{
nixpkgs.config.allowInsecurePredicate = (pkg: true);
nixpkgs.config.allowUnfreePredicate = (pkg: true);
imports = [
../homeModules/util.nix
../homeModules/dev
../homeModules/dev/cpp.nix
../homeModules/dev/javascript.nix
../homeModules/dev/python.nix
../homeModules/scripts
../homeModules/btop.nix
../homeModules/git.nix
../homeModules/nvim.nix
../homeModules/sops.nix
../homeModules/zsh.nix
];
home.username = "meyer";
home.homeDirectory = "/home/meyer";
home = {
packages = with pkgs; [
wslu
];
};
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "23.11"; # Please read the comment before changing.
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}

View file

@ -1,4 +1,4 @@
{ pkgs, inputs, ... }:
{ pkgs, inputs, systemImports, ... }:
let
NAME = "meyer";
in

View file

@ -3,35 +3,40 @@
pkgs,
inputs,
...
}:
let
file = import ../../files.nix { inherit config cpkg; };
shell = import ../../shell.nix { inherit config pkgs cpkg; };
cpkg = import ../../../customPackages { inherit pkgs inputs; };
pkgTypes = import ../../pkgs.nix {
inherit
pkgs
config
inputs
cpkg
;
};
packages = pkgTypes.dev ++ pkgTypes.gui ++ pkgTypes.general ++ pkgTypes.scripts ++ pkgTypes.gaming;
in
{
}: let
pinned = import ./pinned.nix { inherit pkgs config; };
in {
nixpkgs.config.allowInsecurePredicate = (pkg: true);
nixpkgs.config.allowUnfreePredicate = (pkg: true);
imports = [
../homeModules/util.nix
../homeModules/dev
../homeModules/dev/ide
../homeModules/dev/ide/jb/idea.nix
../homeModules/dev/javascript.nix
../homeModules/dev/cpp.nix
../homeModules/dev/jvm.nix
../homeModules/dev/python.nix
../homeModules/media
../homeModules/scripts
../homeModules/audio.nix
../homeModules/btop.nix
../homeModules/flameshot.nix
../homeModules/arrpc.nix
../homeModules/frog.nix
../homeModules/gaming.nix
../homeModules/git.nix
../homeModules/kde.nix
../homeModules/networking.nix
../homeModules/nvim.nix
../homeModules/obsidian.nix
../homeModules/rofi.nix
../homeModules/social.nix
../homeModules/sops.nix
../homeModules/terminal.nix
../homeModules/virt.nix
../homeModules/web.nix
../homeModules/zsh.nix
../homeModules/desktopEntries.nix
../homeModules/java.nix
../homeModules/jetbrains
../homeModules/notion.nix
./sops.nix
./git.nix
];
# Home Manager needs a bit of information about you and the paths it should
@ -43,11 +48,13 @@ in
# The home.packages option allows you to install Nix packages into your
# environment.
home = {
inherit packages file;
packages = with pkgs; [
pinned.etcher
]
};
home.shellAliases = {
sd = ''lsusb | grep Elgato | grep --perl-regexp "(?<=Device 0{0,10})[1-9]+" --only-matching | xargs printf "usb.device_address eq %s" | copy'';
};
home.shellAliases = shell.dev.aliases;
home.sessionPath = shell.dev.path;
home.sessionVariables = shell.dev.env;
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.

View file

@ -77,8 +77,8 @@
{ programs.nix-index-database.comma.enable = true; }
];
};
wsl = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
laptop-evo4b5 = nixpkgs.lib.nixosSystem {
system = "aarch64-linux";
specialArgs = {
inherit inputs;
};