116 lines
2.9 KiB
Nix
116 lines
2.9 KiB
Nix
{
|
|
description = "NixOS Configuration";
|
|
|
|
inputs = {
|
|
nixpkgs = {
|
|
url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
darwin.url = "github:lnl7/nix-darwin/master";
|
|
darwin.inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
impermanence = {
|
|
url = "github:nix-community/impermanence";
|
|
};
|
|
|
|
lanzaboote = {
|
|
url = "github:nix-community/lanzaboote";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
|
|
nixneovimplugins = {
|
|
url = "github:nixneovim/nixneovimplugins";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
nixpkgs,
|
|
darwin,
|
|
home-manager,
|
|
impermanence,
|
|
lanzaboote,
|
|
nixneovimplugins,
|
|
} @ inputs: let
|
|
user = (import ./secrets.nix).users;
|
|
in {
|
|
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
|
|
formatter."x86_64-darwin" = nixpkgs.legacyPackages."x86_64-darwin".alejandra;
|
|
nixosConfigurations = {
|
|
Skipper = nixpkgs.lib.nixosSystem rec {
|
|
system = "x86_64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
overlays = [(import ./packages) nixneovimplugins.overlays.default];
|
|
};
|
|
specialArgs = inputs;
|
|
modules = [
|
|
{
|
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
}
|
|
|
|
home-manager.nixosModules.home-manager
|
|
impermanence.nixosModules.impermanence
|
|
lanzaboote.nixosModules.lanzaboote
|
|
|
|
./common
|
|
./hosts/skipper
|
|
|
|
{
|
|
home-manager = {
|
|
useUserPackages = true;
|
|
useGlobalPkgs = true;
|
|
users.${user.primary.userName} = {pkgs, ...}: {
|
|
imports = [
|
|
impermanence.nixosModules.home-manager.impermanence
|
|
./home
|
|
];
|
|
};
|
|
};
|
|
}
|
|
];
|
|
};
|
|
Rico2 = nixpkgs.lib.nixosSystem rec {
|
|
system = "aarch64-linux";
|
|
pkgs = import nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
};
|
|
specialArgs = inputs;
|
|
modules = [
|
|
{
|
|
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
|
|
}
|
|
./common
|
|
./hosts/rico2
|
|
];
|
|
};
|
|
};
|
|
homeConfigurations."${user.primary.userName}@Alex" = home-manager.lib.homeManagerConfiguration {
|
|
pkgs = import nixpkgs {
|
|
system = "x86_64-darwin";
|
|
config = {
|
|
allowUnfree = true;
|
|
};
|
|
overlays = [nixneovimplugins.overlays.default];
|
|
};
|
|
|
|
# Specify your home configuration modules here, for example,
|
|
# the path to your home.nix.
|
|
modules = [
|
|
(import ./home/darwin.nix {inherit user;})
|
|
];
|
|
};
|
|
};
|
|
}
|