Skip to content

rachitvrma/nixdots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

116 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Rachit's NixOS System Configuration

NixOS Logo Neovim Logo

NixOS Unstable Badge GPL License Badge

Declarative. Reproducible. Minimal.

πŸ“” Instructions for installation

I am presuming that a bootable USB is already prepared. Boot into the computer.

πŸ§ͺEnable Experimental Features

Experimental features are not enabled in NixOS by default. It can be enabled by exporting the NIX_CONFIG variable. It can also be enabled by passing the --extra-experimental-features flag to nix command utility in NixOS.

First enter into a root shell.

$ sudo -i

Run this to enable flakes and the nix-command utility.

$ export NIX_CONFIG="experimental-features = nix-command flakes"

↙️ Clone this Repo

Clone it into /tmp.

$ mkdir -p /tmp
$ cd /tmp
$ git clone --depth=1 https://github.com/rachitvrma/nixdots.git

πŸ’Ύ Run Disko to Prepare Disks

Disko is available in the nixpkgs repository. But it is advisable to run the latest commit from the nix-community github repo. This repository has the ability to support multiple users and hosts. Make sure that the disko-config.nix belongs to the correct host. By default, it's for nixpavilion, the default host machine that I use. Every host has a disko-config.nix file, which is a hard-coded disk layout configuration for each host. There may be a future configuration where I might enable multiple disk layouts. But it's not a very common thing that users choose different disk layouts for the same host every time they re-install for the same host.

$ cd /tmp/nixdots/modules/nixosModules/hosts/nixpavilion

For now, use the disko-config for nixpavilion for installation.

$ nix run github:nix-community/disko/latest -- --mode destroy,format,mount ./disko-config.nix

This will prompt for a password for the disk encryption set in the disko-config.nix.

🐧 OS Installation

Copy the cloned repo into /mnt/etc/nixos.

$ mkdir -p /mnt/etc
$ cp -r /tmp/nixdots /mnt/etc/nixos

Run the nixos-install command. It can be run with many flags. See nixos-install --help for useful flags. It is advisable to enable the --no-root-passwd in nixos-install if users.users.<username>.initialPassword option is set in configuration.nix.

$ nixos-install --no-root-passwd --root /mnt --cores 8 --max-jobs 1 --flake /mnt/etc/nixos#nixpavilion

It will not prompt for the password. Reboot after unmounting.

$ umount -R /mnt
$ reboot

You will land on the greeter. Follow the instructions further down.

πŸ’» Post-OS-Installation

πŸ”’ Change user password

Remember that the password is global and hasn't changed. There's no root user yet. Change the current user password

$ passwd $USER

It will prompt for the current user password and for the new ones.

🏠 Bring /etc/nixos to $HOME/nixdots

$ cp -r /etc/nixos $HOME/nixdots
$ sudo rm -rf /etc/nixos
$ sudo ln -sf /home/$USER/nixdots /etc/nixos

πŸšΆβ€β™‚οΈ Further Steps.

  1. Git actions

    Change the link from https://github.com/rachitvrma/nixdots.git to git@github.com:rachitvrma/nixdots.

  2. Firefox

    Some Firefox extensions need to enabled manually. Some features are still not implemented by me. For example the Nord Extension has to be enabled manually.

Common issues

  • On changing git repo, it may just stop working. Don't worry, remove all backup files and just rebuild.
  • My NixOS bootloader malfunctioned once. I put up a query on NixOS discourse. Here's the solution.

🚧 Work In Progress

  • fish (NixOS module with pkgs.wrapFish)
    • Set up useful fish plugins
    • Set up useful fish functions
  • Manage themes from one place. [DEPRECATE not using stylix anymore]
    • Place conditionals:
    • Wallpaper
    • Icon Theme
    • Cursor Theme
  • NEXT: Write systemd user services
    • noctalia shell
    • poweralertd
  • Move to using wrappers.
    • taskwarrior
      • Also integrate taskwarrior with neovim
    • Set up xplr
      • Key for bookmarks
      • For visiting history
    • Set preferences options to make font, icon and theme name globally available
    • aria2
    • yt-dlp
    • btop
    • bottom
    • cava
    • firefox
    • Wezterm
    • niri
    • neovim
      • Also install note.nvim to link notes to a code line or take quick notes
    • Swayidle
      • wrap the config around the binary
      • create a systemd service to run the binary
    • mpv
    • Zathura pdf reader
    • noctalia [PARTIAL]
      • Use Stylix's base16 modules to integrate with own theme set
      • See this PR
    • shell tools
    • Set GTK Theme using NixOS configuration module
    • Set Fonts using NixOS module
      • Remove Home-Manager stylix font modules
  • Use import-tree and flake-parts to manage config as flake modules.

Todo

  • Move all shell tools into a package called in environment (like in Vimjoyer's Configuration). And use it in users.users.krish.shell
  • Learn jj and move to jjui

πŸ“š Resources

πŸ“ƒ License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details

About

NixOS Configuration with nix-wrapper-modules

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages