Skip to content

Instantly share code, notes, and snippets.

@sandipndev
Created February 10, 2026 07:15
Show Gist options
  • Select an option

  • Save sandipndev/69c59bab970c0303b39bde767af8d0c0 to your computer and use it in GitHub Desktop.

Select an option

Save sandipndev/69c59bab970c0303b39bde767af8d0c0 to your computer and use it in GitHub Desktop.
{
config,
pkgs,
...
}: let
nvimRepo = pkgs.fetchgit {
url = "https://github.com/sandipndev-space/nvim.git";
rev = "efab8ccef03de75a5d53b0ee42d6215a237224e7";
hash = "sha256-G2bq5DDtYUKdMld5bGJCzSNNTnml58TBND0oUj2AAv4=";
};
tmuxRepo = pkgs.fetchgit {
url = "https://github.com/sandipndev-space/.tmux.git";
rev = "14558bd20242a510f56a2c9733ff9fbd3f887621";
hash = "sha256-qY1pN4dQxIrEgWt4ximcWWOmg4oeaiMBYVTwjjvh7pk=";
};
in {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
];
fonts.packages = [pkgs.nerd-fonts.jetbrains-mono];
# Bootloader.
boot.loader.grub.enable = true;
boot.loader.grub.device = "/dev/sda";
boot.loader.grub.useOSProber = true;
programs.nix-ld.enable = true;
networking.hostName = "atlas"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
networking.firewall.enable = false;
networking.wireguard.interfaces.wg0 = {
ips = [ "10.66.66.3/32" ];
privateKeyFile = "/etc/wireguard/wg0.key";
peers = [
{
publicKey = "7b5JGQtqXBJ2eqteHNureT4ysPyLfU4rL56AsXdnSA4=";
endpoint = "139.84.214.107:51820";
allowedIPs = [ "10.66.66.0/24" ];
persistentKeepalive = 25;
}
];
};
# Set your time zone.
time.timeZone = "Asia/Kolkata";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = true;
# Enable the KDE Plasma Desktop Environment.
services.displayManager.sddm.enable = true;
services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound with pipewire.
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.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’.
users.users = {
sandipndev = {
isNormalUser = true;
description = "sandipndev";
extraGroups = ["networkmanager" "wheel" "docker" "podman"];
packages = with pkgs; [
kdePackages.kate
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYWP+MFYSxB5X3cmgg8dorng858hAF9291PjiioO/cUrpZSvU3x+ARY7E+mcALhKraCmBphVjjpCxpWFbRqEdWjFCEWQ8uAN/Tuytxk85RItWgeBt/iMuPzbAN2+NnGTvH1RQvLeRPKrr1S8/x86XfaYP6ns8SXk3tOCL/BdCSAG3sJg2vUxrcSPA5Tvgisuy+kLkn9Ern6JBgmuVkNzpJ3PSI0MAJSHzfNtBfLmNZuqKIBv8Fnt9s7MjAr0mue9Ff6RySoc5BykIDdLuTnZGlMrOQclRG4Xs/tfF3NMjPCfGYK5sRxX+MGI8RMG2oCgHKDeg5daVmPUDjAMqOfONQaI03JAvCXmQF8W4fEosncudohOdbwryCiq1Px4PuTHKO0/D4cuePck9OHJbcHL2rM+GTe7WlNAIkxlPqvu332cKBRefx6BIrSvNgXIW6OYw4AojeCru0YeURhVtUxrvyWI3rUvUZPHEw/VT2zFcA7AKmr+igJ7EsD/IQ4NGf+L0= triethyl@Sandipans-MacBook-Pro.local"
];
};
bitcoin = {
isNormalUser = true;
description = "bitcoin";
extraGroups = ["networkmanager" "wheel" "docker" "podman" "libvrtd" "kvm"];
packages = with pkgs; [
kdePackages.kate
# Required libraries
boost
libevent
capnproto
sqlite
zeromq
# GUI dependencies
qt6.qtbase
qt6.qttools
qrencode
# Testing and scripting
python3
# Compiler and build tools
cmake
ninja
pkg-config
ccache
# Development tools
git
jq
minikube kubectl
libvirt virt-manager
qemu_kvm
wireguard-tools
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYWP+MFYSxB5X3cmgg8dorng858hAF9291PjiioO/cUrpZSvU3x+ARY7E+mcALhKraCmBphVjjpCxpWFbRqEdWjFCEWQ8uAN/Tuytxk85RItWgeBt/iMuPzbAN2+NnGTvH1RQvLeRPKrr1S8/x86XfaYP6ns8SXk3tOCL/BdCSAG3sJg2vUxrcSPA5Tvgisuy+kLkn9Ern6JBgmuVkNzpJ3PSI0MAJSHzfNtBfLmNZuqKIBv8Fnt9s7MjAr0mue9Ff6RySoc5BykIDdLuTnZGlMrOQclRG4Xs/tfF3NMjPCfGYK5sRxX+MGI8RMG2oCgHKDeg5daVmPUDjAMqOfONQaI03JAvCXmQF8W4fEosncudohOdbwryCiq1Px4PuTHKO0/D4cuePck9OHJbcHL2rM+GTe7WlNAIkxlPqvu332cKBRefx6BIrSvNgXIW6OYw4AojeCru0YeURhVtUxrvyWI3rUvUZPHEw/VT2zFcA7AKmr+igJ7EsD/IQ4NGf+L0= triethyl@Sandipans-MacBook-Pro.local"
];
};
galoy = {
isNormalUser = true;
description = "galoy";
subUidRanges = [
{
startUid = 100000;
count = 65536;
}
];
subGidRanges = [
{
startGid = 100000;
count = 65536;
}
];
extraGroups = ["networkmanager" "wheel" "docker" "podman"];
packages = with pkgs; [
kdePackages.kate
];
openssh.authorizedKeys.keys = [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDYWP+MFYSxB5X3cmgg8dorng858hAF9291PjiioO/cUrpZSvU3x+ARY7E+mcALhKraCmBphVjjpCxpWFbRqEdWjFCEWQ8uAN/Tuytxk85RItWgeBt/iMuPzbAN2+NnGTvH1RQvLeRPKrr1S8/x86XfaYP6ns8SXk3tOCL/BdCSAG3sJg2vUxrcSPA5Tvgisuy+kLkn9Ern6JBgmuVkNzpJ3PSI0MAJSHzfNtBfLmNZuqKIBv8Fnt9s7MjAr0mue9Ff6RySoc5BykIDdLuTnZGlMrOQclRG4Xs/tfF3NMjPCfGYK5sRxX+MGI8RMG2oCgHKDeg5daVmPUDjAMqOfONQaI03JAvCXmQF8W4fEosncudohOdbwryCiq1Px4PuTHKO0/D4cuePck9OHJbcHL2rM+GTe7WlNAIkxlPqvu332cKBRefx6BIrSvNgXIW6OYw4AojeCru0YeURhVtUxrvyWI3rUvUZPHEw/VT2zFcA7AKmr+igJ7EsD/IQ4NGf+L0= triethyl@Sandipans-MacBook-Pro.local"
];
};
};
users.defaultUserShell = pkgs.zsh;
virtualisation.libvirtd.enable = true;
# Install firefox.
programs.firefox.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
virtualisation.podman = {
enable = true;
dockerCompat = true; # provides `docker` CLI
defaultNetwork.settings.dns_enabled = true;
};
systemd.tmpfiles.rules = [
"L+ /var/run/docker.sock - - - - /run/podman/podman.sock"
];
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
antigravity
vlc
wget
vim
neovim
tmux
alejandra
pciutils
btop
git
linuxPackages.cpupower
bitcoin
gcc
gnumake
llvm
cmake
ninja
nodejs
ripgrep
unzip
kubectl
direnv
k9s
github-cli
podman-compose
ngrok
google-chrome
claude-code
];
# 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:
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestions.enable = true;
syntaxHighlighting.enable = true;
ohMyZsh = {
enable = true;
plugins = ["git"];
};
promptInit = ''
source ${pkgs.zsh-powerlevel10k}/share/zsh-powerlevel10k/powerlevel10k.zsh-theme
'';
interactiveShellInit = ''
export POWERLEVEL10K_DISABLE_CONFIGURATION_WIZARD=true
[[ -r /etc/zsh/p10k.zsh ]] && source /etc/zsh/p10k.zsh
'';
};
environment.etc."zsh/p10k.zsh".text = ''
# Global Powerlevel10k config
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(os_icon dir vcs)
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status command_execution_time time)
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
typeset -g POWERLEVEL9K_PROMPT_ADD_NEWLINE=true
'';
programs.git = {
enable = true;
config = {
user = {
name = "Sandipan Dey";
email = "hey@sandipan.dev";
signingKey = "DE3561F81B89A469";
};
init.defaultBranch = "main";
commit.gpgSign = true;
rerere.enabled = true;
push.autoSetupRemote = true;
};
};
programs.neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
environment.shellAliases = {
vim = "nvim";
vi = "nvim";
};
environment.etc."nvim-config".source = nvimRepo;
environment.etc."xdg/nvim/sysinit.vim".text = ''
set rtp^=/etc/nvim-config
lua dofile('/etc/nvim-config/init.lua')
'';
programs.tmux.enable = true;
environment.etc."oh-my-tmux".source = tmuxRepo;
environment.loginShellInit = ''
# ~/.tmux → repo
if [ ! -e "$HOME/.tmux" ]; then
ln -sfn /etc/oh-my-tmux "$HOME/.tmux"
fi
# ~/.tmux.conf → .tmux/.tmux.conf
if [ ! -L "$HOME/.tmux.conf" ]; then
ln -sfn .tmux/.tmux.conf "$HOME/.tmux.conf"
fi
# user-local overrides (copied once)
if [ ! -f "$HOME/.tmux.conf.local" ]; then
cp /etc/oh-my-tmux/.tmux.conf.local "$HOME/.tmux.conf.local" 2>/dev/null || true
fi
'';
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
KbdInteractiveAuthentication = false;
};
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "25.11"; # Did you read the comment?
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
}

Comments are disabled for this gist.