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

View file

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

View file

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

View file

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

View file

@ -30,14 +30,6 @@
{ device = "/swap"; size = 16 * 1024; } { 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"; # nixpkgs.hostPlatform = lib.mkDefault "aarch64-linux";
powerManagement.cpuFreqGovernor = lib.mkDefault "ondemand"; 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 { config = mkIf cfg.enable {
## Boot Configuration ## Boot Configuration
# Set kernel version to latest # Set kernel version to latest
boot.kernelPackages = pkgs.linuxPackages_latest; boot.kernelPackages = mkDefault pkgs.linuxPackages_latest;
# Use the systemd-boot EFI boot loader. # Use the systemd-boot EFI boot loader.
boot = { boot = {
plymouth.enable = true; plymouth.enable = true;
@ -85,7 +85,7 @@ in
loader.efi.canTouchEfiVariables = true; loader.efi.canTouchEfiVariables = true;
supportedFilesystems = [ "ntfs" ]; supportedFilesystems = [ "ntfs" ];
}; };
boot.initrd.systemd.enable = true; boot.initrd.systemd.enable = builtins.length (builtins.attrNames (cfg.luksDevices)) > 0;
# LUKS devices # LUKS devices
boot.initrd.luks.devices = builtins.mapAttrs boot.initrd.luks.devices = builtins.mapAttrs
(name: path: { (name: path: {