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-08-19 23:34:41 +02:00
|
|
|
ref = "nixos-unstable";
|
2021-04-19 12:49:30 +02:00
|
|
|
};
|
|
|
|
|
2022-07-01 15:25:52 +02:00
|
|
|
nixpkgs-mu-1-6-11 = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
rev = "0100c5e564462ca83aed241c58a3427783737a26";
|
|
|
|
};
|
|
|
|
|
2021-08-19 23:34:41 +02:00
|
|
|
nixpkgs-unstable-small = {
|
2021-05-27 20:16:14 +02:00
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixpkgs";
|
|
|
|
ref = "nixos-unstable-small";
|
|
|
|
};
|
|
|
|
|
2022-01-17 21:56:41 +01:00
|
|
|
agenix = {
|
|
|
|
type = "github";
|
|
|
|
owner = "ryantm";
|
|
|
|
repo = "agenix";
|
|
|
|
};
|
|
|
|
|
2021-04-19 13:42:29 +02:00
|
|
|
home-manager = {
|
|
|
|
type = "github";
|
|
|
|
owner = "nix-community";
|
|
|
|
repo = "home-manager";
|
2021-08-20 02:11:40 +02:00
|
|
|
ref = "master";
|
2021-06-01 14:28:20 +02:00
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
2021-04-19 13:42:29 +02:00
|
|
|
};
|
2021-07-14 19:40:35 +02:00
|
|
|
|
|
|
|
flake-utils = {
|
|
|
|
type = "github";
|
|
|
|
owner = "numtide";
|
|
|
|
repo = "flake-utils";
|
|
|
|
ref = "master";
|
|
|
|
};
|
2021-07-27 00:33:10 +02:00
|
|
|
|
|
|
|
nixos-hardware = {
|
|
|
|
type = "github";
|
|
|
|
owner = "NixOS";
|
|
|
|
repo = "nixos-hardware";
|
|
|
|
ref = "master";
|
|
|
|
};
|
2021-02-06 03:09:11 +01:00
|
|
|
};
|
|
|
|
|
2022-04-10 11:54:58 +02:00
|
|
|
outputs = {
|
|
|
|
self,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
|
|
|
agenix,
|
|
|
|
...
|
|
|
|
} @ inputs:
|
|
|
|
{
|
|
|
|
nixosModules = {
|
|
|
|
home = {
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.users.alarsyo = import ./home;
|
|
|
|
home-manager.verbose = true;
|
|
|
|
};
|
|
|
|
nix-path = {
|
|
|
|
nix.nixPath = [
|
|
|
|
"nixpkgs=${inputs.nixpkgs}"
|
|
|
|
];
|
|
|
|
};
|
2021-08-25 21:39:05 +02:00
|
|
|
};
|
2021-07-14 18:05:36 +02:00
|
|
|
|
2022-04-10 11:54:58 +02:00
|
|
|
overlays = import ./overlays;
|
2022-01-11 17:59:01 +01:00
|
|
|
|
2022-04-10 11:54:58 +02:00
|
|
|
nixosConfigurations = let
|
2021-07-14 18:05:36 +02:00
|
|
|
system = "x86_64-linux";
|
2022-04-10 11:54:58 +02:00
|
|
|
shared_overlays =
|
|
|
|
[
|
|
|
|
(self: super: {
|
|
|
|
packages = import ./pkgs {pkgs = super;};
|
2022-07-01 15:25:52 +02:00
|
|
|
mu = (import inputs.nixpkgs-mu-1-6-11 { inherit system; }).mu;
|
2022-04-10 11:54:58 +02:00
|
|
|
|
|
|
|
# packages accessible through pkgs.unstable.package
|
|
|
|
unstable = import inputs.nixpkgs-unstable-small {
|
|
|
|
inherit system;
|
|
|
|
config.allowUnfree = true;
|
|
|
|
};
|
|
|
|
})
|
|
|
|
|
|
|
|
agenix.overlay
|
|
|
|
]
|
|
|
|
++ builtins.attrValues self.overlays;
|
|
|
|
sharedModules =
|
|
|
|
[
|
|
|
|
agenix.nixosModule
|
|
|
|
home-manager.nixosModule
|
|
|
|
{nixpkgs.overlays = shared_overlays;}
|
|
|
|
]
|
|
|
|
++ (nixpkgs.lib.attrValues self.nixosModules);
|
2021-07-14 18:06:52 +02:00
|
|
|
in {
|
|
|
|
poseidon = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
2022-04-10 11:54:58 +02:00
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./poseidon.nix
|
|
|
|
]
|
|
|
|
++ sharedModules;
|
2021-07-14 18:06:52 +02:00
|
|
|
};
|
|
|
|
|
2022-06-10 16:56:15 +02:00
|
|
|
hades = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./hades.nix
|
|
|
|
]
|
|
|
|
++ sharedModules;
|
|
|
|
};
|
|
|
|
|
2021-07-14 18:06:52 +02:00
|
|
|
boreal = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
2022-04-10 11:54:58 +02:00
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./boreal.nix
|
|
|
|
|
|
|
|
{
|
|
|
|
nixpkgs.overlays = [
|
|
|
|
# uncomment this to build everything from scratch, fun but takes a
|
|
|
|
# while
|
|
|
|
#
|
|
|
|
# (self: super: {
|
|
|
|
# stdenv = super.impureUseNativeOptimizations super.stdenv;
|
|
|
|
# })
|
|
|
|
];
|
|
|
|
}
|
|
|
|
]
|
|
|
|
++ sharedModules;
|
2021-07-14 18:06:52 +02:00
|
|
|
};
|
2021-07-14 18:05:36 +02:00
|
|
|
|
2021-07-23 18:47:53 +02:00
|
|
|
zephyrus = nixpkgs.lib.nixosSystem rec {
|
|
|
|
inherit system;
|
2022-04-10 11:54:58 +02:00
|
|
|
modules =
|
|
|
|
[
|
|
|
|
./zephyrus.nix
|
|
|
|
|
|
|
|
inputs.nixos-hardware.nixosModules.common-cpu-intel
|
|
|
|
inputs.nixos-hardware.nixosModules.common-pc-laptop
|
|
|
|
inputs.nixos-hardware.nixosModules.common-pc-ssd
|
|
|
|
]
|
|
|
|
++ sharedModules;
|
2021-07-23 18:47:53 +02:00
|
|
|
};
|
2021-07-14 18:05:36 +02:00
|
|
|
};
|
2022-04-10 11:54:58 +02:00
|
|
|
}
|
|
|
|
// inputs.flake-utils.lib.eachDefaultSystem (system: {
|
|
|
|
packages =
|
2022-05-15 20:05:07 +02:00
|
|
|
inputs.flake-utils.lib.flattenTree
|
|
|
|
(import ./pkgs {
|
|
|
|
pkgs = import nixpkgs {inherit system;};
|
|
|
|
});
|
2022-04-10 11:54:58 +02:00
|
|
|
});
|
2021-02-06 03:09:11 +01:00
|
|
|
}
|