nixos-configuration/flake.nix
2025-03-21 02:00:29 +01:00

167 lines
4.1 KiB
Nix
Executable file

{
description = "Nixos configuration flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
# neorg-overlay.url = "github:nvim-neorg/nixpkgs-neorg-overlay";
stylix = {
url = "github:danth/stylix";
# inputs.nixpkgs.follows = "nixpkgs";
};
zen-browser = {
url = "github:MarceColl/zen-browser-flake";
inputs.nixpkgs.follows = "nixpkgs";
};
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
url = "github:nix-community/impermanence";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
nix-index-database = {
url = "github:nix-community/nix-index-database";
inputs.nixpkgs.follows = "nixpkgs";
};
# hyprland.url = "github:hyprwm/Hyprland";
#
# hyprfocus = {
# url = "github:pyt0xic/hyprfocus";
# inputs.hyprland.follows = "hyprland";
# };
#
# hyprland-plugins = {
# url = "github:hyprwm/hyprland-plugins";
# inputs.hyprland.follows = "hyprland";
# };
};
outputs = {
self,
nixpkgs,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
overlays = [];
};
in {
nixosConfigurations = {
bootstrap = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
inputs.disko.nixosModules.default
(import ./modules/disko/disko-luks.nix {
device = "/dev/nvme0n1";
swap-size = "8G";
encrypted = false;
})
./hosts/bootstrap/configuration.nix
inputs.impermanence.nixosModules.impermanence
];
};
desktop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
inputs.disko.nixosModules.default
(import ./modules/disko/disko-luks.nix {
device = "/dev/nvme0n1";
swap-size = "8G";
encrypted = false;
})
./hosts/desktop/configuration.nix
inputs.impermanence.nixosModules.impermanence
inputs.home-manager.nixosModules.default
inputs.nixvim.nixosModules.nixvim
inputs.stylix.nixosModules.stylix
inputs.nix-index-database.nixosModules.nix-index
{programs.nix-index-database.comma.enable = true;}
];
};
nixos-vm = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
inputs.disko.nixosModules.default
(import ./hosts/nixos-vm/disko-luks.nix {device = "/dev/vda";})
./hosts/nixos-vm/configuration.nix
inputs.impermanence.nixosModules.impermanence
inputs.home-manager.nixosModules.default
inputs.nixvim.nixosModules.nixvim
inputs.stylix.nixosModules.stylix
];
};
laptop = nixpkgs.lib.nixosSystem {
specialArgs = {
inherit inputs;
};
modules = [
inputs.disko.nixosModules.default
(import ./modules/disko/disko-luks.nix {
device = "/dev/sda";
swap-size = "32G";
encrypted = true;
})
./hosts/laptop/configuration.nix
inputs.impermanence.nixosModules.impermanence
inputs.home-manager.nixosModules.default
inputs.nixvim.nixosModules.nixvim
inputs.stylix.nixosModules.stylix
inputs.nix-index-database.nixosModules.nix-index
{programs.nix-index-database.comma.enable = true;}
];
};
};
formatter.x86_64-linux = pkgs.alejandra;
templates = {
dotnet = {
path = ./templates/dotnet;
description = "Flake for programming in dotnet";
};
latex = {
path = ./templates/latex;
description = "Flake for creating latex documents";
};
};
};
}