Refactored flake.nix; fixed comma
This commit is contained in:
parent
741e2ab222
commit
e0a8ac3e07
177
flake.nix
177
flake.nix
@ -19,120 +19,71 @@
|
||||
};
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, nix-darwin, home-manager, nix-index-database, ... } @ inputs: {
|
||||
outputs = { self, nixpkgs, nix-darwin, home-manager, nix-index-database, ... } @ inputs:
|
||||
let
|
||||
mkNixosConfig = hostname: modules: nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
inherit modules;
|
||||
};
|
||||
|
||||
# Nixos Configurations
|
||||
mkHomeConfig = username: system: modules: home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
extraSpecialArgs = {
|
||||
inherit inputs;
|
||||
user = username;
|
||||
};
|
||||
inherit modules;
|
||||
};
|
||||
in {
|
||||
# Nixos Configurations
|
||||
nixosConfigurations = {
|
||||
randomctf = mkNixosConfig "randomctf" [ ./config/shared.nix ./config/omen.nix ];
|
||||
r330-media = mkNixosConfig "r330-media" [ ./config/media.nix ];
|
||||
sampledb-dev = mkNixosConfig "sampledb-dev" [ ./config/sampledb.nix ];
|
||||
r330-logging = mkNixosConfig "r330-logging" [ ./config/logging.nix ];
|
||||
mindforge = mkNixosConfig "mindforge" [ ./config/ai.nix ];
|
||||
};
|
||||
# Home-Manager Configurations
|
||||
|
||||
nixosConfigurations.randomctf = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/shared.nix
|
||||
./config/omen.nix
|
||||
];
|
||||
homeConfigurations = {
|
||||
random = mkHomeConfig "random" "x86_64-linux" [
|
||||
./home/headful-nixos.nix
|
||||
./home/modules/development.nix
|
||||
./home/modules/gui-apps.nix
|
||||
./home/modules/hacking.nix
|
||||
];
|
||||
|
||||
sampledb = mkHomeConfig "sampledb" "x86_64-linux" [
|
||||
./home/headless-nixos.nix
|
||||
./home/modules/development.nix
|
||||
];
|
||||
|
||||
media = mkHomeConfig "media" "x86_64-linux" [ ./home/headless-nixos.nix ];
|
||||
logging = mkHomeConfig "logging" "x86_64-linux" [ ./home/headless-nixos.nix ];
|
||||
mindforge = mkHomeConfig "mindforge" "x86_64-linux" [ ./home/headless-nixos.nix ];
|
||||
};
|
||||
|
||||
# Darwin Configuration
|
||||
|
||||
darwinConfigurations."Jadens-MacBook-Air" = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/darwin.nix
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jadenmaxwell = import ./home/darwin.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.jadenmaxwell = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
|
||||
modules = [
|
||||
./home/darwin.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
nixosConfigurations."r330-media" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/media.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."sampledb-dev" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/sampledb.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."r330-logging" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/logging.nix
|
||||
];
|
||||
};
|
||||
|
||||
nixosConfigurations."mindforge" = nixpkgs.lib.nixosSystem {
|
||||
system = "x86_64-linux";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/ai.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Home-Manager Configurations
|
||||
|
||||
homeConfigurations.random = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "random";
|
||||
modules = [
|
||||
./home/headful-nixos.nix
|
||||
./home/modules/development.nix
|
||||
./home/modules/gui-apps.nix
|
||||
./home/modules/hacking.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.media = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "media";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.sampledb = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "sampledb";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
./home/modules/development.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.logging = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "logging";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.mindforge = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."x86_64-linux";
|
||||
extraSpecialArgs.user = "mindforge";
|
||||
modules = [
|
||||
./home/headless-nixos.nix
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# Darwin Configuration
|
||||
|
||||
darwinConfigurations."Jadens-MacBook-Air" = nix-darwin.lib.darwinSystem {
|
||||
system = "aarch64-darwin";
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./config/darwin.nix
|
||||
home-manager.darwinModules.home-manager {
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.users.jadenmaxwell = import ./home/darwin.nix;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
homeConfigurations.jadenmaxwell = home-manager.lib.homeManagerConfiguration {
|
||||
pkgs = nixpkgs.legacyPackages."aarch64-darwin";
|
||||
modules = [
|
||||
./home/darwin.nix
|
||||
./home/modules/comma.nix
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
@ -1,4 +0,0 @@
|
||||
{ config, pkgs, inputs, ...}: {
|
||||
imports = [ inputs.nix-index-database.hmModules.nix-index ];
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
{ pkgs, inputs, ... }: {
|
||||
home.packages = with pkgs; [
|
||||
# Nix specific utilities
|
||||
manix
|
||||
@ -9,6 +9,7 @@
|
||||
# Utilities
|
||||
jq
|
||||
bc
|
||||
duf
|
||||
file
|
||||
wget
|
||||
curl
|
||||
@ -36,4 +37,8 @@
|
||||
enableZshIntegration = true;
|
||||
nix-direnv.enable = true;
|
||||
};
|
||||
|
||||
# Install comma
|
||||
imports = [ inputs.nix-index-database.hmModules.nix-index ];
|
||||
programs.nix-index-database.comma.enable = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user