2021-07-11 04:19:34 -06:00
|
|
|
{
|
|
|
|
inputs = {
|
2023-08-05 17:49:31 -06:00
|
|
|
nixos-hardware = { url = "github:NixOS/nixos-hardware"; };
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2023-06-29 11:28:16 -06:00
|
|
|
nixpkgs = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-06-29 11:28:16 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2021-07-17 15:23:13 -06:00
|
|
|
home-manager = {
|
2023-08-21 22:30:36 -06:00
|
|
|
url = "github:nix-community/home-manager";
|
2021-07-17 15:47:04 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2021-07-11 04:19:34 -06:00
|
|
|
xmonad-contrib = {
|
2023-08-22 16:06:20 -06:00
|
|
|
url = "github:IvanMalison/xmonad-contrib/withMyChanges";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
xmonad.follows = "xmonad";
|
|
|
|
};
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2021-07-11 04:19:34 -06:00
|
|
|
xmonad = {
|
2023-11-17 16:12:37 -07:00
|
|
|
url = "github:xmonad/xmonad";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
};
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2021-07-17 15:23:13 -06:00
|
|
|
taffybar = {
|
2023-11-17 16:12:37 -07:00
|
|
|
url = "github:taffybar/taffybar";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
xmonad.follows = "xmonad";
|
|
|
|
gtk-sni-tray.follows = "gtk-sni-tray";
|
|
|
|
gtk-strut.follows = "gtk-strut";
|
|
|
|
};
|
2023-05-17 14:09:41 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2023-05-17 14:09:41 -06:00
|
|
|
imalison-taffybar = {
|
2023-08-22 16:06:20 -06:00
|
|
|
url = "path:../dotfiles/config/taffybar";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
xmonad.follows = "xmonad";
|
|
|
|
taffybar.follows = "taffybar";
|
|
|
|
};
|
2021-07-13 03:37:03 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2021-07-19 19:38:04 -06:00
|
|
|
notifications-tray-icon = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:IvanMalison/notifications-tray-icon";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs.flake-utils.follows = "flake-utils";
|
|
|
|
inputs.git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-19 19:38:04 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
2022-10-07 18:42:34 -06:00
|
|
|
nix = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:IvanMalison/nix/my2.15.1";
|
2022-10-07 18:42:34 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -06:00
|
|
|
|
|
|
|
flake-utils = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:numtide/flake-utils";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs.systems.follows = "systems";
|
|
|
|
};
|
|
|
|
|
2023-08-05 17:49:31 -06:00
|
|
|
systems = { url = "github:nix-systems/default"; };
|
2023-06-17 10:27:47 -06:00
|
|
|
|
|
|
|
git-ignore-nix = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:hercules-ci/gitignore.nix";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
gtk-sni-tray = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:taffybar/gtk-sni-tray";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
status-notifier-item.follows = "status-notifier-item";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
status-notifier-item = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:taffybar/status-notifier-item";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
gtk-strut = {
|
2023-08-05 17:49:31 -06:00
|
|
|
url = "github:taffybar/gtk-strut";
|
2023-06-17 10:27:47 -06:00
|
|
|
inputs = {
|
|
|
|
nixpkgs.follows = "nixpkgs";
|
|
|
|
flake-utils.follows = "flake-utils";
|
|
|
|
git-ignore-nix.follows = "git-ignore-nix";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-12-13 11:30:46 -07:00
|
|
|
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
|
|
|
|
2023-08-05 17:49:31 -06:00
|
|
|
nixpkgs-regression = { url = "github:NixOS/nixpkgs"; };
|
2023-06-29 11:20:13 -06:00
|
|
|
|
2023-08-05 17:49:31 -06:00
|
|
|
nixified-ai = { url = "github:nixified-ai/flake"; };
|
2023-07-26 13:14:00 -06:00
|
|
|
|
2023-08-05 17:49:31 -06:00
|
|
|
nixos-wsl = { url = "github:nix-community/NixOS-WSL"; };
|
2023-08-22 13:08:31 -06:00
|
|
|
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
2021-07-11 04:19:34 -06:00
|
|
|
};
|
2023-06-17 10:27:47 -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-08-22 13:08:31 -06:00
|
|
|
xmonad-contrib, notifications-tray-icon, nix, agenix, imalison-taffybar, ...
|
2021-07-17 15:23:13 -06:00
|
|
|
}:
|
2021-08-20 19:28:51 -06:00
|
|
|
let
|
2023-06-29 01:11:43 -06:00
|
|
|
machinesFilepath = ./machines;
|
|
|
|
machineFilenames = builtins.attrNames (builtins.readDir machinesFilepath);
|
2021-08-20 19:28:51 -06:00
|
|
|
machineNameFromFilename = filename: builtins.head (builtins.split "\\." filename);
|
2023-08-22 13:08:31 -06:00
|
|
|
machineNames = map machineNameFromFilename machineFilenames;
|
2021-08-20 19:28:51 -06:00
|
|
|
mkConfigurationParams = filename: {
|
|
|
|
name = machineNameFromFilename filename;
|
|
|
|
value = {
|
2023-08-22 13:08:31 -06:00
|
|
|
modules = [
|
|
|
|
(machinesFilepath + ("/" + filename)) agenix.nixosModules.default
|
|
|
|
];
|
2021-08-20 19:28:51 -06:00
|
|
|
};
|
2021-08-20 19:19:50 -06:00
|
|
|
};
|
2021-08-20 19:28:51 -06:00
|
|
|
defaultConfigurationParams =
|
|
|
|
builtins.listToAttrs (map mkConfigurationParams machineFilenames);
|
2023-06-28 21:43:55 -06:00
|
|
|
customParams = {
|
|
|
|
biskcomp = {
|
|
|
|
system = "aarch64-linux";
|
2021-08-20 19:28:51 -06:00
|
|
|
};
|
2023-06-28 21:43:55 -06:00
|
|
|
air-gapped-pi = {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
};
|
|
|
|
};
|
2023-08-22 13:08:31 -06:00
|
|
|
mkConfig =
|
|
|
|
args@
|
|
|
|
{ system ? "x86_64-linux"
|
2023-12-13 11:55:20 -07:00
|
|
|
, baseModules ? []
|
2023-12-13 11:35:26 -07:00
|
|
|
, modules ? []
|
2023-08-22 13:08:31 -06:00
|
|
|
, specialArgs ? {}
|
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
nixpkgs.lib.nixosSystem (args // {
|
|
|
|
inherit system;
|
|
|
|
modules = baseModules ++ modules;
|
|
|
|
specialArgs = rec {
|
|
|
|
inherit inputs machineNames;
|
|
|
|
makeEnable = (import ./make-enable.nix) nixpkgs.lib;
|
|
|
|
mapValueToKeys = keys: value: builtins.listToAttrs (map (name: { inherit name value; }) keys);
|
2023-12-13 11:55:20 -07:00
|
|
|
realUsers = [ "root" "imalison" "kat" "dean" "alex" "will" "mike" ];
|
2023-08-22 13:08:31 -06:00
|
|
|
forEachUser = mapValueToKeys realUsers;
|
2023-10-03 14:50:43 -06:00
|
|
|
keys = (import ./keys.nix);
|
|
|
|
} // specialArgs;
|
2023-08-22 13:08:31 -06:00
|
|
|
});
|
2021-07-11 04:19:34 -06:00
|
|
|
in
|
|
|
|
{
|
2023-10-04 00:12:25 -06:00
|
|
|
nixConfig = {
|
|
|
|
substituters = [
|
|
|
|
"https://cache.nixos.org/"
|
|
|
|
];
|
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
];
|
|
|
|
extra-substituters = [
|
|
|
|
"http://1896Folsom.duckdns.org"
|
|
|
|
"http://192.168.1.26:5050"
|
|
|
|
];
|
|
|
|
extra-trusted-public-keys = [
|
|
|
|
"1896Folsom.duckdns.org:U2FTjvP95qwAJo0oGpvmUChJCgi5zQoG1YisoI08Qoo="
|
|
|
|
];
|
|
|
|
};
|
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
|
|
|
};
|
|
|
|
}
|