Giter Site home page Giter Site logo

dotfiles's Introduction

dotfiles aka machine configuration

This is the personal configuration for Thomas Christensen.

Feel free to borrow parts and/or make your own based on this.

A configuration setup based on Nix flakes for:

As such it can be used to configure:

  • my home directory (shell and utils, dev setup) on a UNIX system (using Nix the package manager with Home Manager)
  • my macOS user (defaults, apps and the above) (using Nix the package manager with nix-darwin)
  • a full machine running NixOS (apps, services, hardware and kernel config)

A motivation/overview of Nix flakes for configuring machines: NIX FLAKES, PART 3: MANAGING NIXOS SYSTEMS.

Prerequisites

Using home-manager

./apply.sh home will apply the homeManagerConfigurations defined as $HOST.$USER in machines.nix

hint: to apply and reload: ./apply.sh home && reload_zshrc

to preview changes without applying:

./build.sh home

Using nix-darwin

The nix-darwin (Nix on macOS) can be configured to use Yabai + SKHD (tiling window manager with a hotkey daemon). For more information on this type of setup, see this video.

Install Nix

Use The Determinate Nix Installer to install nix with flakes on your macOS machine.

Applying changes

./apply.sh darwin will apply the darwinConfigurations defined as $HOST in machines.nix

To preview changes without applying: ./build.sh darwin. The built configuration will be placed in ./result.

Using nixos

./apply.sh nixos will apply the nixos configuration defined for $HOST in machines.nix.

To preview changes without applying: ./build.sh nixos

Updating lockfile

Use ./update.sh to write a new lock file (updating all the inputs)

To preview what has changed, try ./lock-to-github.sh which can show github links to the different inputs including differences to the currently locked.

Listing dependents

nix-store --query --referrers /nix/store/8mlz1pppq90x4j959932jzhm982rb2rc-gtk4-4.6.5

nix-tree.sh

As with apply.sh and build.sh, this command will invoke nix-tree with the current (or specified) configuration.

Why depends?

# home manager
nix why-depends .#homeManagerConfigurations.aeris.thomas.activationPackage nixpkgs#ghc-8.10.4
# darwin (with allow unfree)
NIXPKGS_ALLOW_UNFREE=1 nix why-depends --impure .#darwinConfigurations.aeris.system nixpkgs#nodePackages.vscode-langservers-extracted

Cleaning old system generations

Running ./clean-old-generations.sh (as with sudo for nixos/nix-darwin) will clean any profiles older than 30 days.

Inspiration

dotfiles's People

Contributors

thomaschrstnsn avatar

Watchers

 avatar James Cloos avatar

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.