Make m1-linux run again!
This commit is contained in:
parent
7684299ddc
commit
b8e1b46b5c
77
flake.lock
77
flake.lock
|
@ -4,9 +4,7 @@
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat",
|
"flake-compat": "flake-compat",
|
||||||
"flake-utils": "flake-utils",
|
"flake-utils": "flake-utils",
|
||||||
"nixpkgs": [
|
"nixpkgs": "nixpkgs",
|
||||||
"nixpkgs-unstable"
|
|
||||||
],
|
|
||||||
"rust-overlay": "rust-overlay"
|
"rust-overlay": "rust-overlay"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -47,7 +45,7 @@
|
||||||
"deploy-rs": {
|
"deploy-rs": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-compat": "flake-compat_2",
|
"flake-compat": "flake-compat_2",
|
||||||
"nixpkgs": "nixpkgs",
|
"nixpkgs": "nixpkgs_2",
|
||||||
"utils": "utils"
|
"utils": "utils"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -254,7 +252,7 @@
|
||||||
},
|
},
|
||||||
"nix-gaming": {
|
"nix-gaming": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": "nixpkgs_2"
|
"nixpkgs": "nixpkgs_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676147016,
|
"lastModified": 1676147016,
|
||||||
|
@ -271,28 +269,33 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixos-m1": {
|
"nixos-m1": {
|
||||||
"flake": false,
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
],
|
||||||
|
"rust-overlay": "rust-overlay_2"
|
||||||
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675215747,
|
"lastModified": 1677216540,
|
||||||
"narHash": "sha256-O7vwx67l2PNnkNpPXnp7D0oBW+OfFetxdrlwUtaweY4=",
|
"narHash": "sha256-t7vsvKalN24LUrIABHk3OlzpXhrTfS40AdP6whv3C9I=",
|
||||||
"owner": "tpwrules",
|
"owner": "tpwrules",
|
||||||
"repo": "nixos-m1",
|
"repo": "nixos-apple-silicon",
|
||||||
"rev": "0086dd0e401f9dde826e6c170d312a87564aa6a4",
|
"rev": "e79177006306ae592bc865b03667af4229620461",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "tpwrules",
|
"owner": "tpwrules",
|
||||||
"repo": "nixos-m1",
|
"repo": "nixos-apple-silicon",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1671417167,
|
"lastModified": 1677262115,
|
||||||
"narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
|
"narHash": "sha256-DPkHiJw2QnKYAzQXBlwelwghxbcD5oigK2kLPHMpMQ8=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
|
"rev": "806075be2bdde71895359ed18cb530c4d323e6f6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -350,6 +353,22 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_2": {
|
"nixpkgs_2": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1671417167,
|
||||||
|
"narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"ref": "nixpkgs-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs_3": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1675614288,
|
"lastModified": 1675614288,
|
||||||
"narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=",
|
"narHash": "sha256-i3Rc/ENnz62BcrSloeVmAyPicEh4WsrEEYR+INs9TYw=",
|
||||||
|
@ -365,13 +384,13 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_3": {
|
"nixpkgs_4": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1676177817,
|
"lastModified": 1677179781,
|
||||||
"narHash": "sha256-OQnBnuKkpwkfNY31xQyfU5hNpLs1ilWt+hVY6ztEEOM=",
|
"narHash": "sha256-+peLp16ruWLuTFHo0ZUbLlS1/meS/+RsWQQ9bUAzOh8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "1b82144edfcd0c86486d2e07c7298f85510e7fb8",
|
"rev": "50c23cd4ff6c8344e0b4d438b027b3afabfe58dd",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -381,7 +400,7 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"nixpkgs_4": {
|
"nixpkgs_5": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1656753965,
|
"lastModified": 1656753965,
|
||||||
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
"narHash": "sha256-BCrB3l0qpJokOnIVc3g2lHiGhnjUi0MoXiw6t1o8H1E=",
|
||||||
|
@ -415,7 +434,7 @@
|
||||||
"rnix-lsp": {
|
"rnix-lsp": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"naersk": "naersk",
|
"naersk": "naersk",
|
||||||
"nixpkgs": "nixpkgs_4",
|
"nixpkgs": "nixpkgs_5",
|
||||||
"utils": "utils_3"
|
"utils": "utils_3"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
|
@ -443,7 +462,7 @@
|
||||||
"kakoune": "kakoune",
|
"kakoune": "kakoune",
|
||||||
"nix-gaming": "nix-gaming",
|
"nix-gaming": "nix-gaming",
|
||||||
"nixos-m1": "nixos-m1",
|
"nixos-m1": "nixos-m1",
|
||||||
"nixpkgs": "nixpkgs_3",
|
"nixpkgs": "nixpkgs_4",
|
||||||
"nixpkgs-unstable": "nixpkgs-unstable",
|
"nixpkgs-unstable": "nixpkgs-unstable",
|
||||||
"nur": "nur",
|
"nur": "nur",
|
||||||
"rnix-lsp": "rnix-lsp",
|
"rnix-lsp": "rnix-lsp",
|
||||||
|
@ -477,6 +496,22 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"rust-overlay_2": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677292251,
|
||||||
|
"narHash": "sha256-D+6q5Z2MQn3UFJtqsM5/AvVHi3NXKZTIMZt1JGq/spA=",
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"rev": "34cdbf6ad480ce13a6a526f57d8b9e609f3d65dc",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "oxalica",
|
||||||
|
"repo": "rust-overlay",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"secrets": {
|
"secrets": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-utils": "flake-utils_3"
|
"flake-utils": "flake-utils_3"
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
# --- Build tools
|
# --- Build tools
|
||||||
flake-utils.url = github:numtide/flake-utils;
|
flake-utils.url = github:numtide/flake-utils;
|
||||||
crane.url = github:ipetkov/crane;
|
crane.url = github:ipetkov/crane;
|
||||||
crane.inputs.nixpkgs.follows = "nixpkgs-unstable";
|
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# Imported apps
|
# Imported apps
|
||||||
|
@ -31,8 +30,8 @@
|
||||||
kakoune.flake = false;
|
kakoune.flake = false;
|
||||||
kak-lsp.url = github:kak-lsp/kak-lsp;
|
kak-lsp.url = github:kak-lsp/kak-lsp;
|
||||||
kak-lsp.flake = false;
|
kak-lsp.flake = false;
|
||||||
nixos-m1.url = github:tpwrules/nixos-m1;
|
nixos-m1.url = github:tpwrules/nixos-apple-silicon;
|
||||||
nixos-m1.flake = false;
|
nixos-m1.inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
|
||||||
# ---
|
# ---
|
||||||
# DEPLOYMENT ONLY! secrets
|
# DEPLOYMENT ONLY! secrets
|
||||||
|
@ -149,7 +148,7 @@
|
||||||
modules = [
|
modules = [
|
||||||
./modules/my-tinc
|
./modules/my-tinc
|
||||||
sops-nix.nixosModules.sops
|
sops-nix.nixosModules.sops
|
||||||
"${inputs.nixos-m1}/nix/m1-support"
|
inputs.nixos-m1.nixosModules.apple-silicon-support
|
||||||
./kagami-air-m1/configuration.nix
|
./kagami-air-m1/configuration.nix
|
||||||
nixpkgsAsRegistry
|
nixpkgsAsRegistry
|
||||||
home-manager.nixosModules.home-manager
|
home-manager.nixosModules.home-manager
|
||||||
|
|
|
@ -1,16 +1,5 @@
|
||||||
{ config, pkgs, lib, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
|
||||||
fd =
|
|
||||||
if pkgs.stdenv.isAarch64 && pkgs.stdenv.isLinux then
|
|
||||||
pkgs.fd.overrideAttrs
|
|
||||||
(attrs:
|
|
||||||
{
|
|
||||||
preBuild = ''
|
|
||||||
export JEMALLOC_SYS_WITH_LG_PAGE=16
|
|
||||||
'';
|
|
||||||
}) else pkgs.fd;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./kakoune/kak.nix
|
./kakoune/kak.nix
|
||||||
|
|
|
@ -35,8 +35,7 @@ let
|
||||||
src = pkgs.sources.kak-lsp;
|
src = pkgs.sources.kak-lsp;
|
||||||
buildInputs = (with pkgs;
|
buildInputs = (with pkgs;
|
||||||
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration CoreServices ])
|
||||||
) ++ (with pkgs; [ libiconv ]
|
) ++ (with pkgs; [ libiconv libgcc ]);
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
|
@ -56,7 +56,7 @@ in
|
||||||
programs.my-sway.discord = "${discord}/bin/discord";
|
programs.my-sway.discord = "${discord}/bin/discord";
|
||||||
# Keyboard options
|
# Keyboard options
|
||||||
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
wayland.windowManager.sway.config.input."type:keyboard".xkb_layout = "jp";
|
||||||
wayland.windowManager.sway.config.output."Unknown-1" = {
|
wayland.windowManager.sway.config.output."eDP-1" = {
|
||||||
mode = "2560x1600@60Hz";
|
mode = "2560x1600@60Hz";
|
||||||
scale = "1";
|
scale = "1";
|
||||||
subpixel = "vrgb";
|
subpixel = "vrgb";
|
||||||
|
|
|
@ -139,8 +139,11 @@ in
|
||||||
{ command = "${cfg.browser}"; }
|
{ command = "${cfg.browser}"; }
|
||||||
] ++ (if cfg.discord != null then [
|
] ++ (if cfg.discord != null then [
|
||||||
{ command = "${cfg.discord}"; }
|
{ command = "${cfg.discord}"; }
|
||||||
{ command = "${pkgs.premid}/bin/premid"; }
|
] ++ lib.lists.optional
|
||||||
] else [ ]);
|
(!pkgs.stdenv.isAarch64)
|
||||||
|
(
|
||||||
|
{ command = "${pkgs.premid}/bin/premid"; }
|
||||||
|
) else [ ]);
|
||||||
|
|
||||||
### Keybindings
|
### Keybindings
|
||||||
#
|
#
|
||||||
|
@ -642,3 +645,4 @@ in
|
||||||
font-awesome
|
font-awesome
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -20,18 +20,24 @@
|
||||||
boot.loader.systemd-boot.enable = true;
|
boot.loader.systemd-boot.enable = true;
|
||||||
boot.loader.efi.canTouchEfiVariables = false;
|
boot.loader.efi.canTouchEfiVariables = false;
|
||||||
boot.kernelPatches = [
|
boot.kernelPatches = [
|
||||||
{
|
# {
|
||||||
name = "enable-suspend";
|
# name = "enable-suspend";
|
||||||
patch = null;
|
# patch = null;
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
SUSPEND y
|
# SUSPEND y
|
||||||
'';
|
# '';
|
||||||
}
|
# }
|
||||||
];
|
];
|
||||||
|
|
||||||
# Asahi kernel configuration
|
# Asahi kernel configuration
|
||||||
hardware.asahi.peripheralFirmwareDirectory = ./firmware;
|
hardware.asahi = {
|
||||||
hardware.asahi.use4KPages = false;
|
peripheralFirmwareDirectory = ./firmware;
|
||||||
|
use4KPages = false;
|
||||||
|
withRust = true;
|
||||||
|
addEdgeKernelConfig = true;
|
||||||
|
useExperimentalGPUDriver = true;
|
||||||
|
experimentalGPUInstallMode = "overlay";
|
||||||
|
};
|
||||||
|
|
||||||
# Power Management
|
# Power Management
|
||||||
services.upower = {
|
services.upower = {
|
||||||
|
@ -60,13 +66,6 @@
|
||||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||||
|
|
||||||
# Select internationalisation properties.
|
|
||||||
nix = {
|
|
||||||
package = pkgs.nixFlakes;
|
|
||||||
extraOptions = ''
|
|
||||||
experimental-features = nix-command flakes
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
# Select internationalisation properties.
|
# Select internationalisation properties.
|
||||||
i18n.defaultLocale = "en_US.UTF-8";
|
i18n.defaultLocale = "en_US.UTF-8";
|
||||||
i18n.inputMethod.enabled = "ibus";
|
i18n.inputMethod.enabled = "ibus";
|
||||||
|
|
18
overlay.nix
18
overlay.nix
|
@ -20,6 +20,22 @@ let
|
||||||
overlay-libs = final: prev: {
|
overlay-libs = final: prev: {
|
||||||
libs.crane = inputs.crane.lib.${prev.system};
|
libs.crane = inputs.crane.lib.${prev.system};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
overlay-aarch64-linux = final: prev:
|
||||||
|
{
|
||||||
|
fd =
|
||||||
|
if prev.system == "aarch64-linux" then
|
||||||
|
prev.fd.overrideAttrs
|
||||||
|
(attrs:
|
||||||
|
{
|
||||||
|
preBuild = ''
|
||||||
|
export JEMALLOC_SYS_WITH_LG_PAGE=16
|
||||||
|
'';
|
||||||
|
}) else prev.fd;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
overlay-asahi = inputs.nixos-m1.overlays.default;
|
||||||
in
|
in
|
||||||
[
|
[
|
||||||
(import ./overlays/openrazer)
|
(import ./overlays/openrazer)
|
||||||
|
@ -28,6 +44,8 @@ in
|
||||||
overlay-imported
|
overlay-imported
|
||||||
overlay-versioning
|
overlay-versioning
|
||||||
overlay-libs
|
overlay-libs
|
||||||
|
overlay-asahi
|
||||||
|
overlay-aarch64-linux
|
||||||
nur.overlay
|
nur.overlay
|
||||||
|
|
||||||
# Bug fixes
|
# Bug fixes
|
||||||
|
|
Loading…
Reference in a new issue