set up a default config
This commit is contained in:
commit
92c57d8825
11 changed files with 479 additions and 0 deletions
61
flake.nix
Normal file
61
flake.nix
Normal file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
description = "Mine very own Nix(OS) / home-manager / nix-darwin configuration";
|
||||
|
||||
inputs = {
|
||||
# Nixpkgs
|
||||
nixpkgs-stable.url = "github:nixos/nixpkgs/nixos-24.05";
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
# Home manager
|
||||
home-manager.url = "github:nix-community/home-manager/master";
|
||||
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ self
|
||||
, nixpkgs
|
||||
, home-manager
|
||||
, ...
|
||||
} @ inputs:
|
||||
let
|
||||
inherit (self) outputs;
|
||||
lib = nixpkgs.lib // home-manager.lib;
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-darwin"
|
||||
];
|
||||
forEachSystem = f: lib.genAttrs systems (system: import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
});
|
||||
username = "lu";
|
||||
in
|
||||
{
|
||||
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||
devShells = forEachSystem (pkgs: import ./shell.nix { inherit pkgs; });
|
||||
formatter = forEachSystem (pkgs: pkgs.nixpkgs-fmt);
|
||||
|
||||
overlays = import ./overlays { inherit inputs outputs; };
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
nixosConfigurations = {
|
||||
enoko = lib.nixosSystem {
|
||||
specialArgs = { inherit inputs outputs; };
|
||||
modules = [
|
||||
./nixos/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"${username}@yukari" = lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = { inherit inputs outputs username; };
|
||||
modules = [
|
||||
./home-manager/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue