config/flake.nix

121 lines
2.9 KiB
Nix
Raw Normal View History

2023-12-28 21:33:09 -08:00
{
2024-02-22 15:27:47 -08:00
description = "New Modular flake!";
2023-12-28 21:33:09 -08:00
inputs = {
2024-02-22 15:27:47 -08:00
nixpkgs.url = "nixpkgs/nixos-unstable";
2024-09-27 14:29:46 -07:00
# nixpkgs.url = "github:NixOS/nixpkgs/master";
2024-02-22 15:27:47 -08:00
nixpkgs-stable.url = "nixpkgs/nixos-23.11";
2023-12-28 21:33:09 -08:00
2024-02-22 15:27:47 -08:00
home-manager.url = "github:nix-community/home-manager/master";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2023-12-28 21:33:09 -08:00
2025-02-11 12:40:34 -08:00
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-27 15:09:44 -07:00
darwin = {
url = "github:lnl7/nix-darwin/master";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-30 10:06:37 -07:00
hosts = {
2024-02-22 15:27:47 -08:00
url = "github:StevenBlack/hosts";
#flake = false;
};
2024-09-30 10:06:37 -07:00
2024-02-22 15:27:47 -08:00
hyprland.url = "github:hyprwm/Hyprland";
hyprland-plugins = {
url = "github:hyprwm/hyprland-plugins";
inputs.hyprland.follows = "hyprland";
#flake = false;
};
2024-05-20 17:28:40 -07:00
2024-06-22 19:05:32 -07:00
zig.url = "github:mitchellh/zig-overlay";
zls.url = "github:zigtools/zls?rev=a26718049a8657d4da04c331aeced1697bc7652b";
2025-02-18 16:34:53 -08:00
moonlight = {
url = "github:moonlight-mod/moonlight"; # Add `/develop` to the flake URL to use nightly.
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-27 14:29:46 -07:00
nixos-cosmic = {
url = "github:lilyinstarlight/nixos-cosmic";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-30 10:06:51 -07:00
2025-04-18 15:55:34 -07:00
nh = {
url = "github:viperML/nh";
2024-09-30 10:06:51 -07:00
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-30 10:06:37 -07:00
nix-options-search = {
url = "github:madsbv/nix-options-search";
};
2025-03-07 16:04:44 -08:00
2025-04-18 15:55:34 -07:00
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
2025-03-07 16:04:44 -08:00
chinese-fonts-overlay = {
url = "github:brsvh/chinese-fonts-overlay/main";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-12-28 21:33:09 -08:00
};
2025-04-18 15:55:34 -07:00
outputs = inputs @ {
2024-01-29 01:53:47 -08:00
nixpkgs,
2024-09-27 14:29:46 -07:00
nixos-cosmic,
2025-04-18 15:55:34 -07:00
nix-index-database,
darwin,
2024-01-29 01:53:47 -08:00
...
2025-04-18 15:55:34 -07:00
}: let
2024-06-22 19:05:32 -07:00
overlays = [
inputs.zig.overlays.default
2025-02-11 12:40:34 -08:00
inputs.rust-overlay.overlays.default
2025-03-07 16:04:44 -08:00
inputs.chinese-fonts-overlay.overlays.default
2025-04-18 15:55:34 -07:00
inputs.nh.overlays.default
2024-06-22 19:05:32 -07:00
];
2024-09-27 19:01:35 -07:00
inherit (nixpkgs) lib;
2025-04-18 15:55:34 -07:00
mkIfElse = p: yes: no:
lib.mkMerge [
(lib.mkIf p yes)
(lib.mkIf (!p) no)
];
user = "nmarks";
shared_modules = [
# {nixpkgs.overlays = overlays;}
# {programs.nix-index-database.comma.enable = true;}
# nixindex
# homemanagerModules
{
_module.args = {
inherit user;
inherit mkIfElse;
};
}
];
2024-02-22 15:27:47 -08:00
in {
2024-09-27 15:09:44 -07:00
nixosConfigurations = {
nixos = lib.nixosSystem {
2025-04-18 15:55:34 -07:00
system = "x86_64-linux";
modules =
[
./hosts/desktop/configuration.nix
nixos-cosmic.nixosModules.default
]
++ shared_modules;
2025-03-28 21:09:28 -07:00
specialArgs = inputs;
2023-12-28 21:33:09 -08:00
};
2024-01-29 01:53:47 -08:00
};
2024-09-27 19:01:35 -07:00
darwinConfigurations = {
"Natalies-MacBook-Air" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
2025-04-18 15:55:34 -07:00
specialArgs = inputs;
modules =
[
./hosts/laptop/configuration.nix
]
++ shared_modules;
2024-09-27 19:01:35 -07:00
};
2024-09-27 15:15:30 -07:00
};
2023-12-28 21:33:09 -08:00
};
}