asahi
This commit is contained in:
parent
122f80c49b
commit
320faef2a6
13 changed files with 325 additions and 689 deletions
260
systems/aarch64-linux/canis-nixos/default.nix
Normal file
260
systems/aarch64-linux/canis-nixos/default.nix
Normal file
|
@ -0,0 +1,260 @@
|
|||
{
|
||||
pkgs,
|
||||
config,
|
||||
inputs,
|
||||
lib,
|
||||
...
|
||||
}:
|
||||
with lib // pkgs // inputs; {
|
||||
imports = [
|
||||
./hardware.nix
|
||||
];
|
||||
|
||||
security = {
|
||||
rtkit.enable = true;
|
||||
|
||||
pam.loginLimits = [
|
||||
{
|
||||
domain = "*";
|
||||
item = "nofile";
|
||||
type = "-";
|
||||
value = "32768";
|
||||
}
|
||||
{
|
||||
domain = "*";
|
||||
item = "memlock";
|
||||
type = "-";
|
||||
value = "32768";
|
||||
}
|
||||
];
|
||||
|
||||
sudo.extraConfig = ''
|
||||
Defaults lecture = never, pwfeedback
|
||||
'';
|
||||
};
|
||||
|
||||
console.catppuccin.enable = true;
|
||||
|
||||
systemd.user.extraConfig = let
|
||||
path = lib.concatStringsSep ":" [
|
||||
"/run/wrappers/bin"
|
||||
"/etc/profiles/per-user/%u/bin"
|
||||
"/nix/var/nix/profiles/default/bin"
|
||||
"/run/current-system/sw/bin"
|
||||
];
|
||||
in ''
|
||||
DefaultEnvironment="PATH=${path}"
|
||||
'';
|
||||
|
||||
virtualisation.podman = {
|
||||
enable = true;
|
||||
dockerCompat = true;
|
||||
dockerSocket.enable = true;
|
||||
};
|
||||
|
||||
environment = {
|
||||
sessionVariables = {
|
||||
BROWSER = "firefox";
|
||||
EDITOR = "nvim";
|
||||
TERMINAL = "wezterm";
|
||||
DIRENV_WARN_TIMEOUT = "100s";
|
||||
NIXOS_OZONE_WL = "1";
|
||||
};
|
||||
|
||||
systemPackages = [
|
||||
gnome.nautilus
|
||||
internal.lightly-boehs-qt6
|
||||
snowfallorg.flake
|
||||
sound-theme-freedesktop
|
||||
xclip
|
||||
yt-dlp
|
||||
];
|
||||
};
|
||||
|
||||
boot = {
|
||||
supportedFilesystems = ["btrfs" "ntfs"];
|
||||
|
||||
plymouth = {
|
||||
enable = true;
|
||||
catppuccin.enable = true;
|
||||
};
|
||||
|
||||
extraModprobeConfig = "options apple_dcp show_notch=1";
|
||||
|
||||
loader = {
|
||||
efi.canTouchEfiVariables = false;
|
||||
|
||||
systemd-boot = {
|
||||
enable = true;
|
||||
configurationLimit = 20;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
nix = let
|
||||
mappedRegistry = pipe inputs [
|
||||
(filterAttrs (_: isType "flake"))
|
||||
(mapAttrs (_: flake: {inherit flake;}))
|
||||
(x: x // {nixpkgs.flake = nixpkgs;})
|
||||
];
|
||||
in {
|
||||
package = mkForce nixSuper;
|
||||
registry = mappedRegistry // optionalAttrs (config.nix.package == nixSuper) {default = mappedRegistry.nixpkgs;};
|
||||
nixPath = mapAttrsToList (key: _: "${key}=flake:${key}") config.nix.registry;
|
||||
|
||||
daemonCPUSchedPolicy = "batch";
|
||||
daemonIOSchedClass = "idle";
|
||||
daemonIOSchedPriority = 7;
|
||||
|
||||
gc = {
|
||||
automatic = true;
|
||||
dates = "Sat *-*-* 03:00";
|
||||
options = "--delete-older-than 30d";
|
||||
};
|
||||
|
||||
optimise = {
|
||||
automatic = true;
|
||||
dates = ["04:00"];
|
||||
};
|
||||
|
||||
settings = {
|
||||
auto-optimise-store = true;
|
||||
builders-use-substitutes = true;
|
||||
flake-registry = "/etc/nix/registry.json";
|
||||
keep-going = true;
|
||||
log-lines = 30;
|
||||
max-jobs = "auto";
|
||||
sandbox-fallback = false;
|
||||
sandbox = true;
|
||||
system-features = ["nixos-test" "kvm" "recursive-nix" "big-parallel"];
|
||||
use-cgroups = true;
|
||||
use-xdg-base-directories = true;
|
||||
warn-dirty = false;
|
||||
|
||||
allowed-users = ["root" "@wheel" "nix-builder"];
|
||||
trusted-users = ["root" "@wheel" "nix-builder"];
|
||||
|
||||
min-free = "${toString (5 * 1024 * 1024 * 1024)}";
|
||||
max-free = "${toString (10 * 1024 * 1024 * 1024)}";
|
||||
|
||||
extra-experimental-features = [
|
||||
"flakes" # flakes
|
||||
"nix-command" # experimental nix commands
|
||||
"recursive-nix" # let nix invoke itself
|
||||
"ca-derivations" # content addressed nix
|
||||
"auto-allocate-uids" # allow nix to automatically pick UIDs, rather than creating nixbld* user accounts
|
||||
"cgroups" # allow nix to execute builds inside cgroups
|
||||
];
|
||||
|
||||
substituters = [
|
||||
"https://cache.nixos.org"
|
||||
"https://cache.privatevoid.net"
|
||||
"https://cuda-maintainers.cachix.org"
|
||||
"https://hyprland.cachix.org"
|
||||
"https://nix-community.cachix.org"
|
||||
"https://nyx.chaotic.cx/"
|
||||
];
|
||||
|
||||
trusted-public-keys = [
|
||||
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
||||
"cache.privatevoid.net:SErQ8bvNWANeAvtsOESUwVYr2VJynfuc9JRwlzTTkVg="
|
||||
"chaotic-nyx.cachix.org-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
||||
"cuda-maintainers.cachix.org-1:0dq3bujKpuEPMCX6U4WylrUDZ9JyUG0VpVZa7CNfq5E="
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
||||
"nyx.chaotic.cx-1:HfnXSw4pj95iI/n17rIDy40agHj12WfF+Gqk6SonIT8="
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
programs = {
|
||||
dconf.enable = true;
|
||||
fish.enable = true;
|
||||
gamemode.enable = true;
|
||||
steam.enable = false;
|
||||
gnupg.agent.enable = true;
|
||||
|
||||
hyprland = {
|
||||
enable = true;
|
||||
package = inputs.hyprland.packages.${pkgs.system}.hyprland;
|
||||
};
|
||||
|
||||
nh = {
|
||||
enable = true;
|
||||
flake = "/home/marshall/nix-config";
|
||||
};
|
||||
};
|
||||
|
||||
networking = {
|
||||
useDHCP = mkDefault true;
|
||||
firewall.enable = false;
|
||||
nameservers = ["1.1.1.1" "1.0.0.1"];
|
||||
wireless.iwd = {
|
||||
enable = true;
|
||||
settings.General.EnableNetworkConfiguration = true;
|
||||
};
|
||||
};
|
||||
|
||||
time.timeZone = "America/New_York";
|
||||
|
||||
services = {
|
||||
btrfs.autoScrub.enable = true;
|
||||
flatpak.enable = true;
|
||||
getty.autologinUser = "marshall";
|
||||
gnome.gnome-keyring.enable = true;
|
||||
openssh.enable = true;
|
||||
|
||||
greetd = {
|
||||
enable = true;
|
||||
settings = rec {
|
||||
initial_session = {
|
||||
command = "${pkgs.hyprland}/bin/Hyprland";
|
||||
user = "marshall";
|
||||
};
|
||||
|
||||
default_session = initial_session;
|
||||
};
|
||||
};
|
||||
|
||||
libinput = {
|
||||
enable = true;
|
||||
touchpad.naturalScrolling = true;
|
||||
};
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
};
|
||||
|
||||
pipewire = {
|
||||
enable = true;
|
||||
alsa.enable = true;
|
||||
alsa.support32Bit = true;
|
||||
pulse.enable = true;
|
||||
};
|
||||
};
|
||||
|
||||
users = {
|
||||
users.marshall = {
|
||||
isNormalUser = true;
|
||||
extraGroups = ["wheel" "gamemode" "libvirtd" "networkmanager"];
|
||||
shell = fish;
|
||||
};
|
||||
};
|
||||
|
||||
hardware = {
|
||||
asahi = {
|
||||
peripheralFirmwareDirectory = ./firmware;
|
||||
useExperimentalGPUDriver = true;
|
||||
};
|
||||
|
||||
bluetooth.enable = true;
|
||||
i2c.enable = true;
|
||||
|
||||
opengl = {
|
||||
enable = true;
|
||||
driSupport = true;
|
||||
};
|
||||
};
|
||||
|
||||
system.stateVersion = "24.05";
|
||||
}
|
BIN
systems/aarch64-linux/canis-nixos/firmware/all_firmware.tar.gz
Executable file
BIN
systems/aarch64-linux/canis-nixos/firmware/all_firmware.tar.gz
Executable file
Binary file not shown.
BIN
systems/aarch64-linux/canis-nixos/firmware/kernelcache.release.mac14g
Executable file
BIN
systems/aarch64-linux/canis-nixos/firmware/kernelcache.release.mac14g
Executable file
Binary file not shown.
54
systems/aarch64-linux/canis-nixos/hardware.nix
Normal file
54
systems/aarch64-linux/canis-nixos/hardware.nix
Normal file
|
@ -0,0 +1,54 @@
|
|||
# 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.
|
||||
{
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [
|
||||
(modulesPath + "/installer/scan/not-detected.nix")
|
||||
];
|
||||
|
||||
powerManagement.cpuFreqGovernor = "conservative";
|
||||
|
||||
boot.initrd.availableKernelModules = ["usb_storage"];
|
||||
boot.initrd.kernelModules = [];
|
||||
boot.kernelModules = [];
|
||||
boot.extraModulePackages = [];
|
||||
|
||||
fileSystems."/" = {
|
||||
device = "/dev/disk/by-uuid/bc2d65bb-2316-404d-aff4-cba0cca8f6b5";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=root"];
|
||||
};
|
||||
|
||||
fileSystems."/home" = {
|
||||
device = "/dev/disk/by-uuid/bc2d65bb-2316-404d-aff4-cba0cca8f6b5";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=home"];
|
||||
};
|
||||
|
||||
fileSystems."/nix" = {
|
||||
device = "/dev/disk/by-uuid/bc2d65bb-2316-404d-aff4-cba0cca8f6b5";
|
||||
fsType = "btrfs";
|
||||
options = ["subvol=nix"];
|
||||
};
|
||||
|
||||
fileSystems."/boot" = {
|
||||
device = "/dev/disk/by-uuid/23FC-1D19";
|
||||
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";
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue