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: youwen5
GPG key ID: 865658ED1FE61EC3
41 changed files with 362 additions and 167 deletions

View file

@ -72,44 +72,55 @@
manga-tui.url = "github:josueBarretogit/manga-tui"; manga-tui.url = "github:josueBarretogit/manga-tui";
}; };
outputs = { outputs =
nixpkgs, {
nix-darwin, nixpkgs,
... nix-darwin,
} @ inputs: let ...
in { }@inputs:
formatter = with nixpkgs.legacyPackages; { let
x86_64-linux = x86_64-linux.alejandra; in
aarch64-linux = aarch64-linux.alejandra; {
aarch64-darwin = aarch64-darwin.alejandra; formatter = with nixpkgs.legacyPackages; {
}; x86_64-linux = x86_64-linux.nixfmt-rfc-style;
aarch64-linux = aarch64-linux.nixfmt-rfc-style;
nixosConfigurations = { aarch64-darwin = aarch64-darwin.nixfmt-rfc-style;
demeter = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/demeter
];
}; };
callisto = nixpkgs.lib.nixosSystem { nixosConfigurations = {
specialArgs = {inherit inputs;}; demeter = nixpkgs.lib.nixosSystem {
modules = [ specialArgs = {
./hosts/callisto 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 { darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
specialArgs = {inherit inputs;}; specialArgs = {
inherit inputs;
};
modules = [ modules = [
./hosts/adrastea ./hosts/phobos
]; ];
}; };
}; };
darwinConfigurations.phobos = nix-darwin.lib.darwinSystem {
specialArgs = {inherit inputs;};
modules = [
./hosts/phobos
];
};
};
} }

View file

@ -7,7 +7,8 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }:
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -36,7 +37,7 @@
enable = true; enable = true;
keyboards = { keyboards = {
default = { default = {
ids = ["*"]; ids = [ "*" ];
settings = { settings = {
main = { main = {
capslock = "esc"; capslock = "esc";
@ -83,7 +84,9 @@
LC_TIME = "en_US.UTF-8"; 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. # 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.
@ -91,7 +94,11 @@
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi]; libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
}; };
hardware.nvidia = { hardware.nvidia = {
@ -114,7 +121,7 @@
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = [ "nvidia" ];
# services.desktopManager.plasma6.enable = true; # services.desktopManager.plasma6.enable = true;
@ -134,12 +141,18 @@
users.users.youwen = { users.users.youwen = {
isNormalUser = true; isNormalUser = true;
description = "Youwen Wu"; description = "Youwen Wu";
extraGroups = ["networkmanager"]; extraGroups = [ "networkmanager" ];
}; };
nix.settings = { nix.settings = {
trusted-users = ["root" "youwen"]; trusted-users = [
experimental-features = ["nix-command" "flakes"]; "root"
"youwen"
];
experimental-features = [
"nix-command"
"flakes"
];
}; };
services.udev.extraRules = '' services.udev.extraRules = ''

View file

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

View file

@ -7,13 +7,20 @@
pkgs, pkgs,
modulesPath, 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.availableKernelModules = [
boot.initrd.kernelModules = []; "nvme"
boot.kernelModules = ["kvm-amd"]; "xhci_pci"
boot.extraModulePackages = []; "usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/01983a52-5693-4cda-ad2e-5a406776bfb9"; device = "/dev/disk/by-uuid/01983a52-5693-4cda-ad2e-5a406776bfb9";
@ -25,10 +32,13 @@
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/3FCB-9D60"; device = "/dev/disk/by-uuid/3FCB-9D60";
fsType = "vfat"; 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 # 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
@ -39,6 +49,5 @@
# networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true; # networking.interfaces.wlp2s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
lib.mkDefault config.hardware.enableRedistributableFirmware;
} }

View file

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

View file

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

View file

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

View file

@ -7,15 +7,19 @@
pkgs, pkgs,
modulesPath, modulesPath,
... ...
}: { }:
{
imports = [ imports = [
(modulesPath + "/installer/scan/not-detected.nix") (modulesPath + "/installer/scan/not-detected.nix")
]; ];
boot.initrd.availableKernelModules = ["usb_storage" "sdhci_pci"]; boot.initrd.availableKernelModules = [
boot.initrd.kernelModules = []; "usb_storage"
boot.kernelModules = []; "sdhci_pci"
boot.extraModulePackages = []; ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/mapper/crypted"; device = "/dev/mapper/crypted";
@ -27,10 +31,13 @@
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852F-07F1"; device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat"; 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 # 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

View file

@ -1,3 +1,4 @@
{pkgs, ...}: { { pkgs, ... }:
{
home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf; home.file.".config/neofetch/config.conf".source = ./neofetch-asahi.conf;
} }

View file

@ -7,7 +7,8 @@
pkgs, pkgs,
lib, lib,
... ...
}: { }:
{
imports = [ imports = [
# Include the results of the hardware scan. # Include the results of the hardware scan.
./hardware-configuration.nix ./hardware-configuration.nix
@ -65,7 +66,9 @@
LC_TIME = "en_US.UTF-8"; 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. # 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.
@ -73,7 +76,11 @@
programs.nix-ld = { programs.nix-ld = {
enable = true; enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi]; libraries = with pkgs; [
icu
xorg.libXtst
xorg.libXi
];
}; };
hardware.nvidia = { hardware.nvidia = {
@ -95,7 +102,7 @@
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"]; services.xserver.videoDrivers = [ "nvidia" ];
services.flatpak.enable = true; services.flatpak.enable = true;
@ -117,12 +124,18 @@
users.users.youwen = { users.users.youwen = {
isNormalUser = true; isNormalUser = true;
description = "Youwen Wu"; description = "Youwen Wu";
extraGroups = ["networkmanager"]; extraGroups = [ "networkmanager" ];
}; };
nix.settings = { nix.settings = {
trusted-users = ["root" "youwen"]; trusted-users = [
experimental-features = ["nix-command" "flakes"]; "root"
"youwen"
];
experimental-features = [
"nix-command"
"flakes"
];
}; };
services.udev.extraRules = '' services.udev.extraRules = ''

View file

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

View file

@ -7,15 +7,23 @@
pkgs, pkgs,
modulesPath, 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 = [
boot.initrd.kernelModules = []; "xhci_pci"
boot.kernelModules = ["kvm-intel"]; "ahci"
boot.extraModulePackages = []; "nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" = { fileSystems."/" = {
device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2"; device = "/dev/disk/by-uuid/5a339a7f-8668-42d7-9ecc-d7a8f1d3f7b2";
@ -27,11 +35,14 @@
fileSystems."/boot" = { fileSystems."/boot" = {
device = "/dev/disk/by-uuid/27EE-D950"; device = "/dev/disk/by-uuid/27EE-D950";
fsType = "vfat"; fsType = "vfat";
options = ["fmask=0022" "dmask=0022"]; options = [
"fmask=0022"
"dmask=0022"
];
}; };
swapDevices = [ 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 # Enables DHCP on each ethernet and wireless interface. In case of scripted networking

View file

@ -2,8 +2,12 @@
inputs, inputs,
pkgs, 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.package = inputs.stablepkgs.legacyPackages.${pkgs.system}.hyprland;
wayland.windowManager.hyprland.settings.render.explicit_sync = 0; wayland.windowManager.hyprland.settings.render.explicit_sync = 0;
} }

View file

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

View file

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

View file

@ -1,4 +1,5 @@
{inputs, ...}: { { inputs, ... }:
{
nix-homebrew = { nix-homebrew = {
enable = true; enable = true;
enableRosetta = true; enableRosetta = true;

View file

@ -2,7 +2,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
services.yabai = { services.yabai = {
enable = true; enable = true;
enableScriptingAddition = true; enableScriptingAddition = true;

View file

@ -2,7 +2,8 @@
inputs, inputs,
pkgs, pkgs,
... ...
}: { }:
{
environment.systemPackages = [ environment.systemPackages = [
inputs.personal-neovim.packages.${pkgs.system}.default inputs.personal-neovim.packages.${pkgs.system}.default
]; ];
@ -13,7 +14,7 @@
enable = true; enable = true;
extraRules = [ extraRules = [
{ {
users = ["youwen"]; users = [ "youwen" ];
keepEnv = true; keepEnv = true;
persist = true; persist = true;
} }

View file

@ -1,6 +1,7 @@
{pkgs, ...}: { { pkgs, ... }:
{
xdg.portal = { xdg.portal = {
enable = true; enable = true;
extraPortals = with pkgs; [xdg-desktop-portal-gtk]; extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
}; };
} }

View file

@ -1,18 +1,19 @@
{pkgs, ...}: { { pkgs, ... }:
{
fonts = { fonts = {
enableDefaultPackages = true; enableDefaultPackages = true;
fontconfig = { fontconfig = {
defaultFonts = { defaultFonts = {
serif = ["Noto Serif"]; serif = [ "Noto Serif" ];
sansSerif = ["Noto Sans"]; sansSerif = [ "Noto Sans" ];
}; };
}; };
packages = with pkgs; [ packages = with pkgs; [
noto-fonts noto-fonts
noto-fonts-cjk noto-fonts-cjk
noto-fonts-emoji noto-fonts-emoji
(nerdfonts.override {fonts = ["CascadiaCode"];}) (nerdfonts.override { fonts = [ "CascadiaCode" ]; })
(google-fonts.override {fonts = ["Lora"];}) (google-fonts.override { fonts = [ "Lora" ]; })
]; ];
}; };
} }

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
environment.systemPackages = with pkgs; [ environment.systemPackages = with pkgs; [
ryujinx ryujinx
]; ];
@ -14,8 +15,8 @@
nixpkgs.config.packageOverrides = pkgs: { nixpkgs.config.packageOverrides = pkgs: {
steam = pkgs.steam.override { steam = pkgs.steam.override {
extraPkgs = pkgs: extraPkgs =
with pkgs; [ pkgs: with pkgs; [
xorg.libXcursor xorg.libXcursor
xorg.libXi xorg.libXi
xorg.libXinerama xorg.libXinerama

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
services.greetd = { services.greetd = {
enable = true; enable = true;
settings = { settings = {

View file

@ -11,7 +11,8 @@ let
to = 42872; to = 42872;
} }
]; ];
in { in
{
services.openssh.enable = true; services.openssh.enable = true;
networking.firewall = { networking.firewall = {
allowedTCPPorts = universalAllowedPorts; allowedTCPPorts = universalAllowedPorts;
@ -20,5 +21,8 @@ in {
allowedTCPPortRanges = universalAllowedRanges; allowedTCPPortRanges = universalAllowedRanges;
}; };
networking.firewall.enable = true; networking.firewall.enable = true;
networking.nameservers = ["1.1.1.1" "1.0.0.1"]; networking.nameservers = [
"1.1.1.1"
"1.0.0.1"
];
} }

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
services.spotifyd = { services.spotifyd = {
enable = true; enable = true;
# settings = {global = 320;}; # settings = {global = 320;};

View file

@ -2,11 +2,13 @@
inputs, inputs,
pkgs, pkgs,
... ...
}: let }:
let
stablepkgs = inputs.stablepkgs.legacyPackages.${pkgs.system}; stablepkgs = inputs.stablepkgs.legacyPackages.${pkgs.system};
bleedingpkgs = inputs.bleedingpkgs.legacyPackages.${pkgs.system}; bleedingpkgs = inputs.bleedingpkgs.legacyPackages.${pkgs.system};
nixpkgs-small = inputs.nixpkgs-unstable-small.legacyPackages.${pkgs.system}; nixpkgs-small = inputs.nixpkgs-unstable-small.legacyPackages.${pkgs.system};
in { in
{
nixpkgs.overlays = [ nixpkgs.overlays = [
(self: super: { (self: super: {
xdg-desktop-portal-hyprland = nixpkgs-small.xdg-desktop-portal-hyprland; xdg-desktop-portal-hyprland = nixpkgs-small.xdg-desktop-portal-hyprland;

View file

@ -1,4 +1,5 @@
{pkgs, ...}: { { pkgs, ... }:
{
home.file.".essentials" = { home.file.".essentials" = {
source = ./essentials; source = ./essentials;
recursive = true; recursive = true;
@ -15,7 +16,9 @@
''; '';
}; };
programs.fzf = {enable = true;}; programs.fzf = {
enable = true;
};
programs.git = { programs.git = {
enable = true; enable = true;
@ -58,7 +61,7 @@
programs.gh = { programs.gh = {
enable = true; enable = true;
extensions = [pkgs.github-copilot-cli]; extensions = [ pkgs.github-copilot-cli ];
}; };
programs.oh-my-posh = { programs.oh-my-posh = {

View file

@ -1 +1 @@
{imports = [./core.nix];} { imports = [ ./core.nix ]; }

View file

@ -3,7 +3,8 @@
config, config,
pkgs, pkgs,
... ...
}: { }:
{
home.username = "youwen"; home.username = "youwen";
home.homeDirectory = "/Users/youwen"; home.homeDirectory = "/Users/youwen";

View file

@ -2,7 +2,8 @@
inputs, inputs,
pkgs, pkgs,
... ...
}: { }:
{
home.username = "youwen"; home.username = "youwen";
home.homeDirectory = "/home/youwen"; home.homeDirectory = "/home/youwen";

View file

@ -3,7 +3,8 @@
inputs, inputs,
system, system,
... ...
}: { }:
{
home.packages = with pkgs; [ home.packages = with pkgs; [
wl-clipboard wl-clipboard
grim grim
@ -25,7 +26,7 @@
wayland.windowManager.hyprland = { wayland.windowManager.hyprland = {
enable = true; enable = true;
settings = { settings = {
exec-once = ["waypaper --restore"]; exec-once = [ "waypaper --restore" ];
"$mod" = "SUPER"; "$mod" = "SUPER";
"$Left" = "H"; "$Left" = "H";
"$Right" = "L"; "$Right" = "L";
@ -120,9 +121,7 @@
",XF86AudioRewind, exec, playerctl previous" ",XF86AudioRewind, exec, playerctl previous"
] ]
++ ( ++ (
if pkgs.system != "aarch64-linux" if pkgs.system != "aarch64-linux" then [ "$mod, F, exec, zen" ] else [ "$mod, F, exec, librewolf" ]
then ["$mod, F, exec, zen"]
else ["$mod, F, exec, librewolf"]
); );
bindm = [ bindm = [
"$mod, mouse:272, movewindow" "$mod, mouse:272, movewindow"

View file

@ -1 +1 @@
{imports = [../common.nix];} { imports = [ ../common.nix ]; }

View file

@ -1,5 +1,6 @@
{lib, ...}: { { lib, ... }:
imports = [../common.nix]; {
imports = [ ../common.nix ];
wayland.windowManager.hyprland.settings.input.touchpad = { wayland.windowManager.hyprland.settings.input.touchpad = {
natural_scroll = true; natural_scroll = true;
disable_while_typing = true; disable_while_typing = true;

View file

@ -1,5 +1,12 @@
{pkgs, ...}: { { pkgs, ... }:
imports = [../theming ../home.nix ../programs ../hyprland/laptop ../waybar/laptop]; {
imports = [
../theming
../home.nix
../programs
../hyprland/laptop
../waybar/laptop
];
# some overrides for laptop specifically # some overrides for laptop specifically
programs.kitty.settings.font_size = pkgs.lib.mkForce 11; programs.kitty.settings.font_size = pkgs.lib.mkForce 11;

View file

@ -1,3 +1,7 @@
{pkgs, ...}: let { pkgs, ... }:
let
createCommon = import ../common-packages.nix; createCommon = import ../common-packages.nix;
in {home.packages = (createCommon pkgs) ++ [];} in
{
home.packages = (createCommon pkgs) ++ [ ];
}

View file

@ -1,5 +1,4 @@
pkgs: pkgs: with pkgs; [
with pkgs; [
neofetch neofetch
# archives # archives

View file

@ -2,13 +2,16 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: let }:
let
createCommon = import ../common-packages.nix; createCommon = import ../common-packages.nix;
zen-browser = inputs.zen-browser.packages.${pkgs.system}.specific; zen-browser = inputs.zen-browser.packages.${pkgs.system}.specific;
in { in
{
home.packages = home.packages =
(createCommon pkgs) (createCommon pkgs)
++ (with pkgs; ++ (
with pkgs;
[ [
bitwarden-desktop bitwarden-desktop
modrinth-app modrinth-app
@ -17,16 +20,17 @@ in {
sbctl sbctl
r2modman r2modman
] ]
++ [zen-browser]); ++ [ zen-browser ]
);
xdg.mimeApps = { xdg.mimeApps = {
enable = true; enable = true;
defaultApplications = { defaultApplications = {
"text/html" = ["zen.desktop"]; "text/html" = [ "zen.desktop" ];
"x-scheme-handler/http" = ["zen.desktop"]; "x-scheme-handler/http" = [ "zen.desktop" ];
"x-scheme-handler/https" = ["zen.desktop"]; "x-scheme-handler/https" = [ "zen.desktop" ];
"x-scheme-handler/about" = ["zen.desktop"]; "x-scheme-handler/about" = [ "zen.desktop" ];
"x-scheme-handler/unknown" = ["zen.desktop"]; "x-scheme-handler/unknown" = [ "zen.desktop" ];
}; };
}; };

View file

@ -2,7 +2,8 @@
pkgs, pkgs,
inputs, inputs,
... ...
}: { }:
{
programs.kitty = { programs.kitty = {
enable = true; enable = true;
theme = "Tokyo Night"; theme = "Tokyo Night";

View file

@ -2,9 +2,11 @@
inputs, inputs,
pkgs, pkgs,
... ...
}: let }:
let
spicepkgs = inputs.spicetify.legacyPackages.${pkgs.system}; spicepkgs = inputs.spicetify.legacyPackages.${pkgs.system};
in { in
{
imports = [ imports = [
inputs.spicetify.homeManagerModules.default inputs.spicetify.homeManagerModules.default
]; ];

View file

@ -1,5 +1,6 @@
{pkgs, ...}: { { pkgs, ... }:
imports = [./catppuccin.nix]; {
imports = [ ./catppuccin.nix ];
gtk = { gtk = {
enable = true; enable = true;
@ -8,7 +9,9 @@
name = "Bibata-Modern-Ice"; name = "Bibata-Modern-Ice";
size = 26; size = 26;
}; };
iconTheme = {name = "Papirus-Dark";}; iconTheme = {
name = "Papirus-Dark";
};
}; };
qt = { qt = {

View file

@ -24,8 +24,8 @@
reload_style_on_change = true; reload_style_on_change = true;
modules-left = ["hyprland/workspaces"]; modules-left = [ "hyprland/workspaces" ];
modules-center = ["hyprland/window"]; modules-center = [ "hyprland/window" ];
modules-right = [ modules-right = [
"tray" "tray"
"idle_inhibitor" "idle_inhibitor"
@ -75,13 +75,31 @@
on-click = "pamixer -t"; on-click = "pamixer -t";
on-scroll-up = "pamixer set 5%+"; on-scroll-up = "pamixer set 5%+";
on-scroll-down = "pamixer set 5%-"; on-scroll-down = "pamixer set 5%-";
format-icons = ["" "" "" "" ""]; format-icons = [
""
""
""
""
""
];
}; };
battery = { battery = {
interval = 10; interval = 10;
format = "{icon}{capacity}%"; format = "{icon}{capacity}%";
format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; format-icons = [
"󰂎"
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
tooltip = true; tooltip = true;
tooltip-format = "{timeTo}"; tooltip-format = "{timeTo}";
}; };
@ -115,7 +133,18 @@
"hyprland/workspaces" = { "hyprland/workspaces" = {
show-special = true; show-special = true;
persistent-workspaces = { 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 = "{icon}";
format-icons = { format-icons = {

View file

@ -24,7 +24,10 @@
reload_style_on_change = true; reload_style_on_change = true;
modules-left = ["hyprland/workspaces" "hyprland/window"]; modules-left = [
"hyprland/workspaces"
"hyprland/window"
];
modules-right = [ modules-right = [
"tray" "tray"
"idle_inhibitor" "idle_inhibitor"
@ -74,13 +77,31 @@
on-click = "pamixer -t"; on-click = "pamixer -t";
on-scroll-up = "pamixer set 5%+"; on-scroll-up = "pamixer set 5%+";
on-scroll-down = "pamixer set 5%-"; on-scroll-down = "pamixer set 5%-";
format-icons = ["" "" "" "" ""]; format-icons = [
""
""
""
""
""
];
}; };
battery = { battery = {
interval = 10; interval = 10;
format = "{icon} {capacity}%"; format = "{icon} {capacity}%";
format-icons = ["󰂎" "󰁺" "󰁻" "󰁼" "󰁽" "󰁾" "󰁿" "󰂀" "󰂁" "󰂂" "󰁹"]; format-icons = [
"󰂎"
"󰁺"
"󰁻"
"󰁼"
"󰁽"
"󰁾"
"󰁿"
"󰂀"
"󰂁"
"󰂂"
"󰁹"
];
tooltip = true; tooltip = true;
tooltip-format = "{timeTo}"; tooltip-format = "{timeTo}";
}; };
@ -114,7 +135,18 @@
"hyprland/workspaces" = { "hyprland/workspaces" = {
show-special = true; show-special = true;
persistent-workspaces = { 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 = "{icon}";
format-icons = { format-icons = {