99 lines
2.5 KiB
Nix
99 lines
2.5 KiB
Nix
{
|
|
description = "NixOS configuration";
|
|
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx";
|
|
|
|
peerix = {
|
|
url = "gitlab:asmir.abdulahovic/peerix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
zremap = {
|
|
url = "gitlab:asmir.abdulahovic/zremap";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
sops-nix = {
|
|
url = "github:Mic92/sops-nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
nixpkgs,
|
|
home-manager,
|
|
nix-xilinx,
|
|
peerix,
|
|
sops-nix,
|
|
zremap,
|
|
...
|
|
}: let
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
|
|
in {
|
|
nixosConfigurations = rec {
|
|
nixy = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
{_module.args = inputs;}
|
|
./nixy/configuration.nix
|
|
./nixy/hardware-configuration.nix
|
|
./packages.nix
|
|
sops-nix.nixosModules.sops
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.akill = import ./home/home.nix;
|
|
}
|
|
peerix.nixosModules.peerix
|
|
{
|
|
services.peerix = {
|
|
enable = true;
|
|
globalCacheTTL = 10;
|
|
package = peerix.packages.x86_64-linux.peerix;
|
|
openFirewall = true; # UDP/12304
|
|
privateKeyFile = nixy.config.sops.secrets."peerix/private".path;
|
|
publicKeyFile = ./peerix-public;
|
|
publicKey = "peerix-mediabox:UDgG3xdQYv7bmx2l4ZPNRPJtp2zMmY++H/fnGeJ9BQw=";
|
|
};
|
|
}
|
|
];
|
|
};
|
|
|
|
blue = nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
modules = [
|
|
{_module.args = inputs;}
|
|
./blue/configuration.nix
|
|
./blue/hardware-configuration.nix
|
|
./packages.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.akill = import ./home/home.nix;
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
devShell.x86_64-linux = pkgs.mkShell {
|
|
buildInputs = with pkgs; [sops];
|
|
shellHook = ''
|
|
echo "Configuring NixOS!"
|
|
'';
|
|
};
|
|
|
|
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
|
|
};
|
|
}
|