Skip to content

barsoosayque/nixconfig

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

212 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nixconfig

Nixos config for my machines using flakes.

Honest to God I cannot tell you how it works (as per usual with nix or nixos). I coded it while being possessed so here it is. Probably it is usable.

Install

To install this flake from an installation iso, first enter a sudo mode and then create a Nix shell with dependencies:

$ sudo -i
# nix-shell -p git nixVersions.latest

This is required since git isn’t a hard dependency, and flakes only available in latest nix.

Then, partition according to the NixOS manual. In this nixconfig, there is an option to create and automatically link directories from /storage to /home/user, so it might be usefull to mount / to hdd and home directory to ssd.

After that, mount disks and run the actual installation:

# mount /dev/disk/by-label/nixos /mnt
# mkdir -p /mnt/boot
# mount /dev/disk/by-label/boot /mnt/boot
# nixos-install --root /mnt --flake .#hostname
Note
.#hostname should be a valid host in hosts/.

Adding a new host

To add a new host, first you need to create a host dir in hosts/, and then generate a hadrware config:

# mkdir hosts/myhost
# nixos-generate-config --root /mnt --show-hardware-config > hosts/myhost/hardware.nix

Hardware config must be named hardware.nix. Then add or copy a system.nix file and config a new host system.

Note
Be sure to check out nixos-hardware for more info about specific hardware !

Set background

Background management is made with background command (which is a shortcut to setroot --store). Why though ? Eh.

To see available options and usage, consult man setroot (but since setroot is not included in environemnt packanges: nix shell nixpkgs#setroot -c "man setroot"). In general, you just want to simply set background pictures:

$ background pictures/wallpapers/left-monitor-picture.png \
             pictures/wallpapers/right-monitor-picture.png

Every run of background command is saved so it would be restored at the next system start (via onStartupScript).

Future work

  • Unclutter home

  • Audio change notification

  • Pick window & audio change it + notification

  • Move to miri (wayland gogogo)

About

my nixos flake based configuration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors