2020-11-03 15:41:12 +05:30
|
|
|
{
|
2022-03-27 22:41:51 +05:30
|
|
|
description = "NixOS configuration (flake edition)";
|
2020-11-03 15:41:12 +05:30
|
|
|
|
2021-07-20 16:51:32 +05:30
|
|
|
inputs = {
|
2022-03-29 22:11:51 +05:30
|
|
|
nixpkgs = {
|
2022-07-05 21:33:47 +05:30
|
|
|
url = "github:nixos/nixpkgs/nixos-unstable";
|
2022-03-29 22:11:51 +05:30
|
|
|
};
|
2021-07-20 16:51:32 +05:30
|
|
|
home-manager = {
|
|
|
|
url = "github:nix-community/home-manager";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-02-22 03:01:29 +05:30
|
|
|
agenix = {
|
|
|
|
url = "github:ryantm/agenix";
|
|
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
|
|
};
|
2022-04-14 17:35:56 +05:30
|
|
|
nixos-hardware.url = "github:NixOS/nixos-hardware/master";
|
2023-04-30 15:29:10 +05:30
|
|
|
deploy-rs.url = "github:serokell/deploy-rs";
|
2021-07-20 16:51:32 +05:30
|
|
|
};
|
2020-11-03 15:41:12 +05:30
|
|
|
|
2022-04-20 00:08:33 +05:30
|
|
|
outputs =
|
|
|
|
{ self
|
|
|
|
, nixpkgs
|
|
|
|
, home-manager
|
|
|
|
, agenix
|
|
|
|
, nixos-hardware
|
2023-04-30 15:29:10 +05:30
|
|
|
, deploy-rs
|
2022-04-20 00:08:33 +05:30
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
|
|
|
common-modules = [
|
|
|
|
./cachix.nix
|
|
|
|
./modules/nix.nix
|
|
|
|
./modules/common.nix
|
2023-06-07 20:15:43 +05:30
|
|
|
./modules/fish.nix
|
2022-04-20 00:08:33 +05:30
|
|
|
];
|
2023-11-11 16:37:49 +05:30
|
|
|
in
|
|
|
|
{
|
|
|
|
homeConfigurations."payasrelekar" = home-manager.lib.homeManagerConfiguration {
|
2023-11-16 10:46:35 +05:30
|
|
|
pkgs = import nixpkgs {
|
2023-11-11 16:37:49 +05:30
|
|
|
system = "x86_64-darwin";
|
2023-11-16 10:46:35 +05:30
|
|
|
};
|
2023-11-11 16:37:49 +05:30
|
|
|
modules = [ ./hosts/charles/home.nix ];
|
2023-10-20 23:08:09 +05:30
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
# Optionally use extraSpecialArgs
|
|
|
|
# to pass through arguments to home.nix
|
|
|
|
};
|
2023-10-20 23:08:09 +05:30
|
|
|
|
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
nixosConfigurations = {
|
|
|
|
# The Workhorse: WSL2 edition
|
|
|
|
hermes = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = common-modules ++ [
|
|
|
|
|
|
|
|
# Modules and module config
|
|
|
|
./modules/users.nix
|
|
|
|
./modules/fonts.nix
|
|
|
|
./modules/plasma-desktop.nix
|
|
|
|
./modules/audio.nix
|
2023-12-25 10:30:53 +05:30
|
|
|
./modules/dev-common.nix
|
2023-11-11 16:37:49 +05:30
|
|
|
|
|
|
|
# Host-specific config
|
|
|
|
./hosts/hermes/configuration.nix
|
|
|
|
./hosts/hermes/syncthing.nix
|
|
|
|
agenix.nixosModules.age
|
|
|
|
./hosts/hermes/secrets/agenix.nix
|
|
|
|
|
|
|
|
# User-specific config
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users = {
|
|
|
|
payas = import ./hosts/hermes/home.nix;
|
|
|
|
root = import ./modules/root-home.nix;
|
|
|
|
};
|
2023-09-20 14:21:06 +05:30
|
|
|
};
|
2023-11-11 16:37:49 +05:30
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-04-05 18:54:00 +05:30
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
# GPD MicroPC
|
|
|
|
phoebe = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
modules = common-modules ++ [
|
|
|
|
|
|
|
|
# Modules and module config
|
|
|
|
./modules/users.nix
|
|
|
|
./modules/fonts.nix
|
|
|
|
./modules/plasma-desktop.nix
|
|
|
|
./modules/audio.nix
|
2023-12-25 10:30:53 +05:30
|
|
|
./modules/dev-common.nix
|
2023-11-11 16:37:49 +05:30
|
|
|
|
|
|
|
# Host-specific config
|
|
|
|
nixos-hardware.nixosModules.gpd-micropc
|
|
|
|
./hosts/phoebe/configuration.nix
|
|
|
|
./hosts/phoebe/syncthing.nix
|
|
|
|
agenix.nixosModules.age
|
|
|
|
./hosts/phoebe/secrets/agenix.nix
|
|
|
|
|
|
|
|
# User-specific config
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users = {
|
|
|
|
payas = import ./hosts/phoebe/home.nix;
|
|
|
|
root = import ./modules/root-home.nix;
|
|
|
|
};
|
2023-09-28 14:45:54 +05:30
|
|
|
};
|
2023-11-11 16:37:49 +05:30
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2023-09-28 14:45:54 +05:30
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
# My Pi
|
|
|
|
bebop = nixpkgs.lib.nixosSystem {
|
|
|
|
system = "aarch64-linux";
|
|
|
|
modules = common-modules ++ [
|
|
|
|
# Modules and module config
|
|
|
|
./modules/mail.nix
|
|
|
|
./modules/monitoring/monitoring.nix
|
|
|
|
./modules/books.nix
|
|
|
|
./modules/paperless.nix
|
|
|
|
./modules/minio.nix
|
|
|
|
./modules/plausible.nix
|
|
|
|
./modules/vaultwarden.nix
|
|
|
|
./modules/hledger.nix
|
|
|
|
./modules/etesync.nix
|
|
|
|
./modules/uptime_kuma.nix
|
|
|
|
./modules/rss.nix
|
|
|
|
./modules/wiki.nix
|
2023-12-25 23:29:51 +05:30
|
|
|
./modules/home-assistant.nix
|
2023-11-11 16:37:49 +05:30
|
|
|
|
|
|
|
# Host-specific config
|
|
|
|
nixos-hardware.nixosModules.raspberry-pi-4
|
|
|
|
./hosts/bebop/configuration.nix
|
|
|
|
./hosts/bebop/syncthing.nix
|
|
|
|
./hosts/bebop/navidrome.nix
|
|
|
|
./hosts/bebop/pihole.nix
|
|
|
|
./hosts/bebop/ssh.nix
|
|
|
|
./hosts/bebop/cloudflared.nix
|
2024-03-16 17:01:07 +05:30
|
|
|
./hosts/bebop/forgejo.nix
|
2023-11-11 16:37:49 +05:30
|
|
|
|
|
|
|
agenix.nixosModules.age
|
|
|
|
./hosts/bebop/secrets/agenix.nix
|
|
|
|
|
|
|
|
# User-specific config : Home-manager
|
|
|
|
home-manager.nixosModules.home-manager
|
|
|
|
{
|
|
|
|
home-manager = {
|
|
|
|
useGlobalPkgs = true;
|
|
|
|
useUserPackages = true;
|
|
|
|
users.payas = import ./hosts/bebop/home.nix;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-04-20 00:08:33 +05:30
|
|
|
};
|
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
deploy.nodes = {
|
|
|
|
bebop = {
|
|
|
|
hostname = "bebop";
|
|
|
|
fastConnection = true;
|
|
|
|
remoteBuild = true;
|
|
|
|
profiles.system = {
|
|
|
|
sshUser = "payas";
|
|
|
|
user = "root";
|
|
|
|
path = deploy-rs.lib.aarch64-linux.activate.nixos self.nixosConfigurations.bebop;
|
|
|
|
};
|
2023-04-30 16:59:46 +05:30
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2023-11-11 16:37:49 +05:30
|
|
|
# This is highly advised, and will prevent many possible mistakes
|
|
|
|
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
|
|
|
|
};
|
2020-11-03 15:41:12 +05:30
|
|
|
}
|