96 lines
2.6 KiB
Nix
96 lines
2.6 KiB
Nix
{
|
|
description = "System conf";
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
|
mobile-nixos.url = "github:mobile-nixos/mobile-nixos";
|
|
mobile-nixos.flake = false;
|
|
|
|
sxmo.url = "github:wentam/sxmo-nix";
|
|
sxmo.flake = false;
|
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
tokyo-night-sddm-src.url = "github:rototrash/tokyo-night-sddm";
|
|
tokyo-night-sddm-src.flake = false;
|
|
|
|
macos-hyprcursor-src.url = "github:driedpampas/macOS-hyprcursor";
|
|
macos-hyprcursor-src.flake = false;
|
|
};
|
|
outputs = { self,
|
|
nixpkgs,
|
|
home-manager,
|
|
nixos-hardware,
|
|
mobile-nixos,
|
|
sxmo,
|
|
...}@inputs:
|
|
let
|
|
username = "kiana";
|
|
fullname = "Kiana Sheibani";
|
|
email = "kiana.a.sheibani@gmail.com";
|
|
|
|
moduleArgs = { inherit username fullname email; } // inputs;
|
|
|
|
mkConfig =
|
|
{ machine,
|
|
system ? "x86_64-linux",
|
|
configModules ? [ ./config ],
|
|
configExtraModules ? [],
|
|
homeModules ? [ ./home-manager ],
|
|
homeExtraModules ? []
|
|
}:
|
|
{
|
|
"toki-${machine}" = nixpkgs.lib.nixosSystem {
|
|
inherit system;
|
|
modules =
|
|
configModules ++
|
|
configExtraModules ++
|
|
[
|
|
./machine.nix
|
|
{ _module.args = moduleArgs;
|
|
inherit machine; }
|
|
./hardware-configuration/${machine}.nix
|
|
home-manager.nixosModules.home-manager
|
|
{
|
|
home-manager.useGlobalPkgs = true;
|
|
home-manager.useUserPackages = true;
|
|
home-manager.extraSpecialArgs = moduleArgs;
|
|
|
|
home-manager.sharedModules = [ ./machine.nix { inherit machine; } ];
|
|
home-manager.users.${username} = {
|
|
imports = homeModules ++ homeExtraModules;
|
|
};
|
|
}
|
|
];
|
|
};
|
|
};
|
|
in {
|
|
nixosConfigurations =
|
|
mkConfig {
|
|
machine = "earth";
|
|
} //
|
|
mkConfig {
|
|
machine = "fire";
|
|
configExtraModules = [
|
|
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
|
];
|
|
} //
|
|
mkConfig {
|
|
machine = "air";
|
|
system = "aarch64-linux";
|
|
configExtraModules = [
|
|
./mobile/config.nix
|
|
(import (mobile-nixos + /lib/configuration.nix)
|
|
{ device = "pine64-pinephonepro"; })
|
|
(sxmo + /modules/sxmo)
|
|
(sxmo + /modules/tinydm)
|
|
];
|
|
homeModules = [
|
|
./mobile/home-manager.nix
|
|
];
|
|
};
|
|
};
|
|
}
|