pointfichiers/flake.nix

128 lines
2.8 KiB
Nix
Raw Normal View History

2024-09-16 14:13:01 +02:00
{
description = "Configuration Home Manager jaajesque";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-16 14:59:29 +02:00
caddy = {
url = "github:GaspardCulis/nixos-caddy-ovh";
inputs.nixpkgs.follows = "nixpkgs";
};
disko = {
2024-09-20 16:16:28 +02:00
url = "github:nix-community/disko";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-23 16:58:45 +02:00
deploy-rs = {
url = "github:serokell/deploy-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-26 14:09:28 +02:00
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-16 14:59:29 +02:00
# Hyprland
hyprland = {
url = "git+https://github.com/hyprwm/Hyprland?submodules=1";
follows = "hy3/hyprland";
};
hy3 = {
url = "github:outfoxxed/hy3";
};
end-rs = {
url = "github:Dr-42/end-rs";
inputs.nixpkgs.follows = "nixpkgs";
};
2024-09-16 14:13:01 +02:00
};
outputs = {
self,
nixpkgs,
disko,
deploy-rs,
2024-09-26 14:09:28 +02:00
sops-nix,
home-manager,
...
} @ inputs: let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
in {
nixosConfigurations = {
Zephyrus = nixpkgs.lib.nixosSystem {
extraArgs = {inherit inputs;};
modules = [
./hosts/Zephyrus
disko.nixosModules.disko
2024-09-20 15:16:34 +02:00
home-manager.nixosModules.home-manager
];
};
OVHCloud = nixpkgs.lib.nixosSystem {
extraArgs = {inherit inputs;};
modules = [
./hosts/OVHCloud
disko.nixosModules.disko
2024-09-26 14:09:28 +02:00
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager
];
};
};
2024-09-20 15:16:34 +02:00
homeConfigurations = {
"gaspard" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
2024-09-16 14:13:01 +02:00
extraSpecialArgs = {inherit inputs;};
2024-09-20 15:16:34 +02:00
modules = [
./users/gaspard.nix
];
};
"culisg@im2ag" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
extraSpecialArgs = {inherit inputs;};
2024-09-20 15:16:34 +02:00
modules = [
./users/culisg.nix
];
};
2024-09-16 14:13:01 +02:00
};
deploy.nodes.OVHCloud = {
hostname = "gasdev.fr";
profiles.system = {
user = "root";
sshUser = "root";
sshOpts = ["-p" "22"];
sudo = "";
path = deploy-rs.lib.x86_64-linux.activate.nixos self.nixosConfigurations.OVHCloud;
};
};
checks = builtins.mapAttrs (system: deployLib: deployLib.deployChecks self.deploy) deploy-rs.lib;
devShells.${system}.default = pkgs.mkShell {
packages = with pkgs; [
alejandra
git
helix
nil
pkgs.home-manager
pkgs.deploy-rs
];
shellHook = ''
export EDITOR=hx
'';
};
2024-09-16 14:13:01 +02:00
};
}