chore: run nixfmt

This commit is contained in:
Youwen Wu 2024-07-21 19:02:10 -07:00
parent c72ff260db
commit 420d932dec
Signed by: youwen5
GPG key ID: 865658ED1FE61EC3
4 changed files with 149 additions and 172 deletions

View file

@ -5,8 +5,7 @@
{ config, inputs, pkgs, ... }: { config, inputs, pkgs, ... }:
{ {
imports = imports = [ # Include the results of the hardware scan.
[ # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
]; ];
@ -51,9 +50,7 @@
LC_TIME = "en_US.UTF-8"; LC_TIME = "en_US.UTF-8";
}; };
systemd.services = { systemd.services = { NetworkManager-wait-online.enable = false; };
NetworkManager-wait-online.enable = false;
};
# Enable the X11 windowing system. # Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session. # You can disable this if you're only using the Wayland session.
@ -66,7 +63,8 @@
programs.hyprland = { programs.hyprland = {
enable = true; enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland; package =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
}; };
# Enable the KDE Plasma Desktop Environment. # Enable the KDE Plasma Desktop Environment.
@ -118,7 +116,8 @@
trusted-users = [ "root" "youwen" ]; trusted-users = [ "root" "youwen" ];
experimental-features = [ "nix-command" "flakes" ]; experimental-features = [ "nix-command" "flakes" ];
substituters = [ "https://hyprland.cachix.org" ]; substituters = [ "https://hyprland.cachix.org" ];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="]; trusted-public-keys =
[ "hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc=" ];
}; };
# Allow unfree packages # Allow unfree packages
@ -171,7 +170,8 @@
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override {
extraPkgs = pkgs: with pkgs; [ extraPkgs = pkgs:
with pkgs; [
xorg.libXcursor xorg.libXcursor
xorg.libXi xorg.libXi
xorg.libXinerama xorg.libXinerama
@ -186,7 +186,6 @@
}; };
}; };
# List services that you want to enable: # List services that you want to enable:
# Enable the OpenSSH daemon. # Enable the OpenSSH daemon.
@ -206,9 +205,7 @@
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html). # (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment? system.stateVersion = "24.05"; # Did you read the comment?
hardware.opengl = { hardware.opengl = { enable = true; };
enable = true;
};
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;

View file

@ -18,7 +18,9 @@
}; };
}; };
outputs = { self, nixpkgs, home-manager, catppuccin, zimfw, lanzaboote, ... }@inputs: { outputs = { self, nixpkgs, home-manager, catppuccin, zimfw, lanzaboote, ...
}@inputs: {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt;
nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { nixosConfigurations.nixos = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; }; specialArgs = { inherit inputs; };
system = "x86_64-linux"; system = "x86_64-linux";
@ -53,10 +55,7 @@
home-manager.backupFileExtension = "backup"; home-manager.backupFileExtension = "backup";
home-manager.sharedModules = [ zimfw.homeManagerModules.zimfw ]; home-manager.sharedModules = [ zimfw.homeManagerModules.zimfw ];
home-manager.users.youwen = { home-manager.users.youwen = {
imports = [ imports = [ ./home.nix catppuccin.homeManagerModules.catppuccin ];
./home.nix
catppuccin.homeManagerModules.catppuccin
];
}; };
} }
]; ];

View file

@ -4,22 +4,21 @@
{ config, lib, pkgs, modulesPath, ... }: { config, lib, pkgs, modulesPath, ... }:
{ {
imports = imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ]; boot.initrd.availableKernelModules =
[ "xhci_pci" "ahci" "nvme" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ]; boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ]; boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ]; boot.extraModulePackages = [ ];
fileSystems."/" = fileSystems."/" = {
{ device = "/dev/disk/by-uuid/2616d86c-aac2-4780-9527-7b11192e783f"; device = "/dev/disk/by-uuid/2616d86c-aac2-4780-9527-7b11192e783f";
fsType = "ext4"; fsType = "ext4";
}; };
fileSystems."/boot" = fileSystems."/boot" = {
{ device = "/dev/disk/by-uuid/B826-E14B"; device = "/dev/disk/by-uuid/B826-E14B";
fsType = "vfat"; fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ]; options = [ "fmask=0022" "dmask=0022" ];
}; };
@ -35,5 +34,6 @@
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true; # networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

@ -130,37 +130,30 @@
}; };
}; };
services.easyeffects = { services.easyeffects = { enable = true; };
enable = true;
};
programs.fzf = { programs.fzf = {
enable = true; enable = true;
catppuccin.enable = true; catppuccin.enable = true;
}; };
programs.wlogout = { programs.wlogout = { enable = true; };
enable = true;
};
wayland.windowManager.hyprland.enable = true; wayland.windowManager.hyprland.enable = true;
wayland.windowManager.hyprland.settings = { wayland.windowManager.hyprland.settings = {
exec-once = exec-once = [ "waybar" "waypaper --restore" ];
[
"waybar"
"waypaper --restore"
];
"$mod" = "SUPER"; "$mod" = "SUPER";
"$Left" = "Y"; "$Left" = "Y";
"$Right" = "O"; "$Right" = "O";
"$Up" = "I"; "$Up" = "I";
"$Down" = "U"; "$Down" = "U";
env = [ env = [
"HYPRCURSOR_THEME,Bibata-Modern-Ice" "HYPRCURSOR_SIZE,26" "HYPRCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_THEME,Bibata-Modern-Ice" "XCURSOR_SIZE,26" "HYPRCURSOR_SIZE,26"
"XCURSOR_THEME,Bibata-Modern-Ice"
"XCURSOR_SIZE,26"
]; ];
bind = bind = [
[
# Application Keybinds # Application Keybinds
"$mod, F, exec, librewolf" "$mod, F, exec, librewolf"
"$mod, T, exec, kitty" "$mod, T, exec, kitty"
@ -209,7 +202,7 @@
# Utilities # Utilities
"$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi "$mod, Space, exec, pkill -x rofi || rofi -show drun" # Run rofi
"$mod, P, exec, grim -g \"$(slurp)\" - | swappy -f -" # Screenshot ''$mod, P, exec, grim -g "$(slurp)" - | swappy -f -'' # Screenshot
"$mod, Backspace, exec, wlogout" # Screenshot "$mod, Backspace, exec, wlogout" # Screenshot
]; ];
@ -298,10 +291,8 @@
"ignorezero,swaync-control-center" "ignorezero,swaync-control-center"
"blur,logout_dialog" "blur,logout_dialog"
]; ];
monitor = [ monitor =
"DP-1,2560x1440@165,1920x0,auto" [ "DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1" ];
"HDMI-A-1,1920x1080@60,0x0,1"
];
dwindle = { dwindle = {
pseudotile = "yes"; pseudotile = "yes";
preserve_split = "yes"; preserve_split = "yes";
@ -394,9 +385,7 @@
name = "Bibata-Modern-Ice"; name = "Bibata-Modern-Ice";
size = 26; size = 26;
}; };
iconTheme = { iconTheme = { name = "Papirus-Dark"; };
name = "Papirus-Dark";
};
}; };
qt = { qt = {
@ -411,7 +400,8 @@
theme=GraphiteNordDark theme=GraphiteNordDark
''; '';
"Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord"; "Kvantum/GraphiteNord".source =
"${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord";
}; };
programs.waybar = { programs.waybar = {
@ -450,7 +440,7 @@
}; };
"custom/weather" = { "custom/weather" = {
orientation = "horizontal"; orientation = "horizontal";
exec = "curl wttr.in/?format=\"%l:%20%t\""; exec = ''curl wttr.in/?format="%l:%20%t"'';
interval = 10; interval = 10;
}; };
cpu = { cpu = {
@ -466,12 +456,8 @@
# format-paused = " 󰏤 {title} "; # format-paused = " 󰏤 {title} ";
# format-stopped = "Nothing Playing"; # format-stopped = "Nothing Playing";
# }; # };
tray = { tray = { spacing = 10; };
spacing = 10; clock = { format = "{:%a %b %d, %I:%M %p} "; };
};
clock = {
format = "{:%a %b %d, %I:%M %p} ";
};
backlight = { backlight = {
device = "intel_backlight"; device = "intel_backlight";
format = "{percent}% {icon}"; format = "{percent}% {icon}";
@ -486,9 +472,7 @@
format = "{capacity}% {icon}"; format = "{capacity}% {icon}";
format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ]; format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ];
}; };
"hyprland/window" = { "hyprland/window" = { format = "{class}"; };
format = "{class}";
};
network = { network = {
format-wifi = "{essid} "; format-wifi = "{essid} ";
format-linked = "{ifname} (No IP) "; format-linked = "{ifname} (No IP) ";
@ -502,9 +486,7 @@
format-muted = " {format_source}"; format-muted = " {format_source}";
format-source = "{volume}% "; format-source = "{volume}% ";
format-source-muted = ""; format-source-muted = "";
format-icons = { format-icons = { default = [ "" "" "" ]; };
default = [ "" "" "" ];
};
}; };
}; };
}; };
@ -525,7 +507,8 @@
enable = true; enable = true;
enableZshIntegration = true; enableZshIntegration = true;
enableBashIntegration = true; enableBashIntegration = true;
settings = with builtins; fromJSON (unsafeDiscardStringContext (readFile ./prompt.omp.json)); settings = with builtins;
fromJSON (unsafeDiscardStringContext (readFile ./prompt.omp.json));
}; };
programs.zsh = { programs.zsh = {
@ -557,9 +540,7 @@
}; };
}; };
programs.bash = { programs.bash = { enable = true; };
enable = true;
};
programs.librewolf = { programs.librewolf = {
enable = true; enable = true;