2022-02-20 17:46:48 +01:00
|
|
|
{
|
|
|
|
description = "NixOS configurations by tboerger";
|
|
|
|
|
|
|
|
inputs = {
|
|
|
|
nixpkgs = {
|
|
|
|
url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
|
|
};
|
|
|
|
|
|
|
|
nur = {
|
|
|
|
url = "github:nix-community/NUR";
|
|
|
|
};
|
|
|
|
|
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
|
|
|
|
homemanager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
outputs = { self, nur, ... }@inputs:
|
|
|
|
let
|
|
|
|
sharedNixosConfiguration = { config, pkgs, ... }: {
|
|
|
|
nix = {
|
|
|
|
package = pkgs.nixFlakes;
|
|
|
|
|
|
|
|
extraOptions = ''
|
|
|
|
experimental-features = nix-command flakes
|
|
|
|
'';
|
|
|
|
|
2022-03-22 08:56:13 +01:00
|
|
|
settings = {
|
|
|
|
substituters = [
|
|
|
|
"https://cache.nixos.org"
|
|
|
|
"https://nix-community.cachix.org"
|
|
|
|
"https://nixpkgs.cachix.org"
|
|
|
|
"https://tboerger.cachix.org"
|
|
|
|
];
|
2022-02-20 17:46:48 +01:00
|
|
|
|
2022-03-22 08:56:13 +01:00
|
|
|
trusted-public-keys = [
|
|
|
|
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
|
|
|
|
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
|
|
|
|
"nixpkgs.cachix.org-1:q91R6hxbwFvDqTSDKwDAV4T5PxqXGxswD8vhONFMeOE="
|
|
|
|
"tboerger.cachix.org-1:3Q1gyqgA9NsOshOgknDvc6fhA8gw0PFAf2qs5vJpeLU="
|
|
|
|
];
|
|
|
|
};
|
2022-02-20 17:46:48 +01:00
|
|
|
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
persistent = true;
|
|
|
|
dates = "weekly";
|
|
|
|
options = "--delete-older-than 2w";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
nixpkgs = {
|
|
|
|
config = {
|
|
|
|
allowUnfree = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
overlays = [
|
|
|
|
self.overlay
|
|
|
|
nur.overlay
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
in
|
|
|
|
{
|
|
|
|
overlay = import ./overlays;
|
|
|
|
|
|
|
|
nixosConfigurations = {
|
2022-02-20 18:58:16 +01:00
|
|
|
utgard = inputs.nixpkgs.lib.nixosSystem {
|
2022-02-20 17:46:48 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
|
|
|
|
modules = [
|
2022-04-10 13:37:35 +02:00
|
|
|
({ pkgs, ... }:
|
|
|
|
let
|
|
|
|
nur-no-pkgs = import nur {
|
|
|
|
nurpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
nur-no-pkgs.repos.tboerger.modules
|
|
|
|
];
|
|
|
|
})
|
2022-02-20 17:46:48 +01:00
|
|
|
inputs.homemanager.nixosModules.home-manager
|
|
|
|
inputs.agenix.nixosModules.age
|
|
|
|
sharedNixosConfiguration
|
2022-02-20 18:30:31 +01:00
|
|
|
./machines/utgard
|
2022-02-20 17:46:48 +01:00
|
|
|
./profiles/thomas
|
|
|
|
];
|
2022-02-20 18:58:16 +01:00
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
2022-02-20 17:46:48 +01:00
|
|
|
};
|
2022-02-20 18:58:16 +01:00
|
|
|
asgard = inputs.nixpkgs.lib.nixosSystem {
|
2022-02-20 17:46:48 +01:00
|
|
|
system = "x86_64-linux";
|
|
|
|
inherit inputs;
|
|
|
|
|
|
|
|
modules = [
|
2022-04-10 13:37:35 +02:00
|
|
|
({ pkgs, ... }:
|
|
|
|
let
|
|
|
|
nur-no-pkgs = import nur {
|
|
|
|
nurpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
nur-no-pkgs.repos.tboerger.modules
|
|
|
|
];
|
|
|
|
})
|
2022-02-20 17:46:48 +01:00
|
|
|
inputs.homemanager.nixosModules.home-manager
|
|
|
|
inputs.agenix.nixosModules.age
|
|
|
|
sharedNixosConfiguration
|
2022-02-20 18:30:31 +01:00
|
|
|
./machines/asgard
|
2022-02-20 17:46:48 +01:00
|
|
|
./profiles/thomas
|
|
|
|
];
|
2022-02-20 18:58:16 +01:00
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
2022-02-20 17:46:48 +01:00
|
|
|
};
|
2022-02-20 18:58:16 +01:00
|
|
|
midgard = inputs.nixpkgs.lib.nixosSystem {
|
2022-02-20 18:30:31 +01:00
|
|
|
system = "aarch64-linux";
|
2022-02-20 17:46:48 +01:00
|
|
|
inherit inputs;
|
|
|
|
|
|
|
|
modules = [
|
2022-04-10 13:37:35 +02:00
|
|
|
({ pkgs, ... }:
|
|
|
|
let
|
|
|
|
nur-no-pkgs = import nur {
|
|
|
|
nurpkgs = import inputs.nixpkgs { system = "x86_64-linux"; };
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
imports = [
|
|
|
|
nur-no-pkgs.repos.tboerger.modules
|
|
|
|
];
|
|
|
|
})
|
2022-02-20 17:46:48 +01:00
|
|
|
inputs.homemanager.nixosModules.home-manager
|
|
|
|
inputs.agenix.nixosModules.age
|
|
|
|
sharedNixosConfiguration
|
2022-02-20 18:30:31 +01:00
|
|
|
./machines/midgard
|
2022-02-20 17:46:48 +01:00
|
|
|
./profiles/thomas
|
|
|
|
];
|
2022-02-20 18:58:16 +01:00
|
|
|
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs;
|
|
|
|
};
|
2022-02-20 17:46:48 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-02-20 18:58:16 +01:00
|
|
|
midgard = self.nixosConfigurations.midgard.config.system.build.toplevel;
|
|
|
|
utgard = self.nixosConfigurations.utgard.config.system.build.toplevel;
|
|
|
|
asgard = self.nixosConfigurations.asgard.config.system.build.toplevel;
|
2022-02-20 17:46:48 +01:00
|
|
|
};
|
|
|
|
}
|