nix/flake.nix

117 lines
2.9 KiB
Nix

{
description = "My systems installation";
inputs = {
nixpkgs.url = "nixpkgs/nixos-unstable";
nur.url = "github:nix-community/NUR";
nixgl = {
url = "github:nix-community/nixGL";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, home-manager, nur, nixgl, ... }@inputs:
let
stateVersion = "23.11";
allSystems = [
"x86_64-linux" # 64bit AMD/Intel x86
"aarch64-linux" # 64bit ARM macOS
];
forAllSystems = fn:
nixpkgs.lib.genAttrs allSystems
(system: fn { pkgs = import nixpkgs { inherit system; }; });
in {
devShells = forAllSystems ({ pkgs }: {
default = pkgs.mkShell {
name = "nixfiles";
buildInputs = [
pkgs.shellcheck
pkgs.shfmt
pkgs.lefthook
pkgs.go-task
pkgs.convco
pkgs.typos
pkgs.home-manager
];
};
});
nixosConfigurations = {
morty = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit stateVersion inputs;
hostname = "morty";
username = "ephase";
hostConfig = {
desktop = true;
};
};
modules = [
./nixos/default.nix
home-manager.nixosModule
];
};
mrmeeseeks = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit stateVersion inputs;
hostname = "mrmeeseeks";
username = "ephase";
hostConfig = {
desktop = true;
};
};
modules = [
./nixos/default.nix
home-manager.nixosModule
];
};
luci = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
specialArgs = {
inherit stateVersion inputs;
hostname = "luci";
username = "ephase";
};
modules = [
./nixos/default.nix
home-manager.nixosModule
];
};
};
homeConfigurations = {
rick = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
system = "aarch64-linux";
overlays = [ nixgl.overlay ];
};
extraSpecialArgs = {
inherit stateVersion inputs;
hostname = "rick";
username = "ephase";
};
modules = [
./home-manager/default.nix
];
};
work = home-manager.lib.homeManagerConfiguration {
pkgs = import nixpkgs {
system = "x86_64-linux";
overlays = [ nixgl.overlay ];
};
extraSpecialArgs = {
inherit stateVersion inputs;
hostname = "work";
username = "yorick-barbanneau";
};
modules = [
./home-manager/default.nix
];
};
};
};
}