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