[go: up one dir, main page]

Skip to content

Serial and reproducible experiment to impulse the Linux adoption in work teams

Notifications You must be signed in to change notification settings

INVERSIONESIO/nixos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Expectations

Have a fast setup that any organization collaborator can install in their computer

Even if they come from other operating systems they can have a very stable workstation with all the tools installed to start developing.

Solve the pain of versioned software development tools

In software development we use tools that might not always work in all projects, in this case we would solve this by using dev shell + direnv in each local project. This is completely agnostic for developers who don't share the same thoughts or operating system.

An excellent example of this is nvm, which is a tool that works well, but the idea here is to forget the specific version that each project we are working on uses. This would be delegated to a single maintenance operation instead of a pain that is present n times in every developer's day.

Cheatsheet

Where to search more packages and options

Build a new generation

For both of the sections below you'll need to execute the showcased commands in the same directory where the dotfiles were cloned.

If you recently modified something from the ./system AKA NixOS configuration files you'll need to use this command.

# Update system configuration without the need to reboot
$ sudo nixos-rebuild switch --upgrade --flake .

# The updated system configuration should be available on reboot
# You normally want this when you modify something at very low
# level on the computer
$ sudo nixos-rebuild boot --upgrade --flake .

Use this command if you modified something from the ./home AKA home manager configuration files.

# Update the configuration files, services and assets of the user home
# directory.
#
# As long that there's only a single user you'll be able to use this way.
$ home-manager switch --flake .

However, these settings are heavily embodied to Nix flakes, so the idea is that when you update something in the flake.nix or flake.lock files, you update the environments that you think will be affected by those changes.

How to update a flake input

Each flake entry has a fixed (time-lined) version of itself declared in flake.lock, this ensures reproducibility on the used flakes, but you will need to periodically update the entries for each third-party flake. To achieve this you just have to run this:

# You can press <tab> to autocomplete the input names.
$ nix flake lock --update-input <input-name>

This will update the specified input in the flake.lock file but now is in you to update your NixOS and Home manager setup and check that everything's working as expected.

macOS VM guide

This virtual machine is running as a systemd service and by default it's not started so to use it you'll need to execute the following command on every new computer boot:

# Initializes VM process.
 $ sudo systemctl start macos-ventura.service

Important

The VNC connection values used below depends on your macOS Ventura VM definitions and the default VNC configurations of this module.

After that command the qemu VM will be running in background and you will need a VNC client to connect to it. By default TigerVNC Viewer is installed, in this case the URL to perform a connection with the server might be localhost:5900.

Throubleshooting

License

MIT