lsblk
sudo dd of=/dev/sdh if=~/Downloads/nixos-gnome-21.11.337514.4c560cc7ee5-x86_64-linux.iso
sudo dd of=/dev/sdc1 if=nixos-gnome-22.05.2676.b9fd420fa53-x86_64-linux.iso
sudo vi /etc/nixos/configuration.nix
sudo nixos-rebuild switch
- encoding users password in configuration.nix
mkpasswd -m sha-512
- And in configuration.nix :
hashedPassword="..."
- OF course this is not a best practice ;)
- by regex :
nix-env -qa 'i3.*' nix-env -qa '.*idea.*'
- by package name :
nix search xfce
(experimental) - by command name :
command-not-found make
- which package :
nix-locate /bin/sh
sudo nix-channel --update
sudo nixos-rebuild switch
sudo nix-channel --list
sudo nix-channel --add https://nixos.org/channels/nixos-22.05 nixos
sudo nix-channel --add https://nixos.org/channels/nixos-22.11 nixos
sudo nix-channel --add https://nixos.org/channels/nixos-23.11 nixos
nix-collect-garbage
nix-collect-garbage -d
For example when build fail because no more space in /boot/
file system
nix-env --list-generations --profile /nix/var/nix/profiles/system
nix-env --delete-generations --profile /nix/var/nix/profiles/system --delete-generations +5
nix-env --delete-generations --profile /nix/var/nix/profiles/system 199 198 197
sudo nix-channel --add https://nixos.org/channels/nixos-unstable nixpkgs-unstable
And to make it available in /etc/nixos/configuration.nix
as for example unstable.jetbrains.idea-ultimate
:
{ config, pkgs, ... }:
let
unstable = import <nixpkgs-unstable> {
config.allowUnfree = true;
};
in
{{ config, pkgs, ... }:
let
unstable = import <nixpkgs-unstable> {
config.allowUnfree = true;
};
in
{
...
}
- ephemeral install :
nix-shell -p nmap
- just for the started shell session life time !!!!! :)