Files
samfelag/flake.nix
2022-11-16 23:51:57 +01:00

87 lines
2.2 KiB
Nix

{
description = "System configuration for all machines in samfélag";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.05";
home-manager.url = "github:nix-community/home-manager/release-22.05";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.url = "github:nix-community/emacs-overlay";
};
outputs = inputs @ { self, nixpkgs, home-manager, ... }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
config.allowUnfree = true;
overlays = import ./overlays;
};
lib = nixpkgs.lib.extend
(self: super: { my = import ./lib { inherit pkgs inputs; lib = self; }; });
in {
nixosConfigurations = {
# - Reykjavik ----------------------------
reykjavik = lib.nixosSystem {
inherit system;
inherit pkgs;
specialArgs = { inherit lib inputs system; };
modules = [
./system/modules
./system/profiles
./system/hosts/reykjavik
{
imports =
[ inputs.home-manager.nixosModules.home-manager ]
# All my personal modules
++ (lib.my.mapModulesRec' (toString ./modules) import);
}
{
home-manager.users.marc = {
imports = [
./home/modules
./home/profiles
./home/hosts/reykjavik.nix
];
};
}
];
};
# - Kopavogur ----------------------------
# kopavogur = lib.nixosSystem {
# inherit system;
# inherit pkgs;
# modules = [
# ./system/modules
# ./system/profiles
# ./system/hosts/kopavogur
# home-manager.nixosModules.home-manager {
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.users.marc = {
# imports = [
# ./home/modules
# ./home/profiles
# ./home/hosts/kopavogur.nix
# ];
# };
# }
# ];
# };
};
};
}