nixos_flake_config/flake.nix

79 lines
2.1 KiB
Nix
Raw Normal View History

2023-07-03 22:35:58 +02:00
{
description = "NixOS configuration";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
caps2esc.url = "gitlab:asmir.abdulahovic/caps2esc";
nix-xilinx.url = "gitlab:asmir.abdulahovic/nix-xilinx";
peerix.url = "gitlab:asmir.abdulahovic/peerix";
2023-09-20 19:43:01 +02:00
zremap = {
url = "gitlab:asmir.abdulahovic/zremap";
inputs.nixpkgs.follows = "nixpkgs";
};
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-07-03 22:35:58 +02:00
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs @ {
nixpkgs,
caps2esc,
home-manager,
nix-xilinx,
peerix,
sops-nix,
2023-09-20 19:43:01 +02:00
zremap,
2023-07-03 22:35:58 +02:00
...
2023-07-03 23:10:39 +02:00
}: let
pkgs = nixpkgs.legacyPackages.x86_64-linux.pkgs;
in {
2023-07-03 22:35:58 +02:00
nixosConfigurations = rec {
nixy = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
{_module.args = inputs;}
./configuration.nix
./packages.nix
./hardware-configuration.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=";
};
}
];
};
};
2023-07-03 23:10:39 +02:00
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [sops];
shellHook = ''
echo "Configuring NixOS!"
'';
};
2023-07-06 22:29:34 +02:00
formatter.x86_64-linux = nixpkgs.legacyPackages.x86_64-linux.alejandra;
2023-07-03 22:35:58 +02:00
};
}