2023-10-14 16:55:13 +02:00
|
|
|
{ self, nixpkgs, ... }@inputs:
|
|
|
|
rec {
|
2024-02-05 11:46:52 +01:00
|
|
|
defSystem =
|
|
|
|
system: systemConfig: deployConfig:
|
2023-10-14 16:55:13 +02:00
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
system = "${system}";
|
2024-02-05 11:46:52 +01:00
|
|
|
modules =
|
|
|
|
(systemModules system systemConfig)
|
|
|
|
++ (nixpkgs.lib.optional (deployConfig != null) { _module.args.nixinate = deployConfig; });
|
2023-10-14 16:55:13 +02:00
|
|
|
};
|
|
|
|
|
2024-02-05 11:46:52 +01:00
|
|
|
systemModules =
|
|
|
|
system: systemConfig:
|
|
|
|
builtins.attrValues self.nixosModules
|
|
|
|
++ [
|
2023-10-14 16:55:13 +02:00
|
|
|
{ _module.args.inputs = inputs; }
|
|
|
|
{ _module.args.self-overlay = self.overlays.default; }
|
|
|
|
|
|
|
|
{
|
|
|
|
nix.nixPath = [ "nixpkgs=${nixpkgs}" ];
|
2024-02-05 11:46:52 +01:00
|
|
|
nixpkgs = {
|
|
|
|
overlays =
|
|
|
|
[
|
2023-10-14 16:55:13 +02:00
|
|
|
self.overlays.default
|
2024-08-19 22:30:30 +02:00
|
|
|
inputs.rust-overlay.overlays.default
|
2023-10-14 16:55:13 +02:00
|
|
|
inputs.emacs-overlay.overlay
|
|
|
|
inputs.eww.overlays.default
|
2024-01-17 09:39:53 +01:00
|
|
|
inputs.nil.overlays.default
|
2024-12-03 20:02:13 +01:00
|
|
|
inputs.caddy-nix.overlays.default
|
2024-08-19 22:30:30 +02:00
|
|
|
inputs.ha-now-playing.overlays.${system}
|
|
|
|
inputs.pamedia.overlays.default
|
2024-02-05 11:46:52 +01:00
|
|
|
]
|
|
|
|
++ nixpkgs.lib.optional (system == "aarch64-linux") (
|
|
|
|
_final: super: { makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; }); }
|
|
|
|
);
|
2023-10-14 16:55:13 +02:00
|
|
|
|
2024-02-05 11:46:52 +01:00
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
2024-02-28 23:54:56 +01:00
|
|
|
firefox = {
|
|
|
|
speechSynthesisSupport = true;
|
|
|
|
ffmpegSupport = true;
|
|
|
|
pipewireSupport = true;
|
|
|
|
};
|
2023-10-14 16:55:13 +02:00
|
|
|
};
|
2024-02-05 11:46:52 +01:00
|
|
|
};
|
2023-10-14 16:55:13 +02:00
|
|
|
home-manager = {
|
|
|
|
useUserPackages = true;
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
};
|
|
|
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
|
|
nix.registry.nixpkgs.flake = nixpkgs;
|
|
|
|
}
|
|
|
|
|
|
|
|
systemConfig
|
|
|
|
inputs.home-manager.nixosModules.home-manager
|
|
|
|
|
|
|
|
inputs.sops.nixosModules.sops
|
|
|
|
];
|
|
|
|
}
|