flakes/flake.nix

111 lines
4.5 KiB
Nix
Raw Normal View History

2021-05-11 14:32:58 +07:00
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
2022-11-27 14:30:59 +07:00
nixpkgs-raccoon.url = "github:NixOS/nixpkgs/nixos-22.11";
2021-07-04 21:25:20 +07:00
home-manager.url = "github:nix-community/home-manager";
2022-11-27 14:30:59 +07:00
home-manager-raccoon.url = "github:nix-community/home-manager/release-22.11";
2021-07-05 10:40:52 +07:00
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
2022-02-02 00:50:39 +07:00
nixos-hardware.url = "github:NixOS/nixos-hardware";
2021-09-20 15:09:44 +07:00
agenix.url = "github:ryantm/agenix";
nixos-generators.url = "github:nix-community/nixos-generators";
2023-01-23 22:18:27 +07:00
spicetify-nix.url = "github:the-argus/spicetify-nix";
2021-09-20 15:09:44 +07:00
agenix.inputs.nixpkgs.follows = "nixpkgs";
home-manager.inputs.nixpkgs.follows = "nixpkgs";
2022-11-27 14:30:59 +07:00
home-manager-raccoon.inputs.nixpkgs.follows = "nixpkgs-raccoon";
2021-07-05 10:40:52 +07:00
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
nixos-generators.inputs.nixpkgs.follows = "nixpkgs";
2023-01-23 22:18:27 +07:00
spicetify-nix.inputs.nixpkgs.follows = "nixpkgs";
2021-07-14 11:02:42 +07:00
nix-gaming.url = "github:fufexan/nix-gaming/81af8b6232ed99c46413ca6d43aeb185c53f65b8";
2022-02-14 18:34:46 +07:00
# services
2022-02-24 13:07:46 +07:00
hosts-blocklists = { url = "github:notracking/hosts-blocklists"; flake = false; };
2022-02-14 18:34:46 +07:00
website = { url = "github:LavaDesu/lavadesu.github.io/master"; flake = false; };
2023-06-22 23:34:14 +07:00
spicetify-themes = { url = "github:spicetify/spicetify-themes"; flake = false; };
2022-02-14 18:34:46 +07:00
2021-07-14 11:02:42 +07:00
# zsh plugins
zsh-abbr = { url = "github:olets/zsh-abbr"; flake = false; };
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
discord-tokyonight = { url = "github:DanisDGK/zelk-customizations"; flake = false; };
2021-07-18 14:10:58 +07:00
discover = { url = "github:trigg/Discover"; flake = false; };
linux-tkg = { url = "github:Frogging-Family/linux-tkg"; flake = false; };
nvim-treesitter = { url = "github:nvim-treesitter/nvim-treesitter"; flake = false; };
2021-10-10 14:03:12 +07:00
packwiz = { url = "github:comp500/packwiz"; flake = false; };
2021-09-19 11:31:11 +07:00
spotify-adblock = { url = "github:abba23/spotify-adblock"; flake = false; };
2021-09-05 11:36:43 +07:00
tree-sitter-glimmer = { url = "github:alexlafroscia/tree-sitter-glimmer"; 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; };
# shells
rust-overlay.url = "github:oxalica/rust-overlay";
rust-overlay.inputs.nixpkgs.follows = "nixpkgs";
2021-05-11 14:32:58 +07:00
};
2022-12-02 21:31:37 +07:00
outputs = { self, agenix, nixos-generators, nixpkgs, nixpkgs-raccoon, ... } @ inputs:
2021-05-13 17:59:46 +07:00
let
overlays = (import ./overlays)
++ [(final: prev: {
me = prev.callPackage ./packages { inherit inputs; } // { inherit inputs; };
})];
mkSystem =
if !(self ? rev) then throw "Dirty git tree detected." else
nixpkgs: name: arch: enableGUI: extraModules: nixpkgs.lib.nixosSystem {
system = arch;
modules = [
{ nixpkgs.overlays = overlays; }
2021-09-20 15:09:44 +07:00
agenix.nixosModules.age
(./hosts + "/${name}")
] ++ extraModules;
2022-02-02 00:21:37 +07:00
specialArgs = {
inherit inputs enableGUI;
modules = import ./modules { lib = nixpkgs.lib; };
};
};
2021-05-13 17:59:46 +07:00
in
{
2024-01-17 15:40:02 +07:00
nixosConfigurations."anemone" = mkSystem nixpkgs "anemone" "x86_64-linux" true [];
nixosConfigurations."blossom" = mkSystem nixpkgs "blossom" "x86_64-linux" true [];
2023-01-28 00:12:28 +07:00
nixosConfigurations."hyacinth" = mkSystem nixpkgs "hyacinth" "x86_64-linux" true [];
2021-07-15 13:39:48 +07:00
2022-11-27 14:30:59 +07:00
nixosConfigurations."caramel" = mkSystem nixpkgs-raccoon "caramel" "aarch64-linux" false [{
nixpkgs.overlays = [
(self: super: {
makeModulesClosure = x: super.makeModulesClosure (x // { allowMissing = true; });
})
];
}];
2022-12-02 21:31:37 +07:00
nixosConfigurations."sugarcane" = mkSystem nixpkgs-raccoon "sugarcane" "x86_64-linux" false [];
2022-02-02 00:50:39 +07:00
packages."x86_64-linux" =
let
pkgs = import nixpkgs {
inherit overlays;
system = "x86_64-linux";
};
in
{
inherit (pkgs.me) linux-lava;
};
packages."aarch64-linux" =
let
2022-11-27 14:30:59 +07:00
pkgs = import nixpkgs-raccoon {
inherit overlays;
system = "aarch64-linux";
};
in
{
2022-08-10 13:52:13 +07:00
caramel-img = self.nixosConfigurations."caramel".config.system.build.sdImage;
};
# TODO: currently broken
# devShells.x86_64-linux = pkgs.callPackage ./shells { inherit inputs; };
2021-05-11 14:32:58 +07:00
};
}