chore: format using nixpkgs-fmt
This commit is contained in:
parent
8b0286d8d8
commit
87781f976a
26 changed files with 130 additions and 127 deletions
53
flake.nix
53
flake.nix
|
|
@ -9,35 +9,36 @@
|
|||
nix-vscode-extensions.url = "github:nix-community/nix-vscode-extensions";
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }: let
|
||||
outputs = inputs@{ self, nixpkgs, home-manager, ... }:
|
||||
let
|
||||
|
||||
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; };
|
||||
modules = [
|
||||
./hosts/main-laptop/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.users.fedfer = import ./hosts/main-laptop/home.nix;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
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); };
|
||||
modules = [
|
||||
./hosts/main-laptop/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = false;
|
||||
home-manager.users.fedfer = import ./hosts/main-laptop/home.nix;
|
||||
home-manager.backupFileExtension = "backup";
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
enable = true;
|
||||
enableGitIntegration = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,4 @@
|
|||
enable = true;
|
||||
#todo add fastfetch config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,4 +7,4 @@
|
|||
init.defaultBranch = "main";
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,4 @@
|
|||
enable = true;
|
||||
#todo add hyfetch config
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,4 @@
|
|||
#todo make sure this on only if gnome is setup correctly
|
||||
nativeMessagingHosts = [ pkgs.gnome-browser-connector ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
{ pkgs, ... }: {
|
||||
home.packages = [ pkgs.vesktop ];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,4 +39,4 @@
|
|||
"terminal.integrated.fontWeight" = 500;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{ config, pkgs, ... }: {
|
||||
{ pkgs, ... }: {
|
||||
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
boot.loader.systemd-boot.enable = true;
|
||||
|
|
@ -26,4 +26,4 @@
|
|||
#DO NOT CHANGE THIS! IMPORTANT! DO NOT CHANGE THIS!
|
||||
system.stateVersion = "23.11"; #DO NOT CHANGE THIS!
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
[
|
||||
./hardware-configuration.nix
|
||||
../../nixosModules/default.nix
|
||||
];
|
||||
];
|
||||
|
||||
settings = {
|
||||
programs.docker.enable = lib.mkForce true;
|
||||
|
|
@ -49,13 +49,13 @@
|
|||
#todo need to move this to modules
|
||||
services = {
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad = {
|
||||
tapping = true;
|
||||
};
|
||||
enable = true;
|
||||
touchpad = {
|
||||
tapping = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
#remove various bloat
|
||||
services.xserver.excludePackages = with pkgs; [ xterm ];
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,8 @@
|
|||
|
||||
{
|
||||
imports =
|
||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
||||
[
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
|
||||
|
|
@ -14,18 +15,19 @@
|
|||
boot.extraModulePackages = [ ];
|
||||
|
||||
fileSystems."/" =
|
||||
{ device = "/dev/disk/by-label/nixos";
|
||||
{
|
||||
device = "/dev/disk/by-label/nixos";
|
||||
fsType = "ext4";
|
||||
};
|
||||
|
||||
fileSystems."/boot" =
|
||||
{ device = "/dev/disk/by-label/BOOT";
|
||||
{
|
||||
device = "/dev/disk/by-label/BOOT";
|
||||
fsType = "vfat";
|
||||
};
|
||||
|
||||
swapDevices =
|
||||
[ { device = "/dev/disk/by-label/swap"; }
|
||||
];
|
||||
[{ 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
|
||||
|
|
|
|||
|
|
@ -4,10 +4,10 @@
|
|||
../../homeManagerModules/zsh.nix
|
||||
../../homeManagerModules/starship.nix
|
||||
../../homeManagerModules/desktopPrograms/essentials/firefox.nix
|
||||
|
||||
|
||||
../../homeManagerModules/desktopPrograms/vscodium.nix
|
||||
../../homeManagerModules/desktopPrograms/vesktop.nix
|
||||
|
||||
|
||||
../../homeManagerModules/cliPrograms/hyfetch.nix
|
||||
../../homeManagerModules/cliPrograms/bun.nix
|
||||
../../homeManagerModules/cliPrograms/git.nix
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
{ lib, config, ... }: {
|
||||
|
||||
options = {
|
||||
settings.drivers.gpu.amd.enable = lib.mkEnableOption "enable AMD gpu drivers";
|
||||
};
|
||||
options = {
|
||||
settings.drivers.gpu.amd.enable = lib.mkEnableOption "enable AMD gpu drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.settings.drivers.gpu.amd.enable {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
};
|
||||
config = lib.mkIf config.settings.drivers.gpu.amd.enable {
|
||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,24 +1,24 @@
|
|||
{ lib, config, ... }: {
|
||||
|
||||
options = {
|
||||
settings.drivers.gpu.nvidia.forceDisable = lib.mkEnableOption "force disable all nvidia drivers";
|
||||
};
|
||||
options = {
|
||||
settings.drivers.gpu.nvidia.forceDisable = lib.mkEnableOption "force disable all nvidia drivers";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.forceDisable {
|
||||
boot.extraModprobeConfig = ''
|
||||
blacklist nouveau
|
||||
options nouveau modeset=0
|
||||
'';
|
||||
services.udev.extraRules = ''
|
||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA Audio devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# 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" ];
|
||||
};
|
||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.forceDisable {
|
||||
boot.extraModprobeConfig = ''
|
||||
blacklist nouveau
|
||||
options nouveau modeset=0
|
||||
'';
|
||||
services.udev.extraRules = ''
|
||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c0330", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA USB Type-C UCSI devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# Remove NVIDIA Audio devices, if present
|
||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||
# 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" ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +1,25 @@
|
|||
{ lib, config, ... }: {
|
||||
|
||||
options = {
|
||||
settings.drivers.gpu.nvidia.enable = lib.mkEnableOption "Enable Nvidia proprietary drivers";
|
||||
settings.drivers.gpu.nvidia.offload = lib.mkEnableOption "Enable prime offloading";
|
||||
settings.drivers.gpu.nvidia.sync = lib.mkEnableOption "Enable prime sync";
|
||||
};
|
||||
options = {
|
||||
settings.drivers.gpu.nvidia.enable = lib.mkEnableOption "Enable Nvidia proprietary drivers";
|
||||
settings.drivers.gpu.nvidia.offload = lib.mkEnableOption "Enable prime offloading";
|
||||
settings.drivers.gpu.nvidia.sync = lib.mkEnableOption "Enable prime sync";
|
||||
};
|
||||
|
||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
prime = {
|
||||
nvidiaBusId = "pci:1:0:0";
|
||||
amdgpuBusId = "pci:5:0:0";
|
||||
};
|
||||
prime.offload = lib.mkIf config.settings.drivers.gpu.nvidia.offload {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
prime.sync.enable = lib.mkIf config.settings.drivers.gpu.nvidia.sync true;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.enable {
|
||||
services.xserver.videoDrivers = [ "nvidia" ];
|
||||
hardware.nvidia = {
|
||||
modesetting.enable = true;
|
||||
prime = {
|
||||
nvidiaBusId = "pci:1:0:0";
|
||||
amdgpuBusId = "pci:5:0:0";
|
||||
};
|
||||
prime.offload = lib.mkIf config.settings.drivers.gpu.nvidia.offload {
|
||||
enable = true;
|
||||
enableOffloadCmd = true;
|
||||
};
|
||||
prime.sync.enable = lib.mkIf config.settings.drivers.gpu.nvidia.sync true;
|
||||
nvidiaSettings = true;
|
||||
};
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,5 +11,5 @@
|
|||
libimobiledevice
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,6 @@
|
|||
};
|
||||
|
||||
config = lib.mkIf config.settings.drivers.printer.M2020.enable {
|
||||
services.printing.drivers = [ pkgs.samsung-unified-linux-driver_1_00_37 ];
|
||||
services.printing.drivers = [ pkgs.samsung-unified-linux-driver_1_00_37 ];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.programs.docker.enable {
|
||||
virtualisation.docker.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.programs.powertop.enable {
|
||||
powerManagement.powertop.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.programs.tailscale.enable {
|
||||
services.tailscale.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.services.fstrim.enable {
|
||||
services.fstrim.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,26 +1,26 @@
|
|||
{ config, lib, pkgs, ... }: {
|
||||
options = {
|
||||
settings.gnome.enable = lib.mkEnableOption "enable gnome de";
|
||||
};
|
||||
options = {
|
||||
settings.gnome.enable = lib.mkEnableOption "enable gnome de";
|
||||
};
|
||||
|
||||
#todo make this more configurable
|
||||
config = lib.mkIf config.settings.gnome.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
#todo make this more configurable
|
||||
config = lib.mkIf config.settings.gnome.enable {
|
||||
services.xserver = {
|
||||
enable = true;
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
};
|
||||
|
||||
environment.systemPackages = [ pkgs.gnome.gnome-tweaks ];
|
||||
environment.systemPackages = [ pkgs.gnome.gnome-tweaks ];
|
||||
|
||||
#enable browser connector for installing extensions
|
||||
services.gnome.gnome-browser-connector.enable = true;
|
||||
#enable browser connector for installing extensions
|
||||
services.gnome.gnome-browser-connector.enable = true;
|
||||
|
||||
# Gnome enables pulse by default smh
|
||||
# make sure to have PIPEWIRE enabled!
|
||||
hardware.pulseaudio.enable = false;
|
||||
# Gnome enables pulse by default smh
|
||||
# make sure to have PIPEWIRE enabled!
|
||||
hardware.pulseaudio.enable = false;
|
||||
|
||||
# remove various bloat
|
||||
environment.gnome.excludePackages = with pkgs.gnome; [ epiphany gnome-contacts gnome-maps gnome-music gnome-weather totem yelp pkgs.gnome-tour ];
|
||||
};
|
||||
}
|
||||
# remove various bloat
|
||||
environment.gnome.excludePackages = with pkgs.gnome; [ epiphany gnome-contacts gnome-maps gnome-music gnome-weather totem yelp pkgs.gnome-tour ];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,4 +21,4 @@
|
|||
layout = "it";
|
||||
variant = "";
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,4 +17,4 @@
|
|||
jack.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.services.switcheroo.enable {
|
||||
services.switcherooControl.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,4 @@
|
|||
config = lib.mkIf config.settings.services.tlp.enable {
|
||||
services.tlp.enable = true;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue