Code Monkey home page Code Monkey logo

nixos-lenovo-config's Introduction

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

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

nixos-lenovo-config's People

Contributors

stefandeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.