NixOS configuration flake for all personal machines and servers for liv
Find a file
2024-06-28 01:04:45 +02:00
.github/assets update screenshot 2024-04-09 19:47:32 +02:00
hosts fix: comment out power options because of conflicts 2024-06-22 14:25:16 +02:00
modules fix: change display orientations 2024-06-26 23:04:25 +02:00
pkgs test 2024-01-26 22:16:54 +01:00
wallpapers feat: more wallpapers 2024-06-28 01:04:45 +02:00
.gitignore feat: adds ignore for secrets/ 2024-06-21 12:23:14 +02:00
flake.lock flake: add catppuccin/nix 2024-06-22 13:44:56 +02:00
flake.nix chore: adds todo 2024-06-23 23:11:30 +02:00
install.sh add vm host (closes #13) 2024-05-19 18:28:51 +02:00
LICENSE feat: add my name to license file 2024-06-21 09:53:24 +02:00
README.md chore: rename laptop -> sakura (3) // add TODO notes 2024-06-21 12:34:14 +02:00


Ahwxorg/NixOS-config

🗃️ Overview

📚 Layout

  • flake.nix base of the configuration
  • hosts 🌳 per-host configurations that contain machine specific configurations
    • desktop 🖥️ Desktop specific configuration
    • sakura 💻 Laptop (sakura) specific configuration
  • modules 🍱 modularized NixOS configurations
  • pkgs 📦 packages exported by my flake
  • wallpapers 🌄 wallpapers collection

📓 Components

NixOS + Hyprland
Window Manager Hyprland
Bar Waybar
Application Launcher wofi
Notification Daemon Mako
Terminal Emulator Kitty
Shell zsh
Text Editor VSCodium + Neovim
network management tool NetworkManager + network-manager-applet
System resource monitor htop
File Manager nemo + yazi
Fonts nerd fonts
Color Scheme catppuccin
Icons catppuccin-papirus-folders
Lockscreen swaylock-effects
Image Viewer nsxiv
Media Player mpv
Music Player audacious
Screenshot Software grimblast
Clipboard wl-clip-persist
Color Picker hyprpicker

📝 Shell aliases

NixOS (expand)

TODO: ${host} is either desktop or laptop

  • cdnix \rightarrow cd ~/nixos-config && codium ~/nixos-config
  • ns \rightarrow nix-shell --run zsh
  • nix-switch \rightarrow sudo nixos-rebuild switch --flake ~/nixos-config#${host}
  • nix-switchu \rightarrow sudo nixos-rebuild switch --upgrade --flake ~/nixos-config#${host}
  • nix-flake-update \rightarrow sudo nix flake update ~/nixos-config#
  • nix-clean \rightarrow sudo nix-collect-garbage && sudo nix-collect-garbage -d && sudo rm /nix/var/nix/gcroots/auto/* && nix-collect-garbage && nix-collect-garbage -d

🛠️ Scripts

All the scripts are in modules/home/scripts/scripts/ and are exported as packages in modules/home/scripts/default.nix

extract.sh

Description: This script extract tar.gz archives in the current directory.

Usage: extract <archive_file>

compress.sh

Description: This script compress a file or a folder into a tar.gz archives which is created in the current directory with the name of the chosen file or folder.

Usage: compress <file> or compress <folder>

toggle_blur.sh

Description: This script toggles the Hyprland blur effect. If the blur is currently enabled, it will be disabled, and if it's disabled, it will be turned on.

Usage: toggle_blur

toggle_oppacity.sh

Description: This script toggles the Hyperland oppacity effect. If the oppacity is currently set to 0.90, it will be set to 1, and if it's set to 1, it will be set to 0.90.

Usage: toggle_oppacity

maxfetch.sh

Description: This script is a modified version of the [jobcmax/maxfetch][maxfetch] script.

Usage: maxfetch

music.sh

Description: This script is for managing Audacious (music player). If Audacious is currently running, it will be killed (stopping the music); otherwise, it will start Audacious in the 8th workspace and resume the music.

Usage: music

runbg.sh

Description: This script runs a provided command along with its arguments and detaches it from the terminal. Handy for launching apps from the command line without blocking it.

Usage: runbg <command> <arg1> <arg2> <...>

🚀 Installation

This is unchanged of Frost-Phoenix's dots, needs to be remade but don't feel like spending that time currently.

⚠️ Use this configuration at your own risk! ⚠️
Applying custom configurations, especially those related to your operating system, can have unexpected consequences and may interfere with your system's normal behavior. While I have tested these configurations on my own setup, there is no guarantee that they will work flawlessly on all systems.
I am not responsible for any issues that may arise from using this configuration.

It is highly recommended to review the configuration contents and make necessary modifications to customize it to your needs before attempting the installation.

  1. Install NixOS

    First install nixos using any graphical ISO image.

    Only been tested using the Gnome graphical installer and choosing the No desktop option durring instalation.

  2. Clone the repo

    nix-shell -p git
    git clone https://github.com/Frost-Phoenix/nixos-config
    cd nixos-config
    
  3. Install script

    First make sure to read the install script, it isn't long

    Execute and follow the installation script :

    ./install.sh
    

    You will need to change the git account yourself in ./modules/home/git.nix

       programs.git = {
          ...
          userName = "Frost-Phoenix";
          userEmail = "67cyril6767@gmail.com";
          ...
       };
    
  4. Reboot

    After rebooting, you'll be greeted by swaylock prompting for your password, with the wallpaper in the background.

  5. Manual config

    Even though I use home manager, there is still a little bit of manual configuration to do:

    • Set Aseprite theme (they are in the folder ./nixos-config/modules/home/aseprite/themes).
    • Enable Discord theme (in Discord settings under VENCORD > Themes).
    • Configure the browser (for now, all browser configuration is done manually).

Install script walkthrough

A brief walkthrough of what the install script does.

  1. Get username

    You will receive a prompt to enter your username, with a confirmation check.

  2. Set username

    The script will replace all occurancies of the default usename CURRENT_USERNAME by the given one stored in $username

  3. Create basic directories

    The following directories will be created:

    • ~/Music
    • ~/Documents
    • ~/Pictures/wallpapers/others
  4. Copy the wallpapers

    Then the wallpapers will be copied into ~/Pictures/wallpapers/others which is the folder in which the wallpaper-picker.sh script will be looking for them.

  5. Get the hardware configuration

    It will also automatically copy the hardware configuration from /etc/nixos/hardware-configuration.nix to ./hosts/nixos/hardware-configuration.nix so that the hardware configuration used is yours and not the default one.

  6. Choose a host (desktop / laptop)

    Now you will need to choose the host you want. It depend on whether you are using a desktop or laptop.

  7. Build the system

    Lastly, it will build the system, which includes both the flake config and home-manager config.

👥 Credits

Other dotfiles that I learned / copy from: