Giter VIP home page Giter VIP logo

nixos-dotfiles's Introduction

nixos-dotfiles

A collection of dotfiles to configure NixOS

Useful Things to Know

Enable Flakes by Default

# DESCRIPTION: Enable flakes in <configuration.nix>
# SOURCE: https://www.youtube.com/watch?v=ACybVzRvDhs&t=543s
nix.settings.experimental-feautres = [ "nix-command" "flakes" ];

REMARKS:

Requires execution of

sudo nixos-rebuild switch

to take effect.

Change NixOS Configuration to the one Specified in Flake

sudo nixos-rebuild switch --flake <FILEPATH>#<CONFIGNAME>

REMARKS:

  • If the system's hostname is identical to <CONFIGNAME> specified in the Flake, #<CONFIGNAME> can be omitted.
  • If the Flake file name is flake.nix, one does not have to give a full file path, but only needs to specify the directory where the Flake is located.

SOURCE:
Youtube Video: Libre Phoenix: You Should Use Flakes Right Away in NixOS!
https://www.youtube.com/watch?v=ACybVzRvDhs&t=1346s

Activate Home Manager of Stable Branch in Standalone Mode

  1. Open Terminal and add nix-channel for stable Home Manager Release
nix-channel --add https://github.com/nix-community/home-manager/archive/release-23.11.tar.gz home-manager
nix-channel --update
  1. Install Home Manager
nix-shell '<home-manager>' -A install

Running Home Manager

This flake requires the home manager to be run as follows:

home-manager switch --flake <PATH>#<USERNAME>

For example:

home-manager switch --flake .#nixos

Eventhough the username was identical with the name of the configuration, the configuration would otherwise not be found.

Permission Issue with Flake.lock

While running home-manager switch --flake, there might be an error that the flake.lock file cannot be opened. This might happen if at some point in time a sudo nixos-rebuild switch --flake command has been run.
In some cases, it is sufficient to run sudo nixos-rebuild switch --flake to update all the flake settings properly. This should work for changes required by NixOS and/or Home Manager. If not, the other option is to set the permissions:

sudo chown <USERNAME> flake.lock
sudo chgrp users flake.lock


Source: https://youtu.be/IiyBeR-Guqw?si=j4Jk_bOjpTWtI_SA&t=1001

Warning: Option will be overwritten

Some changes like in the Firefox configuration will not work unless the backup option is set

home-manager switch -b backup --flake <PATH>#<USERNAME>

General Inspiration:
https://gitlab.com/Oglo12/nixos-config

Specific Inspiration (Power Saving, Greeter BG, Garbage Collection):
https://github.com/AlexCKunze/NixOS-build/blob/main/etc/nixos/configuration.nix

Custom Firefox Config:
https://github.com/NapoleonWils0n/nixos-dotfiles/blob/master/nixos-dotfiles.org
https://github.com/mahmoudk1000/nix-config

nixos-dotfiles's People

Contributors

d-sacre avatar

Watchers

 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.