mirror of
https://github.com/eRgo35/nix-config.git
synced 2026-02-04 13:06:13 +01:00
147
flake.nix
147
flake.nix
@@ -2,121 +2,74 @@
|
||||
description = "Mike's Flake";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs.url = "nixpkgs/nixos-23.11";
|
||||
# You can access packages and modules from different nixpkgs revs
|
||||
# at the same time. Here's an working example:
|
||||
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
|
||||
# Also see the 'unstable-packages' overlay at 'overlays/default.nix'.
|
||||
nixpkgs.url = "nixpkgs/nixos-unstable";
|
||||
chaotic.url = "github:chaotic-cx/nyx/nyxpkgs-unstable";
|
||||
|
||||
# Home manager
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-23.11";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# TODO: Add any other flake you might need
|
||||
# hardware.url = "github:nixos/nixos-hardware";
|
||||
|
||||
# Shameless plug: looking for a way to nixify your themes and make
|
||||
# everything match nicely? Try nix-colors!
|
||||
nix-colors.url = "github:misterio77/nix-colors";
|
||||
|
||||
neovim-nightly-overlay.url = "github:nix-community/neovim-nightly-overlay";
|
||||
|
||||
nvim-flake = {
|
||||
url = "github:Gerg-L/nvim-flake";
|
||||
};
|
||||
hyprsunset.url = "github:hyprwm/hyprsunset";
|
||||
hyprsysteminfo.url = "github:/hyprwm/hyprsysteminfo";
|
||||
hyprpolkitagent.url = "github:hyprwm/hyprpolkitagent";
|
||||
|
||||
hyprland = {
|
||||
url = "github:hyprwm/hyprland";
|
||||
type = "git";
|
||||
url = "https://github.com/hyprwm/Hyprland";
|
||||
submodules = true;
|
||||
};
|
||||
|
||||
split-monitor-workspaces = {
|
||||
url = "github:Duckonaut/split-monitor-workspaces";
|
||||
inputs.hyprland.follows = "hyprland"; # <- make sure this line is present for the plugin to work as intended
|
||||
};
|
||||
|
||||
lanzaboote = {
|
||||
url = "github:nix-community/lanzaboote/v0.4.1";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
inputs.pre-commit-hooks-nix.follows = "";
|
||||
};
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprwm-contrib = {
|
||||
url = "github:hyprwm/contrib";
|
||||
spicetify-nix = {
|
||||
url = "github:Gerg-L/spicetify-nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
hyprland-plugins = {
|
||||
url = "github:hyprwm/hyprland-plugins";
|
||||
inputs.hyprland.follows = "hyprland";
|
||||
stylix = {
|
||||
url = "github:danth/stylix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
nixpkgs-unstable,
|
||||
home-manager,
|
||||
...
|
||||
} @ inputs: let
|
||||
inherit (self) outputs;
|
||||
# Supported systems for your flake packages, shell, etc.
|
||||
systems = [
|
||||
"aarch64-linux"
|
||||
"i686-linux"
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
"x86_64-darwin"
|
||||
];
|
||||
# This is a function that generates an attribute by calling a function you
|
||||
# pass to it, with each system as an argument
|
||||
forAllSystems = nixpkgs.lib.genAttrs systems;
|
||||
in {
|
||||
# Your custom packages
|
||||
# Accessible through 'nix build', 'nix shell', etc
|
||||
# packages = forAllSystems (system: import ./pkgs nixpkgs.legacyPackages.${system});
|
||||
# Formatter for your nix files, available through 'nix fmt'
|
||||
# Other options beside 'alejandra' include 'nixpkgs-fmt'
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
outputs = { nixpkgs, ... } @inputs: {
|
||||
|
||||
# Your custom packages and modifications, exported as overlays
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
# Reusable nixos modules you might want to export
|
||||
# These are usually stuff you would upstream into nixpkgs
|
||||
nixosModules = import ./modules/nixos;
|
||||
# Reusable home-manager modules you might want to export
|
||||
# These are usually stuff you would upstream into home-manager
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
# NixOS configuration entrypoint
|
||||
# Available through 'nixos-rebuild --flake .#hostname'
|
||||
nixosConfigurations = {
|
||||
zion = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main NixOS configuration file <
|
||||
./hosts/zion/configuration.nix
|
||||
];
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "zion";
|
||||
};
|
||||
};
|
||||
thor = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main NixOS configuration file <
|
||||
./hosts/thor/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
# Standalone home-manager configuration entrypoint
|
||||
# Available through 'home-manager --flake .#username@hostname'
|
||||
homeConfigurations = {
|
||||
"mike@zion" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main home-manager configuration file <
|
||||
./home-manager/home.nix
|
||||
];
|
||||
thor = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "thor";
|
||||
};
|
||||
};
|
||||
"mike@thor" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
# > Main home-manager configuration file <
|
||||
./home-manager/home.nix
|
||||
];
|
||||
|
||||
server = nixpkgs.lib.nixosSystem {
|
||||
modules = [ ./hosts ];
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
username = "mike";
|
||||
hostname = "server";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user