2021-05-11 14:32:58 +07:00
|
|
|
{
|
|
|
|
|
inputs = {
|
2021-07-14 07:42:25 +07:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs";
|
2021-07-04 21:25:20 +07:00
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
2021-07-05 10:40:52 +07:00
|
|
|
neovim-nightly.url = "github:nix-community/neovim-nightly-overlay";
|
2021-09-20 15:09:44 +07:00
|
|
|
agenix.url = "github:ryantm/agenix";
|
2021-05-20 14:02:49 +07:00
|
|
|
|
2021-09-20 15:09:44 +07:00
|
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
2021-05-20 14:02:49 +07:00
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-05 10:40:52 +07:00
|
|
|
neovim-nightly.inputs.nixpkgs.follows = "nixpkgs";
|
2021-07-14 11:02:42 +07:00
|
|
|
|
2021-09-04 14:14:42 +07:00
|
|
|
nix-gaming.url = "github:fufexan/nix-gaming";
|
2021-08-19 21:42:26 +07:00
|
|
|
powercord-overlay.url = "github:LavaDesu/powercord-overlay";
|
|
|
|
|
powercord-overlay.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
|
|
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; };
|
2021-11-01 23:12:01 +07:00
|
|
|
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
|
2021-08-26 21:03:45 +07:00
|
|
|
discord-tokyonight = { url = "github:DanisDGK/zelk-customizations"; flake = false; };
|
2021-07-18 14:10:58 +07:00
|
|
|
discover = { url = "github:trigg/Discover"; 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-08-19 21:42:26 +07:00
|
|
|
|
|
|
|
|
# powercord plugins/themes
|
|
|
|
|
better-status-indicators = { url = "github:griefmodz/better-status-indicators"; flake = false; };
|
|
|
|
|
channel-typing = { url = "github:powercord-community/channel-typing"; flake = false; };
|
|
|
|
|
discord-tweaks = { url = "github:NurMarvin/discord-tweaks"; flake = false; };
|
|
|
|
|
fix-user-popouts = { url = "github:cyyynthia/fix-user-popouts"; flake = false; };
|
|
|
|
|
no-double-back-pc = { url = "github:the-cord-plug/no-double-back-pc"; flake = false; };
|
|
|
|
|
powercord-popout-fix = { url = "github:Nexure/PowerCord-Popout-Fix"; flake = false; };
|
|
|
|
|
rolecolor-everywhere = { url = "github:powercord-community/rolecolor-everywhere"; flake = false; };
|
|
|
|
|
theme-toggler = { url = "github:redstonekasi/theme-toggler"; flake = false; };
|
|
|
|
|
twemoji-but-good = { url = "github:powercord-community/twemoji-but-good"; flake = false; };
|
|
|
|
|
view-raw = { url = "github:Juby210/view-raw"; flake = false; };
|
|
|
|
|
who-reacted = { url = "github:jaimeadf/who-reacted"; flake = false; };
|
|
|
|
|
|
|
|
|
|
radialstatus = { url = "github:DiscordStyles/RadialStatus"; flake = false; };
|
|
|
|
|
tokyonight = { url = "github:Dyzean/Tokyo-Night"; flake = false; };
|
2021-08-26 21:03:45 +07:00
|
|
|
zelk = { url = "github:schnensch0/zelk"; flake = false; };
|
2021-05-11 14:32:58 +07:00
|
|
|
};
|
|
|
|
|
|
2021-09-20 15:09:44 +07:00
|
|
|
outputs = { self, agenix, nixpkgs, home-manager, ... } @ inputs:
|
2021-05-13 17:59:46 +07:00
|
|
|
let
|
2021-07-15 15:09:38 +07:00
|
|
|
lib = nixpkgs.lib;
|
|
|
|
|
|
2021-06-26 23:48:15 +07:00
|
|
|
getPaths = root: builtins.map
|
|
|
|
|
(path: root + ("/" + path)) # Prepends root path
|
|
|
|
|
(builtins.attrNames (builtins.readDir root)); # Reads root path
|
|
|
|
|
|
2021-07-15 15:09:38 +07:00
|
|
|
modules =
|
2021-07-15 19:57:49 +07:00
|
|
|
let
|
|
|
|
|
getName = path: lib.removeSuffix ".nix" ( # Strip extension
|
|
|
|
|
lib.last ( # Gets the last part (filename)
|
|
|
|
|
lib.splitString "/" ( # Splits the path into components
|
|
|
|
|
builtins.toString path # Converts the path into a string
|
|
|
|
|
)
|
2021-07-15 15:09:38 +07:00
|
|
|
)
|
2021-07-15 19:57:49 +07:00
|
|
|
);
|
|
|
|
|
genModulePaths = basePath: builtins.listToAttrs (
|
|
|
|
|
builtins.map (path: {
|
|
|
|
|
name = getName path;
|
|
|
|
|
value = path;
|
|
|
|
|
}) (getPaths basePath)
|
|
|
|
|
);
|
|
|
|
|
in {
|
|
|
|
|
user = genModulePaths ./modules/user;
|
|
|
|
|
system = genModulePaths ./modules/system;
|
|
|
|
|
};
|
2021-07-15 15:09:38 +07:00
|
|
|
|
2021-06-26 23:48:15 +07:00
|
|
|
customPackages = pkgs:
|
|
|
|
|
let
|
|
|
|
|
callPackage = pkgs.callPackage;
|
|
|
|
|
in {
|
2021-08-26 21:03:45 +07:00
|
|
|
discord-tokyonight = callPackage ./packages/discord-tokyonight {};
|
2021-07-18 14:10:58 +07:00
|
|
|
discover-overlay = callPackage ./packages/discover {};
|
2021-06-26 23:48:15 +07:00
|
|
|
linux-lava = callPackage ./packages/linux-lava {};
|
2021-10-10 14:03:12 +07:00
|
|
|
packwiz = callPackage ./packages/packwiz {};
|
2021-09-19 11:31:11 +07:00
|
|
|
spotify-adblock = callPackage ./packages/spotify-adblock {};
|
2021-09-05 11:36:43 +07:00
|
|
|
tree-sitter-glimmer = callPackage ./packages/tree-sitter-glimmer {};
|
2021-09-05 15:57:23 +07:00
|
|
|
tree-sitter-jsonc = callPackage ./packages/tree-sitter-jsonc {};
|
2021-06-26 23:48:15 +07:00
|
|
|
wine-osu = callPackage ./packages/wine-osu { inherit getPaths; };
|
|
|
|
|
};
|
|
|
|
|
|
2021-07-18 14:10:58 +07:00
|
|
|
overlays = [ (self: super: { inherit inputs; }) ] ++ (builtins.map
|
2021-06-26 23:48:15 +07:00
|
|
|
(path: import path) # Imports path
|
|
|
|
|
(builtins.filter
|
2021-07-15 15:09:38 +07:00
|
|
|
(path: lib.hasSuffix ".nix" path) # Checks file extension
|
2021-06-26 23:48:15 +07:00
|
|
|
(getPaths ./overlays)
|
|
|
|
|
)
|
2021-07-05 10:40:52 +07:00
|
|
|
) ++ [(self: super: customPackages super)]
|
2021-08-19 21:42:26 +07:00
|
|
|
++ [inputs.neovim-nightly.overlay]
|
|
|
|
|
++ [inputs.powercord-overlay.overlay];
|
2021-07-15 20:41:38 +07:00
|
|
|
|
|
|
|
|
mkSystem =
|
|
|
|
|
if !(self ? rev) then throw "Dirty git tree detected." else
|
|
|
|
|
name: arch: enableGUI: lib.nixosSystem {
|
|
|
|
|
system = arch;
|
|
|
|
|
modules = [
|
|
|
|
|
home-manager.nixosModules.home-manager
|
2021-09-20 15:09:44 +07:00
|
|
|
agenix.nixosModules.age
|
2021-08-21 17:50:30 +07:00
|
|
|
(./hosts + "/${name}")
|
2021-07-15 20:41:38 +07:00
|
|
|
];
|
|
|
|
|
specialArgs = { inherit inputs modules overlays enableGUI; };
|
|
|
|
|
};
|
2021-05-13 17:59:46 +07:00
|
|
|
in
|
|
|
|
|
{
|
2021-08-21 18:20:17 +07:00
|
|
|
nixosConfigurations."apricot" = mkSystem "apricot" "x86_64-linux" false;
|
2021-11-02 00:53:56 +07:00
|
|
|
nixosConfigurations."blossom" = mkSystem "blossom" "x86_64-linux" true;
|
2021-09-20 18:10:28 +07:00
|
|
|
nixosConfigurations."fondue" = mkSystem "fondue" "x86_64-linux" false;
|
2021-07-15 13:39:48 +07:00
|
|
|
|
2021-06-26 23:48:15 +07:00
|
|
|
packages.x86_64-linux = customPackages nixpkgs.legacyPackages.x86_64-linux;
|
2021-05-11 14:32:58 +07:00
|
|
|
};
|
|
|
|
|
}
|