chore: reformat using nixd and nixfmt-rfc-style

This commit is contained in:
Veneficium 2024-09-18 18:34:21 +02:00
parent 1ea540535e
commit 813cc599f0
38 changed files with 280 additions and 166 deletions

View file

@ -1,31 +1,31 @@
{ lib, ... }: {
imports =
[
./locale.nix
{ lib, ... }:
{
imports = [
./locale.nix
./users/fedfer.nix
./users/veneficium.nix
./users/fedfer.nix
./users/veneficium.nix
./drivers/samsung-printer.nix
./drivers/ipod.nix
./drivers/gpu/amd.nix
./drivers/gpu/nvidia.nix
./drivers/gpu/disableNvidia.nix
./drivers/samsung-printer.nix
./drivers/ipod.nix
./drivers/gpu/amd.nix
./drivers/gpu/nvidia.nix
./drivers/gpu/disableNvidia.nix
./services/gnome.nix
./services/pipewire.nix
./services/printing.nix
./services/fstrim.nix
./services/tlp.nix
./services/switcheroo.nix
./services/pam.nix
./services/openssh.nix
./services/gnome.nix
./services/pipewire.nix
./services/printing.nix
./services/fstrim.nix
./services/tlp.nix
./services/switcheroo.nix
./services/pam.nix
./services/openssh.nix
./programs/docker.nix
./programs/tailscale.nix
./programs/powertop.nix
./programs/gnupg.nix
];
./programs/docker.nix
./programs/tailscale.nix
./programs/powertop.nix
./programs/gnupg.nix
];
settings = {
users.fedfer.enable = lib.mkDefault false;

View file

@ -1,4 +1,5 @@
{ lib, config, ... }: {
{ lib, config, ... }:
{
options.settings.drivers.gpu.amd = {
enable = lib.mkEnableOption "enable AMD gpu drivers";

View file

@ -1,4 +1,5 @@
{ lib, config, ... }: {
{ lib, config, ... }:
{
options = {
settings.drivers.gpu.nvidia.forceDisable = lib.mkEnableOption "force disable all nvidia drivers";
@ -20,6 +21,13 @@
# Remove NVIDIA VGA/3D controller devices
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x03[0-9]*", ATTR{power/control}="auto", ATTR{remove}="1"
'';
boot.blacklistedKernelModules = [ "nouveau" "nvidia" "nvidia_uvm" "nvidiafb" "nvidia_drm" "nvidia_modeset" ];
boot.blacklistedKernelModules = [
"nouveau"
"nvidia"
"nvidia_uvm"
"nvidiafb"
"nvidia_drm"
"nvidia_modeset"
];
};
}

View file

@ -1,4 +1,5 @@
{ lib, config, ... }: {
{ lib, config, ... }:
{
options.settings.drivers.gpu.nvidia = {
enable = lib.mkEnableOption "Enable Nvidia proprietary drivers";

View file

@ -1,4 +1,10 @@
{ lib, config, pkgs, ... }: {
{
lib,
config,
pkgs,
...
}:
{
options.settings.drivers.ipod = {
enable = lib.mkEnableOption "Enable necessary software for ipod communication";
@ -7,9 +13,7 @@
config = lib.mkIf config.settings.drivers.ipod.enable {
services.usbmuxd.enable = true;
environment.systemPackages = with pkgs; [
libimobiledevice
];
environment.systemPackages = with pkgs; [ libimobiledevice ];
};
}

View file

@ -1,4 +1,10 @@
{ lib, config, pkgs, ... }: {
{
lib,
config,
pkgs,
...
}:
{
#use driver compatible with samsung M2020 printer
options.settings.drivers.printer = {
M2020.enable = lib.mkEnableOption "use the appropriate driver for the samsung M2020 printer";

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
time.timeZone = "Europe/Rome";

View file

@ -1,9 +1,8 @@
{ lib, config, ... }: {
{ lib, config, ... }:
{
options.settings.programs.docker = {
enable = lib.mkEnableOption "enables docker";
};
config = lib.mkIf config.settings.programs.docker.enable {
virtualisation.docker.enable = true;
};
config = lib.mkIf config.settings.programs.docker.enable { virtualisation.docker.enable = true; };
}

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.programs.gnupg = {
enable = lib.mkEnableOption "enable gnuPG";
ssh = lib.mkEnableOption "enable gnuPG ssh integration";

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.programs.powertop = {
enable = lib.mkEnableOption "enables powertop";
};

View file

@ -1,9 +1,8 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.programs.tailscale = {
enable = lib.mkEnableOption "enable tailscale";
};
config = lib.mkIf config.settings.programs.tailscale.enable {
services.tailscale.enable = true;
};
config = lib.mkIf config.settings.programs.tailscale.enable { services.tailscale.enable = true; };
}

View file

@ -1,9 +1,8 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.fstrim = {
enable = lib.mkEnableOption "enables fstrim";
};
config = lib.mkIf config.settings.services.fstrim.enable {
services.fstrim.enable = true;
};
config = lib.mkIf config.settings.services.fstrim.enable { services.fstrim.enable = true; };
}

View file

@ -1,4 +1,10 @@
{ config, lib, pkgs, ... }: {
{
config,
lib,
pkgs,
...
}:
{
options.settings.gnome = {
enable = lib.mkEnableOption "enable gnome de";
};
@ -21,6 +27,15 @@
hardware.pulseaudio.enable = false;
# remove various bloat
environment.gnome.excludePackages = with pkgs; [ gnome-contacts gnome-maps gnome-music gnome-weather gnome-tour epiphany totem yelp ];
environment.gnome.excludePackages = with pkgs; [
gnome-contacts
gnome-maps
gnome-music
gnome-weather
gnome-tour
epiphany
totem
yelp
];
};
}

View file

@ -1,10 +1,10 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.openssh = {
enable = lib.mkEnableOption "enable openSSH";
usePAM = lib.mkEnableOption "use PAM for ssh authentication";
};
#further move these options into settings
config = lib.mkIf config.settings.services.openssh.enable {
services.openssh = {

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.pam = {
enable = lib.mkEnableOption "enables PAM";
sshd = {

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.audio = {
enable = lib.mkEnableOption "enable sound through pipewire and its compat layers";
};

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.printing = {
enable = lib.mkEnableOption "enable printing";
};

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.switcheroo = {
enable = lib.mkEnableOption "enable switcheroo-control for nvidia optimus management";
};

View file

@ -1,9 +1,8 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.services.tlp = {
enable = lib.mkEnableOption "enables tlp for power management";
};
config = lib.mkIf config.settings.services.tlp.enable {
services.tlp.enable = true;
};
config = lib.mkIf config.settings.services.tlp.enable { services.tlp.enable = true; };
}

View file

@ -1,5 +1,11 @@
#need to move stuff to home-manager
{ pkgs, config, lib, ... }: {
{
pkgs,
config,
lib,
...
}:
{
options.settings.users.fedfer = {
enable = lib.mkEnableOption "enables user FedFer";
};
@ -8,7 +14,10 @@
users.users.fedfer = {
isNormalUser = true;
description = "FedFer";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
shell = pkgs.zsh;
};
};

View file

@ -1,4 +1,5 @@
{ config, lib, ... }: {
{ config, lib, ... }:
{
options.settings.users.veneficium = {
enable = lib.mkEnableOption "enables user Veneficium";
};
@ -7,7 +8,10 @@
users.users.veneficium = {
isNormalUser = true;
description = "Veneficium";
extraGroups = [ "networkmanager" "wheel" ];
extraGroups = [
"networkmanager"
"wheel"
];
};
};
}