nix/nixos/thinker/default.nix

58 lines
1.4 KiB
Nix
Raw Normal View History

2023-10-03 11:52:44 -05:00
{
2023-10-03 13:18:12 -05:00
flake,
inputs,
outputs,
2023-10-03 11:52:44 -05:00
lib,
2023-10-04 13:49:48 -05:00
# config,
# pkgs,
2023-10-03 11:52:44 -05:00
...
}: {
2023-10-03 13:18:12 -05:00
networking.hostName = "thinker";
2023-10-03 11:52:44 -05:00
2023-10-03 13:18:12 -05:00
imports =
[
inputs.disko.nixosModules.disko
flake.diskoConfigurations.thinker
]
++ (with outputs.nixosModules; [
# If you want to use modules your own flake exports (from modules/nixos):
desktop-usage
podman
postgres
wifi
])
++ [
inputs.hardware.nixosModules.lenovo-thinkpad-t480
2023-10-04 13:49:48 -05:00
inputs.hardware.nixosModules.common-pc-laptop-ssd
2023-10-03 13:18:12 -05:00
# ./relative-module.nix
];
2023-09-04 11:40:30 -05:00
# TODO: hibernation? I've been using [deep] in /sys/power/mem_sleep alright
# with this machine so it may not be necessary?
# need to measure percentage lost per day, but I think it's around 10%/day
2023-09-05 23:11:14 -05:00
# it looks like I may have had hibernation working -- see ../old/third.nix
2023-09-04 11:40:30 -05:00
2023-10-04 13:49:48 -05:00
boot = {
loader = {
efi.canTouchEfiVariables = true;
systemd-boot.enable = true;
};
kernelParams = ["boot.shell_on_fail"];
initrd.availableKernelModules = ["xhci_pci" "nvme" "ahci"];
};
2023-09-05 23:11:14 -05:00
hardware.bluetooth.enable = true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
services.printing.enable = true; # I own a printer in the year of our Lord 2023
2023-09-04 11:40:30 -05:00
2023-09-22 12:56:48 -05:00
networking = {
firewall = {
enable = true;
allowPing = true;
2023-10-03 11:52:44 -05:00
allowedTCPPorts = [22];
allowedUDPPorts = [];
2023-09-22 12:56:48 -05:00
};
};
2023-09-29 16:57:26 -05:00
system.stateVersion = "23.11";
2023-09-04 11:40:30 -05:00
}