From fc37a1af2fae5ac157b69c581a4282cb7aa884ba Mon Sep 17 00:00:00 2001 From: Kirill Date: Sat, 4 Jul 2026 23:04:35 +0300 Subject: [PATCH] feat(hosts): Added think pad --- flake.nix | 1 + host/ThinkPad/configuration.nix | 31 +++++++++++++++++++++++++++++++ host/ThinkPad/modules/grab.nix | 13 +++++++++++++ host/ThinkPad/modules/swap.nix | 11 +++++++++++ host/modules/packages.nix | 1 + 5 files changed, 57 insertions(+) create mode 100644 host/ThinkPad/configuration.nix create mode 100644 host/ThinkPad/modules/grab.nix create mode 100644 host/ThinkPad/modules/swap.nix diff --git a/flake.nix b/flake.nix index 877b88d..4b566bf 100644 --- a/flake.nix +++ b/flake.nix @@ -74,6 +74,7 @@ in { nixosConfigurations = { WhiteRaven = mkHost "WhiteRaven"; + ThinkPad = mkHost "ThinkPad"; }; }; } diff --git a/host/ThinkPad/configuration.nix b/host/ThinkPad/configuration.nix new file mode 100644 index 0000000..9d90d38 --- /dev/null +++ b/host/ThinkPad/configuration.nix @@ -0,0 +1,31 @@ +# Edit this configuration file to define what should be installed on +# your system. Help is available in the configuration.nix(5) man page +# and in the NixOS manual (accessible by running ‘nixos-help’). +{ config, pkgs, pkgs-stable, pkgs-pinned, lib, inputs, ... }: + +{ + imports = [ + ./modules/grab.nix + ./modules/swap.nix + + (import ../modules/common.nix { + inherit lib; + inherit inputs; + hostname = "ThinkPad"; + }) + + (import ../../user/common.nix { + inherit config; + inherit pkgs; + inherit pkgs-stable; + inherit pkgs-pinned; + inherit lib; + inherit inputs; + name = "kirill"; + fullname = "Black Raven"; + }) + ]; + + hardware.bluetooth.enable = true; + services.printing.enable = true; +} diff --git a/host/ThinkPad/modules/grab.nix b/host/ThinkPad/modules/grab.nix new file mode 100644 index 0000000..a101564 --- /dev/null +++ b/host/ThinkPad/modules/grab.nix @@ -0,0 +1,13 @@ +{ pkgs, ... }: let + theme = pkgs.fetchFromGitHub { + owner = "Patato777"; + repo = "dotfiles"; + rev = "cc363921707807d7ad3e36b462f0df793a0fe18a"; + hash = "sha256-fpXGFNrzbV6K9hoZRX4tGieTLzhpPeGm6wn8CF4OGow="; + }; +in { + boot.loader.grub = { + gfxmodeEfi = "1920x1080"; + theme = "${theme}/grub/themes/virtuaverse"; + }; +} diff --git a/host/ThinkPad/modules/swap.nix b/host/ThinkPad/modules/swap.nix new file mode 100644 index 0000000..6076b00 --- /dev/null +++ b/host/ThinkPad/modules/swap.nix @@ -0,0 +1,11 @@ +{ + zramSwap = { + enable = true; + algorithm = "lz4"; + memoryPercent = 30; + }; + + swapDevices = [ + { device = "/swapfile"; size = 4096; } + ]; +} diff --git a/host/modules/packages.nix b/host/modules/packages.nix index 8cee91b..748278d 100644 --- a/host/modules/packages.nix +++ b/host/modules/packages.nix @@ -15,6 +15,7 @@ tldr helix bluetui + fastfetch ]; fonts = {