nixos-config/flake.nix

118 lines
2.9 KiB
Nix

{
description = "Nixos configuration with flakes";
inputs = {
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-21.05";
};
nixpkgs-unstable = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixos-unstable-small";
};
emacs-overlay = {
type = "github";
owner = "nix-community";
repo = "emacs-overlay";
ref = "master";
};
home-manager = {
type = "github";
owner = "nix-community";
repo = "home-manager";
ref = "release-21.05";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self,
nixpkgs,
nixpkgs-unstable,
emacs-overlay,
home-manager }: {
nixosConfigurations.poseidon = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./poseidon.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
{
nixpkgs.overlays = [
(self: super: {
packages = import ./pkgs { pkgs = super; };
# packages accessible through pkgs.unstable.package
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
fastPython3 = self.python3.override {
enableOptimizations = true;
reproducibleBuild = false;
self = self.fastPython3;
pythonAttr = "fastPython3";
};
matrix-synapse = super.matrix-synapse.override {
python3 = self.fastPython3;
};
})
];
}
];
};
nixosConfigurations.boreal = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
modules = [
./boreal.nix
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.alarsyo = import ./home;
home-manager.verbose = true;
}
{
nixpkgs.overlays = [
emacs-overlay.overlay
(self: super: {
packages = import ./pkgs { pkgs = super; };
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
steam = self.unstable.steam;
})
# uncomment this to build everything from scratch, fun but takes a
# while
#
# (self: super: {
# stdenv = super.impureUseNativeOptimizations super.stdenv;
# })
];
}
];
};
};
}