mirror of
https://codeberg.org/muon/home.git
synced 2025-12-05 23:57:46 +00:00
Merge branch 'main' of codeberg.org:muon/home
This commit is contained in:
commit
ed2e0b4906
7 changed files with 173 additions and 124 deletions
|
|
@ -10,7 +10,7 @@
|
|||
cfg = config.mods;
|
||||
in {
|
||||
# Hardware
|
||||
imports = [./hardware-configuration.nix];
|
||||
imports = [./hardware-configuration.nix ./openrgb.nix];
|
||||
|
||||
environment.systemPackages = with inputs.nix-alien.packages.${system}; [
|
||||
nix-alien
|
||||
|
|
@ -19,9 +19,8 @@ in {
|
|||
pkgs.godot
|
||||
pkgs.rustdesk-flutter
|
||||
pkgs.motion
|
||||
pkgs.linuxPackages.v4l2loopback
|
||||
pkgs.v4l-utils
|
||||
pkgs.qmk
|
||||
pkgs.gnumeric
|
||||
];
|
||||
|
||||
# System
|
||||
|
|
|
|||
|
|
@ -1,16 +1,20 @@
|
|||
# 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") ];
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot.initrd.availableKernelModules =
|
||||
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
|
||||
boot.initrd.kernelModules = [ ];
|
||||
boot.kernelModules = [ "kvm-intel" "v4l2loopback" ];
|
||||
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = ["kvm-intel"];
|
||||
virtualisation.libvirtd.enable = true;
|
||||
boot.extraModulePackages = [ pkgs.linuxPackages.v4l2loopback ];
|
||||
boot.supportedFilesystems = [ "zfs" "ntfs" "btrfs" ];
|
||||
boot.supportedFilesystems = ["zfs" "ntfs" "btrfs"];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/03e49688-cc62-49c9-a906-e2ea87a38891";
|
||||
|
|
@ -18,10 +22,8 @@
|
|||
};
|
||||
|
||||
boot.initrd.luks.devices = {
|
||||
"luks-root".device =
|
||||
"/dev/disk/by-uuid/86769693-b61c-4712-852d-e0fba612d260";
|
||||
"luks-swap".device =
|
||||
"/dev/disk/by-uuid/0418acfc-792c-43f4-a887-cc8bb51fa7c3";
|
||||
"luks-root".device = "/dev/disk/by-uuid/86769693-b61c-4712-852d-e0fba612d260";
|
||||
"luks-swap".device = "/dev/disk/by-uuid/0418acfc-792c-43f4-a887-cc8bb51fa7c3";
|
||||
};
|
||||
|
||||
fileSystems."/mnt/bulk" = {
|
||||
|
|
@ -32,11 +34,11 @@
|
|||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/CCCC-449E";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0022" "dmask=0022" ];
|
||||
options = ["fmask=0022" "dmask=0022"];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/e7cf209d-386d-41db-8a35-6c9fff014722"; }
|
||||
{device = "/dev/disk/by-uuid/e7cf209d-386d-41db-8a35-6c9fff014722";}
|
||||
{
|
||||
device = "/var/lib/swapfile";
|
||||
size = 8 * 1024;
|
||||
|
|
|
|||
29
hosts/muon/openrgb.nix
Normal file
29
hosts/muon/openrgb.nix
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
no-rgb = pkgs.writeScriptBin "no-rgb" ''
|
||||
#!/bin/sh
|
||||
NUM_DEVICES=$(${pkgs.openrgb}/bin/openrgb --noautoconnect --list-devices | grep -E '^[0-9]+: ' | wc -l)
|
||||
|
||||
for i in $(seq 0 $(($NUM_DEVICES - 1))); do
|
||||
${pkgs.openrgb}/bin/openrgb --noautoconnect --device $i --mode static --color 000000
|
||||
done
|
||||
'';
|
||||
in {
|
||||
config = {
|
||||
services.udev.packages = [pkgs.openrgb];
|
||||
boot.kernelModules = ["i2c-dev"];
|
||||
hardware.i2c.enable = true;
|
||||
|
||||
systemd.services.no-rgb = {
|
||||
description = "no-rgb";
|
||||
serviceConfig = {
|
||||
ExecStart = "${no-rgb}/bin/no-rgb";
|
||||
Type = "oneshot";
|
||||
};
|
||||
wantedBy = ["multi-user.target"];
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue