nixos/lib/mk_computer.nix

58 lines
1.3 KiB
Nix
Raw Normal View History

2024-02-02 13:45:05 +01:00
{
home-module,
2024-02-02 13:45:05 +01:00
hostname,
inputs,
username ? "andreas",
}:
2022-09-07 17:36:29 +02:00
let
system = "x86_64-linux";
2022-09-07 17:36:29 +02:00
overlay-unstable = final: prev: {
unstable = import inputs.nixpkgs-unstable {
2022-09-07 17:42:36 +02:00
inherit system;
2022-09-07 17:36:29 +02:00
config.allowUnfree = true;
};
};
pkgs = import inputs.nixpkgs {
2022-09-07 17:36:29 +02:00
inherit system;
2024-02-02 13:45:05 +01:00
config = {
allowUnfree = true;
};
2022-09-07 17:36:29 +02:00
overlays = [
overlay-unstable
2022-11-01 15:23:52 +01:00
# (final: prev: {
# nextcloud-client = prev.nextcloud-client.overrideAttrs (_: rec {
# version = "3.6.0";
# src = pkgs.fetchFromGitHub {
# owner = "nextcloud";
# repo = "desktop";
# rev = "v${version}";
# sha256 = "sha256-wAxq5xFlofn2xEguvewMvGcel9O+CN/1AycR3tv/xMA=";
# };
# });
# })
2022-09-07 17:36:29 +02:00
];
};
2024-02-02 13:45:05 +01:00
in
inputs.nixpkgs.lib.nixosSystem {
inherit system pkgs;
2024-02-02 13:45:05 +01:00
specialArgs = {
inherit inputs;
};
2024-01-01 13:14:24 +01:00
modules = ([
# System configuration for this host
(import "${inputs.self}/systems/${hostname}" { inherit hostname; })
2024-01-01 13:14:24 +01:00
# Common configuration
"${inputs.self}/modules"
2024-04-22 20:43:14 +02:00
{ az-username = username; }
2024-01-01 13:14:24 +01:00
{
home-manager.users.${username}.imports = [
"${inputs.self}/home-manager/profiles/${home-module}.nix"
];
}
]);
}