cute refactor
This commit is contained in:
parent
3e9d95c2a3
commit
7fb32811d4
12 changed files with 252 additions and 181 deletions
144
flake.nix
144
flake.nix
|
@ -9,7 +9,7 @@
|
|||
|
||||
vscode-server.url = "github:nix-community/nixos-vscode-server";
|
||||
agenix.url = "github:ryantm/agenix";
|
||||
zen-browser = {
|
||||
zen-browser = {
|
||||
url = "github:0xc000022070/zen-browser-flake";
|
||||
inputs.nixpkgs.follows = "nixpkgs";
|
||||
};
|
||||
|
@ -21,75 +21,83 @@
|
|||
};
|
||||
};
|
||||
|
||||
outputs = inputs@{ self, nixpkgs, lix-module, vscode-server, agenix, zen-browser, catppuccin, home-manager, ... }: {
|
||||
nixosConfigurations = {
|
||||
focalor = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; system = "x86_64-linux"; };
|
||||
modules = [
|
||||
./hosts/focalor
|
||||
lix-module.nixosModules.default
|
||||
|
||||
vscode-server.nixosModules.default
|
||||
agenix.nixosModules.default
|
||||
|
||||
({ config, pkgs, ... }: {
|
||||
services.vscode-server.enable = true;
|
||||
services.vscode-server.nodejsPackage = pkgs.nodejs_20;
|
||||
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
||||
})
|
||||
outputs =
|
||||
{ self, ... }@inputs:
|
||||
with inputs;
|
||||
let
|
||||
nixosModules = builtins.listToAttrs (
|
||||
map (module: {
|
||||
name = module;
|
||||
value = import (./modules + "/${module}");
|
||||
}) (builtins.attrNames (builtins.readDir ./modules))
|
||||
);
|
||||
in
|
||||
{
|
||||
nixosConfigurations = {
|
||||
focalor = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
modules = [
|
||||
./hosts/focalor
|
||||
lix-module.nixosModules.default
|
||||
|
||||
catppuccin.nixosModules.catppuccin
|
||||
vscode-server.nixosModules.default
|
||||
agenix.nixosModules.default
|
||||
|
||||
home-manager.nixosModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.backupFileExtension = "HMBackup";
|
||||
home-manager.users.regent.imports = [
|
||||
./home/regent/home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
catppuccin.nixosModules.catppuccin
|
||||
|
||||
home-manager.nixosModules.home-manager
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.backupFileExtension = "HMBackup";
|
||||
home-manager.users.regent.imports = [
|
||||
./home/regent/home.nix
|
||||
catppuccin.homeModules.catppuccin
|
||||
];
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
system = "x86_64-linux";
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
valefar = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/valefar
|
||||
lix-module.nixosModules.default
|
||||
|
||||
vscode-server.nixosModules.default
|
||||
agenix.nixosModules.default
|
||||
|
||||
{ imports = builtins.attrValues nixosModules; }
|
||||
];
|
||||
};
|
||||
|
||||
buer = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/buer
|
||||
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# Easy to add more hosts
|
||||
/*
|
||||
server2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/server2
|
||||
agenix.nixosModules.default
|
||||
# different services for server2
|
||||
];
|
||||
home-manager.extraSpecialArgs = { inherit inputs; system = "x86_64-linux";};
|
||||
}
|
||||
];
|
||||
};
|
||||
*/
|
||||
};
|
||||
|
||||
valefar = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/valefar # imports configuration.nix automatically
|
||||
lix-module.nixosModules.default
|
||||
|
||||
# External modules
|
||||
vscode-server.nixosModules.default
|
||||
agenix.nixosModules.default
|
||||
|
||||
# Global external module config
|
||||
({ config, pkgs, ... }: {
|
||||
services.vscode-server.enable = true;
|
||||
services.vscode-server.nodejsPackage = pkgs.nodejs_20;
|
||||
environment.systemPackages = [ agenix.packages.x86_64-linux.default ];
|
||||
})
|
||||
];
|
||||
};
|
||||
|
||||
buer = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/buer
|
||||
|
||||
agenix.nixosModules.default
|
||||
];
|
||||
};
|
||||
|
||||
# Easy to add more hosts
|
||||
/*server2 = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
modules = [
|
||||
./hosts/server2
|
||||
agenix.nixosModules.default
|
||||
# different services for server2
|
||||
];
|
||||
};*/
|
||||
};
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue