mirror of
https://github.com/thiloho/nixos-config.git
synced 2025-11-22 03:21:35 +01:00
Organize configuration better
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports = [
|
||||
inputs.nixos-hardware.nixosModules.common-gpu-amd
|
||||
inputs.nixos-hardware.nixosModules.common-cpu-amd
|
||||
./hardware-configuration.nix
|
||||
../shared-desktop.nix
|
||||
../shared.nix
|
||||
|
||||
../../modules/core.nix
|
||||
../../modules/desktop.nix
|
||||
../../modules/development.nix
|
||||
../../modules/home.nix
|
||||
../../modules/media.nix
|
||||
];
|
||||
|
||||
networking = {
|
||||
@@ -23,28 +26,22 @@
|
||||
};
|
||||
};
|
||||
|
||||
boot.initrd = {
|
||||
luks.devices = {
|
||||
cryptroot = {
|
||||
device = "/dev/disk/by-uuid/1202158c-cf4a-49f5-83f6-d54af16bca65";
|
||||
};
|
||||
boot = {
|
||||
initrd.luks.devices.cryptroot = {
|
||||
device = "/dev/disk/by-uuid/1202158c-cf4a-49f5-83f6-d54af16bca65";
|
||||
};
|
||||
kernelParams = [ "amd_iommu=on" ];
|
||||
kernelModules = [ "v4l2loopback" ];
|
||||
extraModulePackages = [ pkgs.linuxPackages_latest.v4l2loopback ];
|
||||
extraModprobeConfig = ''
|
||||
options v4l2loopback exclusive_caps=1 card_label="Virtual Webcam"
|
||||
'';
|
||||
};
|
||||
|
||||
environment.sessionVariables = {
|
||||
MUTTER_DEBUG_FORCE_KMS_MODE = "simple";
|
||||
MUTTER_DEBUG_DISABLE_HW_CURSORS = "1";
|
||||
};
|
||||
|
||||
boot.kernelParams = [ "amd_iommu=on" ];
|
||||
|
||||
virtualisation.libvirtd.enable = true;
|
||||
virtualisation.libvirtd.qemu.swtpm.enable = true;
|
||||
programs.virt-manager.enable = true;
|
||||
|
||||
programs.adb.enable = true;
|
||||
users.users.thiloho.extraGroups = [ "adbusers" ];
|
||||
|
||||
# Use same monitor settings for GDM as for GNOME user
|
||||
systemd.tmpfiles.rules = [
|
||||
"L+ /run/gdm/.config/monitors.xml - - - - ${pkgs.writeText "gdm-monitors.xml" ''
|
||||
<monitors version="2">
|
||||
@@ -73,16 +70,17 @@
|
||||
''}"
|
||||
];
|
||||
|
||||
home-manager.users.thiloho =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
programs.git.signing.key = "273D6150B9741CCF";
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
inkscape
|
||||
];
|
||||
stateVersion = "24.11";
|
||||
};
|
||||
home-manager.users.thiloho = {
|
||||
programs.git.signing.key = "273D6150B9741CCF";
|
||||
xdg.desktopEntries.andcam = {
|
||||
name = "Android Virtual Camera";
|
||||
exec = "${pkgs.writeScript "andcam" ''
|
||||
${pkgs.android-tools}/bin/adb start-server
|
||||
${pkgs.scrcpy}/bin/scrcpy --camera-id=0 --video-source=camera --no-audio --v4l2-sink=/dev/video0 -m1024
|
||||
''}";
|
||||
};
|
||||
home.stateVersion = "24.11";
|
||||
};
|
||||
|
||||
system.stateVersion = "24.11";
|
||||
}
|
||||
|
||||
@@ -1,32 +1,48 @@
|
||||
# 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, ... }:
|
||||
{
|
||||
config,
|
||||
lib,
|
||||
pkgs,
|
||||
modulesPath,
|
||||
...
|
||||
}:
|
||||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
|
||||
boot.initrd.availableKernelModules = [
|
||||
"xhci_pci"
|
||||
"ahci"
|
||||
"nvme"
|
||||
"usb_storage"
|
||||
"usbhid"
|
||||
"sd_mod"
|
||||
];
|
||||
boot.initrd.kernelModules = [ "dm-snapshot" ];
|
||||
boot.kernelModules = [ "kvm-amd" ];
|
||||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-uuid/69528c2b-4fe1-4ff8-a77b-2fc000669629";
|
||||
fsType = "ext4";
|
||||
};
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/69528c2b-4fe1-4ff8-a77b-2fc000669629";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-uuid/139D-6775";
|
||||
fsType = "vfat";
|
||||
options = [ "fmask=0077" "dmask=0077" ];
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-uuid/aafdb506-7d0b-40ef-b87a-c14c39688b76"; }
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/139D-6775";
|
||||
fsType = "vfat";
|
||||
options = [
|
||||
"fmask=0077"
|
||||
"dmask=0077"
|
||||
];
|
||||
};
|
||||
|
||||
swapDevices = [
|
||||
{ device = "/dev/disk/by-uuid/aafdb506-7d0b-40ef-b87a-c14c39688b76"; }
|
||||
];
|
||||
|
||||
# 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
|
||||
|
||||
Reference in New Issue
Block a user