Skip to content

givtrah/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-config

Nixos files for my installations

How to use

Make sure git and gh is installed

You can start out by using a nix-shell that has gh and git:

nix-shell -p git gh

Auth

gh auth login # login to github using ssh and auth token

Tell git who you are

git config --global user.name "givtrah"

git config --global user.email "THESECRET@email.com"

Clone repo

mkdir ~/.dotfiles
cd ~/.dotfiles
git clone git@github.com:givtrah/dotfiles .

or use https (note: Change git repo from https to ssh afterwards in git config!)

git clone https://github.com/givtrah/dotfiles .

add all (new) files

git add .

commit

git commit -m "reason"

push

git push

solve problems with repo being different from local

(by overwriting local with the repo)

git fetch --all
git reset --hard origin/main
git pull

If you feel you may use the local changes later you can do:

git stash

before doing the above fetch/reset/pull

then to reapply stashed changes later do:

git stash pop

Overall directory structure

config: .config files I for some reason won't or can't nixify home: Home-manager stuff hosts: Host-specific files (note that part of home-manager is also host specific) modules: Nix modules (e.g. non home-manager programs/services etc.)

Nix os commands in dir

Update system according to the flake and nix files

sudo nixos-rebuild boot --flake . --impure

(impure for now, asahi only works well with impure and I have other issues as well that requires impure for now until I solve the issues)

Update the flake file (e.g. actually do an update! run update system above afterwards)

sudo nix flake update

Solve home "backup" problems / interactions between existing config files and nixos trying to override

journalctl -e --unit home-manager-USERNAME.service

Will tell you the problematic config dir / file

Reinstall notes

"Burn" KDE Nix OS iso to USB

Boot Nix OS, TURN OFF screen lock / sleep!

Use disko quickguide

Remember to check lsblk

Enter root password at the end, then reboot

Upon reboot:

Login as root

nix-shell -p git

git clone repo

export TMPDIR=/tmp (or you WILL run out of space during installation).

CHANGE THE STATE VERSION IN THE GIT REPO hosts/*/default.nix to MATCH /etc/nixos/configuration.nix!!!!!!!!!!!!!!!!!!!

Add experimental flake and nix settings to configuration.nix in /etc/nixos/configuration.nix by adding the line nix.settings.experimental-features = [ "nix-command" "flakes" ];

Then run nixos-rebuild switch

Finally do (while standing in the dotfiles dir)

nixos-rebuild switch --flake ./#HOSTNAME-WANTED --impure

About

Dotfiles and Nix OS config

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published