mirror of
https://github.com/foo-dogsquared/nixos-config.git
synced 2025-02-07 06:19:00 +00:00
chore: reformat codebase
This commit is contained in:
parent
7f3f83c757
commit
1957df91ea
34
flake.nix
34
flake.nix
@ -79,6 +79,21 @@
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, ... }:
|
||||
let
|
||||
# A set of image-related utilities for the flake outputs.
|
||||
inherit (import ./lib/extras/images.nix { inherit lib inputs; }) mkHost mkHome mkImage listImagesWithSystems;
|
||||
|
||||
# We're considering this as the variant since we'll export the custom
|
||||
# library as `lib` in the output attribute.
|
||||
lib = nixpkgs.lib.extend (import ./lib/extras/extend-lib.nix);
|
||||
|
||||
# Just add systems here and it should add systems to the outputs.
|
||||
defaultSystem = "x86_64-linux";
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
|
||||
# A set of images with their metadata that is usually built for usual
|
||||
# purposes. The format used here is whatever formats nixos-generators
|
||||
# support.
|
||||
@ -88,29 +103,13 @@
|
||||
# A set of users with their metadata to be deployed with home-manager.
|
||||
users = import ./setups/home-manager.nix { inherit lib inputs; };
|
||||
|
||||
# A set of image-related utilities for the flake outputs.
|
||||
inherit (import ./lib/extras/images.nix { inherit lib inputs; }) mkHost mkHome mkImage listImagesWithSystems;
|
||||
|
||||
# The order here is important(?).
|
||||
overlays = lib.attrValues self.overlays;
|
||||
|
||||
defaultSystem = "x86_64-linux";
|
||||
|
||||
# Just add systems here and it should add systems to the outputs.
|
||||
systems = [
|
||||
"x86_64-linux"
|
||||
"aarch64-linux"
|
||||
];
|
||||
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
|
||||
|
||||
extraArgs = {
|
||||
inherit (inputs) nix-colors;
|
||||
};
|
||||
|
||||
# We're considering this as the variant since we'll export the custom
|
||||
# library as `lib` in the output attribute.
|
||||
lib = nixpkgs.lib.extend (import ./lib/extras/extend-lib.nix);
|
||||
|
||||
# The shared configuration for the entire list of hosts for this cluster.
|
||||
# Take note to only set as minimal configuration as possible since we're
|
||||
# also using this with the stable version of nixpkgs.
|
||||
@ -365,7 +364,8 @@
|
||||
};
|
||||
in
|
||||
{
|
||||
apps = forAllSystems (system: let
|
||||
apps = forAllSystems (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in
|
||||
{
|
||||
|
@ -206,7 +206,8 @@ let
|
||||
};
|
||||
};
|
||||
|
||||
config = let
|
||||
config =
|
||||
let
|
||||
scriptName = "${session.name}-${name}-script";
|
||||
script = "${config.scriptPackage}/bin/${scriptName}";
|
||||
in
|
||||
@ -508,7 +509,8 @@ let
|
||||
inherit (utils.systemdUtils.lib)
|
||||
pathToUnit serviceToUnit targetToUnit timerToUnit socketToUnit;
|
||||
componentsUnits =
|
||||
lib.foldlAttrs (acc: name: component:
|
||||
lib.foldlAttrs
|
||||
(acc: name: component:
|
||||
acc // {
|
||||
"${component.id}.service" = serviceToUnit component.id component.serviceUnit;
|
||||
"${component.id}.target" = targetToUnit component.id component.targetUnit;
|
||||
@ -519,7 +521,8 @@ let
|
||||
} // lib.optionalAttrs (component.pathUnit != null) {
|
||||
"${component.id}.path" = pathToUnit component.id component.pathUnit;
|
||||
})
|
||||
{} config.components;
|
||||
{ }
|
||||
config.components;
|
||||
in
|
||||
componentsUnits // {
|
||||
"gnome-session@${name}.target" = targetToUnit "gnome-session@${name}" config.targetUnit;
|
||||
@ -585,10 +588,13 @@ let
|
||||
'';
|
||||
};
|
||||
|
||||
installDesktopSessions = builtins.map (display:
|
||||
displayScripts.${display}) config.display;
|
||||
installDesktopSessions = builtins.map
|
||||
(display:
|
||||
displayScripts.${display})
|
||||
config.display;
|
||||
|
||||
installSystemdUserUnits = lib.mapAttrsToList (n: v:
|
||||
installSystemdUserUnits = lib.mapAttrsToList
|
||||
(n: v:
|
||||
if (v ? overrideStrategy && v.overrideStrategy == "asDropin") then ''
|
||||
(
|
||||
unit="${v.unit}/${n}"
|
||||
@ -597,7 +603,8 @@ let
|
||||
)
|
||||
'' else ''
|
||||
install -Dm0644 "${v.unit}/${n}" -t "$out/share/systemd/user"
|
||||
'') config.systemdUserUnits;
|
||||
'')
|
||||
config.systemdUserUnits;
|
||||
|
||||
installDesktops = lib.mapAttrsToList
|
||||
(_: p: ''
|
||||
|
Loading…
Reference in New Issue
Block a user