Migrate corp configuration to this repository and use flakes
This commit is contained in:
parent
af5c966e5b
commit
ecbb1b932c
17 changed files with 1099 additions and 0 deletions
51
flake.nix
Normal file
51
flake.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
description = "Multi-host NixOS configuration";
|
||||
|
||||
inputs = {
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager/release-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||
nixvim = {
|
||||
url = "github:nix-community/nixvim/nixos-25.05";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, home-manager, nixpkgs, nixvim }:
|
||||
let
|
||||
allowed-unfree-packages = [
|
||||
"corefonts"
|
||||
];
|
||||
configFiles = pkgs.stdenv.mkDerivation {
|
||||
name = "config-files";
|
||||
src = ./configs;
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -r * $out/
|
||||
'';
|
||||
};
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
system = "x86_64-linux";
|
||||
in {
|
||||
nixosConfigurations = {
|
||||
corp = nixpkgs.lib.nixosSystem {
|
||||
modules = [
|
||||
./host/corp/configuration.nix
|
||||
./modules
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
config = {
|
||||
allowUnfreePredicate = pkg: builtins.elem (nixpkgs.lib.getName pkg) allowed-unfree-packages;
|
||||
};
|
||||
system = "${system}";
|
||||
};
|
||||
specialArgs = {
|
||||
inherit configFiles;
|
||||
};
|
||||
system = "${system}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue