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";
|
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 {
|
pkgs = system: import nixpkgs {
|
||||||
inherit system;
|
inherit system;
|
||||||
overlays = [
|
overlays = [
|
||||||
inputs.nix-vscode-extensions.overlays.default
|
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";
|
|
||||||
}
|
|
||||||
];
|
];
|
||||||
|
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;
|
enable = true;
|
||||||
enableGitIntegration = true;
|
enableGitIntegration = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,4 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
#todo add fastfetch config
|
#todo add fastfetch config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,4 +7,4 @@
|
||||||
init.defaultBranch = "main";
|
init.defaultBranch = "main";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,4 +4,4 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
#todo add hyfetch config
|
#todo add hyfetch config
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,4 +5,4 @@
|
||||||
#todo make sure this on only if gnome is setup correctly
|
#todo make sure this on only if gnome is setup correctly
|
||||||
nativeMessagingHosts = [ pkgs.gnome-browser-connector ];
|
nativeMessagingHosts = [ pkgs.gnome-browser-connector ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,3 @@
|
||||||
{ pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
home.packages = [ pkgs.vesktop ];
|
home.packages = [ pkgs.vesktop ];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -39,4 +39,4 @@
|
||||||
"terminal.integrated.fontWeight" = 500;
|
"terminal.integrated.fontWeight" = 500;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{ config, pkgs, ... }: {
|
{ pkgs, ... }: {
|
||||||
|
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
|
|
@ -26,4 +26,4 @@
|
||||||
#DO NOT CHANGE THIS! IMPORTANT! DO NOT CHANGE THIS!
|
#DO NOT CHANGE THIS! IMPORTANT! DO NOT CHANGE THIS!
|
||||||
system.stateVersion = "23.11"; #DO NOT CHANGE THIS!
|
system.stateVersion = "23.11"; #DO NOT CHANGE THIS!
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
[
|
[
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../../nixosModules/default.nix
|
../../nixosModules/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
programs.docker.enable = lib.mkForce true;
|
programs.docker.enable = lib.mkForce true;
|
||||||
|
|
@ -49,13 +49,13 @@
|
||||||
#todo need to move this to modules
|
#todo need to move this to modules
|
||||||
services = {
|
services = {
|
||||||
libinput = {
|
libinput = {
|
||||||
enable = true;
|
enable = true;
|
||||||
touchpad = {
|
touchpad = {
|
||||||
tapping = true;
|
tapping = true;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#remove various bloat
|
#remove various bloat
|
||||||
services.xserver.excludePackages = with pkgs; [ xterm ];
|
services.xserver.excludePackages = with pkgs; [ xterm ];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,8 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
imports =
|
imports =
|
||||||
[ (modulesPath + "/installer/scan/not-detected.nix")
|
[
|
||||||
|
(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" ];
|
||||||
|
|
@ -14,18 +15,19 @@
|
||||||
boot.extraModulePackages = [ ];
|
boot.extraModulePackages = [ ];
|
||||||
|
|
||||||
fileSystems."/" =
|
fileSystems."/" =
|
||||||
{ device = "/dev/disk/by-label/nixos";
|
{
|
||||||
|
device = "/dev/disk/by-label/nixos";
|
||||||
fsType = "ext4";
|
fsType = "ext4";
|
||||||
};
|
};
|
||||||
|
|
||||||
fileSystems."/boot" =
|
fileSystems."/boot" =
|
||||||
{ device = "/dev/disk/by-label/BOOT";
|
{
|
||||||
|
device = "/dev/disk/by-label/BOOT";
|
||||||
fsType = "vfat";
|
fsType = "vfat";
|
||||||
};
|
};
|
||||||
|
|
||||||
swapDevices =
|
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
|
# 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
|
# (the default) this is the recommended approach. When using systemd-networkd it's
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
../../homeManagerModules/zsh.nix
|
../../homeManagerModules/zsh.nix
|
||||||
../../homeManagerModules/starship.nix
|
../../homeManagerModules/starship.nix
|
||||||
../../homeManagerModules/desktopPrograms/essentials/firefox.nix
|
../../homeManagerModules/desktopPrograms/essentials/firefox.nix
|
||||||
|
|
||||||
../../homeManagerModules/desktopPrograms/vscodium.nix
|
../../homeManagerModules/desktopPrograms/vscodium.nix
|
||||||
../../homeManagerModules/desktopPrograms/vesktop.nix
|
../../homeManagerModules/desktopPrograms/vesktop.nix
|
||||||
|
|
||||||
../../homeManagerModules/cliPrograms/hyfetch.nix
|
../../homeManagerModules/cliPrograms/hyfetch.nix
|
||||||
../../homeManagerModules/cliPrograms/bun.nix
|
../../homeManagerModules/cliPrograms/bun.nix
|
||||||
../../homeManagerModules/cliPrograms/git.nix
|
../../homeManagerModules/cliPrograms/git.nix
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,11 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, config, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
settings.drivers.gpu.amd.enable = lib.mkEnableOption "enable AMD gpu drivers";
|
settings.drivers.gpu.amd.enable = lib.mkEnableOption "enable AMD gpu drivers";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.settings.drivers.gpu.amd.enable {
|
config = lib.mkIf config.settings.drivers.gpu.amd.enable {
|
||||||
boot.initrd.kernelModules = [ "amdgpu" ];
|
boot.initrd.kernelModules = [ "amdgpu" ];
|
||||||
services.xserver.videoDrivers = [ "amdgpu" ];
|
services.xserver.videoDrivers = [ "amdgpu" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,24 +1,24 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, config, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
settings.drivers.gpu.nvidia.forceDisable = lib.mkEnableOption "force disable all nvidia drivers";
|
settings.drivers.gpu.nvidia.forceDisable = lib.mkEnableOption "force disable all nvidia drivers";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.forceDisable {
|
config = lib.mkIf config.settings.drivers.gpu.nvidia.forceDisable {
|
||||||
boot.extraModprobeConfig = ''
|
boot.extraModprobeConfig = ''
|
||||||
blacklist nouveau
|
blacklist nouveau
|
||||||
options nouveau modeset=0
|
options nouveau modeset=0
|
||||||
'';
|
'';
|
||||||
services.udev.extraRules = ''
|
services.udev.extraRules = ''
|
||||||
# Remove NVIDIA USB xHCI Host Controller devices, if present
|
# 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"
|
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
|
# 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"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x0c8000", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
# Remove NVIDIA Audio devices, if present
|
# Remove NVIDIA Audio devices, if present
|
||||||
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
ACTION=="add", SUBSYSTEM=="pci", ATTR{vendor}=="0x10de", ATTR{class}=="0x040300", ATTR{power/control}="auto", ATTR{remove}="1"
|
||||||
# Remove NVIDIA VGA/3D controller devices
|
# 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"
|
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" ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,25 @@
|
||||||
{ lib, config, ... }: {
|
{ lib, config, ... }: {
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
settings.drivers.gpu.nvidia.enable = lib.mkEnableOption "Enable Nvidia proprietary drivers";
|
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.offload = lib.mkEnableOption "Enable prime offloading";
|
||||||
settings.drivers.gpu.nvidia.sync = lib.mkEnableOption "Enable prime sync";
|
settings.drivers.gpu.nvidia.sync = lib.mkEnableOption "Enable prime sync";
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.settings.drivers.gpu.nvidia.enable {
|
config = lib.mkIf config.settings.drivers.gpu.nvidia.enable {
|
||||||
services.xserver.videoDrivers = [ "nvidia" ];
|
services.xserver.videoDrivers = [ "nvidia" ];
|
||||||
hardware.nvidia = {
|
hardware.nvidia = {
|
||||||
modesetting.enable = true;
|
modesetting.enable = true;
|
||||||
prime = {
|
prime = {
|
||||||
nvidiaBusId = "pci:1:0:0";
|
nvidiaBusId = "pci:1:0:0";
|
||||||
amdgpuBusId = "pci:5:0:0";
|
amdgpuBusId = "pci:5:0:0";
|
||||||
};
|
};
|
||||||
prime.offload = lib.mkIf config.settings.drivers.gpu.nvidia.offload {
|
prime.offload = lib.mkIf config.settings.drivers.gpu.nvidia.offload {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableOffloadCmd = true;
|
enableOffloadCmd = true;
|
||||||
};
|
};
|
||||||
prime.sync.enable = lib.mkIf config.settings.drivers.gpu.nvidia.sync true;
|
prime.sync.enable = lib.mkIf config.settings.drivers.gpu.nvidia.sync true;
|
||||||
nvidiaSettings = true;
|
nvidiaSettings = true;
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
};
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,5 +11,5 @@
|
||||||
libimobiledevice
|
libimobiledevice
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,6 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf config.settings.drivers.printer.M2020.enable {
|
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 {
|
config = lib.mkIf config.settings.programs.docker.enable {
|
||||||
virtualisation.docker.enable = true;
|
virtualisation.docker.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
config = lib.mkIf config.settings.programs.powertop.enable {
|
config = lib.mkIf config.settings.programs.powertop.enable {
|
||||||
powerManagement.powertop.enable = true;
|
powerManagement.powertop.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
config = lib.mkIf config.settings.programs.tailscale.enable {
|
config = lib.mkIf config.settings.programs.tailscale.enable {
|
||||||
services.tailscale.enable = true;
|
services.tailscale.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
config = lib.mkIf config.settings.services.fstrim.enable {
|
config = lib.mkIf config.settings.services.fstrim.enable {
|
||||||
services.fstrim.enable = true;
|
services.fstrim.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,26 @@
|
||||||
{ config, lib, pkgs, ... }: {
|
{ config, lib, pkgs, ... }: {
|
||||||
options = {
|
options = {
|
||||||
settings.gnome.enable = lib.mkEnableOption "enable gnome de";
|
settings.gnome.enable = lib.mkEnableOption "enable gnome de";
|
||||||
};
|
};
|
||||||
|
|
||||||
#todo make this more configurable
|
#todo make this more configurable
|
||||||
config = lib.mkIf config.settings.gnome.enable {
|
config = lib.mkIf config.settings.gnome.enable {
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
displayManager.gdm.enable = true;
|
displayManager.gdm.enable = true;
|
||||||
desktopManager.gnome.enable = true;
|
desktopManager.gnome.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.systemPackages = [ pkgs.gnome.gnome-tweaks ];
|
environment.systemPackages = [ pkgs.gnome.gnome-tweaks ];
|
||||||
|
|
||||||
#enable browser connector for installing extensions
|
#enable browser connector for installing extensions
|
||||||
services.gnome.gnome-browser-connector.enable = true;
|
services.gnome.gnome-browser-connector.enable = true;
|
||||||
|
|
||||||
# Gnome enables pulse by default smh
|
# Gnome enables pulse by default smh
|
||||||
# make sure to have PIPEWIRE enabled!
|
# make sure to have PIPEWIRE enabled!
|
||||||
hardware.pulseaudio.enable = false;
|
hardware.pulseaudio.enable = false;
|
||||||
|
|
||||||
# remove various bloat
|
# remove various bloat
|
||||||
environment.gnome.excludePackages = with pkgs.gnome; [ epiphany gnome-contacts gnome-maps gnome-music gnome-weather totem yelp pkgs.gnome-tour ];
|
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";
|
layout = "it";
|
||||||
variant = "";
|
variant = "";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,4 +17,4 @@
|
||||||
jack.enable = true;
|
jack.enable = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
config = lib.mkIf config.settings.services.switcheroo.enable {
|
config = lib.mkIf config.settings.services.switcheroo.enable {
|
||||||
services.switcherooControl.enable = true;
|
services.switcherooControl.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,4 +6,4 @@
|
||||||
config = lib.mkIf config.settings.services.tlp.enable {
|
config = lib.mkIf config.settings.services.tlp.enable {
|
||||||
services.tlp.enable = true;
|
services.tlp.enable = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue