nixos-config/lib/mkSystem.nix

72 lines
1.4 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"
, bluray ? false
}: 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)
2023-09-17 11:35:43 +00:00
{
nixpkgs.overlays = [
nur.overlay
emacs.overlay
(import ../packages)
2021-11-05 11:49:14 +00:00
(import ../overlays/simple.nix)
2022-06-15 17:43:12 +00:00
(import ../overlays/phosh.nix)
]
++ lib.optional bluray (import ../overlays/bluray.nix)
++ [
2022-02-17 18:57:49 +00:00
# Always keep sandbox.nix as the last overlay
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
2022-02-24 10:25:43 +00:00
inputs.tablet-mode.nixosModule
2021-11-06 19:46:30 +00:00
# Actual config
(import ./baseSystem.nix)
(import hostConfigFile)
];
specialArgs = {
inherit inputs;
};
}