Files
nix-config/flake.nix

83 lines
2.0 KiB
Nix

{
description = "My NixOS system flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
# Hyprland cachix flake
hyprland.url = "github:hyprwm/Hyprland";
# NixOS community managed hardware specific features/fixes
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
# Secure boot
lanzaboote = {
url = "github:nix-community/lanzaboote/v0.4.2";
inputs.nixpkgs.follows = "nixpkgs";
};
# Sops
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Disko
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
# Secrets
nix-secrets = {
url = "git+ssh://git@git.dogar.dev/shahab/nix-secrets?shallow=1&ref=main";
flake = false;
};
};
outputs = {nixpkgs, ...} @ inputs: let
system = "x86_64-linux";
hostName = "rihla";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
"${hostName}" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
inputs.lanzaboote.nixosModules.lanzaboote
inputs.disko.nixosModules.disko
inputs.nixos-hardware.nixosModules.framework-13-7040-amd
inputs.sops-nix.nixosModules.sops
inputs.home-manager.nixosModules.home-manager
./nixos/configuration.nix
./nixos/disko-config.nix
./nixos/hardware-configuration.nix
{
home-manager = {
sharedModules = [
./modules/home-manager/yubikey-touch-detector.nix
];
};
}
];
specialArgs = {
inherit inputs hostName;
};
};
};
devShell.x86_64-linux = pkgs.mkShell {
buildInputs = with pkgs; [
nil
alejandra
lua-language-server
];
};
};
}