flake: get rid of flake-parts!
This commit is contained in:
parent
5d74f31c98
commit
2d5ee6c621
11 changed files with 58 additions and 127 deletions
|
@ -1,12 +1,6 @@
|
|||
{
|
||||
withSystem,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
inputs: let
|
||||
inherit (inputs) self;
|
||||
inherit (self) lib;
|
||||
# inherit (lib.extendedLib.builders) mkSystem;
|
||||
# inherit (lib.extendedLib.modules) mkModuleTree';
|
||||
inherit (inputs.nixpkgs) lib;
|
||||
inherit (lib.lists) concatLists flatten singleton;
|
||||
inherit (lib) mkDefault nixosSystem recursiveUpdate;
|
||||
inherit (builtins) filter map toString;
|
||||
|
@ -16,59 +10,48 @@
|
|||
# to be quite a sane way of managing all modules in my flake.
|
||||
|
||||
mkSystem = {
|
||||
withSystem,
|
||||
system,
|
||||
hostname,
|
||||
...
|
||||
} @ args:
|
||||
withSystem system (
|
||||
{
|
||||
inputs',
|
||||
self',
|
||||
...
|
||||
}:
|
||||
nixosSystem {
|
||||
nixosSystem {
|
||||
inherit system;
|
||||
specialArgs =
|
||||
recursiveUpdate
|
||||
{
|
||||
inherit system;
|
||||
specialArgs =
|
||||
recursiveUpdate
|
||||
{
|
||||
inherit lib;
|
||||
inherit inputs inputs';
|
||||
inherit self self';
|
||||
}
|
||||
(args.specialArgs or {});
|
||||
modules = concatLists [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
(singleton {
|
||||
networking.hostName = args.hostname;
|
||||
nixpkgs.hostPlatform = mkDefault args.system;
|
||||
})
|
||||
(flatten (
|
||||
concatLists [
|
||||
(singleton ./${hostname}/default.nix)
|
||||
(
|
||||
filter (hasSuffix "module.nix") (
|
||||
map toString (listFilesRecursive ../modules)
|
||||
)
|
||||
)
|
||||
]
|
||||
))
|
||||
];
|
||||
inherit lib;
|
||||
inherit inputs;
|
||||
inherit self;
|
||||
}
|
||||
);
|
||||
(args.specialArgs or {});
|
||||
modules = concatLists [
|
||||
# This is used to pre-emptively set the hostPlatform for nixpkgs.
|
||||
# Also, we set the system hostname here.
|
||||
(singleton {
|
||||
networking.hostName = args.hostname;
|
||||
nixpkgs.hostPlatform = mkDefault args.system;
|
||||
})
|
||||
(flatten (
|
||||
concatLists [
|
||||
(singleton ./${hostname}/default.nix)
|
||||
(
|
||||
filter (hasSuffix "module.nix") (
|
||||
map toString (listFilesRecursive ../modules)
|
||||
)
|
||||
)
|
||||
]
|
||||
))
|
||||
];
|
||||
};
|
||||
in {
|
||||
flake.nixosConfigurations = {
|
||||
temperance = mkSystem {
|
||||
inherit withSystem;
|
||||
system = "x86_64-linux";
|
||||
hostname = "temperance";
|
||||
};
|
||||
temperance = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "temperance";
|
||||
};
|
||||
|
||||
hermit = mkSystem {
|
||||
inherit withSystem;
|
||||
system = "x86_64-linux";
|
||||
hostname = "hermit";
|
||||
};
|
||||
hermit = mkSystem {
|
||||
system = "x86_64-linux";
|
||||
hostname = "hermit";
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1,10 +1,4 @@
|
|||
{
|
||||
inputs',
|
||||
pkgs,
|
||||
...
|
||||
}: let
|
||||
inherit (inputs'.nixpkgs-stable.legacyPackages) calibre;
|
||||
in {
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs;
|
||||
[
|
||||
alsa-utils
|
||||
|
@ -12,6 +6,7 @@ in {
|
|||
asciinema
|
||||
cachix
|
||||
calc
|
||||
calibre
|
||||
difftastic
|
||||
element-desktop
|
||||
evince
|
||||
|
@ -63,6 +58,5 @@ in {
|
|||
xournalpp
|
||||
zapzap
|
||||
zoxide
|
||||
]
|
||||
++ [calibre];
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue