chore: switch to nixfmt-rfc-style

This commit is contained in:
Youwen Wu 2024-09-02 18:16:22 -07:00
parent 90f6446f5f
commit 523a59f2b3
Signed by: youwen
GPG key ID: 865658ED1FE61EC3
41 changed files with 362 additions and 167 deletions

View file

@ -7,7 +7,8 @@
pkgs,
lib,
...
}: {
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -36,7 +37,7 @@
enable = true;
keyboards = {
default = {
ids = ["*"];
ids = [ "*" ];
settings = {
main = {
capslock = "esc";
@ -83,7 +84,9 @@
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
systemd.services = {
NetworkManager-wait-online.enable = false;
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
@ -91,7 +94,11 @@
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
};
hardware.nvidia = {
@ -114,7 +121,7 @@
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = [ "nvidia" ];
# services.desktopManager.plasma6.enable = true;
@ -134,12 +141,18 @@
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager"];
extraGroups = [ "networkmanager" ];
};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
trusted-users = [
"root"
"youwen"
];
experimental-features = [
"nix-command"
"flakes"
];
};
services.udev.extraRules = ''

View file

@ -2,7 +2,8 @@
inputs,
system,
...
}: {
}:
{
imports = with inputs; [
./configuration.nix
../../modules/linux/gaming
@ -21,7 +22,9 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.youwen = {
imports = [
./home-manager-extras

View file

@ -7,13 +7,20 @@
pkgs,
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.kernelModules = [];
boot.kernelModules = ["kvm-amd"];
boot.extraModulePackages = [];
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-uuid/01983a52-5693-4cda-ad2e-5a406776bfb9";
@ -25,10 +32,13 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3FCB-9D60";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [{device = "/dev/disk/by-uuid/f28d0752-feab-4591-899e-e5deac3712d0";}];
swapDevices = [ { device = "/dev/disk/by-uuid/f28d0752-feab-4591-899e-e5deac3712d0"; } ];
# 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
@ -39,6 +49,5 @@
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

@ -1,3 +1,6 @@
{pkgs, ...}: {
wayland.windowManager.hyprland.settings.monitor = pkgs.lib.mkForce ["eDP-1,2560x1440@165,0x0,1.6"];
{ pkgs, ... }:
{
wayland.windowManager.hyprland.settings.monitor = pkgs.lib.mkForce [
"eDP-1,2560x1440@165,0x0,1.6"
];
}

View file

@ -6,7 +6,8 @@
inputs,
pkgs,
...
}: {
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -26,7 +27,7 @@
options hid_apple iso_layout=0
'';
boot.kernelParams = ["apple_dcp.show_notch=1"];
boot.kernelParams = [ "apple_dcp.show_notch=1" ];
networking.hostName = "callisto"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
@ -36,12 +37,14 @@
settings.General.EnableNetworkConfiguration = true;
};
nixpkgs.overlays = let
stablepkgs = inputs.stablepkgs.legacyPackages.${pkgs.system};
in [
inputs.apple-silicon.overlays.apple-silicon-overlay
inputs.vesktop-bin.overlays.default
];
nixpkgs.overlays =
let
stablepkgs = inputs.stablepkgs.legacyPackages.${pkgs.system};
in
[
inputs.apple-silicon.overlays.apple-silicon-overlay
inputs.vesktop-bin.overlays.default
];
programs.light.enable = true;
@ -76,7 +79,11 @@
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
};
# Configure keymap in X11
@ -96,12 +103,18 @@
isNormalUser = true;
description = "Youwen Wu";
# Wheel is required for iwctl as non-root
extraGroups = ["wheel"];
extraGroups = [ "wheel" ];
};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
trusted-users = [
"root"
"youwen"
];
experimental-features = [
"nix-command"
"flakes"
];
};
services.udev.extraRules = ''
@ -128,7 +141,7 @@
enable = true;
keyboards = {
default = {
ids = ["*"];
ids = [ "*" ];
settings = {
main = {
capslock = "esc";

View file

@ -2,7 +2,8 @@
inputs,
system,
...
}: {
}:
{
imports = with inputs; [
./configuration.nix
../../modules/linux/audio

View file

@ -7,15 +7,19 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"];
boot.initrd.kernelModules = [];
boot.kernelModules = [];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [
"usb_storage"
"sdhci_pci"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/mapper/crypted";
@ -27,10 +31,13 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [];
swapDevices = [ ];
# 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,3 +1,4 @@
{pkgs, ...}: {
{ pkgs, ... }:
{
home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf;
}

View file

@ -7,7 +7,8 @@
pkgs,
lib,
...
}: {
}:
{
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
@ -65,7 +66,9 @@
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
systemd.services = {
NetworkManager-wait-online.enable = false;
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
@ -73,7 +76,11 @@
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
};
hardware.nvidia = {
@ -95,7 +102,7 @@
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
services.xserver.videoDrivers = [ "nvidia" ];
services.flatpak.enable = true;
@ -117,12 +124,18 @@
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager"];
extraGroups = [ "networkmanager" ];
};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
trusted-users = [
"root"
"youwen"
];
experimental-features = [
"nix-command"
"flakes"
];
};
services.udev.extraRules = ''

View file

@ -2,7 +2,8 @@
inputs,
system,
...
}: {
}:
{
imports = with inputs; [
./configuration.nix
../../modules/linux/gaming
@ -23,7 +24,9 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.extraSpecialArgs = {inherit inputs;};
home-manager.extraSpecialArgs = {
inherit inputs;
};
home-manager.users.youwen = {
imports = [
../../users/youwen/linux/desktop

View file

@ -7,15 +7,23 @@
pkgs,
modulesPath,
...
}: {
}:
{
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = ["xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod"];
boot.initrd.kernelModules = [];
boot.kernelModules = ["kvm-intel"];
boot.extraModulePackages = [];
boot.initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = {
device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2";
@ -27,11 +35,14 @@
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/27EE-D950";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
options = [
"fmask=0022"
"dmask=0022"
];
};
swapDevices = [
{device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de";}
{ device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -2,8 +2,12 @@
inputs,
pkgs,
...
}: {
wayland.windowManager.hyprland.settings.monitor = ["DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1"];
}:
{
wayland.windowManager.hyprland.settings.monitor = [
"DP-1,2560x1440@165,1920x0,auto"
"HDMI-A-1,1920x1080@60,0x0,1"
];
# wayland.windowManager.hyprland.package = inputs.stablepkgs.legacyPackages.${pkgs.system}.hyprland;
wayland.windowManager.hyprland.settings.render.explicit_sync = 0;
}

View file

@ -3,13 +3,14 @@
config,
pkgs,
...
}: {
}:
{
# Expose the package set, including overlays, for convenience.
# darwinPackages = inputs.self.darwinConfigurations."Youwens-MacBook-Pro".pkgs;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [];
environment.systemPackages = with pkgs; [ ];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
@ -28,8 +29,7 @@
programs.fish.enable = true;
programs.bash.enable = true;
system.configurationRevision =
config.self.rev or config.self.dirtyRev or null;
system.configurationRevision = config.self.rev or config.self.dirtyRev or null;
nixpkgs.hostPlatform = "aarch64-darwin";
@ -50,8 +50,8 @@
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override {fonts = ["CascadiaCode"];})
(google-fonts.override {fonts = ["Lora"];})
(nerdfonts.override { fonts = [ "CascadiaCode" ]; })
(google-fonts.override { fonts = [ "Lora" ]; })
];
};
}

View file

@ -1,9 +1,12 @@
{inputs, ...}: {
{ inputs, ... }:
{
imports = with inputs; [
./configuration.nix
home-manager.darwinModules.home-manager
{
extraSpecialArgs = {inherit inputs;};
extraSpecialArgs = {
inherit inputs;
};
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.youwen.imports = [