Code Monkey home page Code Monkey logo

dotfiles's Introduction

Tudor's Dotfiles / Nix configuration

This is my Nix configuration, which works both for NixOS and for Nix

Acknowledgements to https://github.com/mrkuz/nixos for heavily inspiring the layout of this config.

Warning The configuration codified here was made to be used by me and only me. While I am publishing them to help others to learn Nix and dotfile management, copying them verbatim will likely produce an unusable system.

Installation

NixOS

First, provision a machine with NixOS.

Then:

Desktop:

  1. Clone this repo somewhere on the machine.
  2. nix run .#nixos-rebuild -- boot --flake .#<hostname> --use-remote-sudo

Remote server:

  1. nix run .#deploy-rs -- .#<hostname>

Any other Linux distro for sane people

The companion distro for this config is My Build of Fedora Silverblue. It is made with BlueBuild. The desktop-oriented configs in this repo are meant to be used with this Fedora build only.

  1. Provision a system with the ISO.
  2. Install Nix (my installer of choice is nix-installer).
  3. Clone this repo somewhere on the machine
  4. nix run .#home-manager -- switch --flake .#tudor

Considerations for WSL

Dependencies

The WSL setup assumes that you have 1Password and npiperelay npiperelay installed.

You can install npiperelay with winget:

winget install npiperelay

Installing the thing

Assuming you have Nix set up on some other machine, clone this repo and run:

nix build .#nixosConfigurations.wsl2.config.system.build.installer

This will build the distro tarball in ./result/tarball/. You can then import it in WSL:

# Create the directory that will store the distro's disk image
New-Item -ItemType Directory c:\WSL\NixOS
# Import the tarball as a distro in WSL
wsl --import NixOS c:\WSL\NixOS .\result\tarball\<whatever>.tar.gz
# Boot it!
wsl -d NixOS

Considerations for encrypting secrets

Secrets are encrypted and used through agenix. When provisioning a new machine, make sure to take its host public key and rekey secrets accordingly.

dotfiles's People

Contributors

tudurom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  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.