Giter Club home page Giter Club logo

home-manager's Introduction

Home-manger

My config for home-manager

  • Deploy with flake
    home-manager switch --flake .
    
  • Deploy specific config from flake
    home-manager switch --flake .'#ksalman'
    

Python workflow

Use pipenv and direnv

  1. Create Pipfile
    cat >Pipfile<<EOF
    [[source]]
    url = "https://pypi.org/simple"
    verify_ssl = true
    name = "pypi"
    
    [packages]
    ansible = "==7.3.0"
    molecule-docker = "==2.1.0"
    passlib= "==1.7.4"
    
    [dev-packages]
    
    [requires]
    python_version = "3.10"
    EOF
    
  2. create venv and install packages
    pipenv install
    
  3. Create .envrc
    cat >.envrc<<EOF
    layout pipenv
    EOF
    
  4. Allow direnv
    direnv allow
    

Linux Notes

  1. We need to install some dependencies on a fresh system
    sudo apt-get update
    sudo apt-get install zsh curl git stow
    sudo dpkg-reconfigure locales
    
    # Install and configure nixpkgs and home-manager
    sh <(curl -L https://nixos.org/nix/install) --daemon
    nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
    nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
    nix-channel --update
    nix-shell '<home-manager>' -A install
    
    # TODO: migrate this to home-manager
    git clone [email protected]:ksalman/dotfiles.git ~/dotfiles
    cd ~/dotfiles && stow ssh
    

MacOS Notes

  1. Add Zscaler Root cert to /nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt
  2. Add the following to /etc/zshrc
    # Nix
    if [ -e '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh' ]; then
      . '/nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh'
    fi
    # End Nix
    
    Note: It may need to be re-added after MacOS upgrade.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.