nuke flake-utils-plus
This commit is contained in:
parent
4f531a83a9
commit
39fb83a20b
36
flake.lock
36
flake.lock
|
@ -68,21 +68,6 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"flake-utils_2": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"home-manager": {
|
||||
"inputs": {
|
||||
"nixpkgs": [
|
||||
|
@ -260,8 +245,7 @@
|
|||
"nixpkgs": "nixpkgs",
|
||||
"notlua": "notlua",
|
||||
"nur": "nur",
|
||||
"rust-overlay": "rust-overlay",
|
||||
"utils": "utils_2"
|
||||
"rust-overlay": "rust-overlay"
|
||||
}
|
||||
},
|
||||
"rust-overlay": {
|
||||
|
@ -314,24 +298,6 @@
|
|||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1657226504,
|
||||
"narHash": "sha256-GIYNjuq4mJlFgqKsZ+YrgzWm0IpA4axA3MCrdKYj7gs=",
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"rev": "2bf0f91643c2e5ae38c1b26893ac2927ac9bd82a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "gytis-ivaskevicius",
|
||||
"repo": "flake-utils-plus",
|
||||
"type": "github"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
|
|
38
flake.nix
38
flake.nix
|
@ -3,7 +3,6 @@
|
|||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
|
||||
nixos-hardware.url = "github:NixOS/nixos-hardware";
|
||||
impermanence.url = "github:nix-community/impermanence";
|
||||
nur.url = "github:nix-community/NUR";
|
||||
|
@ -30,7 +29,7 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, utils, nixos-hardware, impermanence, home-manager, nur, nix-gaming, notlua, nixos-mailserver, ... }:
|
||||
outputs = inputs@{ self, nixpkgs, nixos-hardware, impermanence, home-manager, nur, nix-gaming, notlua, nixos-mailserver, ... }:
|
||||
let
|
||||
# IRL-related stuff I'd rather not put into git
|
||||
priv =
|
||||
|
@ -102,26 +101,39 @@
|
|||
];
|
||||
};
|
||||
};
|
||||
in utils.lib.mkFlake {
|
||||
inherit self inputs;
|
||||
hostDefaults.modules = [
|
||||
in {
|
||||
nixosConfigurations = builtins.mapAttrs (hostname: args @ { system ? "x86_64-linux", modules, ... }:
|
||||
lib.nixosSystem ({
|
||||
inherit system;
|
||||
modules = modules ++ [
|
||||
{ networking.hostName = hostname; }
|
||||
./system/modules/vfio.nix
|
||||
./system/modules/ccache.nix
|
||||
./system/modules/impermanence.nix
|
||||
./system/modules/common.nix
|
||||
impermanence.nixosModule
|
||||
(getPrivSys hostname)
|
||||
{
|
||||
nix.registry =
|
||||
builtins.mapAttrs
|
||||
(_: v: { flake = v; })
|
||||
(lib.filterAttrs (_: v: v?outputs) inputs);
|
||||
|
||||
# add import'able flakes (like nixpkgs) to nix path
|
||||
environment.etc = lib.mapAttrs'
|
||||
(name: value: {
|
||||
name = "nix/inputs/${name}";
|
||||
value = { source = value.outPath; };
|
||||
})
|
||||
(lib.filterAttrs (_: v: builtins.pathExists "${v}/default.nix") inputs);
|
||||
nix.nixPath = [ "/etc/nix/inputs" ];
|
||||
}
|
||||
];
|
||||
hosts = builtins.mapAttrs (hostname: args @ { system ? "x86_64-linux", modules, ... }: {
|
||||
inherit system;
|
||||
modules = modules ++ [ (getPrivSys hostname) ];
|
||||
extraArgs = {
|
||||
inherit nixpkgs;
|
||||
};
|
||||
specialArgs = {
|
||||
inherit lib;
|
||||
inherit lib nixpkgs;
|
||||
hardware = nixos-hardware.nixosModules;
|
||||
};
|
||||
} // (builtins.removeAttrs args [ "home" "modules" ]))
|
||||
} // (builtins.removeAttrs args [ "home" "modules" ])))
|
||||
config;
|
||||
} // {
|
||||
homeConfigurations =
|
||||
|
|
|
@ -48,10 +48,6 @@
|
|||
extraOptions = ''
|
||||
experimental-features = nix-command flakes
|
||||
'';
|
||||
# from flake-utils-plus: make this flake's nixpkgs available to the whole system
|
||||
generateNixPathFromInputs = true;
|
||||
generateRegistryFromInputs = true;
|
||||
linkInputs = true;
|
||||
};
|
||||
systemd.services.nix-daemon.serviceConfig.LimitSTACKSoft = "infinity";
|
||||
boot.kernelParams = lib.optionals (cfg.resolution != null) [
|
||||
|
|
Loading…
Reference in a new issue