nixos-config/lib/mkSystem.nix

63 lines
1.2 KiB
Nix
Raw Normal View History

{ inputs, config, lib, nur, emacs, ... }:
2021-11-04 16:19:50 +00:00
/*
TODO: Make these arguments unneccessary
Idea: Make miku.nix, mashu.nix, ... have the following structure
{
architecture: "x86_64-linux";
config = { ... }: {
# ...
};
}
*/
{
hostConfigFile
, architecture ? "x86_64-linux"
}: let
pkgs = inputs.nixpkgs;
config = pkgs.lib;
network = import ./network.nix;
util = import ./default.nix {
inherit inputs config lib;
};
in inputs.nixpkgs.lib.nixosSystem {
system = architecture;
modules = [
2021-11-06 19:46:30 +00:00
# User configuration management
inputs.home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
}
2021-11-06 19:46:30 +00:00
# Overlays
(util.mkOverlayFromInput "stable" inputs.stable)
(util.mkOverlayFromInput "unstable" inputs.nixpkgs)
{
nixpkgs.overlays = [
nur.overlay
emacs.overlay
(import ../packages)
2021-11-05 11:49:14 +00:00
(import ../overlays/simple.nix)
2022-01-14 17:08:47 +00:00
(import ../overlays/sandbox.nix)
];
}
2021-11-06 19:46:30 +00:00
# My module system
(import ../modules)
inputs.ostylk.nixosModules.nftables
2021-11-06 19:46:30 +00:00
# Actual config
(import ./baseSystem.nix)
(import hostConfigFile)
];
specialArgs = {
inherit inputs;
};
}