configuration.nix/flake.nix

102 lines
2.4 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";
};
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-07-28 16:24:59 +05:30
2023-08-04 18:04:51 +05:30
nixvim = {
url = "github:nix-community/nixvim";
inputs.nixpkgs.follows = "nixpkgs";
};
2023-03-15 22:11:59 +05:30
};
2023-05-18 16:11:26 +05:30
outputs = {
self,
nixpkgs,
home-manager,
impermanence,
lanzaboote,
2023-08-04 18:04:51 +05:30
nixvim,
} @ inputs: let
2023-08-05 14:04:52 +05:30
secrets = import ./secrets.nix;
in {
2023-05-18 16:11:26 +05:30
formatter."x86_64-linux" = nixpkgs.legacyPackages."x86_64-linux".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-08-05 10:34:23 +05:30
overlays = [(import ./packages)];
2023-05-28 22:54:11 +05:30
};
2023-07-01 17:45:08 +05:30
specialArgs = inputs // {inherit secrets;};
2023-04-10 23:07:41 +05:30
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-07-01 17:45:08 +05:30
extraSpecialArgs = {inherit secrets;};
users.${secrets.users.primary.userName} = {pkgs, ...}: {
imports = [
impermanence.nixosModules.home-manager.impermanence
2023-08-04 18:04:51 +05:30
nixvim.homeManagerModules.nixvim
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-07-01 17:45:08 +05:30
specialArgs = inputs // {inherit secrets;};
2023-04-10 23:07:41 +05:30
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
2023-07-28 16:24:59 +05:30
2023-08-04 18:04:51 +05:30
nixvim.nixosModules.nixvim
2023-07-28 16:24:59 +05:30
./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
};
};
2023-04-10 23:07:41 +05:30
};
2023-03-15 22:11:59 +05:30
}