Tweaks re: apple-silicon limitations and compilation failures

This commit is contained in:
Natsu Kagami 2023-04-04 20:28:28 +02:00
parent 530802c0ee
commit f21f4ed2d1
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
6 changed files with 16 additions and 23 deletions

View file

@ -346,7 +346,7 @@
"nixos-m1": {
"inputs": {
"nixpkgs": [
"nixpkgs"
"nixpkgs-unstable"
],
"rust-overlay": "rust-overlay_2"
},
@ -398,15 +398,15 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1680182246,
"narHash": "sha256-2WEHGApYCVt7bCm/0Ws8qYnp5Jn0mRgZ91tkoN+HrcY=",
"owner": "nixos",
"lastModified": 1680453898,
"narHash": "sha256-5M01OQJjVZVTmQTgpXvANosiMqb8Lx9FiThUDNyEtJc=",
"owner": "natsukagami",
"repo": "nixpkgs",
"rev": "b7fc729117a70d0df9e9adfc624662148e32ca0a",
"rev": "551febe6174165d9df7941130677698e3f1831aa",
"type": "github"
},
"original": {
"owner": "nixos",
"owner": "natsukagami",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"

View file

@ -3,7 +3,8 @@
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
nixpkgs-unstable.url = "github:natsukagami/nixpkgs/nixpkgs-unstable";
# nixpkgs-unstable.follows = "nixos-m1/nixpkgs";
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs-unstable";
home-manager.url = "github:natsukagami/home-manager/release-22.11";
@ -41,7 +42,7 @@
kak-lsp.url = github:natsukagami/kak-lsp/show-message-request;
kak-lsp.flake = false;
nixos-m1.url = github:tpwrules/nixos-apple-silicon;
nixos-m1.inputs.nixpkgs.follows = "nixpkgs";
nixos-m1.inputs.nixpkgs.follows = "nixpkgs-unstable";
# ---
# DEPLOYMENT ONLY! secrets
@ -156,8 +157,8 @@
];
};
# macbook nixos
nixosConfigurations."kagami-air-m1" = nixpkgs.lib.nixosSystem rec {
pkgs = pkgs' system;
nixosConfigurations."kagami-air-m1" = nixpkgs-unstable.lib.nixosSystem rec {
pkgs = pkgs-unstable system;
system = "aarch64-linux";
modules = [
./common.nix
@ -165,7 +166,7 @@
inputs.nixos-m1.nixosModules.apple-silicon-support
./kagami-air-m1/configuration.nix
nixpkgsAsRegistry
home-manager.nixosModules.home-manager
inputs.home-manager-unstable.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;

View file

@ -30,7 +30,7 @@ in
# More packages
home.packages = (with pkgs; [
# CLI stuff
python
python3
zip
# TeX
texlive.combined.scheme-full

View file

@ -18,7 +18,7 @@
# More packages
home.packages = (with pkgs; [
# CLI stuff
python
python3
zip
# TeX
texlive.combined.scheme-full

View file

@ -30,14 +30,6 @@
{ device = "/swap"; size = 16 * 1024; }
];
# 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;
# nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand";
# high-resolution display
hardware.video.hidpi.enable = lib.mkDefault true;
}

View file

@ -76,7 +76,7 @@ in
config = mkIf cfg.enable {
## Boot Configuration
# Set kernel version to latest
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelPackages = mkDefault pkgs.linuxPackages_latest;
# Use the systemd-boot EFI boot loader.
boot = {
plymouth.enable = true;
@ -85,7 +85,7 @@ in
loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "ntfs" ];
};
boot.initrd.systemd.enable = true;
boot.initrd.systemd.enable = builtins.length (builtins.attrNames (cfg.luksDevices)) > 0;
# LUKS devices
boot.initrd.luks.devices = builtins.mapAttrs
(name: path: {