Skip to content

These are the "dot files" or settings files I used on *nix based environments for different things.

License

Notifications You must be signed in to change notification settings

bzvestey/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

46 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dem Dot Files

These are the random dot or settings files I use on *nix based devices. Some might be OS specific, or only when I decide to use specific programs (bash/zsh).

MacOS

Basics

  • Clone this to ~/dev/dotfiles
  • symlink it to ~/.mydotfiles

zsh

  • Download zsh
  • Download oh-my-zsh
  • Start zsh at least once (oh-my-zsh should do this for you)
  • Update ~/.zshrc to look something like this:
# Path to my oh-my-zsh installation.
export ZSH=/home/bzvestey/.oh-my-zsh

# Path to my .zshrc file
source ~/.mydotfiles/zsh/zshrc-macos.zsh

NixOS info

  1. Figure out the deivce name you want and set it as an environment variable in your terminal, this way it can be referenced in the other scripts

    export device_name="<name of device>"

Also see.

New device setup

  1. Create a folder for the device, and copy the generated configs into it

    mkdir -p $HOME/dev/dotfiles/devices/$device_name
    cp /etc/nixos/hardware-configuration.nix $HOME/dev/dotfiles/devices/$device_name/
    cp /etc/nixos/configuration.nix $HOME/dev/dotfiles/devices/$device_name/configuration.nix.base
  2. Createa a new configuration for the device using the common configs.

    cat <<EOF > $HOME/dev/dotfiles/devices/$device_name/configuration.nix
    { config, pkgs, ... }:
    
    {
    imports =
        [ # Include the results of the hardware scan.
        ./hardware-configuration.nix
        
        # Include core configurations
        ../common/core/base.nix
        ../common/core/locale.nix
        ../common/core/networking.nix
        ../common/core/time.nix
        ../common/core/users.nix
    
        # Include hardware configurations
        ../common/hardware/audio.nix
        ../common/hardware/fingerprint-reader.nix
        ../common/hardware/keyboard.nix
        ../common/hardware/printer.nix
    
        # Include display manager configurations
        ../common/display/gnome.nix
    
        # Include services configurations
        ../common/services/tailscale.nix
        # ../common/services/syncthing.nix
        ../common/services/flatpak.nix
    
        # Include program configurations
        ../common/programs/1password.nix
        ../common/programs/browsers.nix
        ../common/programs/files.nix
        ../common/programs/programming.nix
        ../common/programs/terminal.nix
        ];
    
    # Fill in "boot.initrd.luks.devices" line from /etc/nixos/configuration.nix
    # boot.initrd.luks.devices....;
    
    networking.hostName = "$device_name"; # Define your hostname.
    
    # Set the "system.stateVersion" line from /etc/nixos/configuration.nix
    # system.stateVersion = "...";
    }
    EOF
  3. Update the new configuration.nix file with local customizations

  4. Continue to the steps for all devices

Setup steps for all devices

  1. Setup the nixos configs

    sudo rm -rf /etc/nixos/*
    sudo ln -s $HOME/dev/dotfiles/devices/$device_name /etc/nixos
    cp $HOME/dev/dotfiles/devices/common/services/vars.nix.example $HOME/dev/dotfiles/devices/common/services/vars.nix
  2. Set the variables in $HOME/dev/dotfiles/devices/common/services/vars.nix before continuing on.

  3. Setup the home-manager configs

    mkdir ~/.config/home-manager
    ln -s $HOME/dev/dotfiles/config/home-manager $HOME/.comfig/home-manager
  4. Move to unstable channel and add home-manager channel

    sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixos
    sudo nix-channel --add https://github.com/nix-community/home-manager/archive/master.tar.gz home-manager
    sudo nix-channel --add https://github.com/NixOS/nixos-hardware/archive/master.tar.gz nixos-hardware
  5. Install nixos packages based on updated channels

    sudo nix-channel --update
    sudo nixos-rebuild switch --upgrade
  6. Install home-manager

    nix-shell '<home-manager>' -A install
  7. Setup Tailscale

    sudo tailscale set --operator=$USER
    tailscale up
  8. Setup the fingerprint reader

    fprintd-enroll -f right-index-finger
    fprintd-enroll -f left-index-finger

Links

About

These are the "dot files" or settings files I used on *nix based environments for different things.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published