configuration.nix/flake.nix

200 lines
4.7 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
nixos-hardware = {
url = "github:NixOS/nixos-hardware";
};
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-06 01:31:56 +05:30
adtyaxyz = {
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-11-04 16:12:45 +05:30
outputs =
{ self
, nixpkgs
, flake-utils
, home-manager
, impermanence
, lanzaboote
, nixos-hardware
2023-11-04 16:12:45 +05:30
, nixvim
2023-11-06 01:31:56 +05:30
, adtyaxyz
2023-11-04 16:12:45 +05:30
, wiki
, if3
,
} @ inputs:
let
secrets = import ./secrets.nix;
nixpkgs-config = {
allowUnfree = true;
};
in
2023-08-05 14:36:01 +05:30
{
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-11-04 16:12:45 +05:30
overlays = [ (import ./packages) ];
};
2023-11-04 16:12:45 +05:30
specialArgs = inputs // { inherit secrets; };
2023-08-05 14:36:01 +05:30
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;
2023-11-04 16:12:45 +05:30
extraSpecialArgs = { inherit secrets; };
users.${secrets.users.primary.userName} = { pkgs, ... }: {
2023-08-05 14:36:01 +05:30
imports = [
impermanence.nixosModules.home-manager.impermanence
nixvim.homeManagerModules.nixvim
./home
];
};
};
2023-08-05 14:36:01 +05:30
}
];
};
2024-01-04 21:51:15 +05:30
Rico0 = nixpkgs.lib.nixosSystem rec {
system = "aarch64-linux";
pkgs = import nixpkgs {
inherit system;
config = nixpkgs-config;
};
specialArgs = inputs // { inherit secrets; };
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
nixos-hardware.nixosModules.raspberry-pi-4
./common
./hosts/rico0
];
};
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
};
2023-11-04 16:12:45 +05:30
specialArgs = inputs // { inherit secrets; };
2023-08-15 13:06:06 +05:30
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
nixos-hardware.nixosModules.raspberry-pi-4
2023-08-15 13:06:06 +05:30
./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-11-04 16:12:45 +05:30
specialArgs = inputs // { inherit secrets; };
2023-08-05 14:36:01 +05:30
modules = [
{
system.configurationRevision = nixpkgs.lib.mkIf (self ? rev) self.rev;
}
2023-07-28 16:24:59 +05:30
nixos-hardware.nixosModules.raspberry-pi-4
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 (
2023-11-04 16:12:45 +05:30
system:
let
2023-08-05 14:36:01 +05:30
pkgs = import nixpkgs {
inherit system;
};
in
2023-11-04 16:12:45 +05:30
with pkgs; {
formatter = nixpkgs-fmt;
devShells.default = mkShell {
buildInputs = [
git
git-crypt
statix
];
};
}
2023-08-05 14:36:01 +05:30
);
2023-03-15 22:11:59 +05:30
}