configuration.nix/flake.nix

170 lines
3.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";
};
2023-08-05 14:36:01 +05:30
flake-utils = {
url = "github:numtide/flake-utils";
};
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-11-03 19:17:33 +05:30
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
2023-04-01 23:20:13 +05:30
};
2023-07-28 16:24:59 +05:30
2023-08-04 18:04:51 +05:30
nixvim = {
url = "github:nix-community/nixvim";
2023-11-03 19:17:33 +05:30
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
2023-08-04 18:04:51 +05:30
};
2023-10-28 03:55:35 +05:30
2023-11-03 19:17:33 +05:30
www = {
2023-10-28 04:31:09 +05:30
url = "github:adtya/adtya.xyz";
2023-11-03 19:17:33 +05:30
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
2023-10-28 04:31:09 +05:30
};
2023-10-28 05:11:41 +05:30
wiki = {
url = "github:adtya/wiki";
2023-11-03 19:17:33 +05:30
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
2023-10-28 05:11:41 +05:30
};
2023-10-28 03:55:35 +05:30
if3 = {
url = "github:adtya/if3-docs";
2023-11-03 19:17:33 +05:30
inputs = {
flake-utils.follows = "flake-utils";
nixpkgs.follows = "nixpkgs";
};
2023-10-28 03:55:35 +05:30
};
2023-03-15 22:11:59 +05:30
};
2023-05-18 16:11:26 +05:30
outputs = {
self,
nixpkgs,
2023-08-05 14:36:01 +05:30
flake-utils,
2023-05-18 16:11:26 +05:30
home-manager,
impermanence,
lanzaboote,
2023-08-04 18:04:51 +05:30
nixvim,
2023-11-03 19:17:33 +05:30
www,
2023-10-28 05:11:41 +05:30
wiki,
2023-10-28 03:55:35 +05:30
if3,
} @ inputs: let
2023-08-05 14:04:52 +05:30
secrets = import ./secrets.nix;
2023-09-24 03:39:32 +05:30
nixpkgs-config = {
2023-08-14 20:47:09 +05:30
allowUnfree = true;
};
2023-08-05 14:36:01 +05:30
in
{
nixosConfigurations = {
Skipper = nixpkgs.lib.nixosSystem rec {
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
2023-09-24 03:39:32 +05:30
config = nixpkgs-config;
2023-08-05 14:36:01 +05:30
overlays = [(import ./packages)];
};
2023-08-05 14:36:01 +05:30
specialArgs = inputs // {inherit secrets;};
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
2023-04-10 23:07:41 +05:30
2023-08-05 14:36:01 +05:30
home-manager.nixosModules.home-manager
impermanence.nixosModules.impermanence
lanzaboote.nixosModules.lanzaboote
2023-04-10 23:07:41 +05:30
2023-08-05 14:36:01 +05:30
./common
./hosts/skipper
2023-08-05 14:36:01 +05:30
{
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {inherit secrets;};
users.${secrets.users.primary.userName} = {pkgs, ...}: {
imports = [
impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim
./home
];
};
};
2023-08-05 14:36:01 +05:30
}
];
};
2023-08-15 13:06:06 +05:30
Rico1 = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
pkgs = import nixpkgs {
inherit system;
2023-09-24 03:39:32 +05:30
config = nixpkgs-config;
2023-08-15 13:06:06 +05:30
};
specialArgs = inputs // {inherit secrets;};
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
./common
./hosts/rico1
];
};
2023-08-05 14:36:01 +05:30
Rico2 = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
pkgs = import nixpkgs {
inherit system;
2023-09-24 03:39:32 +05:30
config = nixpkgs-config;
};
2023-08-05 14:36:01 +05:30
specialArgs = inputs // {inherit secrets;};
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
2023-07-28 16:24:59 +05:30
2023-08-05 14:36:01 +05:30
./common
./hosts/rico2
];
};
2023-03-15 22:11:59 +05:30
};
2023-08-05 14:36:01 +05:30
}
// flake-utils.lib.eachDefaultSystem (
system: let
pkgs = import nixpkgs {
inherit system;
};
in
with pkgs; {
formatter = pkgs.alejandra;
devShells.default = mkShell {
buildInputs = [
2023-08-05 14:44:19 +05:30
git
2023-08-05 14:36:01 +05:30
git-crypt
2023-08-05 14:44:19 +05:30
statix
2023-08-05 14:36:01 +05:30
];
};
}
);
2023-03-15 22:11:59 +05:30
}