feat(koishi): new laptop!!!

This commit is contained in:
Kat Inskip 2024-03-09 14:54:11 -08:00
parent 8820db6792
commit 26ad2434b0
Signed by: kat
GPG key ID: 465E64DECEA8CF0F
36 changed files with 1403 additions and 698 deletions

View file

@ -15,6 +15,5 @@
packages = [pkgs.tamzen];
font = "Tamzen7x14";
earlySetup = true;
keyMap = "uk";
};
}

View file

@ -1,3 +1,3 @@
_: {
services.tailscale.enable = true;
}
}

View file

@ -0,0 +1,3 @@
_: {
services.gnome.gnome-keyring.enable = true;
}

View file

@ -1,6 +1,15 @@
{ pkgs, inputs, ... }: {
{
pkgs,
inputs,
...
}: {
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
};
services.xserver = {
enable = true;
displayManager.gdm.enable = true;
};
}

View file

@ -1,4 +1,8 @@
{pkgs, inputs, ...}: {
{
pkgs,
inputs,
...
}: {
xdg = {
portal = {
enable = true;

View file

@ -1,4 +1,4 @@
{ pkgs, ... }: {
{pkgs, ...}: {
environment.systemPackages = with pkgs; [
xclip
];

View file

@ -0,0 +1,33 @@
{
inputs,
tree,
pkgs,
...
}: {
imports =
(with tree.nixos.hardware; [
amd_cpu
amd_gpu
uefi
])
++ [
inputs.nixos-hardware.outputs.nixosModules.framework-13-7040-amd
];
boot.initrd = {
availableKernelModules = ["nvme" "xhci_pci" "thunderbolt" "usb_storage" "sd_mod"];
};
services = {
fwupd = {
enable = true;
package =
(import (builtins.fetchTarball {
url = "https://github.com/NixOS/nixpkgs/archive/bb2009ca185d97813e75736c2b8d1d8bb81bde05.tar.gz";
sha256 = "sha256:003qcrsq5g5lggfrpq31gcvj82lb065xvr7bpfa8ddsw8x4dnysk";
}) {
inherit (pkgs) system;
})
.fwupd;
};
fprintd.enable = true;
};
}

View file

@ -1,5 +1,5 @@
{ pkgs, ... }: {
services.xserver.videoDrivers = [ "intel" ];
{pkgs, ...}: {
services.xserver.videoDrivers = ["intel"];
hardware.opengl = {
enable = true;
driSupport = true;

View file

@ -0,0 +1,21 @@
{
lib,
pkgs,
...
}: let
inherit (lib.types) submodule loaOf;
inherit (lib.modules) mkDefault mkAfter;
inherit (lib.options) mkOption;
in {
options.security.pam.services = mkOption {
type = loaOf (submodule {
config.text = mkDefault (mkAfter "session required pam_keyinit.so force revoke");
});
};
config = {
boot = {
kernelPackages = pkgs.linuxPackages_latest;
supportedFilesystems = ["bcachefs"];
};
};
}

View file

@ -2,7 +2,7 @@ _: {
boot.loader = {
timeout = null;
grub = {
enable = true;
enable = false;
useOSProber = true;
splashImage = ./splash.jpg;
extraConfig = ''

View file

@ -6,7 +6,6 @@
environment.systemPackages = with pkgs; [
jmtpfs
dnsutils
firefox
usbutils
plexamp
inputs.konawall-py.packages.${pkgs.system}.konawall-py

View file

@ -1,12 +1,3 @@
_: {
services.power-profiles-daemon.enable = false;
services.tlp = {
enable = true;
settings = {
CPU_BOOST_ON_AC = 1;
CPU_BOOST_ON_BAT = 0;
CPU_SCALING_GOVERNOR_ON_AC = "performance";
CPU_SCALING_GOVERNOR_ON_BAT = "powersave";
};
};
services.power-profiles-daemon.enable = true;
}

View file

@ -1,24 +0,0 @@
{
pkgs,
lib,
...
}: {
powerManagement.powertop.enable = true;
systemd.services.powertop.serviceConfig.ExecStartPost = let
deviceList = [
"ThinkPad Dock"
"Razer"
"YubiKey"
"Keychron"
];
inherit (lib.strings) concatMapStrings;
deviceCommands =
concatMapStrings (device: ''
for f in $(${pkgs.gnugrep}/bin/grep -Rl "${device}" /sys/bus/usb/devices/*/product); do
${pkgs.coreutils}/bin/echo on > $(dirname $f)/power/control
done
'')
deviceList;
execStartPost = pkgs.writeShellScriptBin "powertop-execStartPost" deviceCommands;
in "${execStartPost}/bin/powertop-execStartPost";
}

View file

@ -6,4 +6,4 @@ _: {
serverName = "monica.gensokyo.zone";
};
};
}
}