nixos-dotfiles/flake.nix

66 lines
1.5 KiB
Nix
Raw Normal View History

{
description = "NixOS configuration";
inputs = {
2023-02-01 03:19:31 +00:00
nixpkgs.url = "github:nixos/nixpkgs/nixos-22.11";
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2023-02-01 03:19:31 +00:00
home-manager.url = "github:nix-community/home-manager/release-22.11";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
agenix.url = "github:ryantm/agenix";
};
2023-02-01 03:19:31 +00:00
outputs = inputs@{ nixpkgs, unstable, home-manager, agenix, ... }:
let
system = "x86_64-linux";
in
2023-02-01 03:19:31 +00:00
{
nixosConfigurations =
let
# Inject unstable for inputs for modules
defaults = { pkgs, ... }: {
_module.args.unstable = import inputs.unstable {
inherit (pkgs.stdenv.targetPlatform) system;
config.allowUnfree = true;
};
};
in {
smallinux = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
defaults
home-manager.nixosModules.home-manager
agenix.nixosModule
2022-10-05 23:38:05 +00:00
{
2023-02-01 03:19:31 +00:00
networking.hostName = "smallinux";
2022-10-05 23:38:05 +00:00
}
2023-02-01 03:19:31 +00:00
./common.nix
./hosts/smallinux.nix
];
};
xps15 = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
defaults
home-manager.nixosModules.home-manager
agenix.nixosModule
{
2023-02-01 03:19:31 +00:00
networking.hostName = "xps15";
}
./common.nix
2023-02-01 03:19:31 +00:00
./hosts/xps15.nix
];
2023-02-01 03:19:31 +00:00
};
};
};
}