nixos/flake.nix

77 lines
2.1 KiB
Nix
Raw Normal View History

2021-07-13 09:53:22 +01:00
{
inputs = {
2022-07-17 19:30:45 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.05";
2022-07-06 19:34:12 +01:00
nixos-unstable.url = "github:NixOS/nixpkgs/master";
2021-07-13 09:53:22 +01:00
home-manager = {
2022-07-17 19:30:45 +01:00
url = "github:rycee/home-manager/release-22.05";
2021-07-13 09:53:22 +01:00
inputs.nixpkgs.follows = "nixpkgs";
2021-11-25 11:42:32 +00:00
};
2022-10-13 17:08:08 +01:00
vim-extra-plugins.url = "github:m15a/nixpkgs-vim-extra-plugins";
2021-07-13 09:53:22 +01:00
};
2021-10-13 13:29:07 +01:00
2022-10-13 17:08:08 +01:00
outputs =
inputs@{ self, nixpkgs, nixos-unstable, home-manager, vim-extra-plugins }:
2021-11-25 11:42:32 +00:00
let
2022-10-13 18:05:31 +01:00
x64System = "x86_64-linux";
darwinSystem = "aarch64-darwin";
2021-10-13 13:29:07 +01:00
2022-10-13 18:05:31 +01:00
wrapPkgsSystem = { system }:
import nixpkgs rec {
inherit system;
unstable = wrapUnstablePkgsSystem { inherit system; };
config.allowUnfree = true;
overlays = [
(final: prev: { inherit unstable; })
vim-extra-plugins.overlays.default
];
};
2021-10-13 13:29:07 +01:00
2022-10-13 18:05:31 +01:00
wrapUnstablePkgsSystem = { system }:
import nixos-unstable {
inherit system;
config.allowUnfree = true;
};
2021-10-13 13:29:07 +01:00
2022-10-13 18:05:31 +01:00
pkgsX64 = wrapPkgsSystem { system = x64System; };
unstableX64 = wrapUnstablePkgsSystem { system = x64System; };
2022-10-13 18:05:31 +01:00
utilsX64 = import ./lib {
inherit nixpkgs nixos-unstable home-manager;
pkgs = pkgsX64;
unstable = unstableX64;
system = x64System;
};
pkgsDarwin = wrapPkgsSystem { system = darwinSystem; };
unstableDarwin = wrapUnstablePkgsSystem { system = darwinSystem; };
utilsDarwin = import ./lib {
inherit nixpkgs nixos-unstable home-manager;
pkgs = pkgsDarwin;
unstable = unstableDarwin;
system = darwinSystem;
};
2022-11-22 12:05:53 +00:00
in
{
2021-11-25 11:42:32 +00:00
nixosConfigurations = {
2022-10-13 18:05:31 +01:00
architect = utilsX64.host.mkHost {
2021-11-25 11:42:32 +00:00
name = "architect";
2021-11-25 11:47:13 +00:00
users = [{
user = "giulio";
roles = [ ];
}];
2021-11-25 11:42:32 +00:00
};
2022-10-13 18:05:31 +01:00
gAluminum = utilsX64.host.mkHost {
2021-11-25 11:42:32 +00:00
name = "gAluminum";
users = [{
user = "giulio";
roles = [ "desktop" "ssh" "git" ];
}];
roles = [ "gnome" ];
};
2022-10-13 18:05:31 +01:00
proxy = utilsX64.host.mkHost {
2021-11-25 11:42:32 +00:00
name = "proxy";
users = [ ];
};
};
2021-08-23 12:25:36 +01:00
};
2021-07-13 09:53:22 +01:00
}