Push these changes to a branch cause I'm kind of giving up
This commit is contained in:
parent
d9469fc321
commit
e3bacb2d84
229 changed files with 1496 additions and 1479 deletions
14
system/modules/bluetooth/default.nix
Normal file
14
system/modules/bluetooth/default.nix
Normal file
|
@ -0,0 +1,14 @@
|
|||
{ ... }: {
|
||||
hardware.bluetooth = {
|
||||
enable = true;
|
||||
settings = {
|
||||
General.Experimental = "true";
|
||||
Policy.AutoEnable = "true";
|
||||
};
|
||||
};
|
||||
|
||||
# Enable lingering for Bluetooth
|
||||
systemd.tmpfiles.rules = [
|
||||
"f /var/lib/systemd/linger/jimbo"
|
||||
];
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
# For ARM machines
|
||||
boot.loader = {
|
||||
generic-extlinux-compatible.enable = true;
|
||||
grub.enable = false;
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
# For UEFI machines
|
||||
boot.loader.systemd-boot = {
|
||||
enable = true;
|
||||
netbootxyz.enable = true;
|
12
system/modules/default.nix
Normal file
12
system/modules/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./bluetooth
|
||||
./filesystems
|
||||
./networking
|
||||
./pipewire
|
||||
./printing
|
||||
./security
|
||||
./udev
|
||||
./video
|
||||
];
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
{lib, ...}: {
|
||||
{ lib, ... }: {
|
||||
boot.supportedFilesystems = {
|
||||
ntfs = true;
|
||||
zfs = lib.mkForce false;
|
|
@ -1,9 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
programs.gnupg.agent = {
|
||||
enable = true;
|
||||
enableSSHSupport = true;
|
||||
};
|
||||
environment.systemPackages = with pkgs; [
|
||||
git-crypt
|
||||
];
|
||||
}
|
|
@ -1,7 +1,11 @@
|
|||
{
|
||||
# Networking settings
|
||||
{ ... }: {
|
||||
imports = [
|
||||
./wireless
|
||||
];
|
||||
|
||||
networking = {
|
||||
wireless.enable = false;
|
||||
dhcpcd.enable = true;
|
||||
nftables.enable = true;
|
||||
};
|
||||
}
|
12
system/modules/networking/wireless/default.nix
Normal file
12
system/modules/networking/wireless/default.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ lib, config, ... }: {
|
||||
options = {
|
||||
networking.wifi.enable = lib.mkEnableOption "Enable enable Network Manager and B43";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.misc.general.enable {
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
enableB43Firmware = true;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,4 +0,0 @@
|
|||
{pkgs, ...}: {
|
||||
# Enable video drivers
|
||||
services.xserver.videoDrivers = ["nouveau"];
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
{pkgs, config, ...}: {
|
||||
# Enable video drivers
|
||||
services.xserver.videoDrivers = ["nvidia"];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
};
|
||||
}
|
7
system/modules/overlays/default.nix
Normal file
7
system/modules/overlays/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
{ outputs, ... }: {
|
||||
nixpkgs.overlays = [
|
||||
outputs.overlays.additions
|
||||
outputs.overlays.selfsuper
|
||||
outputs.overlays.finalprev
|
||||
];
|
||||
}
|
22
system/modules/pipewire/default.nix
Normal file
22
system/modules/pipewire/default.nix
Normal file
|
@ -0,0 +1,22 @@
|
|||
{ pkgs, ... }: {
|
||||
services = {
|
||||
pipewire = {
|
||||
enable = true;
|
||||
audio.enable = true;
|
||||
wireplumber = {
|
||||
enable = true;
|
||||
configPackages = [
|
||||
(pkgs.writeTextDir "share/wireplumber/wireplumber.conf.d/11-bluetooth-policy.conf" ''
|
||||
wireplumber.settings = { bluetooth.autoswitch-to-headset-profile = false }
|
||||
'')
|
||||
];
|
||||
};
|
||||
alsa = {
|
||||
enable = true;
|
||||
support32Bit = true;
|
||||
};
|
||||
pulse.enable = true;
|
||||
#jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
18
system/modules/printing/default.nix
Normal file
18
system/modules/printing/default.nix
Normal file
|
@ -0,0 +1,18 @@
|
|||
{ pkgs, ... }: {
|
||||
services = {
|
||||
printing = {
|
||||
enable = true;
|
||||
drivers = with pkgs; [hplip];
|
||||
webInterface = false;
|
||||
};
|
||||
avahi = {
|
||||
enable = true;
|
||||
nssmdns4 = true;
|
||||
openFirewall = true;
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
system-config-printer
|
||||
];
|
||||
}
|
3
system/modules/security/apparmor/default.nix
Normal file
3
system/modules/security/apparmor/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
security.apparmor.enable = true;
|
||||
}
|
8
system/modules/security/default.nix
Normal file
8
system/modules/security/default.nix
Normal file
|
@ -0,0 +1,8 @@
|
|||
{ ... }: {
|
||||
imports = [
|
||||
./apparmor
|
||||
./doas
|
||||
./gnome-keyring
|
||||
./polkit
|
||||
];
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
{
|
||||
# Enable AppArmor
|
||||
{ ... }: {
|
||||
security = {
|
||||
sudo.enable = false;
|
||||
doas = {
|
||||
|
@ -12,6 +11,5 @@
|
|||
}
|
||||
];
|
||||
};
|
||||
apparmor.enable = true;
|
||||
};
|
||||
}
|
3
system/modules/security/gnome-keyring/default.nix
Normal file
3
system/modules/security/gnome-keyring/default.nix
Normal file
|
@ -0,0 +1,3 @@
|
|||
{ ... }: {
|
||||
services.gnome.gnome-keyring.enable = true;
|
||||
}
|
6
system/modules/security/polkit/default.nix
Normal file
6
system/modules/security/polkit/default.nix
Normal file
|
@ -0,0 +1,6 @@
|
|||
{ ... }: {
|
||||
security = {
|
||||
polkit.enable = true;
|
||||
rtkit.enable = true;
|
||||
};
|
||||
}
|
20
system/modules/udev/default.nix
Normal file
20
system/modules/udev/default.nix
Normal file
|
@ -0,0 +1,20 @@
|
|||
{ pkgs, ... }: {
|
||||
# Rules to make PDP controller and Oculus Rift CV1 work
|
||||
services.udev = let
|
||||
pdpRules = pkgs.writeTextFile {
|
||||
name = "10-pdp.rules";
|
||||
text = ''SUBSYSTEM=="usb", ATTR{idVendor}=="2833", MODE="0666"'';
|
||||
destination = "/etc/udev/rules.d/10-pdp.rules";
|
||||
};
|
||||
oculusRules = pkgs.writeTextFile {
|
||||
name = "10-oculus.rules";
|
||||
text = ''KERNEL=="hidraw*", ATTRS{idVendor}=="0e6f", ATTRS{idProduct}=="0184", MODE="0660", TAG+="uaccess"'';
|
||||
destination = "/etc/udev/rules.d/10-oculus.rules";
|
||||
};
|
||||
in {
|
||||
packages = [
|
||||
oculusRules
|
||||
pdpRules
|
||||
];
|
||||
};
|
||||
}
|
|
@ -1,5 +1,9 @@
|
|||
{pkgs, ...}: {
|
||||
# Enable OpenGL
|
||||
{ pkgs, ... }: {
|
||||
imports = [
|
||||
./nvidia
|
||||
./nouveau
|
||||
];
|
||||
|
||||
hardware.opengl = {
|
||||
enable = true;
|
||||
driSupport32Bit = true;
|
9
system/modules/video/nouveau/default.nix
Normal file
9
system/modules/video/nouveau/default.nix
Normal file
|
@ -0,0 +1,9 @@
|
|||
{ config, lib, ... }: {
|
||||
options = {
|
||||
drivers.nouveau.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.drivers.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nouveau" ];
|
||||
};
|
||||
}
|
15
system/modules/video/nvidia/default.nix
Normal file
15
system/modules/video/nvidia/default.nix
Normal file
|
@ -0,0 +1,15 @@
|
|||
{ pkgs, config, lib, ... }: {
|
||||
options = {
|
||||
drivers.nvidia.enable = lib.mkEnableOption "Enable proprietary Nvidia drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.drivers.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
nvidiaSettings = false;
|
||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||
open = false;
|
||||
};
|
||||
};
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
# Enable wireless networkmanager
|
||||
networking = {
|
||||
networkmanager.enable = true;
|
||||
enableB43Firmware = true;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue