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

@ -10,21 +10,31 @@
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
};
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
outputs =
inputs@{
self,
nixpkgs,
home-manager,
...
}:
let
pkgs = system: import nixpkgs {
inherit system;
overlays = [
inputs.nix-vscode-extensions.overlays.default
];
config = { allowUnfree = true; };
};
pkgs =
system:
import nixpkgs {
inherit system;
overlays = [ inputs.nix-vscode-extensions.overlays.default ];
config = {
allowUnfree = true;
};
};
in
{
nixosConfigurations = {
fedfer-main-laptop-nixos = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { pkgs = (pkgs system); };
specialArgs = {
pkgs = (pkgs system);
};
modules = [
./hosts/main-laptop/configuration.nix
home-manager.nixosModules.home-manager
@ -39,10 +49,10 @@
veneficium-main-homelab-nixos = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
specialArgs = { pkgs = (pkgs system); };
modules = [
./hosts/main-homelab/configuration.nix
];
specialArgs = {
pkgs = (pkgs system);
};
modules = [ ./hosts/main-homelab/configuration.nix ];
};
};
};

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.bun = {
enable = true;
enableGitIntegration = true;

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.fastfetch = {
enable = true;
#todo add fastfetch config

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.git = {
enable = true;
userEmail = "85629831+veneficium42@users.noreply.github.com";

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
imports = [ ./fastfetch.nix ];
programs.hyfetch = {
enable = true;

View file

@ -1,6 +1,10 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
programs.password-store = {
enable = true;
package = pkgs.pass-wayland.withExtensions (exts: [ exts.pass-checkup exts.pass-audit ]);
package = pkgs.pass-wayland.withExtensions (exts: [
exts.pass-checkup
exts.pass-audit
]);
};
}

View file

@ -1,3 +1,4 @@
{ ... }: {
{ ... }:
{
services.amberol.enable = true;
}

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
#todo config
programs.firefox = {
enable = true;

View file

@ -1,3 +1,4 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
home.packages = [ pkgs.vesktop ];
}

View file

@ -1,8 +1,10 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
#The VSCoderrrrrrrr
#codepilled nixmaxxer
#god I love tumblr
#tumblrpilled mememaxxer
programs.vscode = {
enable = true;
package = pkgs.vscodium;
@ -10,29 +12,40 @@
enableExtensionUpdateCheck = false;
mutableExtensionsDir = false;
extensions = with pkgs.vscode-extensions; [
ms-vscode.cpptools
ms-vscode.live-server
mhutchie.git-graph
pkief.material-icon-theme
pkief.material-product-icons
oderwat.indent-rainbow
bierner.markdown-emoji
bierner.emojisense
jnoortheen.nix-ide
rust-lang.rust-analyzer
biomejs.biome
] ++ (with pkgs.open-vsx; [
jeanp413.open-remote-ssh
antfu.unocss
]);
extensions =
with pkgs.vscode-extensions;
[
ms-vscode.cpptools
ms-vscode.live-server
mhutchie.git-graph
pkief.material-icon-theme
pkief.material-product-icons
oderwat.indent-rainbow
bierner.markdown-emoji
bierner.emojisense
jnoortheen.nix-ide
rust-lang.rust-analyzer
biomejs.biome
]
++ (with pkgs.open-vsx; [
jeanp413.open-remote-ssh
antfu.unocss
]);
userSettings = {
"workbench.iconTheme" = "material-icon-theme";
"workbench.productIconTheme" = "material-product-icons";
"terminal.integrated.fontFamily" = "FiraCode Nerd Font";
"terminal.integrated.fontSize" = 14;
"terminal.integrated.fontWeight" = 500;
"editor.fontFamily" = "FiraCode Nerd Font Mono";
"editor.fontLigatures" = true;
"editor.formatOnSave" = true;
"workbench.sideBar.location" = "right";
"workbench.startupEditor" = "welcomePageInEmptyWorkbench";
"nix.enableLanguageServer" = true;
"nix.serverPath" = "nixd";
"nix.serverSettings" = {
@ -44,11 +57,6 @@
};
"C_Cpp.clang_format_fallbackStyle" = "LLVM";
"editor.fontFamily" = "FiraCode Nerd Font Mono";
"editor.fontLigatures" = true;
"terminal.integrated.fontFamily" = "FiraCode Nerd Font";
"terminal.integrated.fontSize" = 14;
"terminal.integrated.fontWeight" = 500;
};
};
}

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
programs.starship = {
enable = true;
enableZshIntegration = true;

View file

@ -1,4 +1,5 @@
{ ... }: {
{ ... }:
{
#todo config
programs.zsh = {
enable = true;

View file

@ -1,11 +1,11 @@
{ pkgs, lib, ... }: {
{ pkgs, lib, ... }:
{
imports =
[
# Include the results of the hardware scan.
./hardware-configuration.nix
../../nixosModules/default.nix
];
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../nixosModules/default.nix
];
settings = {
users.veneficium.enable = lib.mkForce true;
@ -49,9 +49,12 @@
nixpkgs.config.allowUnfree = true;
#enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
#DO NOT CHANGE THIS! IMPORTANT! DO NOT CHANGE THIS!
system.stateVersion = "24.05"; #DO NOT CHANGE THIS!
system.stateVersion = "24.05"; # DO NOT CHANGE THIS!
}

View file

@ -1,31 +1,43 @@
# 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 = [ "vmd" "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"vmd"
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-uuid/58d4396b-d87c-419b-ac35-c4d282ef05b1";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-uuid/58d4396b-d87c-419b-ac35-c4d282ef05b1";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-uuid/F5D9-1046";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/F5D9-1046";
fsType = "vfat";
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [ ];

View file

@ -1,9 +1,17 @@
{ lib, pkgs, ... }: {
imports =
[
./hardware-configuration.nix
../../nixosModules/default.nix
];
{ lib, pkgs, ... }:
{
imports = [
./hardware-configuration.nix
../../nixosModules/default.nix
];
virtualisation.libvirtd.enable = true;
programs.virt-manager.enable = true;
#required by virt-manager
programs.dconf.enable = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "fedfer" ];
settings = {
users.fedfer.enable = lib.mkForce true;
@ -59,7 +67,7 @@
};
#remove various bloat
services.xserver.excludePackages = with pkgs; [ xterm ];
services.xserver.excludePackages = with pkgs; [ xterm ];
hardware = {
bluetooth = {
@ -85,8 +93,11 @@
];
#enable flakes
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
system.stateVersion = "23.11"; #DO NOT CHANGE THIS!
system.stateVersion = "23.11"; # DO NOT CHANGE THIS!
}

View file

@ -1,33 +1,38 @@
# 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, modulesPath, ... }:
{
config,
lib,
modulesPath,
...
}:
{
imports =
[
(modulesPath + "/installer/scan/not-detected.nix")
];
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/" = {
device = "/dev/disk/by-label/nixos";
fsType = "ext4";
};
fileSystems."/boot" =
{
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
fileSystems."/boot" = {
device = "/dev/disk/by-label/BOOT";
fsType = "vfat";
};
swapDevices =
[{ device = "/dev/disk/by-label/swap"; }];
swapDevices = [ { device = "/dev/disk/by-label/swap"; } ];
# 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

View file

@ -1,4 +1,5 @@
{ pkgs, ... }: {
{ pkgs, ... }:
{
imports = [
../../homeManagerModules/zsh.nix
@ -47,6 +48,6 @@
nixpkgs.config.allowUnfree = true;
home.stateVersion = "23.11"; #DO NOT CHANGE
programs.home-manager.enable = true; #DO NOT CHANGE
home.stateVersion = "23.11"; # DO NOT CHANGE
programs.home-manager.enable = true; # DO NOT CHANGE
}

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"
];
};
};
}