mirror of
https://github.com/sadan4/dotfiles.git
synced 2025-06-08 13:33:02 -04:00
pray
This commit is contained in:
parent
59ee516926
commit
5a3af882ec
61 changed files with 705 additions and 562 deletions
|
@ -9,6 +9,7 @@
|
||||||
# Include the results of the hardware scan.
|
# Include the results of the hardware scan.
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../common/systemModules/boot.nix
|
../../common/systemModules/boot.nix
|
||||||
|
../../common/systemModules/kernel.nix
|
||||||
../../common/systemModules/audio.nix
|
../../common/systemModules/audio.nix
|
||||||
../../common/systemModules/kde.nix
|
../../common/systemModules/kde.nix
|
||||||
../../common/systemModules/tailscale.nix
|
../../common/systemModules/tailscale.nix
|
||||||
|
@ -44,11 +45,11 @@
|
||||||
|
|
||||||
|
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
|
ddcutil
|
||||||
clinfo
|
clinfo
|
||||||
|
i2c-tools
|
||||||
fuse
|
fuse
|
||||||
ifuse
|
ifuse
|
||||||
ddcutil
|
|
||||||
i2c-tools
|
|
||||||
gcc
|
gcc
|
||||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
curl
|
curl
|
||||||
|
|
|
@ -7,131 +7,74 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
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.
|
# Set your time zone.
|
||||||
time.timeZone = "America/New_York";
|
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;
|
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; [
|
environment.systemPackages = with pkgs; [
|
||||||
ddcutil
|
ddcutil
|
||||||
i2c-tools
|
i2c-tools
|
||||||
# python311
|
fuse
|
||||||
# python311Packages.evdev
|
|
||||||
# python311Packages.xlib
|
|
||||||
gcc
|
gcc
|
||||||
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
|
||||||
curl
|
curl
|
||||||
wget
|
wget
|
||||||
git
|
|
||||||
ripgrep
|
ripgrep
|
||||||
tldr
|
tldr
|
||||||
gnupg
|
|
||||||
openssh
|
|
||||||
pinentry-curses
|
|
||||||
pinentry
|
|
||||||
libnotify
|
libnotify
|
||||||
file
|
file
|
||||||
];
|
];
|
||||||
#LD fix
|
#LD fix
|
||||||
programs.nix-ld.enable = true;
|
programs.nix-ld.enable = true;
|
||||||
programs.nix-ld.libraries = with pkgs; [
|
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.startAgent = true;
|
||||||
# programs.ssh.askPassword = pkgs.lib.mkForce "${pkgs.ksshaskpass.out}/bin/ksshaskpass";
|
# 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,
|
# 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.
|
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
|
||||||
#
|
#
|
||||||
|
|
|
@ -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;
|
|
||||||
}
|
|
|
@ -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
|
|
||||||
# '';
|
|
||||||
}
|
|
211
common/pkgs.nix
211
common/pkgs.nix
|
@ -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
|
|
||||||
];
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
|
@ -9,6 +9,5 @@
|
||||||
efiInstallAsRemovable = true;
|
efiInstallAsRemovable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
kernelPackages = pkgs.linuxPackages_latest;
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
common/systemModules/kernel.nix
Normal file
5
common/systemModules/kernel.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
boot = {
|
||||||
|
kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,4 +1,8 @@
|
||||||
{ NAME }: { ... }: {
|
{ NAME }: { ... }: {
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
polychromatic
|
||||||
|
];
|
||||||
hardware = {
|
hardware = {
|
||||||
openrazer = {
|
openrazer = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
|
@ -3,6 +3,9 @@
|
||||||
imports = [
|
imports = [
|
||||||
inputs.stylix.nixosModules.stylix
|
inputs.stylix.nixosModules.stylix
|
||||||
];
|
];
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
nerdfonts
|
||||||
|
];
|
||||||
stylix = {
|
stylix = {
|
||||||
enable = true;
|
enable = true;
|
||||||
image = ./wallpaper.jpg;
|
image = ./wallpaper.jpg;
|
||||||
|
|
6
common/systemModules/wsl.nix
Normal file
6
common/systemModules/wsl.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
wsl = {
|
||||||
|
enable = true;
|
||||||
|
defaultUser = "meyer";
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,11 @@
|
||||||
{ ... }:
|
{pkgs, ...}: {
|
||||||
{
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
spotify
|
||||||
|
pulseaudioFull
|
||||||
|
pavucontrol
|
||||||
|
];
|
||||||
|
};
|
||||||
xdg = {
|
xdg = {
|
||||||
desktopEntries = {
|
desktopEntries = {
|
||||||
spotifyOpen = {
|
spotifyOpen = {
|
||||||
|
@ -14,4 +20,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
14
common/users/homeModules/btop.nix
Normal file
14
common/users/homeModules/btop.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
btop
|
||||||
|
];
|
||||||
|
file = {
|
||||||
|
btop = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../dotfiles/btop;
|
||||||
|
target = "./.config/btop";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
18
common/users/homeModules/dev/cpp.nix
Normal file
18
common/users/homeModules/dev/cpp.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
common/users/homeModules/dev/default.nix
Normal file
8
common/users/homeModules/dev/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
gnumake
|
||||||
|
linuxHeaders
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
7
common/users/homeModules/dev/go.nix
Normal file
7
common/users/homeModules/dev/go.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
go
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
12
common/users/homeModules/dev/ide/default.nix
Normal file
12
common/users/homeModules/dev/ide/default.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
5
common/users/homeModules/dev/ide/jb/default.nix
Normal file
5
common/users/homeModules/dev/ide/jb/default.nix
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./idea.nix
|
||||||
|
];
|
||||||
|
}
|
7
common/users/homeModules/dev/ide/jb/idea.nix
Normal file
7
common/users/homeModules/dev/ide/jb/idea.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
jetbrains.idea-ultimate
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
22
common/users/homeModules/dev/javascript.nix
Normal file
22
common/users/homeModules/dev/javascript.nix
Normal 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
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
19
common/users/homeModules/dev/jvm.nix
Normal file
19
common/users/homeModules/dev/jvm.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
7
common/users/homeModules/dev/lua.nix
Normal file
7
common/users/homeModules/dev/lua.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
lua
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
8
common/users/homeModules/dev/nix.nix
Normal file
8
common/users/homeModules/dev/nix.nix
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
nixfmt-rfc-style
|
||||||
|
nil
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
7
common/users/homeModules/dev/php.nix
Normal file
7
common/users/homeModules/dev/php.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
php
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
20
common/users/homeModules/dev/python.nix
Normal file
20
common/users/homeModules/dev/python.nix
Normal 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
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
7
common/users/homeModules/dev/rust.nix
Normal file
7
common/users/homeModules/dev/rust.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
rustup
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
11
common/users/homeModules/frog.nix
Normal file
11
common/users/homeModules/frog.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, inputs, ...}:
|
||||||
|
let
|
||||||
|
cpkg = import ../../../customPackages { inherit pkgs inputs; };
|
||||||
|
in
|
||||||
|
{
|
||||||
|
home = {
|
||||||
|
packages = [
|
||||||
|
cpkg.frog
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
17
common/users/homeModules/gaming.nix
Normal file
17
common/users/homeModules/gaming.nix
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
xclicker
|
||||||
|
bottles
|
||||||
|
(prismlauncher.override {
|
||||||
|
jdks = [
|
||||||
|
jdk8
|
||||||
|
jdk17
|
||||||
|
jdk22
|
||||||
|
];
|
||||||
|
})
|
||||||
|
protontricks
|
||||||
|
lutris
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -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 = {
|
programs = {
|
||||||
git = {
|
git = {
|
||||||
enable = true;
|
enable = true;
|
|
@ -1,8 +0,0 @@
|
||||||
{ pkgs, ... }: {
|
|
||||||
programs = {
|
|
||||||
java = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.temurin-bin-17;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
11
common/users/homeModules/kde.nix
Normal file
11
common/users/homeModules/kde.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
ksshaskpass
|
||||||
|
xsel
|
||||||
|
libsForQt5.kinit
|
||||||
|
libsForQt5.kcolorchooser
|
||||||
|
gnome.gnome-calculator
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
9
common/users/homeModules/media/cli.nix
Normal file
9
common/users/homeModules/media/cli.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
imagemagick
|
||||||
|
ffmpeg
|
||||||
|
yt-dlp
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
7
common/users/homeModules/media/davinci.nix
Normal file
7
common/users/homeModules/media/davinci.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
davinci-resolve
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
6
common/users/homeModules/media/default.nix
Normal file
6
common/users/homeModules/media/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{...}: {
|
||||||
|
imports = [
|
||||||
|
./cli.nix
|
||||||
|
./gui.nix
|
||||||
|
];
|
||||||
|
}
|
11
common/users/homeModules/media/gui.nix
Normal file
11
common/users/homeModules/media/gui.nix
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
shotcut
|
||||||
|
pinta
|
||||||
|
gimp
|
||||||
|
inkscape
|
||||||
|
obs-studio
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
12
common/users/homeModules/networking.nix
Normal file
12
common/users/homeModules/networking.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
parsec-bin
|
||||||
|
protonvpn-gui
|
||||||
|
insomnia
|
||||||
|
teamviewer
|
||||||
|
filezilla
|
||||||
|
bitwarden
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
19
common/users/homeModules/nvim.nix
Normal file
19
common/users/homeModules/nvim.nix
Normal 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";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
7
common/users/homeModules/obsidian.nix
Normal file
7
common/users/homeModules/obsidian.nix
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
obsidian
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
13
common/users/homeModules/prisma.nix
Normal file
13
common/users/homeModules/prisma.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
14
common/users/homeModules/rofi.nix
Normal file
14
common/users/homeModules/rofi.nix
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
rofi
|
||||||
|
];
|
||||||
|
file = {
|
||||||
|
rofi = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../dotfiles/rofi;
|
||||||
|
target = "./.config/rofi";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
8
common/users/homeModules/scripts/copy.sh
Normal file
8
common/users/homeModules/scripts/copy.sh
Normal 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
|
62
common/users/homeModules/scripts/default.nix
Normal file
62
common/users/homeModules/scripts/default.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
3
common/users/homeModules/scripts/git_fetchAll.sh
Normal file
3
common/users/homeModules/scripts/git_fetchAll.sh
Normal 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
|
1
common/users/homeModules/scripts/hashi18n.sh
Normal file
1
common/users/homeModules/scripts/hashi18n.sh
Normal file
|
@ -0,0 +1 @@
|
||||||
|
xsel -ob | node $HOME/.scripts/hash.js | tr -d '\n' | xsel -ib
|
12
common/users/homeModules/scripts/http2ssh.sh
Normal file
12
common/users/homeModules/scripts/http2ssh.sh
Normal 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;
|
10
common/users/homeModules/scripts/install_eslint.sh
Normal file
10
common/users/homeModules/scripts/install_eslint.sh
Normal 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
|
2
common/users/homeModules/scripts/math.sh
Normal file
2
common/users/homeModules/scripts/math.sh
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
set -e
|
||||||
|
python3 -c "print($*)"
|
8
common/users/homeModules/scripts/paste.sh
Normal file
8
common/users/homeModules/scripts/paste.sh
Normal 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
|
16
common/users/homeModules/social.nix
Normal file
16
common/users/homeModules/social.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
imports = [
|
||||||
|
./arrpc.nix
|
||||||
|
];
|
||||||
|
home = {
|
||||||
|
packages = with pkgs;[
|
||||||
|
legcord
|
||||||
|
cinny-desktop
|
||||||
|
element-desktop
|
||||||
|
(pkgs.discord.override {
|
||||||
|
withVencord = true;
|
||||||
|
})
|
||||||
|
vesktop
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
18
common/users/homeModules/terminal.nix
Normal file
18
common/users/homeModules/terminal.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
22
common/users/homeModules/utils.nix
Normal file
22
common/users/homeModules/utils.nix
Normal 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"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
9
common/users/homeModules/virt.nix
Normal file
9
common/users/homeModules/virt.nix
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
bottles
|
||||||
|
virt-manager
|
||||||
|
qemu_full
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
12
common/users/homeModules/web.nix
Normal file
12
common/users/homeModules/web.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{pkgs, ...}: {
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
firefox-devedition
|
||||||
|
google-chrome
|
||||||
|
thunderbird
|
||||||
|
jellyfin-web
|
||||||
|
jellyfin-media-player
|
||||||
|
vlc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
|
@ -1,6 +1,7 @@
|
||||||
{ lib, pkgs, ... }:
|
{ lib, pkgs, ... }:
|
||||||
let
|
let
|
||||||
|
|
||||||
|
# TODO: make these modular
|
||||||
_ = [
|
_ = [
|
||||||
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
|
"source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme"
|
||||||
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
"source ${pkgs.zsh-syntax-highlighting}/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
||||||
|
@ -12,6 +13,19 @@ let
|
||||||
zshInitArgs = lib.concatMapStrings (x: x + "\n") _;
|
zshInitArgs = lib.concatMapStrings (x: x + "\n") _;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
home = {
|
||||||
|
packages = with pkgs; [
|
||||||
|
zsh-powerlevel10k
|
||||||
|
zsh-syntax-highlighting
|
||||||
|
];
|
||||||
|
file = {
|
||||||
|
p10k = {
|
||||||
|
recursive = true;
|
||||||
|
source = ../dotfiles/.p10k.zsh;
|
||||||
|
target = ".p10k.zsh";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
programs = {
|
programs = {
|
||||||
zoxide = {
|
zoxide = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
33
common/users/meyer-wsl/default.nix
Normal file
33
common/users/meyer-wsl/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
44
common/users/meyer-wsl/home.nix
Normal file
44
common/users/meyer-wsl/home.nix
Normal 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;
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
{ pkgs, inputs, ... }:
|
{ pkgs, inputs, systemImports, ... }:
|
||||||
let
|
let
|
||||||
NAME = "meyer";
|
NAME = "meyer";
|
||||||
in
|
in
|
||||||
|
|
|
@ -3,35 +3,40 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
inputs,
|
inputs,
|
||||||
...
|
...
|
||||||
}:
|
}: let
|
||||||
|
pinned = import ./pinned.nix { inherit pkgs config; };
|
||||||
let
|
in {
|
||||||
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
|
|
||||||
{
|
|
||||||
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
nixpkgs.config.allowInsecurePredicate = (pkg: true);
|
||||||
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
nixpkgs.config.allowUnfreePredicate = (pkg: true);
|
||||||
|
|
||||||
imports = [
|
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/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/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
|
# 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
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home = {
|
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
|
# Home Manager is pretty good at managing dotfiles. The primary way to manage
|
||||||
# plain files is through 'home.file'.
|
# plain files is through 'home.file'.
|
||||||
|
|
||||||
|
|
|
@ -77,8 +77,8 @@
|
||||||
{ programs.nix-index-database.comma.enable = true; }
|
{ programs.nix-index-database.comma.enable = true; }
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
wsl = nixpkgs.lib.nixosSystem {
|
laptop-evo4b5 = nixpkgs.lib.nixosSystem {
|
||||||
system = "x86_64-linux";
|
system = "aarch64-linux";
|
||||||
specialArgs = {
|
specialArgs = {
|
||||||
inherit inputs;
|
inherit inputs;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue