2021-07-11 04:19:34 -06:00
|
|
|
{
|
|
|
|
inputs = {
|
2022-09-16 16:28:56 -06:00
|
|
|
nixos-hardware.url = github:NixOS/nixos-hardware;
|
2021-07-17 15:47:04 -06:00
|
|
|
nixpkgs = {
|
2023-05-14 15:17:10 -06:00
|
|
|
# url = github:IvanMalison/nixpkgs/my-unstable;
|
|
|
|
url = path:./nixpkgs;
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2021-07-17 15:23:13 -06:00
|
|
|
home-manager = {
|
2023-04-11 20:57:18 -06:00
|
|
|
url = github:IvanMalison/home-manager/master;
|
|
|
|
# url = path:./home-manager;
|
2021-07-17 15:47:04 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
|
|
|
xmonad-contrib = {
|
2023-04-11 20:56:05 -06:00
|
|
|
url = github:IvanMalison/xmonad-contrib/withMyChanges;
|
2021-07-17 15:47:04 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
|
|
|
xmonad = {
|
2023-04-11 20:57:18 -06:00
|
|
|
url = github:IvanMalison/xmonad/master;
|
|
|
|
# url = path:../dotfiles/config/xmonad/xmonad;
|
2021-07-17 15:47:04 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2021-07-17 15:23:13 -06:00
|
|
|
taffybar = {
|
2023-05-17 14:09:41 -06:00
|
|
|
url = path:../dotfiles/config/taffybar/taffybar;
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
imalison-taffybar = {
|
|
|
|
url = path:../dotfiles/config/taffybar;
|
2021-07-17 15:47:04 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-13 03:37:03 -06:00
|
|
|
};
|
2021-07-19 19:38:04 -06:00
|
|
|
notifications-tray-icon = {
|
|
|
|
url = github:IvanMalison/notifications-tray-icon/master;
|
|
|
|
};
|
2022-10-07 18:42:34 -06:00
|
|
|
nix = {
|
|
|
|
url = github:IvanMalison/nix/master;
|
|
|
|
};
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2021-08-20 14:45:29 -06:00
|
|
|
outputs = inputs@{
|
2022-09-16 16:28:56 -06:00
|
|
|
self, nixpkgs, nixos-hardware, home-manager, taffybar, xmonad,
|
2023-05-17 14:09:41 -06:00
|
|
|
xmonad-contrib, notifications-tray-icon, nix, imalison-taffybar,
|
2021-07-17 15:23:13 -06:00
|
|
|
}:
|
2021-08-20 19:28:51 -06:00
|
|
|
let
|
|
|
|
mkConfig =
|
|
|
|
args@
|
|
|
|
{ system ? "x86_64-linux"
|
|
|
|
, baseModules ? []
|
|
|
|
, modules ? []
|
|
|
|
, specialArgs ? {}
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
nixpkgs.lib.nixosSystem (args // {
|
|
|
|
inherit system;
|
|
|
|
modules = baseModules ++ modules;
|
|
|
|
specialArgs = { inherit inputs; } // specialArgs;
|
|
|
|
});
|
|
|
|
machineFilenames = builtins.attrNames (builtins.readDir ./machines);
|
|
|
|
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
|
|
|
mkConfigurationParams = filename: {
|
|
|
|
name = machineNameFromFilename filename;
|
|
|
|
value = {
|
|
|
|
modules = [ (./machines + ("/" + filename)) ];
|
|
|
|
};
|
2021-08-20 19:19:50 -06:00
|
|
|
};
|
2021-08-20 19:28:51 -06:00
|
|
|
defaultConfigurationParams =
|
|
|
|
builtins.listToAttrs (map mkConfigurationParams machineFilenames);
|
|
|
|
customParams = {
|
|
|
|
biskcomp = {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
};
|
|
|
|
air-gapped-pi = {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
};
|
|
|
|
};
|
2021-07-11 04:19:34 -06:00
|
|
|
in
|
|
|
|
{
|
2021-08-20 19:19:50 -06:00
|
|
|
nixosConfigurations = builtins.mapAttrs (machineName: params:
|
|
|
|
let machineParams =
|
|
|
|
if builtins.hasAttr machineName customParams
|
|
|
|
then (builtins.getAttr machineName customParams)
|
|
|
|
else {};
|
|
|
|
in mkConfig (params // machineParams)
|
|
|
|
) defaultConfigurationParams;
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
|
|
|
}
|