Skip to content

Latest commit

 

History

History
132 lines (92 loc) · 2.97 KB

README.md

File metadata and controls

132 lines (92 loc) · 2.97 KB

NixOS Lenovo T14 Configuration

For further information, please refer to the NixOS documentation

Desktop

Getting Started

First, install NixOS as it is recommended by the official documentation. If full disk encryption is required, read here for more information.

Build the project:

# Update channels
nix-channel update
# Update flake
nix flake update
# Update system
nixos-rebuild switch  --flake '.#stefan' --upgrade
# Build Image
nix build .#vm

Clean old generations:

nix-env -p /nix/var/nix/profiles/system --delete-generations old
nix-collect-garbage -d
nix-env -p /nix/var/nix/profiles/system --list-generations
## Remove entries from /boot/loader/entries:
sudo bash -c "cd /boot/loader/entries; ls | grep -v <current-generation-name> | xargs rm"

Make sure flake is already available during set up otherwise it might fail.

Building custom host

To build a custom host, just copy a default one and adapt to your needs. Important: install bootloader might fail, add --install-bootloader during NixOS build

Configuration

VSCode

Use extension i3 with i3 config to lint your profile:

"files.associations": {
"**/.i3/config": "i3",
"**/i3/config": "i3",
"**/i3/config/*": "i3",
},

i3

# Restart and reload
i3-msg reload
i3-msg restart

Keyboard Configuration

More information documentation

By default, I use a US layout. However, I need german umlauts so I added a custom layout. Only one problem is that I cannot set it as default. Please run:

setxkbmap us

Printer Configuration

For personal use, I have Canon printers like MF522. To add a printer please refer to the documentation

lpadmin -p Canon-XXXXX -E -v ipp://XXX.XXX.X.XX/ipp/print -m everywhere

Networkmanager

  • tmui: configure Wifi connection

Display & Screens

Set multilockscreen:

betterlockscreen -u ~/Documents/nixos-artwork/wallpapers/nix-wallpaper-nineish-dark-gray.svg --display 1 --span
betterlockscreen -u path_to_file --fx dim,pixel

Set background:

nitrogen --no-recurse ~/Documents/git/nixos-artwork/wallpapers

Set up new display:

# See what displays are available
xrandr
# Set display
xrandr --output DisplayPort-1 --auto --left-of eDP
# Save
autorandr --save

Fonts

VSCode and Zsh

Set the font in the settings.json correctly:

{
  "terminal.integrated.fontFamily": "'Source Code Pro for Powerline', 'Hack Nerd Font'"
}

Other

  • nitrogen: Change background
  • multilockscreen: Lock i3

Credits