refactor: move some of wim's configs to module folder
This commit is contained in:
parent
9942d9a0bc
commit
7005fc441d
5 changed files with 54 additions and 93 deletions
|
@ -1,6 +1,9 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
services = {
|
services = {
|
||||||
|
|
||||||
|
fwupd.enable = true;
|
||||||
|
upower.enable = true;
|
||||||
|
|
||||||
locate = {
|
locate = {
|
||||||
enable = true;
|
enable = true;
|
||||||
package = pkgs.mlocate;
|
package = pkgs.mlocate;
|
||||||
|
|
|
@ -1,54 +0,0 @@
|
||||||
{ pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
# enable brightness control for swayosd
|
|
||||||
programs.light.enable = true;
|
|
||||||
|
|
||||||
services = {
|
|
||||||
|
|
||||||
udev.extraRules = ''
|
|
||||||
# give permanent path to keyboard XF86* binds
|
|
||||||
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
|
|
||||||
|
|
||||||
# give permanent path to touchpad
|
|
||||||
SUBSYSTEMS=="input", ATTRS{id/product}=="01e0", ATTRS{id/vendor}=="27c6", ATTRS{name}=="GXTP5140:00 27C6:01E0 Touchpad", SYMLINK += "touchpad"
|
|
||||||
'';
|
|
||||||
|
|
||||||
fwupd.enable = true;
|
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
printing = {
|
|
||||||
enable = true;
|
|
||||||
drivers = with pkgs; [
|
|
||||||
hplip
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
pipewire = {
|
|
||||||
enable = true;
|
|
||||||
alsa.enable = true;
|
|
||||||
jack.enable = true;
|
|
||||||
pulse.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
upower.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware = {
|
|
||||||
pulseaudio.enable = false;
|
|
||||||
sensor.iio.enable = true;
|
|
||||||
opengl.enable = true;
|
|
||||||
opengl.driSupport32Bit = true;
|
|
||||||
uinput.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation = {
|
|
||||||
libvirtd.enable = true;
|
|
||||||
waydroid.enable = true;
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -3,7 +3,6 @@
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./boot.nix
|
./boot.nix
|
||||||
./extra-hardware.nix
|
|
||||||
./security.nix
|
./security.nix
|
||||||
./packages.nix
|
./packages.nix
|
||||||
];
|
];
|
||||||
|
|
|
@ -1,13 +1,19 @@
|
||||||
{ pkgs, ... }:
|
{ lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
|
|
||||||
|
../../modules/audio.nix
|
||||||
|
../../modules/kmscon.nix
|
||||||
|
../../modules/printer.nix
|
||||||
|
|
||||||
./cfg/main.nix
|
./cfg/main.nix
|
||||||
./home/main.nix
|
./home/main.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
networking = {
|
networking = {
|
||||||
|
useDHCP = lib.mkDefault true;
|
||||||
hostName = "wim";
|
hostName = "wim";
|
||||||
networkmanager = {
|
networkmanager = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -18,14 +24,6 @@
|
||||||
# Set your time zone.
|
# Set your time zone.
|
||||||
time.timeZone = "America/Montreal";
|
time.timeZone = "America/Montreal";
|
||||||
|
|
||||||
services.kmscon = {
|
|
||||||
enable = true;
|
|
||||||
hwRender = true;
|
|
||||||
# FIXME: https://github.com/Aetf/kmscon/issues/18 // Icons not rendering properly
|
|
||||||
# FIXME: https://github.com/Aetf/kmscon/issues/56 // Mouse cursor stays
|
|
||||||
extraOptions = "--font-size 12.5 --font-dpi 170 --font-name 'JetBrainsMono Nerd Font'";
|
|
||||||
};
|
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It's perfectly fine and recommended to leave
|
# on your system were taken. It's perfectly fine and recommended to leave
|
||||||
|
|
|
@ -1,40 +1,55 @@
|
||||||
# Do not modify this file! It was generated by ‘nixos-generate-config’
|
{ config, modulesPath, ... }: {
|
||||||
# and may be overwritten by future invocations. Please make changes
|
nixpkgs.hostPlatform = "x86_64-linux";
|
||||||
# to /etc/nixos/configuration.nix instead.
|
|
||||||
{ config, lib, modulesPath, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
boot = {
|
||||||
boot.initrd.kernelModules = [ ];
|
initrd = {
|
||||||
boot.kernelModules = [ "kvm-amd" ];
|
availableKernelModules = [ "nvme" "xhci_pci" "usb_storage" "sd_mod" ];
|
||||||
boot.extraModulePackages = [ ];
|
luks.devices."root".device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
|
||||||
|
};
|
||||||
fileSystems."/" = {
|
kernelModules = [ "kvm-amd" ];
|
||||||
device = "/dev/disk/by-uuid/6ae4d722-dacf-485a-8d29-b276f540dc91";
|
|
||||||
fsType = "btrfs";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
boot.initrd.luks.devices."root".device = "/dev/disk/by-uuid/ab82b477-2477-453f-b95f-28e5553ad10d";
|
fileSystems = {
|
||||||
|
"/" = {
|
||||||
|
device = "/dev/disk/by-uuid/6ae4d722-dacf-485a-8d29-b276f540dc91";
|
||||||
|
fsType = "btrfs";
|
||||||
|
};
|
||||||
|
|
||||||
fileSystems."/boot" = {
|
"/boot" = {
|
||||||
device = "/dev/disk/by-label/NIXBOOT";
|
device = "/dev/disk/by-label/NIXBOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices = [ ];
|
|
||||||
|
|
||||||
zramSwap.enable = true;
|
zramSwap.enable = true;
|
||||||
|
hardware = {
|
||||||
|
cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
||||||
|
|
||||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
sensor.iio.enable = true;
|
||||||
# (the default) this is the recommended approach. When using systemd-networkd it's
|
opengl.enable = true;
|
||||||
# still possible to use this option, but it's recommended to use it in conjunction
|
opengl.driSupport32Bit = true;
|
||||||
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
|
uinput.enable = true;
|
||||||
networking.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.enp7s0f4u2.useDHCP = lib.mkDefault true;
|
|
||||||
# networking.interfaces.wlp6s0.useDHCP = lib.mkDefault true;
|
|
||||||
|
|
||||||
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
bluetooth = {
|
||||||
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
enable = true;
|
||||||
|
powerOnBoot = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
virtualisation = {
|
||||||
|
libvirtd.enable = true;
|
||||||
|
waydroid.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
# enable brightness control for swayosd
|
||||||
|
programs.light.enable = true;
|
||||||
|
|
||||||
|
services.udev.extraRules = ''
|
||||||
|
# give permanent path to keyboard XF86* binds
|
||||||
|
SUBSYSTEMS=="input", ATTRS{id/product}=="0006", ATTRS{id/vendor}=="0000", SYMLINK += "video-bus"
|
||||||
|
|
||||||
|
# give permanent path to touchpad
|
||||||
|
SUBSYSTEMS=="input", ATTRS{id/product}=="01e0", ATTRS{id/vendor}=="27c6", ATTRS{name}=="GXTP5140:00 27C6:01E0 Touchpad", SYMLINK += "touchpad"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue