121 lines
3.6 KiB
Nix
121 lines
3.6 KiB
Nix
{
|
|
description = "Nixos config flake";
|
|
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
haumea = {
|
|
url = "github:nix-community/haumea/v0.2.2";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = inputs @ {
|
|
flake-parts,
|
|
self,
|
|
haumea,
|
|
nixpkgs,
|
|
...
|
|
}:
|
|
flake-parts.lib.mkFlake {
|
|
inherit inputs;
|
|
} {
|
|
imports = [
|
|
# To import a flake module
|
|
#cajun-xmonad.default
|
|
];
|
|
|
|
systems = ["x86_64-linux" "aarch64-linux" "aarch64-darwin" "x86_64-darwin"];
|
|
perSystem = {
|
|
config,
|
|
self,
|
|
inputs,
|
|
system,
|
|
nixpkgs,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
# Per-system attributes can be defined here. The self' and inputs'
|
|
# module parameters provide easy access to attributes of the same
|
|
# system.
|
|
|
|
# Equivalent to inputs'.nixpkgs.legacyPackages.hello;
|
|
# packages.default = pkgs.hello;
|
|
# formatter = pkgs.nixfmt-rfc-style;
|
|
# pkgs = import nixpkgs {
|
|
# inherit system;
|
|
# config.allowUnfree = true;
|
|
# };
|
|
|
|
formatter = pkgs.alejandra;
|
|
};
|
|
flake = {
|
|
# The usual flake attributes can be defined here, including system-
|
|
# agnostic ones like nixosModule and system-enumerating ones, although
|
|
# those are more easily expressed in perSystem.
|
|
# nixosConfigurations.myhostname = "thonkpad";
|
|
nixosConfigurations.thonkpad = inputs.nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
pkgs = import inputs.nixpkgs {
|
|
inherit system;
|
|
|
|
config = {
|
|
allowUnfree = true;
|
|
packageOverrides = pkgs: {
|
|
# "package" = pkgs."package".overrideAttrs (attrs: {...})
|
|
};
|
|
};
|
|
overlays = [
|
|
# (final: prev: {
|
|
# nur = import inputs.nur {inherit (final) pkgs;};
|
|
# })
|
|
# inputs.emacs-overlay.overlay -- breaks doom on 30.??
|
|
# inputs.nur.overlay
|
|
];
|
|
|
|
# home.packages = with pkgs; [xrandr procps polybar bspwm sxhkd polybar-pulseaudio-control bluez];
|
|
};
|
|
specialArgs = {inherit inputs;};
|
|
# extraSpecialArgs = {inherit inputs;};
|
|
modules = [
|
|
./configuration.nix
|
|
# inputs.nixos-hardware.nixosModules.system76-gaze18
|
|
# agenix
|
|
# agenix.nixosModules.default
|
|
# home manager
|
|
# inputs.haumea.nixosModules
|
|
# self.h-lib
|
|
inputs.home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.users.synchronous = import ./home/home.nix;
|
|
home-manager.extraSpecialArgs = {inherit inputs;};
|
|
home-manager.backupFileExtension = "hm-backup";
|
|
|
|
# Optionally, use home-manager.extraSpecialArgs to pass
|
|
# arguments to home.nix
|
|
}
|
|
];
|
|
};
|
|
};
|
|
|
|
# outputs = { self, nixpkgs, ... }@inputs: {
|
|
# nixosConfigurations.default = nixpkgs.lib.nixosSystem {
|
|
# specialArgs = {inherit inputs;};
|
|
# modules = [
|
|
# ./configuration.nix
|
|
# # inputs.home-manager.nixosModules.default
|
|
# { home-manager.users.synch = import ./home.nix; }
|
|
# ];
|
|
# };
|
|
# };
|
|
};
|
|
}
|