chore: initial commit
This commit is contained in:
commit
cc4f3398ff
37 changed files with 2210 additions and 0 deletions
41
hosts/thinkpad/default.nix
Normal file
41
hosts/thinkpad/default.nix
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
{ config, pkgs, user, ... }:
|
||||
|
||||
{
|
||||
imports = # For now, if applying to other system, swap files
|
||||
[ (import ./hardware-configuration.nix) ] ++ # Current system hardware config @ /etc/nixos/hardware-configuration.nix
|
||||
(import ../../modules/desktop/virtualisation/default.nix) ++
|
||||
(import ../../modules/hardware/default.nix) ++
|
||||
[ (import ../../modules/desktop/hyprland/default.nix) ]; # Window Manager
|
||||
|
||||
|
||||
hardware.sane = {
|
||||
# Used for scanning with Xsane
|
||||
enable = true;
|
||||
extraBackends = [ pkgs.sane-airscan ];
|
||||
};
|
||||
|
||||
environment = {
|
||||
systemPackages = with pkgs; [
|
||||
simple-scan
|
||||
];
|
||||
};
|
||||
|
||||
programs = {
|
||||
# No xbacklight, this is the alterantive
|
||||
dconf.enable = true;
|
||||
light.enable = true;
|
||||
};
|
||||
|
||||
services = {
|
||||
tlp.enable = true; # TLP and auto-cpufreq for power management
|
||||
#logind.lidSwitch = "ignore"; # Laptop does not go to sleep when lid is closed
|
||||
auto-cpufreq.enable = true;
|
||||
blueman.enable = true;
|
||||
};
|
||||
|
||||
#temporary bluetooth fix
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /var/lib/bluetooth 700 root root - -"
|
||||
];
|
||||
systemd.targets."bluetooth".after = [ "systemd-tmpfiles-setup.service" ];
|
||||
}
|
||||
43
hosts/thinkpad/hardware-configuration.nix
Normal file
43
hosts/thinkpad/hardware-configuration.nix
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
||||
# and may be overwritten by future invocations. Please make changes
|
||||
# to /etc/nixos/configuration.nix instead.
|
||||
{ config, lib, pkgs, modulesPath, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/88ae54e9-a47f-4ef0-acae-256803662304";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
boot.initrd.luks.devices."luks-9d4b251f-b7d5-4a28-8e5d-6df09b434e47".device = "/dev/disk/by-uuid/9d4b251f-b7d5-4a28-8e5d-6df09b434e47";
|
||||
|
||||
fileSystems."/boot/efi" =
|
||||
{
|
||||
device = "/dev/disk/by-uuid/C3A8-F13F";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices = [ ];
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||
# still possible to use this option, but it's recommended to use it in conjunction
|
||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
||||
networking.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp2s0f0.useDHCP = lib.mkDefault true;
|
||||
# networking.interfaces.enp5s0.useDHCP = lib.mkDefault true;
|
||||
|
||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
}
|
||||
40
hosts/thinkpad/home.nix
Normal file
40
hosts/thinkpad/home.nix
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/shell/git/home.nix
|
||||
../../modules/desktop/hyprland/home.nix
|
||||
];
|
||||
|
||||
home = {
|
||||
# Specific packages for laptop
|
||||
packages = with pkgs; [
|
||||
# Applications
|
||||
libreoffice # Office packages
|
||||
|
||||
# Display
|
||||
#light # xorg.xbacklight not supported. Other option is just use xrandr.
|
||||
|
||||
# Power Management
|
||||
#auto-cpufreq # Power management
|
||||
#tlp # Power management
|
||||
];
|
||||
};
|
||||
|
||||
# programs = {
|
||||
# alacritty.settings.font.size = 11;
|
||||
# };
|
||||
|
||||
services = {
|
||||
# Applets
|
||||
blueman-applet.enable = true; # Bluetooth
|
||||
network-manager-applet.enable = true; # Network
|
||||
# cbatticon = {
|
||||
# enable = true;
|
||||
# criticalLevelPercent = 10;
|
||||
# lowLevelPercent = 20;
|
||||
# iconType = null;
|
||||
# };
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue