2022-01-06 21:14:02 -05:00
|
|
|
{
|
|
|
|
description = "System conf";
|
2023-01-03 21:17:49 -05:00
|
|
|
inputs = {
|
2022-04-20 23:40:29 -04:00
|
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
2023-01-07 20:54:12 -05:00
|
|
|
|
2022-03-04 13:25:16 -05:00
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
2024-08-03 09:51:30 -04:00
|
|
|
mobile-nixos.url = "github:mobile-nixos/mobile-nixos";
|
2023-01-07 20:54:12 -05:00
|
|
|
mobile-nixos.flake = false;
|
2022-01-13 21:50:37 -05:00
|
|
|
|
2023-01-14 15:03:31 -05:00
|
|
|
sxmo.url = "github:wentam/sxmo-nix";
|
|
|
|
sxmo.flake = false;
|
2023-01-07 22:44:17 -05:00
|
|
|
|
2022-01-06 21:14:02 -05:00
|
|
|
home-manager.url = "github:nix-community/home-manager/master";
|
|
|
|
home-manager.inputs.nixpkgs.follows = "nixpkgs";
|
2022-10-26 15:54:00 -04:00
|
|
|
|
|
|
|
tokyo-night-sddm-src.url = "github:rototrash/tokyo-night-sddm";
|
|
|
|
tokyo-night-sddm-src.flake = false;
|
2022-01-06 21:14:02 -05:00
|
|
|
};
|
|
|
|
outputs = { self,
|
|
|
|
nixpkgs,
|
|
|
|
home-manager,
|
2022-01-13 21:50:37 -05:00
|
|
|
nixos-hardware,
|
2023-01-07 22:32:56 -05:00
|
|
|
mobile-nixos,
|
2023-01-07 22:44:17 -05:00
|
|
|
sxmo,
|
2022-01-06 21:14:02 -05:00
|
|
|
...}@inputs:
|
|
|
|
let
|
|
|
|
username = "kiana";
|
2022-10-26 15:54:00 -04:00
|
|
|
fullname = "Kiana Sheibani";
|
2024-02-13 15:13:46 -05:00
|
|
|
email = "kiana.a.sheibani@gmail.com";
|
|
|
|
|
|
|
|
moduleArgs = { inherit username fullname email; } // inputs;
|
2023-01-03 21:17:49 -05:00
|
|
|
|
2024-03-20 01:07:09 -04:00
|
|
|
mkConfig =
|
|
|
|
{ platform,
|
|
|
|
system ? "x86_64-linux",
|
|
|
|
configModules ? [ ./config ],
|
|
|
|
configExtraModules ? [],
|
|
|
|
homeModules ? [ ./home-manager ],
|
|
|
|
homeExtraModules ? []
|
|
|
|
}:
|
|
|
|
nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules =
|
|
|
|
configModules ++
|
|
|
|
configExtraModules ++
|
|
|
|
[
|
|
|
|
./platform.nix
|
|
|
|
{ _module.args = moduleArgs;
|
|
|
|
inherit platform; }
|
|
|
|
./hardware-configuration/${platform}.nix
|
2023-01-03 21:17:49 -05:00
|
|
|
|
2024-03-20 01:07:09 -04:00
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager.useGlobalPkgs = true;
|
|
|
|
home-manager.useUserPackages = true;
|
|
|
|
home-manager.extraSpecialArgs = moduleArgs;
|
2022-01-06 22:16:45 -05:00
|
|
|
|
2024-03-20 01:07:09 -04:00
|
|
|
home-manager.sharedModules = [ ./platform.nix { inherit platform; } ];
|
|
|
|
home-manager.users.${username} = {
|
|
|
|
imports = homeModules ++ homeExtraModules;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
in {
|
|
|
|
nixosConfigurations = {
|
|
|
|
"${username}-desktop" = mkConfig {
|
|
|
|
platform = "desktop";
|
|
|
|
};
|
2023-01-03 21:17:49 -05:00
|
|
|
|
2024-03-20 01:07:09 -04:00
|
|
|
"${username}-laptop" = mkConfig {
|
|
|
|
platform = "laptop";
|
|
|
|
configExtraModules = [
|
2023-05-15 10:47:52 -04:00
|
|
|
nixos-hardware.nixosModules.microsoft-surface-pro-intel
|
2022-01-11 22:38:54 -05:00
|
|
|
];
|
2022-01-06 22:16:45 -05:00
|
|
|
};
|
2023-01-07 20:54:12 -05:00
|
|
|
|
2024-03-20 01:07:09 -04:00
|
|
|
"${username}-mobile" = mkConfig {
|
|
|
|
platform = "mobile";
|
2023-01-07 22:51:37 -05:00
|
|
|
system = "aarch64-linux";
|
2024-05-12 19:01:06 -04:00
|
|
|
configExtraModules = [
|
2023-01-07 22:19:04 -05:00
|
|
|
./mobile/config.nix
|
2024-03-20 01:07:09 -04:00
|
|
|
(import (mobile-nixos + /lib/configuration.nix)
|
|
|
|
{ device = "pine64-pinephonepro"; })
|
|
|
|
(sxmo + /modules/sxmo)
|
|
|
|
(sxmo + /modules/tinydm)
|
|
|
|
];
|
|
|
|
homeModules = [
|
|
|
|
./mobile/home-manager.nix
|
2023-01-07 20:54:12 -05:00
|
|
|
];
|
|
|
|
};
|
2022-01-06 21:14:02 -05:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|