diff --git a/flake.nix b/flake.nix index 998f2f2..304e4e8 100755 --- a/flake.nix +++ b/flake.nix @@ -28,8 +28,7 @@ inputs.nixpkgs.follows = "nixpkgs"; }; lix-module = { - url = - "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; + url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz"; inputs.nixpkgs.follows = "nixpkgs"; }; apple-silicon = { @@ -38,146 +37,157 @@ }; }; - outputs = { self, nixpkgs, home-manager, catppuccin, lanzaboote, stablepkgs - , bleedingpkgs, lix-module, nix-darwin, nix-homebrew, apple-silicon, ... - }@inputs: rec { - formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.nixfmt; - nixosConfigurations = { - demeter = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - system = "x86_64-linux"; - modules = [ - ./hosts/demeter - ./modules/nixos/gaming - ./modules/nixos/audio - ./modules/nixos/networking - ./modules/nixos/fonts - ./modules/nixos/greeter - ./modules/nixos/core - - catppuccin.nixosModules.catppuccin - lix-module.nixosModules.default - lanzaboote.nixosModules.lanzaboote - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.backupFileExtension = "backup"; - home-manager.users.youwen = { - imports = [ - ./users/youwen/linux/desktop - ./users/youwen/linux/packages/x86_64 - ./users/youwen/linux/programs - ./users/youwen/common/neofetch - ./users/youwen/common - inputs.catppuccin.homeManagerModules.catppuccin - ]; - }; - } - ]; - }; - callisto = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - system = "aarch64-linux"; - modules = [ - ./hosts/callisto - ./modules/nixos/audio - ./modules/nixos/networking - ./modules/nixos/fonts - ./modules/nixos/greeter - ./modules/nixos/core - - apple-silicon.nixosModules.apple-silicon-support - catppuccin.nixosModules.catppuccin - lix-module.nixosModules.default - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.backupFileExtension = "backup"; - home-manager.users.youwen = { - imports = [ - ./users/youwen/common - ./users/youwen/common/neofetch/asahi-only.nix - ./users/youwen/linux/laptop - ./users/youwen/linux/packages/aarch-64 - - inputs.catppuccin.homeManagerModules.catppuccin - ]; - }; - } - { - nixpkgs.overlays = [ - (self: super: { - signal-desktop = - bleedingpkgs.legacyPackages.${self.system}.signal-desktop; - }) - ]; - } - ]; - }; - adrastea = nixpkgs.lib.nixosSystem { - specialArgs = { inherit inputs; }; - system = "x86_64-linux"; - modules = [ - ./hosts/adrastea - ./modules/nixos/gaming - ./modules/nixos/audio - ./modules/nixos/networking - ./modules/nixos/fonts - ./modules/nixos/greeter - ./modules/nixos/core - - catppuccin.nixosModules.catppuccin - lix-module.nixosModules.default - # lanzaboote.nixosModules.lanzaboote - home-manager.nixosModules.home-manager - { - home-manager.useGlobalPkgs = true; - home-manager.useUserPackages = true; - home-manager.backupFileExtension = "backup"; - home-manager.users.youwen = { - imports = [ - ./users/youwen/linux/laptop - ./users/youwen/linux/packages/x86_64 - ./users/youwen/linux/programs - ./users/youwen/common - ./users/youwen/common/neofetch - ./hosts/adrastea/home-manager-overrides.nix - inputs.catppuccin.homeManagerModules.catppuccin - ]; - }; - } - ]; - }; - }; - formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.nixfmt; - formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.nixfmt; - # Build darwin flake using: - # $ darwin-rebuild build --flake .#Youwens-MacBook-Pro - darwinConfigurations.phobos = nix-darwin.lib.darwinSystem { - specialArgs = { inherit inputs; }; + outputs = { + self, + nixpkgs, + home-manager, + catppuccin, + lanzaboote, + stablepkgs, + bleedingpkgs, + lix-module, + nix-darwin, + nix-homebrew, + apple-silicon, + ... + } @ inputs: rec { + formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra; + nixosConfigurations = { + demeter = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + system = "x86_64-linux"; modules = [ - ./hosts/phobos - home-manager.darwinModules.home-manager + ./hosts/demeter + ./modules/nixos/gaming + ./modules/nixos/audio + ./modules/nixos/networking + ./modules/nixos/fonts + ./modules/nixos/greeter + ./modules/nixos/core + + catppuccin.nixosModules.catppuccin + lix-module.nixosModules.default + lanzaboote.nixosModules.lanzaboote + home-manager.nixosModules.home-manager { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; - home-manager.users.youwen.imports = [ - ./users/youwen/darwin/darwin-home.nix - ./users/youwen/common/core.nix - ./users/youwen/common/neofetch - ]; home-manager.backupFileExtension = "backup"; - - # Optionally, use home-manager.extraSpecialArgs to pass - # arguments to home.nix + home-manager.users.youwen = { + imports = [ + ./users/youwen/linux/desktop + ./users/youwen/linux/packages/x86_64 + ./users/youwen/linux/programs + ./users/youwen/common/neofetch + ./users/youwen/common + inputs.catppuccin.homeManagerModules.catppuccin + ]; + }; + } + ]; + }; + callisto = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + system = "aarch64-linux"; + modules = [ + ./hosts/callisto + ./modules/nixos/audio + ./modules/nixos/networking + ./modules/nixos/fonts + ./modules/nixos/greeter + ./modules/nixos/core + + apple-silicon.nixosModules.apple-silicon-support + catppuccin.nixosModules.catppuccin + lix-module.nixosModules.default + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.backupFileExtension = "backup"; + home-manager.users.youwen = { + imports = [ + ./users/youwen/common + ./users/youwen/common/neofetch/asahi-only.nix + ./users/youwen/linux/laptop + ./users/youwen/linux/packages/aarch-64 + + inputs.catppuccin.homeManagerModules.catppuccin + ]; + }; + } + { + nixpkgs.overlays = [ + (self: super: { + signal-desktop = + bleedingpkgs.legacyPackages.${self.system}.signal-desktop; + }) + ]; + } + ]; + }; + adrastea = nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs;}; + system = "x86_64-linux"; + modules = [ + ./hosts/adrastea + ./modules/nixos/gaming + ./modules/nixos/audio + ./modules/nixos/networking + ./modules/nixos/fonts + ./modules/nixos/greeter + ./modules/nixos/core + + catppuccin.nixosModules.catppuccin + lix-module.nixosModules.default + # lanzaboote.nixosModules.lanzaboote + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.backupFileExtension = "backup"; + home-manager.users.youwen = { + imports = [ + ./users/youwen/linux/laptop + ./users/youwen/linux/packages/x86_64 + ./users/youwen/linux/programs + ./users/youwen/common + ./users/youwen/common/neofetch + ./hosts/adrastea/home-manager-overrides.nix + inputs.catppuccin.homeManagerModules.catppuccin + ]; + }; } - nix-homebrew.darwinModules.nix-homebrew - ./modules/darwin/homebrew.nix - ./modules/darwin/yabai.nix - ./modules/darwin/skhd.nix ]; }; }; + formatter.aarch64-darwin = nixpkgs.legacyPackages.aarch64-darwin.alejandra; + formatter.aarch64-linux = nixpkgs.legacyPackages.aarch64-linux.alejandra; + # Build darwin flake using: + # $ darwin-rebuild build --flake .#Youwens-MacBook-Pro + darwinConfigurations.phobos = nix-darwin.lib.darwinSystem { + specialArgs = {inherit inputs;}; + modules = [ + ./hosts/phobos + home-manager.darwinModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.youwen.imports = [ + ./users/youwen/darwin/darwin-home.nix + ./users/youwen/common/core.nix + ./users/youwen/common/neofetch + ]; + home-manager.backupFileExtension = "backup"; + + # Optionally, use home-manager.extraSpecialArgs to pass + # arguments to home.nix + } + nix-homebrew.darwinModules.nix-homebrew + ./modules/darwin/homebrew.nix + ./modules/darwin/yabai.nix + ./modules/darwin/skhd.nix + ]; + }; + }; } diff --git a/hosts/adrastea/default.nix b/hosts/adrastea/default.nix index 5cb7247..3f2583c 100755 --- a/hosts/adrastea/default.nix +++ b/hosts/adrastea/default.nix @@ -1,11 +1,15 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, inputs, pkgs, lib, ... }: - { - imports = [ # Include the results of the hardware scan. + config, + inputs, + pkgs, + lib, + ... +}: { + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -32,7 +36,7 @@ enable = true; keyboards = { default = { - ids = [ "*" ]; + ids = ["*"]; settings = { main = { capslock = "esc"; @@ -44,8 +48,7 @@ }; }; - boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = - "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c"; + boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c"; services.tlp.enable = true; @@ -80,7 +83,7 @@ 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. @@ -88,7 +91,7 @@ programs.nix-ld = { enable = true; - libraries = with pkgs; [ icu xorg.libXtst xorg.libXi ]; + libraries = with pkgs; [icu xorg.libXtst xorg.libXi]; }; hardware.nvidia = { @@ -111,7 +114,7 @@ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver.videoDrivers = ["nvidia"]; # services.desktopManager.plasma6.enable = true; @@ -131,14 +134,14 @@ users.users.youwen = { isNormalUser = true; description = "Youwen Wu"; - extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ]; + extraGroups = ["networkmanager" "wheel" "nixos" "realtime"]; }; - users.groups.realtime = { }; + users.groups.realtime = {}; nix.settings = { - trusted-users = [ "root" "youwen" ]; - experimental-features = [ "nix-command" "flakes" ]; + trusted-users = ["root" "youwen"]; + experimental-features = ["nix-command" "flakes"]; }; services.udev.extraRules = '' diff --git a/hosts/adrastea/hardware-configuration.nix b/hosts/adrastea/hardware-configuration.nix index ea69d5c..5655ceb 100644 --- a/hosts/adrastea/hardware-configuration.nix +++ b/hosts/adrastea/hardware-configuration.nix @@ -1,33 +1,34 @@ # 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, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + pkgs, + modulesPath, + ... +}: { + 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"; fsType = "ext4"; }; - boot.initrd.luks.devices."luks-f169a679-d70b-4dff-a344-7131f3303813".device = - "/dev/disk/by-uuid/f169a679-d70b-4dff-a344-7131f3303813"; + boot.initrd.luks.devices."luks-f169a679-d70b-4dff-a344-7131f3303813".device = "/dev/disk/by-uuid/f169a679-d70b-4dff-a344-7131f3303813"; 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 diff --git a/hosts/adrastea/home-manager-overrides.nix b/hosts/adrastea/home-manager-overrides.nix index 74c4542..0569056 100644 --- a/hosts/adrastea/home-manager-overrides.nix +++ b/hosts/adrastea/home-manager-overrides.nix @@ -1,4 +1,3 @@ -{ 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"]; } diff --git a/hosts/callisto/default.nix b/hosts/callisto/default.nix index cde4ee2..d786b9d 100755 --- a/hosts/callisto/default.nix +++ b/hosts/callisto/default.nix @@ -1,11 +1,14 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, inputs, pkgs, ... }: - { - imports = [ # Include the results of the hardware scan. + config, + inputs, + pkgs, + ... +}: { + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix # ./apple-silicon-support ]; @@ -23,7 +26,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. @@ -33,7 +36,7 @@ settings.General.EnableNetworkConfiguration = true; }; - nixpkgs.overlays = [ inputs.apple-silicon.overlays.apple-silicon-overlay ]; + nixpkgs.overlays = [inputs.apple-silicon.overlays.apple-silicon-overlay]; programs.light.enable = true; @@ -68,7 +71,7 @@ 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 @@ -87,14 +90,14 @@ users.users.youwen = { isNormalUser = true; description = "Youwen Wu"; - extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ]; + extraGroups = ["networkmanager" "wheel" "nixos" "realtime"]; }; - users.groups.realtime = { }; + users.groups.realtime = {}; nix.settings = { - trusted-users = [ "root" "youwen" ]; - experimental-features = [ "nix-command" "flakes" ]; + trusted-users = ["root" "youwen"]; + experimental-features = ["nix-command" "flakes"]; }; services.udev.extraRules = '' @@ -155,13 +158,12 @@ environment.variables = { EDITOR = "nvim"; NIX_AUTO_RUN = 1; - }; services.keyd = { enable = true; keyboards = { default = { - ids = [ "*" ]; + ids = ["*"]; settings = { main = { capslock = "esc"; diff --git a/hosts/callisto/hardware-configuration.nix b/hosts/callisto/hardware-configuration.nix index 2b4a84f..c812f7a 100755 --- a/hosts/callisto/hardware-configuration.nix +++ b/hosts/callisto/hardware-configuration.nix @@ -1,15 +1,19 @@ # 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, ... }: - { - imports = [ (modulesPath + "/installer/scan/not-detected.nix") ]; + config, + lib, + 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/disk/by-uuid/bc88058e-6e3a-4987-b78e-e19cb5611608"; @@ -19,10 +23,10 @@ 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 diff --git a/hosts/demeter/default.nix b/hosts/demeter/default.nix index 528f624..f2e081f 100755 --- a/hosts/demeter/default.nix +++ b/hosts/demeter/default.nix @@ -1,11 +1,15 @@ # Edit this configuration file to define what should be installed on # your system. Help is available in the configuration.nix(5) man page # and in the NixOS manual (accessible by running ‘nixos-help’). - -{ config, inputs, pkgs, lib, ... }: - { - imports = [ # Include the results of the hardware scan. + config, + inputs, + pkgs, + lib, + ... +}: { + imports = [ + # Include the results of the hardware scan. ./hardware-configuration.nix ]; @@ -61,7 +65,7 @@ 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. @@ -69,7 +73,7 @@ programs.nix-ld = { enable = true; - libraries = with pkgs; [ icu xorg.libXtst xorg.libXi ]; + libraries = with pkgs; [icu xorg.libXtst xorg.libXi]; }; hardware.nvidia = { @@ -91,7 +95,7 @@ hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; - services.xserver.videoDrivers = [ "nvidia" ]; + services.xserver.videoDrivers = ["nvidia"]; services.flatpak.enable = true; @@ -113,14 +117,14 @@ users.users.youwen = { isNormalUser = true; description = "Youwen Wu"; - extraGroups = [ "networkmanager" "wheel" "nixos" "realtime" ]; + extraGroups = ["networkmanager" "wheel" "nixos" "realtime"]; }; - users.groups.realtime = { }; + users.groups.realtime = {}; nix.settings = { - trusted-users = [ "root" "youwen" ]; - experimental-features = [ "nix-command" "flakes" ]; + trusted-users = ["root" "youwen"]; + experimental-features = ["nix-command" "flakes"]; }; services.udev.extraRules = '' diff --git a/hosts/demeter/hardware-configuration.nix b/hosts/demeter/hardware-configuration.nix index d31778a..27265a7 100644 --- a/hosts/demeter/hardware-configuration.nix +++ b/hosts/demeter/hardware-configuration.nix @@ -1,34 +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, pkgs, modulesPath, ... }: - { - imports = - [ (modulesPath + "/installer/scan/not-detected.nix") - ]; + config, + lib, + 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"; - fsType = "ext4"; - }; + fileSystems."/" = { + device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2"; + fsType = "ext4"; + }; boot.initrd.luks.devices."luks-362ec972-7c5e-4c9f-ba5d-b8f2ed083509".device = "/dev/disk/by-uuid/362ec972-7c5e-4c9f-ba5d-b8f2ed083509"; - fileSystems."/boot" = - { device = "/dev/disk/by-uuid/27EE-D950"; - fsType = "vfat"; - options = [ "fmask=0022" "dmask=0022" ]; - }; + fileSystems."/boot" = { + device = "/dev/disk/by-uuid/27EE-D950"; + fsType = "vfat"; + options = ["fmask=0022" "dmask=0022"]; + }; - swapDevices = - [ { device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de"; } - ]; + swapDevices = [ + {device = "/dev/disk/by-uuid/670fc084-d593-44b3-aed9-78d95fec71de";} + ]; # 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 diff --git a/hosts/phobos/default.nix b/hosts/phobos/default.nix index 7f1633b..c17278e 100755 --- a/hosts/phobos/default.nix +++ b/hosts/phobos/default.nix @@ -1,10 +1,15 @@ -{ inputs, config, pkgs, ... }: { +{ + inputs, + 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 @@ -45,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"];}) ]; }; } diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index e3ec0b6..674a588 100755 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: { +{inputs, ...}: { nix-homebrew = { enable = true; enableRosetta = true; diff --git a/modules/darwin/yabai.nix b/modules/darwin/yabai.nix index d4dcbaf..5cf06ab 100755 --- a/modules/darwin/yabai.nix +++ b/modules/darwin/yabai.nix @@ -1,4 +1,8 @@ -{ config, pkgs, ... }: { +{ + config, + pkgs, + ... +}: { services.yabai = { enable = true; enableScriptingAddition = true; @@ -28,4 +32,3 @@ blur_radius = 5.0; }; } - diff --git a/modules/nixos/fonts/default.nix b/modules/nixos/fonts/default.nix index 4cf26d2..5cfec33 100755 --- a/modules/nixos/fonts/default.nix +++ b/modules/nixos/fonts/default.nix @@ -1,18 +1,18 @@ -{ pkgs, ... }: { +{pkgs, ...}: { fonts = { enableDefaultPackages = true; fontconfig = { defaultFonts = { - serif = [ "Noto Serif" ]; - sansSerif = [ "Noto Sans" ]; + serif = ["Noto Serif"]; + sansSerif = ["Noto Sans"]; }; }; packages = with pkgs; [ 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"];}) ]; }; } diff --git a/modules/nixos/greeter/default.nix b/modules/nixos/greeter/default.nix index 7001e05..840d063 100644 --- a/modules/nixos/greeter/default.nix +++ b/modules/nixos/greeter/default.nix @@ -1,5 +1,4 @@ -{pkgs, ...}: -{ +{pkgs, ...}: { services.greetd = { enable = true; settings = { diff --git a/modules/nixos/networking/default.nix b/modules/nixos/networking/default.nix index b7291da..33589a8 100755 --- a/modules/nixos/networking/default.nix +++ b/modules/nixos/networking/default.nix @@ -2,5 +2,5 @@ services.openssh.enable = true; # networking.firewall.allowedTCPPorts = [ ... ]; # networking.firewall.allowedUDPPorts = [ ... ]; - networking.nameservers = [ "1.1.1.1" "1.0.0.1" ]; + networking.nameservers = ["1.1.1.1" "1.0.0.1"]; } diff --git a/users/youwen/common/core.nix b/users/youwen/common/core.nix index 8d14f9a..091ada1 100755 --- a/users/youwen/common/core.nix +++ b/users/youwen/common/core.nix @@ -1,4 +1,4 @@ -{ pkgs, ... }: { +{pkgs, ...}: { home.file.".essentials" = { source = ./essentials; recursive = true; @@ -15,7 +15,7 @@ ''; }; - programs.fzf = { enable = true; }; + programs.fzf = {enable = true;}; programs.git = { enable = true; @@ -57,7 +57,7 @@ programs.gh = { enable = true; - extensions = [ pkgs.github-copilot-cli ]; + extensions = [pkgs.github-copilot-cli]; }; programs.oh-my-posh = { @@ -68,7 +68,6 @@ useTheme = "gruvbox"; }; - programs.direnv.enable = true; programs.fish = { @@ -79,8 +78,7 @@ }; functions = { update-nixos = { - description = - "Update the system flake and attempt to build and switch to the new configuration."; + description = "Update the system flake and attempt to build and switch to the new configuration."; body = '' cd /etc/nixos nix flake update diff --git a/users/youwen/common/default.nix b/users/youwen/common/default.nix index 977e74b..d6379e7 100644 --- a/users/youwen/common/default.nix +++ b/users/youwen/common/default.nix @@ -1 +1 @@ -{ imports = [ ./core.nix ]; } +{imports = [./core.nix];} diff --git a/users/youwen/darwin/darwin-home.nix b/users/youwen/darwin/darwin-home.nix index 3568f4f..6f16f12 100755 --- a/users/youwen/darwin/darwin-home.nix +++ b/users/youwen/darwin/darwin-home.nix @@ -1,6 +1,9 @@ -{ inputs, config, pkgs, ... }: - { + inputs, + config, + pkgs, + ... +}: { home.username = "youwen"; home.homeDirectory = "/Users/youwen"; @@ -79,5 +82,4 @@ # Let home Manager install and manage itself. programs.home-manager.enable = true; - } diff --git a/users/youwen/linux/desktop/default.nix b/users/youwen/linux/desktop/default.nix index 0b05422..c147434 100644 --- a/users/youwen/linux/desktop/default.nix +++ b/users/youwen/linux/desktop/default.nix @@ -7,4 +7,3 @@ ../waybar/desktop ]; } - diff --git a/users/youwen/linux/home.nix b/users/youwen/linux/home.nix index e46621e..ecfd013 100755 --- a/users/youwen/linux/home.nix +++ b/users/youwen/linux/home.nix @@ -1,6 +1,8 @@ -{ config, pkgs, ... }: - { + config, + pkgs, + ... +}: { home.username = "youwen"; home.homeDirectory = "/home/youwen"; diff --git a/users/youwen/linux/hyprland/common.nix b/users/youwen/linux/hyprland/common.nix index def608e..c0facf2 100644 --- a/users/youwen/linux/hyprland/common.nix +++ b/users/youwen/linux/hyprland/common.nix @@ -1,9 +1,8 @@ -{ pkgs, ... }: -{ +{pkgs, ...}: { wayland.windowManager.hyprland = { enable = true; settings = { - exec-once = [ "waypaper --restore" ]; + exec-once = ["waypaper --restore"]; "$mod" = "SUPER"; "$Left" = "Y"; "$Right" = "O"; @@ -164,8 +163,7 @@ "ignorezero,swaync-control-center" "blur,logout_dialog" ]; - monitor = - [ "DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1" ]; + monitor = ["DP-1,2560x1440@165,1920x0,auto" "HDMI-A-1,1920x1080@60,0x0,1"]; dwindle = { pseudotile = "yes"; preserve_split = "yes"; @@ -189,7 +187,7 @@ "workspaces, 1, 5, wind" ]; }; - + general = { gaps_in = "3"; gaps_out = "8"; @@ -284,17 +282,15 @@ services.hypridle = { enable = true; settings = { - lock_cmd = - "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances. + lock_cmd = "pidof hyprlock || hyprlock"; # avoid starting multiple hyprlock instances. before_sleep_cmd = "loginctl lock-session"; # lock before suspend. - after_sleep_cmd = - "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display. + after_sleep_cmd = "hyprctl dispatch dpms on"; # to avoid having to press a key twice to turn on the display. }; }; xdg.portal = { enable = true; - configPackages = [ pkgs.xdg-desktop-portal-hyprland ]; - extraPortals = [ pkgs.xdg-desktop-portal-hyprland ]; + configPackages = [pkgs.xdg-desktop-portal-hyprland]; + extraPortals = [pkgs.xdg-desktop-portal-hyprland]; }; } diff --git a/users/youwen/linux/hyprland/desktop/default.nix b/users/youwen/linux/hyprland/desktop/default.nix index 3870786..ec1d3bc 100644 --- a/users/youwen/linux/hyprland/desktop/default.nix +++ b/users/youwen/linux/hyprland/desktop/default.nix @@ -1 +1 @@ -{ imports = [ ../common.nix ]; } +{imports = [../common.nix];} diff --git a/users/youwen/linux/hyprland/laptop/default.nix b/users/youwen/linux/hyprland/laptop/default.nix index 61765f7..6512099 100644 --- a/users/youwen/linux/hyprland/laptop/default.nix +++ b/users/youwen/linux/hyprland/laptop/default.nix @@ -1,5 +1,5 @@ -{ lib, ... }: { - imports = [ ../common.nix ]; +{lib, ...}: { + imports = [../common.nix]; wayland.windowManager.hyprland.settings.input.touchpad = { natural_scroll = true; disable_while_typing = true; diff --git a/users/youwen/linux/laptop/default.nix b/users/youwen/linux/laptop/default.nix index 6becfb1..601aeea 100644 --- a/users/youwen/linux/laptop/default.nix +++ b/users/youwen/linux/laptop/default.nix @@ -1,8 +1,6 @@ -{ pkgs, ... }: { - imports = - [ ../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop ]; +{pkgs, ...}: { + imports = [../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop]; # some overrides for laptop specifically programs.kitty.settings.font_size = pkgs.lib.mkForce 11; } - diff --git a/users/youwen/linux/packages/aarch-64/default.nix b/users/youwen/linux/packages/aarch-64/default.nix index 3d4450b..5cc9a49 100644 --- a/users/youwen/linux/packages/aarch-64/default.nix +++ b/users/youwen/linux/packages/aarch-64/default.nix @@ -1,3 +1,3 @@ -{ pkgs, ... }: -let createCommon = import ../common-packages.nix; -in { home.packages = ((createCommon pkgs) ++ [ ]); } +{pkgs, ...}: let + createCommon = import ../common-packages.nix; +in {home.packages = (createCommon pkgs) ++ [];} diff --git a/users/youwen/linux/packages/x86_64/default.nix b/users/youwen/linux/packages/x86_64/default.nix index 83b091a..b8d166a 100644 --- a/users/youwen/linux/packages/x86_64/default.nix +++ b/users/youwen/linux/packages/x86_64/default.nix @@ -1,13 +1,15 @@ -{ pkgs, ... }: -let createCommon = import ../common-packages.nix; +{pkgs, ...}: let + createCommon = import ../common-packages.nix; in { - home.packages = ((createCommon pkgs) ++ (with pkgs; [ - spotify - bitwarden-desktop - modrinth-app - lutris - wine - sbctl - r2modman - ])); + home.packages = + (createCommon pkgs) + ++ (with pkgs; [ + spotify + bitwarden-desktop + modrinth-app + lutris + wine + sbctl + r2modman + ]); } diff --git a/users/youwen/linux/programs/default.nix b/users/youwen/linux/programs/default.nix index 20a0e61..15dd19a 100644 --- a/users/youwen/linux/programs/default.nix +++ b/users/youwen/linux/programs/default.nix @@ -15,8 +15,8 @@ action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py"; }; keybindings = { - "kitty_mod+h" = "kitty_scrollback_nvim"; - "kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output"; + "kitty_mod+h" = "kitty_scrollback_nvim"; + "kitty_mod+g" = "kitty_scrollback_nvim --config ksb_builtin_last_cmd_output"; }; }; diff --git a/users/youwen/linux/theming/default.nix b/users/youwen/linux/theming/default.nix index 287bf8c..dd85c96 100644 --- a/users/youwen/linux/theming/default.nix +++ b/users/youwen/linux/theming/default.nix @@ -1,5 +1,5 @@ -{ pkgs, ... }: { - imports = [ ./catppuccin.nix ]; +{pkgs, ...}: { + imports = [./catppuccin.nix]; gtk = { enable = true; @@ -8,7 +8,7 @@ name = "Bibata-Modern-Ice"; size = 26; }; - iconTheme = { name = "Papirus-Dark"; }; + iconTheme = {name = "Papirus-Dark";}; }; qt = { @@ -23,8 +23,6 @@ theme=GraphiteNordDark ''; - "Kvantum/GraphiteNord".source = - "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord"; + "Kvantum/GraphiteNord".source = "${pkgs.graphite-kde-theme}/share/Kvantum/GraphiteNord"; }; - } diff --git a/users/youwen/linux/waybar/desktop/default.nix b/users/youwen/linux/waybar/desktop/default.nix index feb589a..1e2f773 100644 --- a/users/youwen/linux/waybar/desktop/default.nix +++ b/users/youwen/linux/waybar/desktop/default.nix @@ -9,21 +9,21 @@ width = 1600; reload-style-on-change = true; margin = "10px 0px 0px 0px"; - modules-left = [ "hyprland/window" "hyprland/workspaces" ]; - modules-right = [ "backlight" "group/adjustable" "custom/weather" ]; - modules-center = [ "network" "group/hardware" "clock" ]; + modules-left = ["hyprland/window" "hyprland/workspaces"]; + modules-right = ["backlight" "group/adjustable" "custom/weather"]; + modules-center = ["network" "group/hardware" "clock"]; "hyprland/workspaces" = { active-only = false; all-outputs = false; format = "{icon}"; persistent-workspaces = { - eDP-1 = [ 1 ]; - DP-1 = [ 2 3 4 5 ]; + eDP-1 = [1]; + DP-1 = [2 3 4 5]; }; }; "group/hardware" = { orientation = "inherit"; - modules = [ "cpu" "memory" "battery" ]; + modules = ["cpu" "memory" "battery"]; }; "group/adjustable" = { orientation = "inherit"; @@ -31,7 +31,7 @@ transition-duration = 500; transition-left-to-right = true; }; - modules = [ "pulseaudio" "mpris" ]; + modules = ["pulseaudio" "mpris"]; }; "custom/weather" = { orientation = "horizontal"; @@ -51,12 +51,12 @@ # format-paused = " 󰏤 {title} "; # format-stopped = "Nothing Playing"; # }; - tray = { spacing = 10; }; - clock = { format = "{:%a %b %d, %I:%M %p} "; }; + tray = {spacing = 10;}; + clock = {format = "{:%a %b %d, %I:%M %p} ";}; backlight = { device = "intel_backlight"; format = "{percent}% {icon}"; - format-icons = [ "󰃞" "󰃠" ]; + format-icons = ["󰃞" "󰃠"]; }; battery = { states = { @@ -65,9 +65,9 @@ critical = 10; }; format = "{capacity}% {icon}"; - format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ]; + format-icons = ["󰁻" "󰁽" "󰁿" "󰂀" "󰁹"]; }; - "hyprland/window" = { format = "{class}"; }; + "hyprland/window" = {format = "{class}";}; network = { format-wifi = "{essid} "; format-linked = "{ifname} (No IP) "; @@ -81,7 +81,7 @@ format-muted = " {format_source}"; format-source = "{volume}% "; format-source-muted = ""; - format-icons = { default = [ "" "" "" ]; }; + format-icons = {default = ["" "" ""];}; }; }; }; diff --git a/users/youwen/linux/waybar/laptop/default.nix b/users/youwen/linux/waybar/laptop/default.nix index 5e2d71c..f21e0ec 100644 --- a/users/youwen/linux/waybar/laptop/default.nix +++ b/users/youwen/linux/waybar/laptop/default.nix @@ -9,23 +9,21 @@ # width = 1000; reload-style-on-change = true; margin = "5px 0px 0px 0px"; - modules-left = - [ "hyprland/window" "hyprland/workspaces" "network" "clock" ]; - modules-right = - [ "group/hardware" "backlight" "group/adjustable" "custom/weather" ]; + modules-left = ["hyprland/window" "hyprland/workspaces" "network" "clock"]; + modules-right = ["group/hardware" "backlight" "group/adjustable" "custom/weather"]; # modules-center = [ "network" "group/hardware" "clock" ]; "hyprland/workspaces" = { active-only = false; all-outputs = false; format = "{icon}"; persistent-workspaces = { - eDP-1 = [ 1 ]; - DP-1 = [ 2 3 4 5 ]; + eDP-1 = [1]; + DP-1 = [2 3 4 5]; }; }; "group/hardware" = { orientation = "inherit"; - modules = [ "cpu" "battery" ]; + modules = ["cpu" "battery"]; }; "group/adjustable" = { orientation = "inherit"; @@ -33,7 +31,7 @@ transition-duration = 500; transition-left-to-right = true; }; - modules = [ "pulseaudio" "mpris" ]; + modules = ["pulseaudio" "mpris"]; }; "custom/weather" = { orientation = "horizontal"; @@ -53,12 +51,12 @@ # format-paused = " 󰏤 {title} "; # format-stopped = "Nothing Playing"; # }; - tray = { spacing = 10; }; - clock = { format = "{:%a %b %d, %I:%M %p} "; }; + tray = {spacing = 10;}; + clock = {format = "{:%a %b %d, %I:%M %p} ";}; backlight = { device = "intel_backlight"; format = "{percent}% {icon}"; - format-icons = [ "󰃞" "󰃠" ]; + format-icons = ["󰃞" "󰃠"]; }; battery = { states = { @@ -67,9 +65,9 @@ critical = 10; }; format = "{capacity}% {icon}"; - format-icons = [ "󰁻" "󰁽" "󰁿" "󰂀" "󰁹" ]; + format-icons = ["󰁻" "󰁽" "󰁿" "󰂀" "󰁹"]; }; - "hyprland/window" = { format = "{class}"; }; + "hyprland/window" = {format = "{class}";}; network = { format-wifi = "{essid} "; format-linked = "{ifname} (No IP) "; @@ -83,7 +81,7 @@ format-muted = " {format_source}"; format-source = "{volume}% "; format-source-muted = ""; - format-icons = { default = [ "" "" "" ]; }; + format-icons = {default = ["" "" ""];}; }; }; };