Now that you've created your own flake, you can start customizing the template to your liking.
- edit
config.nixwith your preferences - run
sudo nixos-generate-config --show-hardware-config > hardware-configuration.nix git init && git add .(flakes have to be managed via git)- run any of the packages in your new
flake.nix
config.nix is your main configuration file. It is used to set variables and import your own custom modules
Hydenix can be upgraded, downgraded, or version locked easy.
in your template flake folder, update hydenix to main using
nix flake update hydenixor define a specific version in your flake.nix template
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
hydenix = {
# Available inputs:
# Main: github:richen604/hydenix
# Dev: github:richen604/hydenix/dev
# Commit: github:richen604/hydenix/<commit-hash>
# Version: github:richen604/hydenix/v1.0.0
url = "github:richen604/hydenix";
};
};When adding custom modules, use the config.nix file to import them.
Be warned it is very easy to override hydenix defaults this way, here are some tips to prevent breakage:
Boot option is systemd by default, rebuilds will only effect the boot option selected so you need to change boot in Bios to use grub if you have systemd and vice versa.
config.nix - nixModules
{...}:
{
# default option, disable if switching to grub
boot.loader.systemd-boot.enable = true;
#! Enable grub below, note you will have to change to the new bios boot option for settings to apply
# boot = {
# loader = {
# efi = {
# canTouchEfiVariables = true;
# efiSysMountPoint = "/boot/efi";
# };
# grub = {
# enable = true;
# devices = [ "nodev" ];
# efiSupport = true;
# useOSProber = true;
# };
# };
# };
}For home.activation, make sure the scripts run after setTheme
home.activation = {
example = lib.hm.dag.entryAfter [ "setTheme" ] ''
$DRY_RUN_CMD echo "example"
'';
}For home.file, reference home-file.nix for files.
home.file = {
".config/example" = {
source = ./example;
force = true; # false by default
recursive = true; # false by default
mutable = true; # Hydenix custom, allows for files to be modified after being created. false by default
};
}Common way of using this would be to persist waybar and kitty styles.
# for waybar
cp ~/.config/waybar/config.ctl ~/path/to/flake/config.ctl
# for kitty
cp ~/.config/kitty/kitty.conf ~/path/to/flake/kitty.confThen in your config.nix homeModules import
home.file = {
# waybar
".config/waybar/config.ctl" = {
source = ./config.ctl; # path to your waybar config.ctl
force = true;
mutable = true;
};
# kitty
".config/kitty/kitty.conf" = {
source = ./kitty.conf; # path to your kitty.conf
force = true;
mutable = true;
};
}- waybar look weird after rebuild? run
Hyde waybar reload - config resets on rebuild? note readme
- dolphin icons not showing? open
qt5ctand set icon theme
Please open a feature request if you have any feature requests.
Tip
Nix is a powerful package manager and configuration system that can be overwhelming at first. Here are some resources to help you get started:
General Resources
- Nix Packages
- Nix Options
- Home Manager Options hint: use control + f to search
- NixOS Wiki
- Nixpkgs Discussions
- Nixpkgs Issues