feat: initial commit

This commit is contained in:
2024-11-23 21:35:39 +01:00
commit 28590f35e1
11 changed files with 273 additions and 0 deletions

View File

@ -0,0 +1,51 @@
{ pkgs, ... }: {
imports = [
./hardware-configuration.nix
./n100.nix
../../profiles/base
../../profiles/graphical
../../profiles/kde
../../users/transcaffeine
../../users/leona
];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.kernelPackages = pkgs.linuxPackages_latest;
#boot.kernelPackages = pkgs.linuxPackages_6_6;
boot.kernelParams = [
"fbcon=rotate:1"
# disable panel self refresh for i915
# "i915.enable_psr=0"
# set max cstate to 2 (suspend?)
# "intel_idle.max_cstate=2"
"nvme.noacpi=1"
];
hardware.enableRedistributableFirmware = true;
networking.hostName = "affogato";
networking.hosts = {
"78.94.116.221" = [
"git.finally.coffee"
"chat.finallycoffee.eu"
"cloud.finallycoffee.eu"
];
};
# Set your time zone.
time.timeZone = "Europe/Berlin";
# Network
networking.networkmanager.enable = true;
systemd.services.ModemManager.enable = true;
services.printing.enable = true;
services.avahi.enable = true;
services.tailscale.enable = true;
services.blueman.enable = true;
# TODO: delete this later
system.stateVersion = "23.05"; # Did you read the comment?
}

View File

@ -0,0 +1,56 @@
# 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 = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "sdhci_pci" ];
boot.initrd.kernelModules = [ "dm-snapshot" ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/34d0b26e-8d69-4388-bf94-67e44669cdd8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/3B4B-0489";
fsType = "vfat";
};
swapDevices =
[ { device = "/dev/disk/by-uuid/22e2d822-7f26-4246-a28e-b10a116f2818"; }
];
boot.initrd.luks.devices."coffee".device = "/dev/disk/by-uuid/e24d653d-df2d-472b-97c3-653ee3169b1c";
# 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.enp0s20f0u1u3.useDHCP = lib.mkDefault true;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.bluetooth.enable = true;
hardware.bluetooth.settings = {
General = {
JustWorksRepairing = "always";
FastConnectable = true;
Class = "0x000100";
};
Policy = {
AutoEnable = true;
};
};
# Enable WWAN over USB (also sets up usb-modeswitch for LTE sticks)
hardware.usb-modeswitch.enable = true;
}

14
hosts/affogato/n100.nix Normal file
View File

@ -0,0 +1,14 @@
{ lib, pkgs, ... }: {
boot.extraModprobeConfig = ''
options iwlwifi disable_11ax=true
'';
hardware.firmware = let
intelfirmware = (pkgs.runCommandNoCC "n100-firmware" {} ''
mkdir -p $out/lib/firmware/intel/
cp ${pkgs.linux-firmware}/lib/firmware/intel/ibt-1040-4150.ddc $out/lib/firmware/intel/ibt-1040-1050.ddc
cp ${pkgs.linux-firmware}/lib/firmware/intel/ibt-1040-4150.sfi $out/lib/firmware/intel/ibt-1040-1050.sfi
cp ${pkgs.linux-firmware}/lib/firmware/intel/ibt-1040-4150.ddc $out/lib/firmware/intel/ibt-0040-1050.ddc
cp ${pkgs.linux-firmware}/lib/firmware/intel/ibt-1040-4150.sfi $out/lib/firmware/intel/ibt-0040-1050.sfi
''); #// { meta.priority = 8; };
in lib.mkBefore [ intelfirmware ];
}