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";
outputs = { alejandra, cryptpad, darwin, 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
outputs = {
alejandra,
cryptpad,
darwin,
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:
pkgs.lib.nixosSystem {
inherit system;
@ -13,19 +29,18 @@
(import ./nixos/server-common.nix)
sops.nixosModules.sops
disko.nixosModules.disko
({ pkgs, ... }: {
nixpkgs.overlays = [ inputs.cryptpad.overlays.default ];
({pkgs, ...}: {
nixpkgs.overlays = [inputs.cryptpad.overlays.default];
})
inputs.cryptpad.nixosModules.cryptpad
];
specialArgs = { inherit inputs system; };
specialArgs = {inherit inputs system;};
};
mkRaspi = pkgs: hostname:
pkgs.lib.nixosSystem {
system = "aarch64-linux";
modules =
[ (./. + "/nixos/boxes/${hostname}") sops.nixosModules.sops ];
specialArgs = { inherit inputs; };
modules = [(./. + "/nixos/boxes/${hostname}") sops.nixosModules.sops];
specialArgs = {inherit inputs;};
};
mkKiosk = pkgs: system: hostname:
pkgs.lib.nixosSystem {
@ -40,8 +55,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = {
imports =
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
_module.args.inputs = inputs;
_module.args.system = system;
};
@ -51,11 +65,11 @@
inherit inputs system;
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
inherit system;
config = { allowUnfree = true; };
config = {allowUnfree = true;};
};
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
inherit system;
config = { allowUnfree = true; };
config = {allowUnfree = true;};
};
};
};
@ -69,14 +83,13 @@
sops.nixosModules.sops
disko.nixosModules.disko
nix-ld.nixosModules.nix-ld
{ programs.nix-ld.dev.enable = true; }
{programs.nix-ld.dev.enable = true;}
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = {
imports =
[ ./nixos/home-manager ./nixos/home-manager/linux.nix ];
imports = [./nixos/home-manager ./nixos/home-manager/linux.nix];
_module.args.inputs = inputs;
_module.args.system = system;
};
@ -86,19 +99,20 @@
inherit inputs system;
nixpkgs-nixos-stable-and-unfree = import nixpkgs-stable {
inherit system;
config = { allowUnfree = true; };
config = {allowUnfree = true;};
};
nixpkgs-nixos-unstable =
import nixpkgs-nixos-unstable { inherit system; };
import nixpkgs-nixos-unstable {inherit system;};
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
inherit system;
config = { allowUnfree = true; };
config = {allowUnfree = true;};
};
};
};
mkShell = packageSet: system:
let pkgs = packageSet.legacyPackages.${system};
in pkgs.mkShell {
mkShell = packageSet: system: let
pkgs = packageSet.legacyPackages.${system};
in
pkgs.mkShell {
packages = with pkgs; [
inputs.alejandra.defaultPackage.${system}
cacert
@ -115,6 +129,7 @@
devShells = {
"x86_64-darwin".default = mkShell nixpkgs-stable "x86_64-darwin";
"x86_64-linux".default = mkShell nixpkgs-stable "x86_64-linux";
"aarch64-linux".default = mkShell nixpkgs-stable "aarch64-linux";
};
darwinConfigurations = {
"FORM3-CYRYLPLOTN" = darwin.lib.darwinSystem rec {
@ -126,7 +141,7 @@
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.cyryl = {
imports = [ ./nixos/home-manager ];
imports = [./nixos/home-manager];
_module.args.inputs = inputs;
_module.args.system = system;
};
@ -146,12 +161,12 @@
bootstrap = nixpkgs-stable.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [ (./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops ];
modules = [(./. + "/nixos/boxes/bootstrap") sops.nixosModules.sops];
specialArgs = {
inherit inputs system;
nixpkgs-nixos-unstable-and-unfree = import nixpkgs-nixos-unstable {
inherit system;
config = { allowUnfree = true; };
config = {allowUnfree = true;};
};
};
};
@ -164,8 +179,7 @@
(import
"${inputs.nixpkgs-stable}/nixos/modules/installer/sd-card/sd-image-aarch64-installer.nix")
{
environment.systemPackages =
with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
environment.systemPackages = with nixpkgs-nixos-unstable.legacyPackages."aarch64-linux"; [
neovim
htop
btop
@ -197,7 +211,7 @@
console.earlySetup = true;
}
];
specialArgs = { inherit inputs; };
specialArgs = {inherit inputs;};
};
};
};
@ -301,7 +315,7 @@
};
cryptpad = {
url = "github:michaelshmitty/cryptpad-flake";
inputs = { nixpkgs.follows = "nixpkgs-stable"; };
inputs = {nixpkgs.follows = "nixpkgs-stable";};
};
disko = {
url = "github:nix-community/disko";