major rewrite of flake
This commit is contained in:
parent
f9a642398b
commit
9b99eef302
7 changed files with 214 additions and 2171 deletions
75
flake.nix
75
flake.nix
|
@ -13,7 +13,7 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch. Use github:gmodena/nix-flatpak/?ref=<tag> to pin releases.
|
||||
nix-flatpak.url = "github:gmodena/nix-flatpak"; # unstable branch
|
||||
|
||||
kmonad = {
|
||||
url = "git+https://github.com/kmonad/kmonad?submodules=1&dir=nix";
|
||||
|
@ -35,45 +35,62 @@
|
|||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
nix-ld.url = "github:Mic92/nix-ld";
|
||||
nix-ld.inputs.nixpkgs.follows = "nixpkgs";
|
||||
# nix-ld.url = "github:Mic92/nix-ld";
|
||||
# nix-ld.inputs.nixpkgs.follows = "nixpkgs";
|
||||
|
||||
# affinity-nix.url = "github:mrshmllow/affinity-nix";
|
||||
# affinity-nix.inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
outputs = {nixpkgs, nixpkgs-unstable, wezterm, home-manager, audio, nix-flatpak, kmonad, musnix, nix-ld, self, ... } @ inputs: {
|
||||
outputs = {nixpkgs, nixpkgs-unstable, wezterm, home-manager, audio, nix-flatpak, kmonad, musnix, self, ... } @ 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;
|
||||
|
||||
# packages = nixpkgs.legacyPackages.x86_64-linux;
|
||||
in {
|
||||
|
||||
nixosConfigurations = {
|
||||
eddie = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; }; # Pass flake inputs to our config
|
||||
modules = [
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
kmonad.nixosModules.default
|
||||
musnix.nixosModules.musnix
|
||||
nix-ld.nixosModules.nix-ld
|
||||
./system/eddie/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
formatter = forAllSystems (system: nixpkgs.legacyPackages.${system}.alejandra);
|
||||
|
||||
overlays = import ./overlays {inherit inputs;};
|
||||
|
||||
homeConfigurations = {
|
||||
"emenel" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
pkgs-unstable = nixpkgs-unstable.legacyPackages.x86_64-linux;
|
||||
nixosConfigurations = {
|
||||
eddie = nixpkgs.lib.nixosSystem {
|
||||
specialArgs = {
|
||||
inherit inputs outputs;
|
||||
pkgs-unstable = import nixpkgs-unstable { system = "x86_64-linux"; config.allowUnfree = true; };
|
||||
};
|
||||
modules = [
|
||||
nix-flatpak.nixosModules.nix-flatpak
|
||||
kmonad.nixosModules.default
|
||||
musnix.nixosModules.musnix
|
||||
./system/eddie/configuration.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
modules = [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
./home/home.nix
|
||||
];
|
||||
|
||||
homeConfigurations = {
|
||||
"emenel" = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages.x86_64-linux; # Home-manager requires 'pkgs' instance
|
||||
extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
modules = [
|
||||
nix-flatpak.homeManagerModules.nix-flatpak
|
||||
./home/home.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue