187 lines
7 KiB
Nix
187 lines
7 KiB
Nix
{
|
|
description = "My awesome system config";
|
|
|
|
/*
|
|
╔══════════════════════════════════════════════════════════╗
|
|
║ Inputs ║
|
|
╚══════════════════════════════════════════════════════════╝
|
|
*/
|
|
inputs = {
|
|
master.url = "github:nixos/nixpkgs";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
|
stable.url = "github:nixos/nixpkgs/nixos-22.11";
|
|
|
|
pre-commit-hooks.url = "github:cachix/pre-commit-hooks.nix";
|
|
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
|
|
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
|
utils.inputs.flake-utils.follows = "flake-utils";
|
|
|
|
agenix.url = "github:ryantm/agenix";
|
|
agenix.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager.url = "github:nix-community/home-manager";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
home-manager.inputs.utils.follows = "flake-utils";
|
|
|
|
asus-touchpad-numpad-driver.url = "github:MoritzBoehme/asus-touchpad-numpad-driver/german-layout";
|
|
asus-touchpad-numpad-driver.flake = false;
|
|
|
|
arkenfox-userjs.url = "github:arkenfox/user.js";
|
|
arkenfox-userjs.flake = false;
|
|
|
|
howdy.url = "sourcehut:~moritzboehme/howdy";
|
|
howdy.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
emacs.url = "git+ssh://git@gitea.moritzboeh.me/moritz/emacs.git?ref=main";
|
|
|
|
neovim.url = "github:neovim/neovim/83bfd94d1df5eecb8e4069a227c7d24598636d63?dir=contrib"; # HACK to fix neovim not building at the moment
|
|
|
|
nil.url = "github:oxalica/nil";
|
|
nil.inputs.nixpkgs.follows = "nixpkgs";
|
|
nil.inputs.flake-utils.follows = "flake-utils";
|
|
|
|
hyprland.url = "github:hyprwm/Hyprland";
|
|
hyprpaper.url = "github:hyprwm/hyprpaper";
|
|
hypr-contrib.url = "github:hyprwm/contrib";
|
|
|
|
nvim-treesitter-textsubjects.url = "github:RRethy/nvim-treesitter-textsubjects";
|
|
nvim-treesitter-textsubjects.flake = false;
|
|
|
|
smartcolumn-nvim.url = "github:m4xshen/smartcolumn.nvim";
|
|
smartcolumn-nvim.flake = false;
|
|
|
|
copilot-lua.url = "github:zbirenbaum/copilot.lua";
|
|
copilot-lua.flake = false;
|
|
|
|
lspsaga-nvim.url = "github:glepnir/lspsaga.nvim";
|
|
lspsaga-nvim.flake = false;
|
|
|
|
advanced-git-search-nvim.url = "github:aaronhallaert/advanced-git-search.nvim";
|
|
advanced-git-search-nvim.flake = false;
|
|
|
|
comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim";
|
|
comment-box-nvim.flake = false;
|
|
|
|
attic.url = "github:zhaofengli/attic";
|
|
attic.inputs.nixpkgs.follows = "nixpkgs";
|
|
attic.inputs.nixpkgs-stable.follows = "stable";
|
|
attic.inputs.flake-utils.follows = "flake-utils";
|
|
};
|
|
|
|
/*
|
|
╔══════════════════════════════════════════════════════════╗
|
|
║ Outputs ║
|
|
╚══════════════════════════════════════════════════════════╝
|
|
*/
|
|
outputs =
|
|
inputs@{ self, nixpkgs, utils, ... }:
|
|
utils.lib.mkFlake {
|
|
inherit self inputs;
|
|
|
|
supportedSystems = [ "x86_64-linux" ];
|
|
|
|
channelsConfig.allowUnfree = true;
|
|
|
|
lib = nixpkgs.lib.extend
|
|
(self: super: { my = import ./lib { lib = self; }; });
|
|
|
|
/*
|
|
╔══════════════════════════════════════════════════════════╗
|
|
║ Overlays ║
|
|
╚══════════════════════════════════════════════════════════╝
|
|
*/
|
|
overlay = import ./overlays {
|
|
inherit inputs;
|
|
inherit (self) lib;
|
|
};
|
|
|
|
channels.nixpkgs.overlaysBuilder = channels: [
|
|
inputs.emacs.overlays.default
|
|
inputs.howdy.overlays.default
|
|
inputs.hypr-contrib.overlays.default
|
|
inputs.hyprland.overlays.default
|
|
inputs.utils.overlay
|
|
self.overlay
|
|
];
|
|
|
|
# overlays = utils.lib.exportOverlays {
|
|
# inherit (self) pkgs inputs;
|
|
# };
|
|
|
|
overlays.default = self.overlay;
|
|
|
|
/*
|
|
╔══════════════════════════════════════════════════════════╗
|
|
║ Modules ║
|
|
╚══════════════════════════════════════════════════════════╝
|
|
*/
|
|
nixosModules = utils.lib.exportModules [
|
|
./modules/profiles/base.nix
|
|
./modules/profiles/gaming.nix
|
|
./modules/profiles/desktop.nix
|
|
];
|
|
|
|
hostDefaults.modules = [
|
|
./modules/default.nix
|
|
self.nixosModules.base
|
|
inputs.home-manager.nixosModule
|
|
{
|
|
home-manager = {
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
extraSpecialArgs = { inherit inputs self; };
|
|
};
|
|
}
|
|
inputs.hyprland.nixosModules.default
|
|
inputs.agenix.nixosModules.age
|
|
inputs.howdy.nixosModules.default
|
|
];
|
|
|
|
|
|
hosts.nixos-laptop.modules = [
|
|
./hosts/nixos-laptop
|
|
self.nixosModules.desktop
|
|
self.nixosModules.gaming
|
|
];
|
|
|
|
|
|
hosts.nixos-desktop.modules = [
|
|
./hosts/nixos-desktop
|
|
self.nixosModules.desktop
|
|
self.nixosModules.gaming
|
|
];
|
|
|
|
/*
|
|
╔══════════════════════════════════════════════════════════╗
|
|
║ Other Outputs ║
|
|
╚══════════════════════════════════════════════════════════╝
|
|
*/
|
|
outputsBuilder = channels:
|
|
with channels.nixpkgs; {
|
|
devShells.default = mkShell {
|
|
inherit (self.checks.${system}.pre-commit-check) shellHook;
|
|
name = "dotfiles";
|
|
packages = [
|
|
# Secrets
|
|
pkgs.agenix
|
|
# cachix
|
|
cachix
|
|
];
|
|
};
|
|
|
|
checks.pre-commit-check = inputs.pre-commit-hooks.lib."${system}".run {
|
|
src = ./.;
|
|
hooks = {
|
|
nixpkgs-fmt.enable = true;
|
|
statix.enable = true;
|
|
shellcheck.enable = true;
|
|
stylua.enable = true;
|
|
};
|
|
};
|
|
|
|
packages = utils.lib.exportPackages self.overlays channels;
|
|
};
|
|
};
|
|
}
|