diff --git a/flake.nix b/flake.nix index dc5b881..4652eb6 100755 --- a/flake.nix +++ b/flake.nix @@ -72,44 +72,55 @@ manga-tui.url = "github:josueBarretogit/manga-tui"; }; - outputs = { - nixpkgs, - nix-darwin, - ... - } @ inputs: let - in { - formatter = with nixpkgs.legacyPackages; { - x86_64-linux = x86_64-linux.alejandra; - aarch64-linux = aarch64-linux.alejandra; - aarch64-darwin = aarch64-darwin.alejandra; - }; - - nixosConfigurations = { - demeter = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/demeter - ]; + outputs = + { + nixpkgs, + nix-darwin, + ... + }@inputs: + let + in + { + formatter = with nixpkgs.legacyPackages; { + x86_64-linux = x86_64-linux.nixfmt-rfc-style; + aarch64-linux = aarch64-linux.nixfmt-rfc-style; + aarch64-darwin = aarch64-darwin.nixfmt-rfc-style; }; - callisto = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/callisto - ]; + nixosConfigurations = { + demeter = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + }; + modules = [ + ./hosts/demeter + ]; + }; + + callisto = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + }; + modules = [ + ./hosts/callisto + ]; + }; + adrastea = nixpkgs.lib.nixosSystem { + specialArgs = { + inherit inputs; + }; + modules = [ + ./hosts/adrastea + ]; + }; }; - adrastea = nixpkgs.lib.nixosSystem { - specialArgs = {inherit inputs;}; + darwinConfigurations.phobos = nix-darwin.lib.darwinSystem { + specialArgs = { + inherit inputs; + }; modules = [ - ./hosts/adrastea + ./hosts/phobos ]; }; }; - darwinConfigurations.phobos = nix-darwin.lib.darwinSystem { - specialArgs = {inherit inputs;}; - modules = [ - ./hosts/phobos - ]; - }; - }; } diff --git a/hosts/adrastea/configuration.nix b/hosts/adrastea/configuration.nix index 4743f82..7aaf6a0 100755 --- a/hosts/adrastea/configuration.nix +++ b/hosts/adrastea/configuration.nix @@ -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 = '' diff --git a/hosts/adrastea/default.nix b/hosts/adrastea/default.nix index b854237..b1a77cb 100644 --- a/hosts/adrastea/default.nix +++ b/hosts/adrastea/default.nix @@ -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 diff --git a/hosts/adrastea/hardware-configuration.nix b/hosts/adrastea/hardware-configuration.nix index 5655ceb..9fffae6 100644 --- a/hosts/adrastea/hardware-configuration.nix +++ b/hosts/adrastea/hardware-configuration.nix @@ -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; } diff --git a/hosts/adrastea/home-manager-extras/default.nix b/hosts/adrastea/home-manager-extras/default.nix index 0569056..1059869 100644 --- a/hosts/adrastea/home-manager-extras/default.nix +++ b/hosts/adrastea/home-manager-extras/default.nix @@ -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" + ]; } diff --git a/hosts/callisto/configuration.nix b/hosts/callisto/configuration.nix index 802198f..8bf73b8 100755 --- a/hosts/callisto/configuration.nix +++ b/hosts/callisto/configuration.nix @@ -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"; diff --git a/hosts/callisto/default.nix b/hosts/callisto/default.nix index 56cc4cb..b9efb2e 100644 --- a/hosts/callisto/default.nix +++ b/hosts/callisto/default.nix @@ -2,7 +2,8 @@ inputs, system, ... -}: { +}: +{ imports = with inputs; [ ./configuration.nix ../../modules/linux/audio diff --git a/hosts/callisto/hardware-configuration.nix b/hosts/callisto/hardware-configuration.nix index a891889..349c4e3 100644 --- a/hosts/callisto/hardware-configuration.nix +++ b/hosts/callisto/hardware-configuration.nix @@ -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 diff --git a/hosts/callisto/home-manager-extras/default.nix b/hosts/callisto/home-manager-extras/default.nix index c65c10a..c71847d 100644 --- a/hosts/callisto/home-manager-extras/default.nix +++ b/hosts/callisto/home-manager-extras/default.nix @@ -1,3 +1,4 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf; } diff --git a/hosts/demeter/configuration.nix b/hosts/demeter/configuration.nix index e768af7..250d7f9 100755 --- a/hosts/demeter/configuration.nix +++ b/hosts/demeter/configuration.nix @@ -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 = '' diff --git a/hosts/demeter/default.nix b/hosts/demeter/default.nix index c90be99..dc1c782 100644 --- a/hosts/demeter/default.nix +++ b/hosts/demeter/default.nix @@ -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 diff --git a/hosts/demeter/hardware-configuration.nix b/hosts/demeter/hardware-configuration.nix index 27265a7..74d863f 100644 --- a/hosts/demeter/hardware-configuration.nix +++ b/hosts/demeter/hardware-configuration.nix @@ -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 diff --git a/hosts/demeter/home-manager-extras/default.nix b/hosts/demeter/home-manager-extras/default.nix index 52a3281..0e16ce7 100644 --- a/hosts/demeter/home-manager-extras/default.nix +++ b/hosts/demeter/home-manager-extras/default.nix @@ -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; } diff --git a/hosts/phobos/configuration.nix b/hosts/phobos/configuration.nix index c17278e..8790ced 100755 --- a/hosts/phobos/configuration.nix +++ b/hosts/phobos/configuration.nix @@ -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" ]; }) ]; }; } diff --git a/hosts/phobos/default.nix b/hosts/phobos/default.nix index dd0e044..5b6a6e6 100644 --- a/hosts/phobos/default.nix +++ b/hosts/phobos/default.nix @@ -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 = [ diff --git a/modules/darwin/homebrew.nix b/modules/darwin/homebrew.nix index 674a588..77445bb 100755 --- a/modules/darwin/homebrew.nix +++ b/modules/darwin/homebrew.nix @@ -1,4 +1,5 @@ -{inputs, ...}: { +{ inputs, ... }: +{ nix-homebrew = { enable = true; enableRosetta = true; diff --git a/modules/darwin/yabai.nix b/modules/darwin/yabai.nix index 5cf06ab..48abd2e 100755 --- a/modules/darwin/yabai.nix +++ b/modules/darwin/yabai.nix @@ -2,7 +2,8 @@ config, pkgs, ... -}: { +}: +{ services.yabai = { enable = true; enableScriptingAddition = true; diff --git a/modules/linux/core/default.nix b/modules/linux/core/default.nix index 4aefbe8..90d10f4 100644 --- a/modules/linux/core/default.nix +++ b/modules/linux/core/default.nix @@ -2,7 +2,8 @@ inputs, pkgs, ... -}: { +}: +{ environment.systemPackages = [ inputs.personal-neovim.packages.${pkgs.system}.default ]; @@ -13,7 +14,7 @@ enable = true; extraRules = [ { - users = ["youwen"]; + users = [ "youwen" ]; keepEnv = true; persist = true; } diff --git a/modules/linux/desktop-portal/default.nix b/modules/linux/desktop-portal/default.nix index 890d099..80d4975 100644 --- a/modules/linux/desktop-portal/default.nix +++ b/modules/linux/desktop-portal/default.nix @@ -1,6 +1,7 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ xdg.portal = { enable = true; - extraPortals = with pkgs; [xdg-desktop-portal-gtk]; + extraPortals = with pkgs; [ xdg-desktop-portal-gtk ]; }; } diff --git a/modules/linux/fonts/default.nix b/modules/linux/fonts/default.nix index 5cfec33..ee59e1f 100755 --- a/modules/linux/fonts/default.nix +++ b/modules/linux/fonts/default.nix @@ -1,18 +1,19 @@ -{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/linux/gaming/default.nix b/modules/linux/gaming/default.nix index f5f5db0..5e32bf8 100755 --- a/modules/linux/gaming/default.nix +++ b/modules/linux/gaming/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ environment.systemPackages = with pkgs; [ ryujinx ]; @@ -14,8 +15,8 @@ nixpkgs.config.packageOverrides = pkgs: { steam = pkgs.steam.override { - extraPkgs = pkgs: - with pkgs; [ + extraPkgs = + pkgs: with pkgs; [ xorg.libXcursor xorg.libXi xorg.libXinerama diff --git a/modules/linux/greeter/default.nix b/modules/linux/greeter/default.nix index 840d063..556deaf 100644 --- a/modules/linux/greeter/default.nix +++ b/modules/linux/greeter/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.greetd = { enable = true; settings = { diff --git a/modules/linux/networking/default.nix b/modules/linux/networking/default.nix index 0e40ee7..af5d2d3 100755 --- a/modules/linux/networking/default.nix +++ b/modules/linux/networking/default.nix @@ -11,7 +11,8 @@ let to = 42872; } ]; -in { +in +{ services.openssh.enable = true; networking.firewall = { allowedTCPPorts = universalAllowedPorts; @@ -20,5 +21,8 @@ in { allowedTCPPortRanges = universalAllowedRanges; }; networking.firewall.enable = true; - networking.nameservers = ["1.1.1.1" "1.0.0.1"]; + networking.nameservers = [ + "1.1.1.1" + "1.0.0.1" + ]; } diff --git a/modules/linux/spotifyd/default.nix b/modules/linux/spotifyd/default.nix index d06298e..120b3c5 100644 --- a/modules/linux/spotifyd/default.nix +++ b/modules/linux/spotifyd/default.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ services.spotifyd = { enable = true; # settings = {global = 320;}; diff --git a/overlays/default.nix b/overlays/default.nix index 5e3a17f..9d3bc5c 100644 --- a/overlays/default.nix +++ b/overlays/default.nix @@ -2,11 +2,13 @@ inputs, pkgs, ... -}: let +}: +let stablepkgs = inputs.stablepkgs.legacyPackages.${pkgs.system}; bleedingpkgs = inputs.bleedingpkgs.legacyPackages.${pkgs.system}; nixpkgs-small = inputs.nixpkgs-unstable-small.legacyPackages.${pkgs.system}; -in { +in +{ nixpkgs.overlays = [ (self: super: { xdg-desktop-portal-hyprland = nixpkgs-small.xdg-desktop-portal-hyprland; diff --git a/users/youwen/common/core.nix b/users/youwen/common/core.nix index 72bbc4f..583bc8c 100755 --- a/users/youwen/common/core.nix +++ b/users/youwen/common/core.nix @@ -1,4 +1,5 @@ -{pkgs, ...}: { +{ pkgs, ... }: +{ home.file.".essentials" = { source = ./essentials; recursive = true; @@ -15,7 +16,9 @@ ''; }; - programs.fzf = {enable = true;}; + programs.fzf = { + enable = true; + }; programs.git = { enable = true; @@ -58,7 +61,7 @@ programs.gh = { enable = true; - extensions = [pkgs.github-copilot-cli]; + extensions = [ pkgs.github-copilot-cli ]; }; programs.oh-my-posh = { diff --git a/users/youwen/common/default.nix b/users/youwen/common/default.nix index d6379e7..977e74b 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 39d97c7..c2ea10e 100755 --- a/users/youwen/darwin/darwin-home.nix +++ b/users/youwen/darwin/darwin-home.nix @@ -3,7 +3,8 @@ config, pkgs, ... -}: { +}: +{ home.username = "youwen"; home.homeDirectory = "/Users/youwen"; diff --git a/users/youwen/linux/home.nix b/users/youwen/linux/home.nix index 178c176..9e976f5 100755 --- a/users/youwen/linux/home.nix +++ b/users/youwen/linux/home.nix @@ -2,7 +2,8 @@ inputs, 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 ff0843f..55a3534 100644 --- a/users/youwen/linux/hyprland/common.nix +++ b/users/youwen/linux/hyprland/common.nix @@ -3,7 +3,8 @@ inputs, system, ... -}: { +}: +{ home.packages = with pkgs; [ wl-clipboard grim @@ -25,7 +26,7 @@ wayland.windowManager.hyprland = { enable = true; settings = { - exec-once = ["waypaper --restore"]; + exec-once = [ "waypaper --restore" ]; "$mod" = "SUPER"; "$Left" = "H"; "$Right" = "L"; @@ -120,9 +121,7 @@ ",XF86AudioRewind, exec, playerctl previous" ] ++ ( - if pkgs.system != "aarch64-linux" - then ["$mod, F, exec, zen"] - else ["$mod, F, exec, librewolf"] + if pkgs.system != "aarch64-linux" then [ "$mod, F, exec, zen" ] else [ "$mod, F, exec, librewolf" ] ); bindm = [ "$mod, mouse:272, movewindow" diff --git a/users/youwen/linux/hyprland/desktop/default.nix b/users/youwen/linux/hyprland/desktop/default.nix index ec1d3bc..3870786 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 4503211..7a441f1 100644 --- a/users/youwen/linux/hyprland/laptop/default.nix +++ b/users/youwen/linux/hyprland/laptop/default.nix @@ -1,5 +1,6 @@ -{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 601aeea..98e32b5 100644 --- a/users/youwen/linux/laptop/default.nix +++ b/users/youwen/linux/laptop/default.nix @@ -1,5 +1,12 @@ -{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 5cc9a49..a56dd58 100644 --- a/users/youwen/linux/packages/aarch-64/default.nix +++ b/users/youwen/linux/packages/aarch-64/default.nix @@ -1,3 +1,7 @@ -{pkgs, ...}: let +{ pkgs, ... }: +let createCommon = import ../common-packages.nix; -in {home.packages = (createCommon pkgs) ++ [];} +in +{ + home.packages = (createCommon pkgs) ++ [ ]; +} diff --git a/users/youwen/linux/packages/common-packages.nix b/users/youwen/linux/packages/common-packages.nix index 40d9421..1f7154b 100644 --- a/users/youwen/linux/packages/common-packages.nix +++ b/users/youwen/linux/packages/common-packages.nix @@ -1,5 +1,4 @@ -pkgs: -with pkgs; [ +pkgs: with pkgs; [ neofetch # archives diff --git a/users/youwen/linux/packages/x86_64/default.nix b/users/youwen/linux/packages/x86_64/default.nix index 620a8ec..1e1a586 100644 --- a/users/youwen/linux/packages/x86_64/default.nix +++ b/users/youwen/linux/packages/x86_64/default.nix @@ -2,13 +2,16 @@ pkgs, inputs, ... -}: let +}: +let createCommon = import ../common-packages.nix; zen-browser = inputs.zen-browser.packages.${pkgs.system}.specific; -in { +in +{ home.packages = (createCommon pkgs) - ++ (with pkgs; + ++ ( + with pkgs; [ bitwarden-desktop modrinth-app @@ -17,16 +20,17 @@ in { sbctl r2modman ] - ++ [zen-browser]); + ++ [ zen-browser ] + ); xdg.mimeApps = { enable = true; defaultApplications = { - "text/html" = ["zen.desktop"]; - "x-scheme-handler/http" = ["zen.desktop"]; - "x-scheme-handler/https" = ["zen.desktop"]; - "x-scheme-handler/about" = ["zen.desktop"]; - "x-scheme-handler/unknown" = ["zen.desktop"]; + "text/html" = [ "zen.desktop" ]; + "x-scheme-handler/http" = [ "zen.desktop" ]; + "x-scheme-handler/https" = [ "zen.desktop" ]; + "x-scheme-handler/about" = [ "zen.desktop" ]; + "x-scheme-handler/unknown" = [ "zen.desktop" ]; }; }; diff --git a/users/youwen/linux/programs/default.nix b/users/youwen/linux/programs/default.nix index 0f23b25..4024ea0 100644 --- a/users/youwen/linux/programs/default.nix +++ b/users/youwen/linux/programs/default.nix @@ -2,7 +2,8 @@ pkgs, inputs, ... -}: { +}: +{ programs.kitty = { enable = true; theme = "Tokyo Night"; diff --git a/users/youwen/linux/spicetify/default.nix b/users/youwen/linux/spicetify/default.nix index ca1dddc..d6cfeb5 100644 --- a/users/youwen/linux/spicetify/default.nix +++ b/users/youwen/linux/spicetify/default.nix @@ -2,9 +2,11 @@ inputs, pkgs, ... -}: let +}: +let spicepkgs = inputs.spicetify.legacyPackages.${pkgs.system}; -in { +in +{ imports = [ inputs.spicetify.homeManagerModules.default ]; diff --git a/users/youwen/linux/theming/default.nix b/users/youwen/linux/theming/default.nix index dd85c96..04bcb1b 100644 --- a/users/youwen/linux/theming/default.nix +++ b/users/youwen/linux/theming/default.nix @@ -1,5 +1,6 @@ -{pkgs, ...}: { - imports = [./catppuccin.nix]; +{ pkgs, ... }: +{ + imports = [ ./catppuccin.nix ]; gtk = { enable = true; @@ -8,7 +9,9 @@ name = "Bibata-Modern-Ice"; size = 26; }; - iconTheme = {name = "Papirus-Dark";}; + iconTheme = { + name = "Papirus-Dark"; + }; }; qt = { diff --git a/users/youwen/linux/waybar/desktop/default.nix b/users/youwen/linux/waybar/desktop/default.nix index bdef7ec..dad6dc5 100644 --- a/users/youwen/linux/waybar/desktop/default.nix +++ b/users/youwen/linux/waybar/desktop/default.nix @@ -24,8 +24,8 @@ reload_style_on_change = true; - modules-left = ["hyprland/workspaces"]; - modules-center = ["hyprland/window"]; + modules-left = [ "hyprland/workspaces" ]; + modules-center = [ "hyprland/window" ]; modules-right = [ "tray" "idle_inhibitor" @@ -75,13 +75,31 @@ on-click = "pamixer -t"; on-scroll-up = "pamixer set 5%+"; on-scroll-down = "pamixer set 5%-"; - format-icons = ["" "" "" "" ""]; + format-icons = [ + "" + "" + "" + "" + "" + ]; }; battery = { interval = 10; format = "{icon}{capacity}%"; - format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + format-icons = [ + "󰂎" + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; tooltip = true; tooltip-format = "{timeTo}"; }; @@ -115,7 +133,18 @@ "hyprland/workspaces" = { show-special = true; persistent-workspaces = { - "*" = [1 2 3 4 5 6 7 8 9 10]; + "*" = [ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + ]; }; format = "{icon}"; format-icons = { diff --git a/users/youwen/linux/waybar/laptop/default.nix b/users/youwen/linux/waybar/laptop/default.nix index 57fa9b0..8164a8b 100644 --- a/users/youwen/linux/waybar/laptop/default.nix +++ b/users/youwen/linux/waybar/laptop/default.nix @@ -24,7 +24,10 @@ reload_style_on_change = true; - modules-left = ["hyprland/workspaces" "hyprland/window"]; + modules-left = [ + "hyprland/workspaces" + "hyprland/window" + ]; modules-right = [ "tray" "idle_inhibitor" @@ -74,13 +77,31 @@ on-click = "pamixer -t"; on-scroll-up = "pamixer set 5%+"; on-scroll-down = "pamixer set 5%-"; - format-icons = ["" "" "" "" ""]; + format-icons = [ + "" + "" + "" + "" + "" + ]; }; battery = { interval = 10; format = "{icon} {capacity}%"; - format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; + format-icons = [ + "󰂎" + "󰁺" + "󰁻" + "󰁼" + "󰁽" + "󰁾" + "󰁿" + "󰂀" + "󰂁" + "󰂂" + "󰁹" + ]; tooltip = true; tooltip-format = "{timeTo}"; }; @@ -114,7 +135,18 @@ "hyprland/workspaces" = { show-special = true; persistent-workspaces = { - "*" = [1 2 3 4 5 6 7 8 9 10]; + "*" = [ + 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 + ]; }; format = "{icon}"; format-icons = {