theyre ass

This commit is contained in:
cln
2026-04-19 17:12:27 +02:00
commit b8170ba73c
537 changed files with 53600 additions and 0 deletions
+160
View File
@@ -0,0 +1,160 @@
# NixOS configuration with Hyprland
This repository contains the declarative configuration files for my Thinkpad T480, it uses NixOS and Hyprland as the window compositor, it should work on most hardware just fine, assuming you are using an Intel IGPU, adjust accordingly to the NixOS wiki if needed.
> It works on my hardware, and of course it is not guaranteed to fully work on yours, although it should.
![screenshot](/assets/preview.jpg)
---
## Preparation
In order to use these configuration files you do need to use NixOS unstable, ideally download the unstable ISO instead of the stable one, and install the system that way to avoid unnecessary steps, you can download it from [here](https://releases.nixos.org/nixos/unstable/nixos-26.05pre980183.4bd9165a9165) and burn it onto your USB drive accordingly to their wiki page, after that you can boot from the USB. It works on stable tho as long as you comment the dunst section in ```desktop/home/default.nix```.
## Installation
This setup assumes that you are going to use full disk encryption and label the boot partition as "BOOT", and the root partition as "ROOT", here is a list of steps in order to do so:
Check your drive identificator and create a 512MB boot partition, and a root partition of any size, can be the rest of your disk.
```bash
sudo lsblk
fdisk /dev/sdX
```
After partitioning the drive and assuming /dev/sdX1 is the boot partition and /dev/sdX2 is the root one, do the following to achieve full disk encryption and format the drives with correct labels:
```bash
sudo mkfs.fat -F 32 /dev/sdX1
sudo fatlabel /dev/sdX1 BOOT
sudo cryptsetup luksFormat -y --label="ROOT" /dev/sdX2
sudo cryptsetup luksOpen /dev/sdX2 ROOT
sudo mkfs.xfs -L "ROOT" /dev/mapper/ROOT
```
Afterwards you can mount the drives:
```bash
sudo mount /dev/disk/by-label/ROOT /mnt
sudo mkdir -p /mnt/boot
sudo mount /dev/disk/by-label/BOOT /mnt/boot
```
After mounting the drives, generate default directories for NixOS, cleanse of the old unnecessary files, enter a Nix shell in order to use the git package, and clone this repo:
```bash
sudo nixos-generate-config --root /mnt
sudo rm -rf /mnt/etc/nixos/*
sudo nix-shell -p git
cd /mnt/etc/nixos/
git clone https://git.cln.cat/cln6/nixos-thinkpad
```
After that you can leave the Nix shell and enter into the proper directory, and install the system:
```bash
exit
cd /mnt
sudo nixos-install --flake /mnt/etc/nixos#cln (replace cln with your new hostname if you have decided to change it, instructions on how to do that are in the Notes section of this repo)
```
That's it, after it's done installing you should be able to reboot into the system, the default username is "cln" and password is "123", please change it after installation with the ```passwd cln``` command.
# Keybinds
---
## Applications
| Keybind | App |
|---|---|
| Super + D | App launcher |
| Super + Enter | kitty |
| Super + Q | kitty |
| Super + Shift + D | Mullvad browser |
| Super + Shift + F | Librewolf |
| Super + E | File manager |
| Super + H | Clipboard history |
| Super + B | Overskride ( Bluetooth ) |
| Super + P | Pwvucontrol ( Audio ) |
| Super + Shift + P | Power menu |
---
## Window Management
| Keybind | Action |
|---|---|
| Super + Shift + Q | Kill active window |
| Super + V | Toggle floating mode |
| Super + J | Toggle split |
| Super + O | Toggle dwindle |
---
## Workspace related
| Keybind | Action |
|---|---|
| Super + 1-10 | Switch workspace to your chosen number |
| Super + Shift + 1-10 | Move the active window to your chosen workspace |
| Super + S | Switch to special workspace |
| Super + Shift + S | Move the active window to the special workspace |
---
## Other
| Keybind | Action |
|---|---|
| Super + Arrow key | Switch your current focused window |
| Super + M | Exit hyprland |
| Super + F1 | Toggle game mode |
---
# Notes
- In order to use a different username, replace every "cln" word with your desired username in these files: ```configuration.nix```, ```home.nix``` as well as "users.cln" line in ```flake.nix```.
- In order to change your hostname, edit the hostname line in ```networks/default.nix```, as well as all other lines with the word "cln" except for the "users.cln" line.
# Summary
So yeah these are my configuration files, I am aware that they are nowhere near perfect, I am a really unprofessional and new NixOS user as for now, but it is what it is for now, my next distro will probably be Gentoo if everything goes right, therefore this will stay as it is for now I think.
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

+157
View File
@@ -0,0 +1,157 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
./networks
./desktop
./virtualisation
];
# Use the GNU GRUB bootloader.
boot.loader = {
grub = {
enable = true;
device = "nodev";
efiSupport = true;
};
efi.canTouchEfiVariables = true;
};
# Catppuccin for GRUB
catppuccin.grub = {
enable = true;
flavor = "mocha";
};
# Catppuccin for tty
catppuccin.tty = {
enable = true;
flavor = "mocha";
};
# Use latest kernel.
boot.kernelPackages = pkgs.linuxPackages_latest;
# Enable NixOS flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Set your time zone.
time.timeZone = "Europe/Warsaw";
# Define a user account. Don't forget to set a password with passwd.
users.users.cln = {
isNormalUser = true;
description = "cln";
password = "123"; # Change
extraGroups = [ "wheel" "video" "render" "input" "libvirtd" ];
shell = pkgs.zsh;
home = "/home/cln";
};
# Shell for user
programs.zsh.enable = true;
programs.bash.enable = true; # In case something breaks
swapDevices = [{ # Create a swap file
device = "/.swapfile";
size = 8*1024;
}];
# Intel GPU Drivers
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
# Required for modern Intel GPUs (Xe iGPU and ARC)
intel-media-driver # VA-API (iHD) userspace
vpl-gpu-rt # oneVPL (QSV) runtime
# Optional (compute / tooling):
intel-compute-runtime # OpenCL (NEO) + Level Zero for Arc/Xe
# NOTE: 'intel-ocl' also exists as a legacy package; not recommended for Arc/Xe.
# libvdpau-va-gl # Only if you must run VDPAU-only apps
];
};
environment.sessionVariables = {
LIBVA_DRIVER_NAME = "iHD"; # Prefer the modern iHD backend
# VDPAU_DRIVER = "va_gl"; # Only if using libvdpau-va-gl
};
# May help if FFmpeg/VAAPI/QSV init fails (esp. on Arc with i915):
hardware.enableRedistributableFirmware = true;
boot.kernelParams = [ "i915.enable_guc=3" ];
# X related settings
services.xserver = {
enable = false;
xkb.layout = "pl";
videoDrivers = [ "modesetting" ];
};
# Enable pipewire
security.rtkit.enable = true;
services.pipewire.wireplumber.enable = true;
services.pipewire = {
enable = true; # if not already enabled
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
};
# Bluetooth support
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
settings = {
General = {
# Shows battery charge of connected devices on supported
# Bluetooth adapters. Defaults to 'false'.
Experimental = true;
# When enabled other devices can connect faster to us, however
# the tradeoff is increased power consumption. Defaults to
# 'false'.
FastConnectable = true;
};
Policy = {
# Enable all controllers when they are found. This includes
# adapters present on start as well as adapters that are plugged
# in later on. Defaults to 'true'.
AutoEnable = true;
};
};
};
# List packages installed in system profile.
# You can use https://search.nixos.org/ to find more packages (and options).
environment.systemPackages = with pkgs; [
cryptsetup
xfsprogs
vim
];
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "26.05"; # Did you read the comment?
}
+62
View File
@@ -0,0 +1,62 @@
{ config, lib, pkgs, ... }:
{
imports = [
./ly
];
services.dbus.enable = true;
# Enable hyprland globally
programs.hyprland.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
];
wlr.enable = true;
};
# Auto mounting of USBs
services.udisks2.enable = true;
# Polkit
security.polkit.enable = true;
# Steam
programs.steam = {
enable = true;
remotePlay.openFirewall = false;
dedicatedServer.openFirewall = false;
localNetworkGameTransfers.openFirewall = false;
};
# Allow unfree
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"steam"
"steam-original"
"steam-unwrapped"
"steam-run"
];
# Mullvad
services.mullvad-vpn.enable = true;
environment.systemPackages = with pkgs; [
nmap
unzip
tor-browser
git
];
# Fonts for everything pretty much
fonts.packages = with pkgs; [
noto-fonts
font-awesome
font-awesome_4
nerd-fonts.jetbrains-mono
adwaita-fonts
];
}
+17
View File
@@ -0,0 +1,17 @@
{ config, lib, ... }:
{
programs.btop = {
enable = true;
settings = {
#TODO: Make a proper config
};
};
# Catppuccin
catppuccin.btop = {
enable = true;
flavor = "mocha";
};
}
+18
View File
@@ -0,0 +1,18 @@
{ config, lib, ... }:
{
programs.cava = {
enable = true;
settings = {
# im genuinely so lazy rn
};
};
# Catppuccin
catppuccin.cava = {
enable = true;
flavor = "mocha";
transparent = true;
};
}
+10
View File
@@ -0,0 +1,10 @@
{ config, libs, pkgs, ... }:
{
home.packages = with pkgs; [
wl-clipboard
cliphist
];
}
+36
View File
@@ -0,0 +1,36 @@
{ config, pkgs, ... }:
{
imports = [
./hyprland
./hyprpaper
./hypridle
./hyprlock
./hyprsunset
./waybar
./kitty
./zsh
./dunst
./rofi
./clipboard
./lf
./librewolf
./fzf
./fastfetch
./btop
./cava
./neovim
./mullvad
];
home.packages = with pkgs; [
nautilus
tty-clock
mullvad-browser
];
xdg.userDirs = {
enable = true;
createDirectories = true;
};
}
+54
View File
@@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
{
services.dunst = {
enable = true;
settings = { #TODO: Write my own config, this one is temporary from GGORG0 on Github
global = {
width = 450;
shrink = "no";
follow = "mouse";
progress_bar = true;
progress_bar_max_width = 430;
transparency = 25;
frame_color = "#89B4FA";
idle_threshold = 120;
font = "JetBrainsMono Nerd Font Mono 12";
format = "<small>%a</small>\\n<b>%s</b>\\n%b";
alignment = "right";
word_wrap = "yes";
ellipsize = "end";
icon_position = "right";
min_icon_size = 0;
max_icon_size = 64;
history_length = 50;
browser = "${lib.getExe pkgs.librewolf} -new-tab"; # TODO: get the browser from an option
dmenu = "${lib.getExe config.programs.rofi.package} -dmenu -p dunst:";
corner_radius = 20;
mouse_left_click = "do_action, close_current";
mouse_middle_click = "close_all";
mouse_right_click = "close_current";
};
};
};
# Catppuccin!
catppuccin.dunst = {
enable = true;
flavor = "mocha";
};
}
+10
View File
@@ -0,0 +1,10 @@
{ config, lib, ...}:
{
programs.fastfetch = {
enable = true;
settings = {
# TODO: Make my config
};
};
}
+17
View File
@@ -0,0 +1,17 @@
{ config, lib, ...}:
{
programs.fzf = {
enable = true;
enableZshIntegration = true;
};
# Catppuccin
catppuccin.fzf = {
enable = true;
flavor = "mocha";
accent = "lavender";
};
}
+39
View File
@@ -0,0 +1,39 @@
{ config, lib, ... }:
{
services.hypridle = {
enable = true;
settings = {
general = {
lock_cmd = "pidof hyprlock || hyprlock";
before_sleep_cmd = "loginctl lock-session";
after_sleep_cmd = "hyprctl dispatch dpms on";
};
listener = [
{
timeout = 150;
on-timeout = "brightnessctl -s set 10";
on-resume = "brightnessctl -r";
}
{
timeout = 150;
on-timeout = "brightnessctl -sd rgb:kbd_backlight set 0";
on-resume = "brightnessctl -rd rgb:kbd_backlight set 1";
}
{
timeout = 300;
on-timeout = "loginctl lock-session";
}
{
timeout = 300;
on-timeout = "hyprctl dispatch dpms off";
on-resume = "hyprctl dispatch dpms on && brightnessctl -r";
}
{
timeout = 600;
on-timeout = "systemctl suspend";
}
];
};
};
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 145 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 415 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 544 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 438 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 442 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 609 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 621 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 667 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 719 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 138 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 261 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 507 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 581 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 519 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 531 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 777 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 570 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 814 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

@@ -0,0 +1,23 @@
button_offset=9
button_spacing=0
show_app_icon=false
full_width_title=true
title_shadow_active=false
title_shadow_inactive=false
title_horizontal_offset=3
active_text_color=#f0f7fe
active_text_shadow_color=#222426
inactive_text_color=#999da3
inactive_text_shadow_color=#222426
shadow_delta_height=2
shadow_delta_width=0
shadow_delta_x=0
shadow_delta_y=-5
shadow_opacity=40
Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 141 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 193 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 195 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 160 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 638 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 406 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 504 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 139 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 454 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 660 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 539 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 702 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 723 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 509 B

Some files were not shown because too many files have changed in this diff Show More