Nix: reference - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki
Following is specifications/syntax for various Nix things I think to be important in a fast and readable way.
LOCATION:
/etc/nixos/configuration.nix
COMMON CONFIGURATION FUNCTIONS:
-
enviroment.systemPackages- specifies an array of packages to install onto the system
COMMON CONFIGURATION SYNTAX:
-
with <KEY>; [<VALUES>]- specifies an array of values that would start in aKEY.VALUEformat in a way as to not have to putKEYbefore each one. IT SHOULD BE NOTED I DO NOT CURRENTLY KNOW WHAT THE CORRECT NAME WOULD BE FOR THE KEY AND VALUE IN NIX SYNTAX!!!
SYNTAX:
nix-shell <FLAGS>
FLAGS:
-
-p <PACKAGES>- specifies what packages you want in the shell -
--run '<COMMANDS>'- specifies what commands you what to run in the enviro
SYNTAX:
sudo nixos-rebuild <OPTION>
FLAGS/OPTIONS:
-
switch- apply the currentconfiguration.nixfile AND make it boot default -
test- apply the currentconfiguration.nixfile AND DON'T make it boot default