mirror of
https://github.com/Moe1369/nixos-config.git
synced 2024-10-18 04:14:08 +02:00
format
This commit is contained in:
parent
aeda5c47ce
commit
7da9c00d71
164
flake.nix
164
flake.nix
@ -15,63 +15,115 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
# Define Outputs, import Modules
|
# Define Outputs, import Modules
|
||||||
outputs = { nixpkgs, home-manager, jovian, plasma-manager, ...}:
|
outputs =
|
||||||
let
|
{
|
||||||
# Define system globally since I have no aarch devices
|
nixpkgs,
|
||||||
system = "x86_64-linux";
|
home-manager,
|
||||||
pkgs = import nixpkgs { inherit system;};
|
jovian,
|
||||||
lib = nixpkgs.lib;
|
plasma-manager,
|
||||||
# NixOS Modules for all hosts
|
...
|
||||||
systemModules = [
|
}:
|
||||||
home-manager.nixosModules.home-manager
|
let
|
||||||
./modules/system/apps-shell
|
# Define system globally since I have no aarch devices
|
||||||
./modules/system/boot
|
system = "x86_64-linux";
|
||||||
./modules/system/devices
|
pkgs = import nixpkgs { inherit system; };
|
||||||
./modules/system/locale
|
lib = nixpkgs.lib;
|
||||||
./modules/system/networking
|
# NixOS Modules for all hosts
|
||||||
./modules/system/nixsettings
|
systemModules = [
|
||||||
./modules/system/shell
|
home-manager.nixosModules.home-manager
|
||||||
./modules/system/systemversion
|
./modules/system/apps-shell
|
||||||
./modules/system/upgrades
|
./modules/system/boot
|
||||||
./modules/system/users
|
./modules/system/devices
|
||||||
];
|
./modules/system/locale
|
||||||
# Home Manager Modules for all hosts
|
./modules/system/networking
|
||||||
userModules = [
|
./modules/system/nixsettings
|
||||||
./modules/user/git
|
./modules/system/shell
|
||||||
./modules/user/homeversion
|
./modules/system/systemversion
|
||||||
];
|
./modules/system/upgrades
|
||||||
in
|
./modules/system/users
|
||||||
{
|
];
|
||||||
|
# Home Manager Modules for all hosts
|
||||||
nixosConfigurations = {
|
userModules = [
|
||||||
# user and hostName variable inside hostConfig so we can call it in other modules
|
./modules/user/git
|
||||||
computer-mo = let
|
./modules/user/homeversion
|
||||||
user = "mo";
|
];
|
||||||
hostName = "computer-mo";
|
in
|
||||||
in lib.nixosSystem {
|
{
|
||||||
specialArgs = {inherit systemModules; inherit userModules; inherit system; inherit user; inherit hostName;};
|
nixosConfigurations = {
|
||||||
system = system;
|
# Workstation config
|
||||||
# Device specific NixOS Modules
|
# user and hostName variable inside hostConfig so we can call it in other modules
|
||||||
modules = systemModules ++ [
|
computer-mo =
|
||||||
jovian.nixosModules.jovian
|
let
|
||||||
./hosts/${hostName}
|
user = "mo";
|
||||||
./modules/system/apps-misc
|
hostName = "computer-mo";
|
||||||
./modules/system/browser
|
in
|
||||||
./modules/system/controller
|
lib.nixosSystem {
|
||||||
./modules/system/jovian-desktop
|
specialArgs = {
|
||||||
./modules/system/lact
|
inherit systemModules;
|
||||||
./modules/system/plasma
|
inherit userModules;
|
||||||
./modules/system/steam
|
inherit system;
|
||||||
{
|
inherit user;
|
||||||
# Device specific Home Manager Modules
|
inherit hostName;
|
||||||
home-manager.users.${user}.imports = userModules ++ [
|
};
|
||||||
./modules/user/plasma
|
system = system;
|
||||||
|
# Device specific NixOS Modules
|
||||||
|
modules = systemModules ++ [
|
||||||
|
jovian.nixosModules.jovian
|
||||||
|
./hosts/${hostName}
|
||||||
|
./modules/system/apps-misc
|
||||||
|
./modules/system/browser
|
||||||
|
./modules/system/controller
|
||||||
|
./modules/system/jovian-desktop
|
||||||
|
./modules/system/lact
|
||||||
|
./modules/system/plasma
|
||||||
|
./modules/system/steam
|
||||||
|
{
|
||||||
|
# Device specific Home Manager Modules
|
||||||
|
home-manager.users.${user}.imports = userModules ++ [
|
||||||
|
./modules/user/plasma
|
||||||
|
];
|
||||||
|
# Issue with Plasma Manager, has to be imported in a special way
|
||||||
|
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||||
|
}
|
||||||
];
|
];
|
||||||
# Issue with Plasma Manager, has to be imported in a special way
|
};
|
||||||
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
};
|
||||||
|
# Steamdeck config
|
||||||
|
# user and hostName variable inside hostConfig so we can call it in other modules
|
||||||
|
steamdeck =
|
||||||
|
let
|
||||||
|
user = "deck";
|
||||||
|
hostName = "steamdeck";
|
||||||
|
in
|
||||||
|
lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit systemModules;
|
||||||
|
inherit userModules;
|
||||||
|
inherit system;
|
||||||
|
inherit user;
|
||||||
|
inherit hostName;
|
||||||
|
};
|
||||||
|
system = system;
|
||||||
|
# Device specific NixOS Modules
|
||||||
|
modules = systemModules ++ [
|
||||||
|
jovian.nixosModules.jovian
|
||||||
|
./hosts/${hostName}
|
||||||
|
./modules/system/apps-misc
|
||||||
|
./modules/system/browser
|
||||||
|
./modules/system/controller
|
||||||
|
./modules/system/jovian-desktop
|
||||||
|
./modules/system/lact
|
||||||
|
./modules/system/plasma
|
||||||
|
./modules/system/steam
|
||||||
|
{
|
||||||
|
# Device specific Home Manager Modules
|
||||||
|
home-manager.users.${user}.imports = userModules ++ [
|
||||||
|
./modules/user/plasma
|
||||||
|
];
|
||||||
|
# Issue with Plasma Manager, has to be imported in a special way
|
||||||
|
home-manager.sharedModules = [ plasma-manager.homeManagerModules.plasma-manager ];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user