Added nixos configs
This commit is contained in:
Executable
+89
@@ -0,0 +1,89 @@
|
||||
{
|
||||
description = "Henrov's nixos configuration";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
|
||||
home-manager = {
|
||||
url = "github:nix-community/home-manager";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
emacs-overlay = {
|
||||
url = "github:nix-community/emacs-overlay";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
||||
# sops-nix = {
|
||||
# url = "github:Mic92/sops-nix";
|
||||
# inputs.nixpkgs.follows = "nixpkgs";
|
||||
# };
|
||||
#
|
||||
catppuccin = {
|
||||
url = "github:catppuccin/nix";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
};
|
||||
|
||||
outputs = {
|
||||
nixpkgs,
|
||||
home-manager,
|
||||
emacs-overlay,
|
||||
# sops-nix,
|
||||
catppuccin,
|
||||
...
|
||||
}:
|
||||
let
|
||||
user = import ./user.nix;
|
||||
lib = nixpkgs.lib;
|
||||
machines = [
|
||||
"traveldroid"
|
||||
];
|
||||
pkgs = import nixpkgs {
|
||||
inherit (user) system;
|
||||
};
|
||||
in
|
||||
{
|
||||
nixosConfigurations = builtins.listToAttrs (
|
||||
builtins.map (machine: {
|
||||
name = machine;
|
||||
value = lib.nixosSystem {
|
||||
modules = [
|
||||
({ ... }: {
|
||||
nixpkgs.overlays = [ emacs-overlay.overlays.default ];
|
||||
})
|
||||
./machines/${machine}/configuration.nix
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit user;
|
||||
};
|
||||
home-manager.backupFileExtension = "backup";
|
||||
home-manager.users.${user.username} = {
|
||||
imports = [
|
||||
./machines/${machine}/home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
};
|
||||
}
|
||||
#sops-nix.nixosModules.sops # sops
|
||||
catppuccin.nixosModules.catppuccin # theme
|
||||
];
|
||||
specialArgs = {
|
||||
hostname = machine;
|
||||
inherit user;
|
||||
};
|
||||
};
|
||||
}) machines
|
||||
);
|
||||
devShells.${user.system}.default = pkgs.mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
nil # nix lsp server
|
||||
nixfmt-rfc-style # nix formatter
|
||||
#sops # used to edit secrets
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user