flakes/flake.nix

98 lines
4 KiB
Nix
Raw Normal View History

2021-05-11 14:32:58 +07:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2021-07-04 21:25:20 +07:00
home-manager.url = "github:nix-community/home-manager";
2025-04-05 13:05:59 +11:00
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2025-04-05 13:05:59 +11:00
agenix.url = "github:ryantm/agenix";
2021-09-20 15:09:44 +07:00
agenix.inputs.nixpkgs.follows = "nixpkgs";
2025-04-05 13:05:59 +11:00
aagl.url = "github:ezKEa/aagl-gtk-on-nix";
2025-01-24 12:57:53 +11:00
catppuccin.url = "github:catppuccin/nix/8eada392fd6571a747e1c5fc358dd61c14c8704e";
catppuccin.inputs.nixpkgs.follows = "nixpkgs";
catppuccin-palette = { url = "github:catppuccin/palette"; flake = false; };
2025-04-05 13:05:59 +11:00
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
2021-07-05 10:40:52 +07:00
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
2021-07-14 11:02:42 +07:00
2024-01-17 18:20:59 +07:00
nix-gaming.url = "github:fufexan/nix-gaming";
2026-03-15 21:06:20 +11:00
nix-index-database.url = "github:nix-community/nix-index-database";
nix-index-database.inputs.nixpkgs.follows = "nixpkgs";
spicetify-nix.url = "github:Gerg-L/spicetify-nix";
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
2022-02-14 18:34:46 +07:00
# services
2026-03-15 19:41:44 +11:00
pastel.url = "github:cillynder/pastel";
2025-05-22 22:57:47 +10:00
stevenblack-hosts = { url = "github:StevenBlack/hosts"; flake = false; };
2026-03-15 19:41:44 +11:00
website = { url = "github:cillynder/lavadesu.github.io/master"; flake = false; };
2022-02-14 18:34:46 +07:00
2021-07-14 11:02:42 +07:00
# zsh plugins
2024-12-07 22:39:40 +11:00
zsh-abbr = { url = "git+https://github.com/olets/zsh-abbr?submodules=1"; flake = false; };
2021-07-14 11:02:42 +07:00
zsh-history-substring-search = { url = "github:zsh-users/zsh-history-substring-search"; flake = false; };
fast-syntax-highlighting = { url = "github:zdharma-continuum/fast-syntax-highlighting"; flake = false; };
2021-07-15 14:59:23 +07:00
pure = { url = "github:sindresorhus/pure"; flake = false; };
2021-07-18 14:10:58 +07:00
# overlays
linux-tkg = { url = "github:Frogging-Family/linux-tkg"; flake = false; };
nvim-treesitter = { url = "github:nvim-treesitter/nvim-treesitter"; flake = false; };
2021-09-19 11:31:11 +07:00
spotify-adblock = { url = "github:abba23/spotify-adblock"; flake = false; };
2021-09-05 15:57:23 +07:00
tree-sitter-jsonc = { url = "gitlab:WhyNotHugo/tree-sitter-jsonc"; flake = false; };
2021-12-23 22:43:50 +07:00
wine-discord-ipc-bridge = { url = "github:0e4ef622/wine-discord-ipc-bridge"; flake = false; };
2026-03-15 15:53:14 +11:00
# containers
c-amethyst.url = "path:./containers/amethyst";
2026-03-15 19:27:29 +11:00
c-beryllium.url = "path:./containers/beryllium";
2026-03-16 00:48:51 +11:00
c-citrine.url = "path:./containers/citrine";
2026-03-17 14:37:36 +11:00
c-diamond.url = "path:./containers/diamond";
2021-05-11 14:32:58 +07:00
};
outputs = { self, agenix, catppuccin, nixpkgs, ... } @ inputs:
2021-05-13 17:59:46 +07:00
let
overlays = (import ./overlays)
++ [(final: prev: {
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
})];
patchOverlaysWithLinuxLava = nixpkgs: arch: ([(self: super: {
linuxLavaNixpkgs = import nixpkgs {
overlays = [ (import ./overlays/linux-lava.nix) ] ++ overlays;
system = arch;
};
})] ++ overlays);
mkSystem =
if !(self ? rev) then throw "Dirty git tree detected." else
nixpkgs: name: arch: extraModules: nixpkgs.lib.nixosSystem {
system = arch;
modules = [
({
nixpkgs.overlays = patchOverlaysWithLinuxLava nixpkgs arch;
})
2021-09-20 15:09:44 +07:00
agenix.nixosModules.age
2025-01-24 12:57:53 +11:00
catppuccin.nixosModules.catppuccin
(./hosts + "/${name}")
] ++ extraModules;
2022-02-02 00:21:37 +07:00
specialArgs = {
inherit inputs;
2022-02-02 00:21:37 +07:00
modules = import ./modules { lib = nixpkgs.lib; };
2025-05-19 19:43:57 +10:00
gcSecrets = builtins.fromJSON (builtins.readFile "${self}/secrets.gcrypt/shared.json");
2022-02-02 00:21:37 +07:00
};
};
2021-05-13 17:59:46 +07:00
in
{
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" [];
nixosConfigurations."dandelion" = mkSystem nixpkgs "dandelion" "aarch64-linux" [];
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" [];
2021-07-15 13:39:48 +07:00
packages."x86_64-linux" =
let
pkgs = import nixpkgs rec {
overlays = patchOverlaysWithLinuxLava nixpkgs system;
system = "x86_64-linux";
};
in
{
2024-03-14 13:55:04 +11:00
inherit (pkgs.me) linux-lava spotify-adblock;
linux-lava-ccache = pkgs.me.linux-lava.override { useCcache = true; };
};
2021-05-11 14:32:58 +07:00
};
}