nixos/flake.nix

106 lines
2.9 KiB
Nix
Raw Normal View History

2026-03-03 20:15:06 +01:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
stylix.url = "github:danth/stylix";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
nixvim.url = "github:nix-community/nixvim";
home-manager.url = "github:nix-community/home-manager";
2026-03-04 16:48:43 +01:00
ignis = {
url = "github:ignis-sh/ignis";
inputs.nixpkgs.follows = "nixpkgs"; # recommended
};
2026-03-06 19:06:32 +01:00
lanzaboote = {
url = "github:nix-community/lanzaboote/v1.0.0";
# Optional but recommended to limit the size of your system closure.
inputs.nixpkgs.follows = "nixpkgs";
};
2026-03-03 20:15:06 +01:00
};
outputs =
{
2026-03-04 21:43:27 +01:00
self,
2026-03-03 20:15:06 +01:00
nixpkgs,
stylix,
spicetify-nix,
nixvim,
home-manager,
2026-03-06 19:06:32 +01:00
lanzaboote,
2026-03-03 20:15:06 +01:00
...
2026-03-04 16:48:43 +01:00
}@inputs:
2026-03-03 20:15:06 +01:00
let
system = "x86_64-linux";
pkgs = import nixpkgs { inherit system; };
in
{
2026-03-06 19:06:32 +01:00
nixosConfigurations.cyberia = nixpkgs.lib.nixosSystem {
2026-03-03 20:15:06 +01:00
inherit system;
modules = [
stylix.nixosModules.stylix
home-manager.nixosModules.home-manager
2026-03-06 19:06:32 +01:00
lanzaboote.nixosModules.lanzaboote
(
{
pkgs,
lib,
config,
...
}:
{
networking.hostName = "cyberia";
environment.systemPackages = [
# For debugging and troubleshooting Secure Boot.
pkgs.sbctl
];
services.xserver.videoDrivers = [ "nvidia" ];
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
hardware.nvidia.modesetting.enable = true;
hardware.nvidia.open = true;
# Lanzaboote currently replaces the systemd-boot module.
# This setting is usually set to true in configuration.nix
# generated at installation time. So we force it to false
# for now.
boot.loader.systemd-boot.enable = lib.mkForce false;
boot.lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
}
)
2026-03-03 20:15:06 +01:00
./configuration.nix
{
home-manager.useUserPackages = true;
home-manager.useGlobalPkgs = true;
home-manager.users.lucy = {
imports = [
2026-03-06 19:06:32 +01:00
inputs.ignis.homeManagerModules.default
nixvim.homeModules.nixvim
2026-03-03 20:15:06 +01:00
spicetify-nix.homeManagerModules.spicetify
./home/home.nix
];
};
}
];
};
homeConfigurations.lucy = home-manager.lib.homeManagerConfiguration {
2026-03-06 19:06:32 +01:00
pkgs = nixpkgs.legacyPackages.${system};
2026-03-04 16:48:43 +01:00
extraSpecialArgs = { inherit inputs; };
2026-03-03 20:15:06 +01:00
modules = [
stylix.homeModules.stylix
nixvim.homeModules.nixvim
./home/home.nix
./home/programs.nix
];
};
};
}