This repository has been archived on 2025-03-05. You can view files and clone it, but cannot push or open issues or pull requests.
nix-configurations/flake.nix

127 lines
3.7 KiB
Nix
Raw Normal View History

2022-12-30 13:05:46 +01:00
{
description = ''
This i my basic NixOS system configuration. Feel free to reuse anything you find useful.
'';
inputs = {
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
agenix.url = "github:ryantm/agenix";
2022-12-30 13:05:46 +01:00
nixpkgs.url = "github:NixOS/nixpkgs/nixos-22.11";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
2022-12-30 13:05:46 +01:00
deploy-rs.url = "github:serokell/deploy-rs";
2023-04-06 17:12:19 +02:00
hyprland.url = "github:hyprwm/Hyprland";
2023-04-07 06:09:28 +02:00
nix-colors.url = "github:misterio77/nix-colors";
2022-12-30 13:05:46 +01:00
};
2023-04-07 06:09:28 +02:00
outputs = { self, nix-colors, nixpkgs, nixpkgs-unstable, home-manager, hyprland
2023-04-06 17:12:19 +02:00
, agenix, deploy-rs, ... }@inputs:
2022-12-30 13:05:46 +01:00
let
inherit (self) outputs;
lib = nixpkgs.lib;
2023-02-05 14:36:38 +01:00
allowUnfree = { nixpkgs.config.allowUnfree = true; };
system = "x86_64-linux";
overlay-unstable = final: prev: {
2023-03-30 08:40:15 +02:00
unstable = import nixpkgs-unstable {
inherit system;
config.allowUnfree = true;
};
};
2022-12-30 13:05:46 +01:00
in {
2023-02-05 14:36:38 +01:00
nixosConfigurations = {
2022-12-30 13:05:46 +01:00
lkk-nix-1 = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./hosts/lkk-nix-1
agenix.nixosModules.default
({ config, pkgs, ... }: {
nixpkgs.overlays = [ overlay-unstable ];
})
];
2022-12-30 13:05:46 +01:00
};
2023-02-28 15:26:31 +01:00
lkk-prod-1 = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
allowUnfree
./hosts/lkk-prod-1
agenix.nixosModules.default
({ config, pkgs, ... }: {
nixpkgs.overlays = [ overlay-unstable ];
})
];
};
2023-03-14 13:22:16 +01:00
lkk-prod-2 = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
allowUnfree
./hosts/lkk-prod-2
agenix.nixosModules.default
({ config, pkgs, ... }: {
nixpkgs.overlays = [ overlay-unstable ];
})
];
};
2023-04-06 17:12:19 +02:00
m3-nix = lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
allowUnfree
./hosts/m3-nix
agenix.nixosModules.default
({ config, pkgs, ... }: {
nixpkgs.overlays = [ overlay-unstable ];
})
];
};
2023-02-05 14:36:38 +01:00
};
homeConfigurations = {
2022-12-30 13:05:46 +01:00
# Laptop
2023-02-05 14:36:38 +01:00
"m3tam3re@m3-nix" = home-manager.lib.homeManagerConfiguration {
pkgs = nixpkgs.legacyPackages."x86_64-linux";
2023-04-07 06:09:28 +02:00
extraSpecialArgs = { inherit inputs nix-colors;
2022-12-30 13:05:46 +01:00
};
2023-04-06 17:12:19 +02:00
modules = [
./home/users/m3tam3re/m3-nix.nix
allowUnfree
];
2022-12-30 13:05:46 +01:00
};
2023-02-05 14:36:38 +01:00
# Company Root Servera
"m3tam3re@lkk-nix-1" = home-manager.lib.homeManagerConfiguration {
2023-04-06 17:12:19 +02:00
extraSpecialArgs = { # pass things to t
2022-12-30 13:05:46 +01:00
};
2023-02-05 14:36:38 +01:00
modules = [ ./home/users/m3tam3re/lkk-nix-1.nix ];
2022-12-30 13:05:46 +01:00
};
};
deploy.nodes.lkk-nix-1 = {
hostname = "lkk-nix-1";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-nix-1;
};
};
2023-02-28 15:26:31 +01:00
deploy.nodes.lkk-prod-1 = {
hostname = "lkk-prod-1";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-prod-1;
};
};
2023-03-14 13:22:16 +01:00
deploy.nodes.lkk-prod-2 = {
hostname = "lkk-prod-2";
sshUser = "root";
profiles.system = {
user = "root";
path = deploy-rs.lib.x86_64-linux.activate.nixos
self.nixosConfigurations.lkk-prod-2;
};
};
2022-12-30 13:05:46 +01:00
deploy.remoteBuild = true;
};
}