181 lines
5.7 KiB
Nix
181 lines
5.7 KiB
Nix
{
|
|
description = "Configuration for my homes & OSs";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
|
|
unstable.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
home-manager = {
|
|
url = "github:nix-community/home-manager/release-25.11";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
nixgl = {
|
|
url = "github:nix-community/nixGL";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
st-flexipatch.url = "https://git.antoinevaure.fr/ant/st-flexipatch/archive/master.zip";
|
|
simple-nixos-mailserver.url = "gitlab:simple-nixos-mailserver/nixos-mailserver/nixos-25.11";
|
|
};
|
|
|
|
outputs =
|
|
{ self, nixpkgs, ... }@inputs:
|
|
let
|
|
system = "x86_64-linux";
|
|
pkgs = inputs.nixpkgs.legacyPackages.${system};
|
|
nixgl = inputs.nixgl.packages.${system};
|
|
sshKeys = (import ./sshKeys.nix);
|
|
osConfig = modules: nixpkgs.lib.nixosSystem {
|
|
system = "x86_64-linux";
|
|
specialArgs = {
|
|
inherit inputs;
|
|
};
|
|
inherit modules;
|
|
};
|
|
homeConfig = modules: inputs.home-manager.lib.homeManagerConfiguration {
|
|
inherit pkgs;
|
|
|
|
extraSpecialArgs = {
|
|
inherit inputs;
|
|
};
|
|
|
|
inherit modules;
|
|
};
|
|
homeConfigInOs = {username, modules, userOptions ? []}: {
|
|
imports = [ inputs.home-manager.nixosModules.home-manager ];
|
|
users.users.${username} = { isNormalUser = true; } // userOptions;
|
|
home-manager = {
|
|
extraSpecialArgs = { inherit inputs; };
|
|
useGlobalPkgs = true;
|
|
useUserPackages = true;
|
|
users.${username} = {
|
|
imports = modules ++ [
|
|
{ home.username = username; }
|
|
];
|
|
};
|
|
};
|
|
};
|
|
in
|
|
rec {
|
|
homeConfigurations."anvaure@Allegro23-12" = homeConfig [
|
|
{ home.username = "anvaure"; }
|
|
./home/more-software.nix
|
|
./home/ui.nix
|
|
./home/syncthing.nix
|
|
./home/allegro.nix
|
|
{ home.packages = [ nixgl.nixGLIntel ]; }
|
|
{ targets.genericLinux.enable = true; }
|
|
];
|
|
|
|
homeConfigurations."anvaure@msm-lnx-ipva-01" = homeConfig [
|
|
{
|
|
home.username = "anvaure";
|
|
home.homeDirectory = "/home/anvaure";
|
|
}
|
|
./home/base.nix
|
|
({pkgs, ...}: {
|
|
programs.fish.loginShellInit = "source ${pkgs.nix}/etc/profile.d/nix.fish";
|
|
})
|
|
];
|
|
homeConfigurations."anvaure@msm-lnx-ipva-02" = homeConfigurations."anvaure@msm-lnx-ipva-01";
|
|
homeConfigurations."anvaure@msm-lnx-demo-01" = homeConfigurations."anvaure@msm-lnx-ipva-01";
|
|
|
|
nixosConfigurations.basado = osConfig [
|
|
./os/basado/configuration.nix
|
|
./os/basado/hardware-configuration.nix
|
|
|
|
./os/common.nix
|
|
./os/common-graphics.nix
|
|
(import ./os/remote-disk-unlock.nix ["igb"] (with sshKeys; [moon]))
|
|
./os/builder.nix
|
|
./os/kdeconnect-ports.nix
|
|
(import ./os/swapfile.nix 64)
|
|
./os/ccache.nix
|
|
(homeConfigInOs {
|
|
username = "ant";
|
|
modules = [
|
|
./home/ui.nix
|
|
./home/more-software.nix
|
|
./home/gaming.nix
|
|
./home/syncthing.nix
|
|
{ services.kdeconnect.enable = true; }
|
|
./home/basado.nix
|
|
];
|
|
userOptions = {
|
|
extraGroups = [ "networkmanager" "wheel" "video" "libvirtd" "msr" "docker" "gamemode" ];
|
|
};
|
|
})
|
|
];
|
|
nixosConfigurations.moon = osConfig [
|
|
./os/moon/configuration.nix
|
|
./os/moon/hardware-configuration.nix
|
|
./os/common.nix
|
|
./os/common-graphics.nix
|
|
./os/kdeconnect-ports.nix
|
|
(homeConfigInOs {
|
|
username = "ant";
|
|
modules = [
|
|
./home/more-software.nix
|
|
./home/ui.nix
|
|
./home/syncthing.nix
|
|
{ services.kdeconnect.enable = true; }
|
|
./home/moon.nix
|
|
];
|
|
userOptions = {
|
|
extraGroups = [ "networkmanager" "wheel" "video" ];
|
|
};
|
|
} )
|
|
];
|
|
nixosConfigurations.hs = osConfig [
|
|
./os/hs/configuration.nix
|
|
./os/hs/hardware-configuration.nix
|
|
./os/hs/syncthing.nix
|
|
./os/hs/disks.nix
|
|
./os/hs/backup.nix
|
|
|
|
./os/common.nix
|
|
./os/forgejo.nix
|
|
(import ./os/remote-disk-unlock.nix ["r8169"] (with sshKeys; [moon basado]))
|
|
./os/builder.nix
|
|
./os/ccache.nix
|
|
(import ./os/swapfile.nix 64)
|
|
(homeConfigInOs {
|
|
username = "ant";
|
|
modules = [ ./home/more-software.nix ];
|
|
userOptions = {
|
|
extraGroups = [ "networkmanager" "wheel" "jellyfin" ];
|
|
openssh.authorizedKeys.keys = (with sshKeys; [ basado moon allegro hs ]);
|
|
};
|
|
})
|
|
];
|
|
nixosConfigurations.ks = osConfig [
|
|
./os/ks/configuration.nix
|
|
./os/ks/hardware-configuration.nix
|
|
./os/common.nix
|
|
./os/3proxy.nix
|
|
(homeConfigInOs {
|
|
username = "ant";
|
|
modules = [ ./home/more-software.nix ];
|
|
userOptions = {
|
|
extraGroups = [ "networkmanager" "wheel" "jellyfin" ];
|
|
openssh.authorizedKeys.keys = with sshKeys; [ basado hs moon ];
|
|
};
|
|
})
|
|
];
|
|
|
|
build-all = pkgs.runCommand "build-all" {
|
|
buildInputs =
|
|
let osDerivation = name: self.nixosConfigurations.${name}.config.system.build.toplevel; in
|
|
let homeDerivation = name: self.homeConfigurations.${name}.activationPackage; in
|
|
[
|
|
(osDerivation "basado")
|
|
(osDerivation "moon")
|
|
(osDerivation "hs")
|
|
(osDerivation "ks")
|
|
(homeDerivation "anvaure@Allegro23-12")
|
|
];
|
|
} ''
|
|
echo Build all derivations
|
|
mkdir -p $out
|
|
'';
|
|
|
|
};
|
|
}
|