Skip to content

zhongjis/nix-config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zshen's nix-config

This is my personal nix-config. It is always a work in progress as I love tweaking.

Special Thanks

System Status

host profile system
thinkpad-t480 zshen@thinkpad-t480 x86_64-linux
framework-16 zshen@framework-16 x86_64-linux
Zhongjies-MacBook-Pro [email protected] aarch64-darwin

Get Started

  1. install nix (https://zero-to-nix.com/start/install)
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
  1. clone this repo
  2. setup keys.txt (for sops-nix)
age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";

Nix-Darwin

# first time setup
nix run nix-darwin --extra-experimental-features 'nix-command flakes' -- switch --flake .#mac-m1-max

# switch
darwin-rebuild switch --flake .#mac-m1-max
darwin-rebuild --list-generations
darwin-rebuild switch --switch-generation 41

NixOS

  • switch NixOS (TBD)
  • test NixOS (TBD)

Useful cmds

# useful nix cmds
nix run github:zhongjis/nix-update-input # upgrade specific input
nix search nixpkgs <package-name> # search nixpkgs

# rebuild system use nix-helper
oswitch # os switch
hswitch # home-manager switch

Secret Management

I use sops-nix's home-manager module.

nix run nixpkgs#sops -- secrets.yaml # view secrets

more about sops see https://github.com/getsops/sops#2usage

TODOs

NOTE: most of the changes (like for neovim) are changed on the way while im using it. this list just for later in case I have nothing to do.

see here

Notes

Build directly from repo

adding inputs

inputs = {
    trouble-nvim = {
      url = "github:folke/trouble.nvim";
      flake = false;
    };
}

override in overlays

  modifications = final: prev: rec {
    vimPlugins =
      prev.vimPlugins
      // {
        trouble-nvim =
          prev.vimUtils.buildVimPlugin
          {
            name = "trouble.nvim";
            src = inputs.trouble-nvim;
          };
      };
  };

About

Nix Config

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published