Squash merge asahi-fix into main

This commit is contained in:
Youwen Wu 2024-08-21 16:48:17 -07:00
parent e5a4f927a3
commit 9fbf576165
20 changed files with 6015 additions and 879 deletions

View file

@ -24,11 +24,11 @@
},
"bleedingpkgs": {
"locked": {
"lastModified": 1724117083,
"narHash": "sha256-26Zgap4D9E8PRL9jvc4Df9POMNGFS9fMwKz+SiGrlXI=",
"lastModified": 1724277913,
"narHash": "sha256-88IaCyNgVQHq1WoyK1mSOzedz3UAfwhtDLUca7qGB3I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "44f636f8cb95238dabd5f33d00557329c0681cd5",
"rev": "4c97b427ece2d45026ab6c5264adb67c763e7927",
"type": "github"
},
"original": {
@ -57,11 +57,11 @@
},
"catppuccin": {
"locked": {
"lastModified": 1724048768,
"narHash": "sha256-OZ9OXsPQi+fNdMM7SBPtU8OB1ntLzOvUwA/3zYJY6Eo=",
"lastModified": 1724156255,
"narHash": "sha256-rpUCeS/QZwQdJmDrvCm0hRi8bFvQNQKAnIMK5ZDBfpM=",
"owner": "catppuccin",
"repo": "nix",
"rev": "ff4128f8ea57879050145cf077a27b9d3a9cbf33",
"rev": "8886a68edadb1d93c7101337f995ffce4b410ff2",
"type": "github"
},
"original": {
@ -404,11 +404,11 @@
"homebrew-cask": {
"flake": false,
"locked": {
"lastModified": 1724120139,
"narHash": "sha256-vVE53gBCJPc3/dj7OHvQ7mNuUk1bWVpNR4c0jKe+K9U=",
"lastModified": 1724279485,
"narHash": "sha256-izbAx5wx4QS332G9dJ/E1U/NA9nrUjS0qS6b1thPQuE=",
"owner": "homebrew",
"repo": "homebrew-cask",
"rev": "606d3429e6fae79849c0eaf4bbcf05ff1570051a",
"rev": "761ddda3d71597c6b594af9416492fbf67ec813e",
"type": "github"
},
"original": {
@ -420,11 +420,11 @@
"homebrew-core": {
"flake": false,
"locked": {
"lastModified": 1724119620,
"narHash": "sha256-p+M24z3IDeIJBppaWWTpaz63WMGvi3HGW/mQHQVYpgM=",
"lastModified": 1724279403,
"narHash": "sha256-k/OW0HDkdJHfo1E52PyfeEyBDH0LwXuM1VmmFxCvYk0=",
"owner": "homebrew",
"repo": "homebrew-core",
"rev": "cd06a79081ce6e08b475e01315cdf1cb51952d77",
"rev": "7270362c593e96b2368834f6a87cd0d904874eb9",
"type": "github"
},
"original": {
@ -502,11 +502,11 @@
]
},
"locked": {
"lastModified": 1723859949,
"narHash": "sha256-kiaGz4deGYKMjJPOji/JVvSP/eTefrIA3rAjOnOpXl4=",
"lastModified": 1724219898,
"narHash": "sha256-7PwlnEQDIbww8+nk0CHLeYTYMA23F/CkynHsX7Mxk+s=",
"owner": "LnL7",
"repo": "nix-darwin",
"rev": "076b9a905af8a52b866c8db068d6da475839d97b",
"rev": "d6703b988728b89456b32bac242c8689902e5a5b",
"type": "github"
},
"original": {
@ -651,11 +651,11 @@
"treefmt-nix": "treefmt-nix"
},
"locked": {
"lastModified": 1724118730,
"narHash": "sha256-UwtVD2FyD7FjfLLmqGLsCBCQgLC1Jj78e1PhiVb0MJk=",
"lastModified": 1724222231,
"narHash": "sha256-IFlMn1lgVsZQZC9WklY9YKcCdI0mUxSYZ7EfkaKCsQU=",
"owner": "nix-community",
"repo": "nixvim",
"rev": "39081a41067a7bdb66f6f85a3fee9693ff8a21b1",
"rev": "b7f419a759f70126e220533b724cc17e8528b184",
"type": "github"
},
"original": {
@ -773,11 +773,11 @@
},
"stablepkgs": {
"locked": {
"lastModified": 1723938990,
"narHash": "sha256-9tUadhnZQbWIiYVXH8ncfGXGvkNq3Hag4RCBEMUk7MI=",
"lastModified": 1724098845,
"narHash": "sha256-D5HwjQw/02fuXbR4LCTo64koglP2j99hkDR79/3yLOE=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c42fcfbdfeae23e68fc520f9182dde9f38ad1890",
"rev": "f1bad50880bae73ff2d82fafc22010b4fc097a9c",
"type": "github"
},
"original": {

156
flake.nix
View file

@ -3,38 +3,52 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
stablepkgs.url = "github:nixos/nixpkgs/nixos-24.05";
bleedingpkgs.url = "github:nixos/nixpkgs/master";
nix-darwin.url = "github:LnL7/nix-darwin";
nix-darwin.inputs.nixpkgs.follows = "nixpkgs";
nix-darwin = {
url = "github:LnL7/nix-darwin";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew";
homebrew-core = {
url = "github:homebrew/homebrew-core";
flake = false;
};
homebrew-cask = {
url = "github:homebrew/homebrew-cask";
flake = false;
};
catppuccin.url = "github:catppuccin/nix";
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.1";
# Optional but recommended to limit the size of your system closure.
inputs.nixpkgs.follows = "nixpkgs";
};
lix-module = {
url = "https://git.lix.systems/lix-project/nixos-module/archive/2.90.0.tar.gz";
inputs.nixpkgs.follows = "nixpkgs";
};
apple-silicon = {
url = "github:tpwrules/nixos-apple-silicon";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
@ -54,85 +68,33 @@
nix-homebrew,
apple-silicon,
...
} @ inputs: rec {
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
} @ inputs: let
in rec {
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;};
system = "x86_64-linux";
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
./overlays
];
};
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/neovim
./users/youwen/common
inputs.catppuccin.homeManagerModules.catppuccin
inputs.nixvim.homeManagerModules.nixvim
];
};
}
];
};
callisto = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
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
./users/youwen/common/neovim
inputs.catppuccin.homeManagerModules.catppuccin
inputs.nixvim.homeManagerModules.nixvim
];
};
}
{
nixpkgs.overlays = [
(self: super: {
signal-desktop =
bleedingpkgs.legacyPackages.${self.system}.signal-desktop;
})
];
}
];
};
adrastea = nixpkgs.lib.nixosSystem {
@ -140,65 +102,13 @@
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/neovim
./users/youwen/common
./users/youwen/common/neofetch
./hosts/adrastea/home-manager-overrides.nix
inputs.catppuccin.homeManagerModules.catppuccin
inputs.nixvim.homeManagerModules.nixvim
];
};
}
];
};
};
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
./users/youwen/common/neovim
];
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
];
};
};

227
hosts/adrastea/configuration.nix Executable file
View file

@ -0,0 +1,227 @@
# 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.
./hardware-configuration.nix
];
# Bootloader.
boot.loader = {
efi.canTouchEfiVariables = true;
timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
systemd-boot = {
enable = true;
consoleMode = "auto";
};
};
# boot.lanzaboote = {
# enable = false;
# pkiBundle = "/etc/secureboot";
# };
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["*"];
settings = {
main = {
capslock = "esc";
leftalt = "leftcontrol";
leftcontrol = "leftalt";
};
};
};
};
};
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
services.tlp.enable = true;
networking.hostName = "adrastea"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
prime = {
amdgpuBusId = "PCI:4:0:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
librewolf
gnumake
gcc
cachix
gnupg
openssh
python3
steam-run
# deps for neovim compilation
lua51Packages.lua
lua51Packages.luarocks
tree-sitter
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

248
hosts/adrastea/default.nix Executable file → Normal file
View file

@ -1,227 +1,35 @@
# 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).
{inputs, ...}: {
imports = with inputs; [
./configuration.nix
../../modules/nixos/gaming
../../modules/nixos/audio
../../modules/nixos/networking
../../modules/nixos/fonts
../../modules/nixos/greeter
../../modules/nixos/core
../../overlays
catppuccin.nixosModules.catppuccin
lix-module.nixosModules.default
# lanzaboote.nixosModules.lanzaboote
home-manager.nixosModules.home-manager
{
config,
inputs,
pkgs,
lib,
...
}: {
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.backupFileExtension = "backup";
home-manager.users.youwen = {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
./home-manager-extras
../../users/youwen/linux/laptop
../../users/youwen/linux/packages/x86_64
../../users/youwen/linux/programs
../../users/youwen/common/neovim
../../users/youwen/common
../../users/youwen/common/neofetch
inputs.catppuccin.homeManagerModules.catppuccin
inputs.nixvim.homeManagerModules.nixvim
];
# Bootloader.
boot.loader = {
efi.canTouchEfiVariables = true;
timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
systemd-boot = {
enable = true;
consoleMode = "auto";
};
};
# boot.lanzaboote = {
# enable = false;
# pkiBundle = "/etc/secureboot";
# };
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["*"];
settings = {
main = {
capslock = "esc";
leftalt = "leftcontrol";
leftcontrol = "leftalt";
};
};
};
};
};
boot.initrd.luks.devices."luks-52d1be6d-b32f-41e0-a6d7-2ff52599fe7c".device = "/dev/disk/by-uuid/52d1be6d-b32f-41e0-a6d7-2ff52599fe7c";
services.tlp.enable = true;
networking.hostName = "adrastea"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
prime = {
amdgpuBusId = "PCI:4:0:0";
nvidiaBusId = "PCI:1:0:0";
offload = {
enable = true;
enableOffloadCmd = true;
};
};
};
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
librewolf
gnumake
gcc
cachix
gnupg
openssh
python3
steam-run
# deps for neovim compilation
lua51Packages.lua
lua51Packages.luarocks
tree-sitter
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

File diff suppressed because it is too large Load diff

212
hosts/callisto/configuration.nix Executable file
View file

@ -0,0 +1,212 @@
# 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.
./hardware-configuration.nix
# ./apple-silicon-support
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
hardware.asahi = {
peripheralFirmwareDirectory = ./firmware;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
};
boot.extraModprobeConfig = ''
options hid_apple iso_layout=0
'';
boot.kernelParams = ["apple_dcp.show_notch=1"];
networking.hostName = "callisto"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
nixpkgs.overlays = [
inputs.apple-silicon.overlays.apple-silicon-overlay
(final: prev: {
hyprland = prev.hyprland.overrideAttrs (oldAttrs: {
src = oldAttrs.src;
patches =
oldAttrs.patches
or []
++ [
./asahi-fix.patch
];
});
})
];
programs.light.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
# networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["*"];
settings = {
main = {
capslock = "esc";
leftmeta = "leftcontrol";
leftalt = "leftmeta";
leftcontrol = "leftalt";
rightmeta = "leftalt";
rightalt = "layer(rightalt)";
};
rightalt = {
i = "up";
j = "left";
k = "down";
l = "right";
};
};
};
};
};
services.tlp.enable = true;
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
# programs.hyprland.package = inputs.stablepkgs.legacyPackages.${pkgs.stdenv.hostPlatform.system}.hyprland;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
}

219
hosts/callisto/default.nix Executable file → Normal file
View file

@ -1,198 +1,41 @@
# 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,
system,
...
}: {
imports = with inputs; [
./configuration.nix
../../modules/nixos/audio
../../modules/nixos/networking
../../modules/nixos/fonts
../../modules/nixos/greeter
../../modules/nixos/core
../../overlays
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.extraSpecialArgs = {
inherit inputs;
inherit system;
};
home-manager.users.youwen = {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
# ./apple-silicon-support
../../users/youwen/common
../../users/youwen/common/neofetch/asahi-only.nix
../../users/youwen/linux/laptop
../../users/youwen/linux/packages/aarch-64
../../users/youwen/common/neovim
inputs.catppuccin.homeManagerModules.catppuccin
inputs.nixvim.homeManagerModules.nixvim
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = false;
hardware.asahi = {
peripheralFirmwareDirectory = ./firmware;
useExperimentalGPUDriver = true;
experimentalGPUInstallMode = "overlay";
};
boot.extraModprobeConfig = ''
options hid_apple iso_layout=0
'';
boot.kernelParams = ["apple_dcp.show_notch=1"];
networking.hostName = "callisto"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.wireless.iwd = {
enable = true;
settings.General.EnableNetworkConfiguration = true;
};
nixpkgs.overlays = [inputs.apple-silicon.overlays.apple-silicon-overlay];
programs.light.enable = true;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
# networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
KERNEL=="macsmc-battery", SUBSYSTEM=="power_supply", ATTR{charge_control_end_threshold}="80", ATTR{charge_control_start_threshold}="70"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
services.keyd = {
enable = true;
keyboards = {
default = {
ids = ["*"];
settings = {
main = {
capslock = "esc";
leftmeta = "leftcontrol";
leftalt = "leftmeta";
leftcontrol = "leftalt";
rightmeta = "leftalt";
rightalt = "layer(rightalt)";
};
rightalt = {
i = "up";
j = "left";
k = "down";
l = "right";
};
};
};
};
};
services.tlp.enable = true;
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.11"; # Did you read the comment?
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
}

22
hosts/callisto/hardware-configuration.nix Executable file → Normal file
View file

@ -1,27 +1,27 @@
# 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, ... }:
{
config,
lib,
pkgs,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
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";
fileSystems."/" =
{ device = "/dev/mapper/crypted";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852F-07F1";
boot.initrd.luks.devices."crypted".device = "/dev/disk/by-uuid/f4c552be-a4c2-4ca0-aec6-ed692d78fe24";
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};

View file

@ -0,0 +1,39 @@
# 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")];
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";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/852F-07F1";
fsType = "vfat";
options = ["fmask=0022" "dmask=0022"];
};
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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.wlan0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
}

210
hosts/demeter/configuration.nix Executable file
View file

@ -0,0 +1,210 @@
# 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.
./hardware-configuration.nix
];
# Bootloader.
boot.loader = {
efi.canTouchEfiVariables = true;
timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
systemd-boot = {
enable = false;
consoleMode = "auto";
};
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
networking.hostName = "demeter"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
services.flatpak.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
librewolf
gnumake
gcc
cachix
gnupg
openssh
python3
steam-run
# deps for neovim compilation
lua51Packages.lua
lua51Packages.luarocks
tree-sitter
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

232
hosts/demeter/default.nix Executable file → Normal file
View file

@ -1,210 +1,42 @@
# 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,
system,
...
}: {
imports = with inputs; [
./configuration.nix
../../modules/nixos/gaming
../../modules/nixos/audio
../../modules/nixos/networking
../../modules/nixos/fonts
../../modules/nixos/greeter
../../modules/nixos/core
../../overlays
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.extraSpecialArgs = {
inherit inputs;
inherit system;
};
home-manager.users.youwen = {
imports = [
# Include the results of the hardware scan.
./hardware-configuration.nix
../../users/youwen/linux/desktop
../../users/youwen/linux/packages/x86_64
../../users/youwen/linux/programs
../../users/youwen/common/neofetch
../../users/youwen/common/neovim
../../users/youwen/common
catppuccin.homeManagerModules.catppuccin
nixvim.homeManagerModules.nixvim
];
# Bootloader.
boot.loader = {
efi.canTouchEfiVariables = true;
timeout = 15;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
systemd-boot = {
enable = false;
consoleMode = "auto";
};
};
boot.lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
boot.initrd.luks.devices."luks-af320a0f-b388-43f5-b5a3-af2b47cfc716".device = "/dev/disk/by-uuid/af320a0f-b388-43f5-b5a3-af2b47cfc716";
networking.hostName = "demeter"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
# select kernel
boot.kernelPackages = pkgs.linuxPackages_zen;
# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
# Enable networking
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/Los_Angeles";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
systemd.services = {NetworkManager-wait-online.enable = false;};
# Enable the X11 windowing system.
# You can disable this if you're only using the Wayland session.
services.xserver.enable = false;
programs.nix-ld = {
enable = true;
libraries = with pkgs; [icu xorg.libXtst xorg.libXi];
};
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
open = false;
nvidiaSettings = true;
};
hardware.bluetooth = {
enable = true;
powerOnBoot = true;
};
services.blueman.enable = true;
hardware.graphics.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
services.xserver.videoDrivers = ["nvidia"];
services.flatpak.enable = true;
# services.desktopManager.plasma6.enable = true;
# Configure keymap in X11
services.xserver = {
xkb.layout = "us";
xkb.variant = "";
};
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.youwen = {
isNormalUser = true;
description = "Youwen Wu";
extraGroups = ["networkmanager" "wheel" "nixos" "realtime"];
};
users.groups.realtime = {};
nix.settings = {
trusted-users = ["root" "youwen"];
experimental-features = ["nix-command" "flakes"];
};
services.udev.extraRules = ''
KERNEL=="cpu_dma_latency", GROUP="realtime"
'';
security.pam.loginLimits = [
{
domain = "@realtime";
type = "-";
item = "rtprio";
value = 98;
}
{
domain = "@realtime";
type = "-";
item = "memlock";
value = "unlimited";
}
{
domain = "@realtime";
type = "-";
item = "nice";
value = -11;
}
];
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
git
curl
librewolf
gnumake
gcc
cachix
gnupg
openssh
python3
steam-run
# deps for neovim compilation
lua51Packages.lua
lua51Packages.luarocks
tree-sitter
];
environment.variables = {
EDITOR = "nvim";
NIX_AUTO_RUN = 1;
};
# tells electron apps to use Wayland
environment.sessionVariables.NIXOS_OZONE_WL = "1";
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
programs.dconf.enable = true;
programs.hyprland.enable = true;
programs.zsh.enable = false;
programs.fish.enable = true;
users.users.youwen.shell = pkgs.fish;
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. Its perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "24.05"; # Did you read the comment?
}

View file

@ -1,39 +0,0 @@
# 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") ];
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/2616d86c-aac2-4780-9527-7b11192e783f";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/B826-E14B";
fsType = "vfat";
options = [ "fmask=0022" "dmask=0022" ];
};
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
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.enp6s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlo1.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode =
lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View file

57
hosts/phobos/configuration.nix Executable file
View file

@ -0,0 +1,57 @@
{
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; [];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.config.allowUnfree = true;
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
programs.bash.enable = true;
system.configurationRevision =
config.self.rev or config.self.dirtyRev or null;
nixpkgs.hostPlatform = "aarch64-darwin";
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
users.users.youwen = {
home = "/Users/youwen";
description = "Youwen Wu";
shell = pkgs.fish;
};
security.pam.enableSudoTouchIdAuth = true;
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override {fonts = ["CascadiaCode"];})
(google-fonts.override {fonts = ["Lora"];})
];
};
}

73
hosts/phobos/default.nix Executable file → Normal file
View file

@ -1,57 +1,22 @@
{inputs, ...}: {
imports = with inputs; [
./configuration.nix
home-manager.darwinModules.home-manager
{
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; [];
# Use a custom configuration.nix location.
# $ darwin-rebuild switch -I darwin-config=$HOME/.config/nixpkgs/darwin/configuration.nix
# environment.darwinConfig = "$HOME/.config/nixpkgs/darwin/configuration.nix";
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# nix.package = pkgs.nix;
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.config.allowUnfree = true;
# Create /etc/zshrc that loads the nix-darwin environment.
programs.zsh.enable = true; # default shell on catalina
programs.fish.enable = true;
programs.bash.enable = true;
system.configurationRevision =
config.self.rev or config.self.dirtyRev or null;
nixpkgs.hostPlatform = "aarch64-darwin";
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
users.users.youwen = {
home = "/Users/youwen";
description = "Youwen Wu";
shell = pkgs.fish;
};
security.pam.enableSudoTouchIdAuth = true;
fonts = {
packages = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
(nerdfonts.override {fonts = ["CascadiaCode"];})
(google-fonts.override {fonts = ["Lora"];})
extraSpecialArgs = {inherit inputs;};
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
../../users/youwen/common/neovim
];
home-manager.backupFileExtension = "backup";
}
nix-homebrew.darwinModules.nix-homebrew
../../modules/darwin/homebrew.nix
../../modules/darwin/yabai.nix
../../modules/darwin/skhd.nix
];
};
}

View file

@ -1,6 +1,12 @@
{pkgs, ...}: {
{
pkgs,
inputs,
system,
...
}: {
wayland.windowManager.hyprland = {
enable = true;
# package = inputs.stablepkgs.legacyPackages.${system}.hyprland;
settings = {
exec-once = ["waypaper --restore"];
"$mod" = "SUPER";
@ -198,7 +204,6 @@
"col.inactive_border" = "rgba(b4befecc) rgba(6c7086cc) 45deg";
layout = "dwindle";
resize_on_border = "true";
sensitivity = "0.5";
};
misc = {
@ -224,6 +229,9 @@
special = true;
};
};
input = {
sensitivity = "0.5";
};
};
};

View file

@ -7,7 +7,7 @@
tap-to-click = false;
scroll_factor = 0.5;
};
wayland.windowManager.hyprland.settings.general.sensitivity = lib.mkForce 1.0;
wayland.windowManager.hyprland.settings.input.sensitivity = lib.mkForce 1.0;
wayland.windowManager.hyprland.settings.env = [
"HYPRCURSOR_THEME,Bibata-Modern-Ice"
"HYPRCURSOR_SIZE,24"

View file

@ -36,7 +36,7 @@ with pkgs; [
# desktop apps
dolphin
thunderbird
vesktop
# vesktop
signal-desktop
gcc

View file

@ -12,11 +12,13 @@
background_opacity = "0.8";
allow_remote_control = "socket-only";
listen_on = "unix:/tmp/kitty";
action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
# action_alias = "kitty_scrollback_nvim kitten /home/youwen/.local/share/nvim/lazy/kitty-scrollback.nvim/python/kitty_scrollback_nvim.py";
scrollback_pager = ''nvim --noplugin -c "set signcolumn=no showtabline=0" -c "silent write! /tmp/kitty_scrollback_buffer | te cat /tmp/kitty_scrollback_buffer - "'';
};
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";
"kitty_mod+h" = "show_scrollback";
};
};