2021-02-06 03:09:11 +01:00
|
|
|
{
|
|
|
|
description = "Nixos configuration with flakes";
|
|
|
|
inputs = {
|
2021-04-19 12:49:30 +02:00
|
|
|
nixpkgs = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
2021-06-01 14:28:20 +02:00
|
|
|
ref = "nixos-21.05";
|
2021-04-19 12:49:30 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs-unstable = {
|
2021-05-27 20:16:14 +02:00
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
ref = "nixos-unstable-small";
|
|
|
|
};
|
|
|
|
|
2021-04-19 12:49:30 +02:00
|
|
|
emacs-overlay = {
|
|
|
|
type = "github";
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "emacs-overlay";
|
|
|
|
ref = "master";
|
|
|
|
};
|
2021-04-19 13:42:29 +02:00
|
|
|
|
|
|
|
home-manager = {
|
|
|
|
type = "github";
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "home-manager";
|
2021-06-01 14:28:20 +02:00
|
|
|
ref = "release-21.05";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-04-19 13:42:29 +02:00
|
|
|
};
|
2021-02-06 03:09:11 +01:00
|
|
|
};
|
|
|
|
|
2021-07-14 17:53:31 +02:00
|
|
|
outputs = { self, nixpkgs, home-manager, ... } @inputs: {
|
2021-07-14 18:20:11 +02:00
|
|
|
nixosModules = {
|
|
|
|
home = {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.alarsyo = import ./home;
|
|
|
|
home-manager.verbose = true;
|
|
|
|
};
|
|
|
|
};
|
2021-07-14 18:05:36 +02:00
|
|
|
|
2021-07-14 18:06:52 +02:00
|
|
|
nixosConfigurations =
|
|
|
|
let
|
2021-07-14 18:05:36 +02:00
|
|
|
system = "x86_64-linux";
|
2021-07-14 18:06:52 +02:00
|
|
|
shared_overlays = [
|
|
|
|
(self: super: {
|
|
|
|
packages = import ./pkgs { pkgs = super; };
|
|
|
|
|
|
|
|
# packages accessible through pkgs.unstable.package
|
|
|
|
unstable = import inputs.nixpkgs-unstable {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
})
|
2021-07-14 18:05:36 +02:00
|
|
|
];
|
2021-07-14 18:06:52 +02:00
|
|
|
in {
|
|
|
|
|
|
|
|
poseidon = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
./poseidon.nix
|
|
|
|
|
2021-07-14 18:20:11 +02:00
|
|
|
home-manager.nixosModule
|
|
|
|
self.nixosModules.home
|
2021-07-14 18:06:52 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
(self: super: {
|
|
|
|
fastPython3 = self.python3.override {
|
|
|
|
enableOptimizations = true;
|
|
|
|
reproducibleBuild = false;
|
|
|
|
self = self.fastPython3;
|
|
|
|
pythonAttr = "fastPython3";
|
|
|
|
};
|
|
|
|
|
|
|
|
matrix-synapse = super.matrix-synapse.override {
|
|
|
|
python3 = self.fastPython3;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
] ++ shared_overlays;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
boreal = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
|
|
|
modules = [
|
|
|
|
./boreal.nix
|
|
|
|
|
2021-07-14 18:20:11 +02:00
|
|
|
home-manager.nixosModule
|
|
|
|
self.nixosModules.home
|
2021-07-14 18:06:52 +02:00
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
inputs.emacs-overlay.overlay
|
|
|
|
|
|
|
|
(self: super: {
|
|
|
|
steam = self.unstable.steam;
|
|
|
|
})
|
|
|
|
|
|
|
|
# uncomment this to build everything from scratch, fun but takes a
|
|
|
|
# while
|
|
|
|
#
|
|
|
|
# (self: super: {
|
|
|
|
# stdenv = super.impureUseNativeOptimizations super.stdenv;
|
|
|
|
# })
|
|
|
|
] ++ shared_overlays;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2021-07-14 18:05:36 +02:00
|
|
|
|
|
|
|
};
|
2021-02-06 03:09:11 +01:00
|
|
|
};
|
|
|
|
}
|