nixos/flake.nix

45 lines
1.4 KiB
Nix
Raw Normal View History

2024-12-15 15:02:21 +00:00
{
inputs = {
2025-01-04 02:24:04 +00:00
# This points to the same nixpkgs that nixos-cosmic is using by default.
# If you want to stick to a stable channel, you can switch "nixpkgs" to "nixpkgs-stable".
2025-01-04 22:26:45 +00:00
nixpkgs.follows = "nixos-cosmic/nixpkgs-stable";
2024-12-15 15:02:21 +00:00
2025-01-04 02:24:04 +00:00
# The main input: NixOS COSMIC
2024-12-15 15:02:21 +00:00
nixos-cosmic.url = "github:lilyinstarlight/nixos-cosmic";
};
2025-01-04 02:24:04 +00:00
outputs = { self, nixpkgs, nixos-cosmic }:
{
nixosConfigurations = {
# Replace "my-hostname" with your actual hostname
hypr-nix = nixpkgs.lib.nixosSystem {
# Point to an existing configuration file or create a new one
modules = [
# Set up the COSMIC binary cache (substituter)
{
nix.settings = {
substituters = [ "https://cosmic.cachix.org/" ];
trusted-public-keys = [
"cosmic.cachix.org-1:Dya9IyXD4xdBehWjrkPv6rtxpmMdRel02smYzA85dPE="
];
};
}
# Import the default COSMIC NixOS module
nixos-cosmic.nixosModules.default
# Your existing configuration typically youd have:
./configuration.nix
# Optionally, you could enable COSMIC right here:
{
services.desktopManager.cosmic.enable = true;
services.displayManager.cosmic-greeter.enable = true;
}
];
};
2024-12-15 15:02:21 +00:00
};
};
}
2025-01-04 02:24:04 +00:00