configuration.nix/flake.nix

117 lines
2.9 KiB
Nix
Raw Normal View History

2023-03-15 22:11:59 +05:30
{
2023-03-25 22:10:42 +05:30
description = "NixOS Configuration";
2023-03-15 22:11:59 +05:30
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
darwin.url = "github:lnl7/nix-darwin/master";
darwin.inputs.nixpkgs.follows = "nixpkgs";
2023-04-01 23:20:13 +05:30
home-manager = {
2023-04-02 00:30:38 +05:30
url = "github:nix-community/home-manager";
2023-03-15 22:11:59 +05:30
inputs.nixpkgs.follows = "nixpkgs";
};
impermanence = {
2023-04-02 00:30:38 +05:30
url = "github:nix-community/impermanence";
2023-03-15 22:11:59 +05:30
};
2023-04-01 23:20:13 +05:30
lanzaboote = {
url = "github:nix-community/lanzaboote";
2023-04-01 23:20:13 +05:30
inputs.nixpkgs.follows = "nixpkgs";
};
2023-06-04 10:20:19 +05:30
nixneovimplugins = {
url = "github:nixneovim/nixneovimplugins";
2023-03-15 22:11:59 +05:30
inputs.nixpkgs.follows = "nixpkgs";
};
};
2023-05-18 16:11:26 +05:30
outputs = {
self,
nixpkgs,
darwin,
2023-05-18 16:11:26 +05:30
home-manager,
impermanence,
lanzaboote,
2023-06-04 10:20:19 +05:30
nixneovimplugins,
} @ inputs: let
user = (import ./secrets.nix).users;
in {
2023-05-18 16:11:26 +05:30
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".alejandra;
formatter."x86_64-darwin" = nixpkgs.legacyPackages."x86_64-darwin".alejandra;
nixosConfigurations = {
2023-05-28 22:54:11 +05:30
Skipper = nixpkgs.lib.nixosSystem rec {
2023-04-10 23:07:41 +05:30
system = "x86_64-linux";
2023-05-28 22:54:11 +05:30
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
2023-06-04 10:20:19 +05:30
overlays = [(import ./packages) nixneovimplugins.overlays.default];
2023-05-28 22:54:11 +05:30
};
2023-04-10 23:07:41 +05:30
specialArgs = inputs;
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
./common
2023-04-16 23:22:55 +05:30
./hosts/skipper
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
2023-05-18 16:11:26 +05:30
users.${user.primary.userName} = {pkgs, ...}: {
imports = [
impermanence.nixosModules.home-manager.impermanence
2023-05-27 19:55:24 +05:30
./home
];
};
};
}
2023-04-10 23:07:41 +05:30
];
};
2023-05-28 22:54:11 +05:30
Rico2 = nixpkgs.lib.nixosSystem rec {
2023-04-10 23:07:41 +05:30
system = "aarch64-linux";
2023-05-28 22:54:11 +05:30
pkgs = import nixpkgs {
inherit system;
config = {
allowUnfree = true;
};
2023-05-28 22:54:11 +05:30
};
2023-04-10 23:07:41 +05:30
specialArgs = inputs;
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
./common
2023-05-27 19:33:35 +05:30
./hosts/rico2
2023-04-10 23:07:41 +05:30
];
2023-03-15 22:11:59 +05:30
};
};
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;})
];
};
2023-04-10 23:07:41 +05:30
};
2023-03-15 22:11:59 +05:30
}