support aarch64-linux shells
Some checks failed
use nix / build (push) Failing after 3m13s

This commit is contained in:
Cyryl Płotnicki 2024-04-21 18:17:38 +01:00
parent ae6ea8fe04
commit 83c99fde4b

View file

@ -1,10 +1,26 @@
{ {
description = "NixOS configuration with flakes"; description = "NixOS configuration with flakes";
outputs = { alejandra, cryptpad, darwin, disko, endless-sky, flake-compat outputs = {
, flake-utils, helix, home-manager, nil, nix-ld, nixos-hardware alejandra,
, nixpkgs-master, nixpkgs-nixos-unstable, nixpkgs-rust-analyzer cryptpad,
, nixpkgs-stable, nur, self, sops, }@inputs: darwin,
let disko,
endless-sky,
flake-compat,
flake-utils,
helix,
home-manager,
nil,
nix-ld,
nixos-hardware,
nixpkgs-master,
nixpkgs-nixos-unstable,
nixpkgs-rust-analyzer,
nixpkgs-stable,
nur,
self,
sops,
} @ inputs: let
mkServer = pkgs: system: hostname: mkServer = pkgs: system: hostname:
pkgs.lib.nixosSystem { pkgs.lib.nixosSystem {
inherit system; inherit system;
@ -23,8 +39,7 @@
mkRaspi = pkgs: hostname: mkRaspi = pkgs: hostname:
pkgs.lib.nixosSystem { pkgs.lib.nixosSystem {
system = "aarch64-linux"; system = "aarch64-linux";
modules = modules = [(./. + "/nixos/boxes/${hostname}") sops.nixosModules.sops];
[ (./. + "/nixos/boxes/${hostname}") sops.nixosModules.sops ];
specialArgs = {inherit inputs;}; specialArgs = {inherit inputs;};
}; };
mkKiosk = pkgs: system: hostname: mkKiosk = pkgs: system: hostname:
@ -40,8 +55,7 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { home-manager.users.cyryl = {
imports = imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system; _module.args.system = system;
}; };
@ -75,8 +89,7 @@
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true; home-manager.useUserPackages = true;
home-manager.users.cyryl = { home-manager.users.cyryl = {
imports = imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
_module.args.inputs = inputs; _module.args.inputs = inputs;
_module.args.system = system; _module.args.system = system;
}; };
@ -96,9 +109,10 @@
}; };
}; };
}; };
mkShell = packageSet: system: mkShell = packageSet: system: let
let pkgs = packageSet.legacyPackages.${system}; pkgs = packageSet.legacyPackages.${system};
in pkgs.mkShell { in
pkgs.mkShell {
packages = with pkgs; [ packages = with pkgs; [
inputs.alejandra.defaultPackage.${system} inputs.alejandra.defaultPackage.${system}
cacert cacert
@ -115,6 +129,7 @@
devShells = { devShells = {
"x86_64-darwin".default = mkShell nixpkgs-stable "x86_64-darwin"; "x86_64-darwin".default = mkShell nixpkgs-stable "x86_64-darwin";
"x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux"; "x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux";
"aarch64-linux".default = mkShell nixpkgs-stable "aarch64-linux";
}; };
darwinConfigurations = { darwinConfigurations = {
"FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec { "FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
@ -164,8 +179,7 @@
(import (import
"${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix") "${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
{ {
environment.systemPackages = environment.systemPackages = with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
neovim neovim
htop htop
btop btop