framework-2024-08-30-18-30-57

This commit is contained in:
Alexander Szczepanski
2024-08-30 18:30:57 +02:00
parent 756590abc3
commit c138e90c56
9 changed files with 163 additions and 48 deletions

View File

@ -25,7 +25,6 @@ in
];
# Configure your nixpkgs instance
config = {
# Disable if you don't want unfree packages
allowUnfree = true;
};
};

View File

@ -0,0 +1,39 @@
# 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" "thunderbolt" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/5549d49d-165e-4a45-973e-6a32a63e31be";
fsType = "ext4";
};
boot.initrd.luks.devices."luks-4f42a0a6-1f09-413c-8af3-9be8fc5c1b25".device = "/dev/disk/by-uuid/4f42a0a6-1f09-413c-8af3-9be8fc5c1b25";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/20D2-E669";
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.wlp166s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@ -1,14 +1,34 @@
{ config, pkgs, lib, ... }:
{ config, pkgs, lib, outputs, inputs, ... }:
let
unstable = import <nixos-unstable> { config = { allowUnfree = true; }; };
be = import ../configs/borg-exclude.nix;
secrets = import ../configs/secrets.nix;
wireguard = import ../configs/wireguard.nix;
in
{
nixpkgs = {
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
outputs.overlays.unstable-packages
# You can also add overlays exported from other flakes:
# neovim-nightly-overlay.overlays.default
# Or define it inline, for example:
# (final: prev: {
# hi = final.hello.overrideAttrs (oldAttrs: {
# patches = [ ./change-hello-to-hi.patch ];
# });
# })
];
config = {
allowUnfree = true;
};
};
imports = [
<nixos-hardware/framework/13-inch/12th-gen-intel>
/etc/nixos/hardware-configuration.nix
./framework-hardware-configuration.nix
inputs.nixos-hardware.nixosModules.framework-12th-gen-intel
../configs/browser.nix
../configs/common.nix
../configs/docker.nix
@ -17,7 +37,6 @@ in
../configs/plasma-wayland.nix
../configs/user-gui.nix
../configs/user.nix
/home/alex/Workspace/fw-fanctrl-nix/service.nix
];
boot = {
@ -28,13 +47,13 @@ in
};
};
nixpkgs.config = {
allowUnfree = true;
packageOverrides = pkgs: {
intel-vaapi-driver =
pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
};
};
# nixpkgs.config = {
# allowUnfree = true;
# packageOverrides = pkgs: {
# intel-vaapi-driver =
# pkgs.intel-vaapi-driver.override { enableHybridCodec = true; };
# };
# };
# nixpkgs.localSystem = {
# gcc.arch = "alderlake";
@ -46,24 +65,31 @@ in
networking = {
hostName = "framework";
# wireguard.interfaces = {
# wg0 = {
# ips = [ "10.100.0.7/24" ];
# privateKey = secrets.wireguard-framework-private;
# peers = [{
# publicKey = wireguard.wireguard-vps-public;
# presharedKey = secrets.wireguard-preshared;
# allowedIPs = [ "10.100.0.0/24" ];
# endpoint = "old.szczepan.ski:51820";
# persistentKeepalive = 25;
# }];
# };
# };
};
time.timeZone = "Europe/Berlin";
programs.fw-fanctrl = {
enable = true;
config = {
defaultStrategy = "lazy";
strategies = {
"lazy" = {
fanSpeedUpdateFrequency = 5;
movingAverageInterval = 30;
speedCurve = [
{ temp = 0; speed = 15; }
{ temp = 50; speed = 15; }
{ temp = 65; speed = 25; }
{ temp = 70; speed = 35; }
{ temp = 75; speed = 50; }
{ temp = 85; speed = 100; }
];
};
};
};
};
hardware = {
keyboard.qmk.enable = true;
enableAllFirmware = true;
@ -91,16 +117,6 @@ in
fwupd.enable = true;
fw-fanctrl = {
enable = true;
configJsonPath = "/home/alex/nixos-config/config.json";
};
# displayManager.autoLogin = {
# enable = true;
# user = "alex";
# };
pipewire = {
enable = true;
alsa.enable = true;
@ -168,7 +184,7 @@ in
# systemd.services.nix-daemon.serviceConfig.LimitNOFILE = 40960;
environment.systemPackages = with unstable.pkgs; [
environment.systemPackages = with pkgs.unstable; [
psensor
veracrypt
gnumake
@ -185,7 +201,6 @@ in
homebank
# fahviewer
# fahcontrol
(import ("/home/alex/Workspace/fw-ectool/default.nix"))
];
# Set up deep sleep + hibernation

View File

@ -61,8 +61,6 @@ in
};
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
environment.systemPackages = with pkgs; [
goaccess
xd