chore: clean up flake

Signed-off-by: jolheiser <john.olheiser@gmail.com>
teamcity
jolheiser 2024-04-03 21:36:13 -05:00
parent 6a5f3da703
commit 08c39b6601
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 112 additions and 118 deletions

230
flake.nix
View File

@ -3,6 +3,7 @@
inputs = { inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils"; # Only expressed here to use for followers
nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db"; nixpkgs-py39.url = "github:nixos/nixpkgs/f294325aed382b66c7a188482101b0f336d1d7db";
home-manager = { home-manager = {
@ -17,7 +18,6 @@
home-manager.follows = ""; home-manager.follows = "";
}; };
}; };
flake-utils.url = "github:numtide/flake-utils";
nixos-hardware.url = "github:nixos/nixos-hardware/master"; nixos-hardware.url = "github:nixos/nixos-hardware/master";
nur.url = "github:nix-community/NUR"; nur.url = "github:nix-community/NUR";
@ -125,8 +125,7 @@
inputs.golink.overlay inputs.golink.overlay
]; ];
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit overlays; inherit overlays system;
system = "x86_64-linux";
config.allowUnfree = true; config.allowUnfree = true;
}; };
userSecret = path: { userSecret = path: {
@ -191,123 +190,118 @@
}) })
]; ];
username = "jolheiser"; username = "jolheiser";
in system = "x86_64-linux";
{ in {
homeConfigurations = let homeConfigurations = let
commonModules = [ commonModules = [
{ {
home = { home = {
inherit username; inherit username;
homeDirectory = "/home/${username}"; homeDirectory = "/home/${username}";
};
}
./apps/gui
];
in {
"jolheiser" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules = commonModules;
};
"work" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
commonModules
++ [
{
nixpkgs.overlays = [
(_: _: {
py39 = import nixpkgs-py39 {inherit (pkgs) system;};
})
];
programs = {
git.package = pkgs.gitSVN;
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
};
}
];
};
};
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
workModules
++ [
./machines/chai
];
};
"earlgrey" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
workModules
++ [
./machines/earlgrey
];
};
"masala" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules =
workModules
++ [
wsl.nixosModules.wsl
./machines/masala
];
};
"matcha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
agenix.nixosModules.default
./machines/matcha
commonConfig
];
};
"genmaicha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
agenix.nixosModules.default
./machines/genmaicha
commonConfig
];
};
"sencha" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
agenix.nixosModules.default
./machines/sencha
commonConfig
];
};
};
colmena = {
meta = {
nixpkgs = import nixpkgs {
system = "x86_64-linux";
overlays = overlays;
}; };
}; }
dragonwell = { ./apps/gui
imports = [ ];
inputs.agenix.nixosModules.default
inputs.golink.nixosModules.default
inputs.ugit.nixosModules.default
./machines/dragonwell
];
};
};
nixConfig = {
extra-substitutors = ["https://jolheiser.cachix.org"];
extra-trusted-public-keys = ["jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="];
};
}
// inputs.flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
in { in {
devShells.default = pkgs.mkShell { "jolheiser" = home-manager.lib.homeManagerConfiguration {
nativeBuildInputs = [ inherit pkgs;
agenix.packages.${system}.agenix modules = commonModules;
pkgs.colmena };
"work" = home-manager.lib.homeManagerConfiguration {
inherit pkgs;
modules =
commonModules
++ [
{
nixpkgs.overlays = [
(_: _: {
py39 = import nixpkgs-py39 {inherit (pkgs) system;};
})
];
programs = {
git.package = pkgs.gitSVN;
firefox.profiles.default.bookmarks = [(import ./apps/gui/firefox/work.nix)];
};
}
];
};
};
nixosConfigurations = {
"chai" = nixpkgs.lib.nixosSystem {
inherit system;
modules =
workModules
++ [
./machines/chai
];
};
"earlgrey" = nixpkgs.lib.nixosSystem {
inherit system;
modules =
workModules
++ [
./machines/earlgrey
];
};
"masala" = nixpkgs.lib.nixosSystem {
inherit system;
modules =
workModules
++ [
wsl.nixosModules.wsl
./machines/masala
];
};
"matcha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
./machines/matcha
commonConfig
]; ];
}; };
}); "genmaicha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
nixos-hardware.nixosModules.framework-13-7040-amd
agenix.nixosModules.default
./machines/genmaicha
commonConfig
];
};
"sencha" = nixpkgs.lib.nixosSystem {
inherit system;
modules = [
agenix.nixosModules.default
./machines/sencha
commonConfig
];
};
};
colmena = {
meta = {
nixpkgs = import nixpkgs {
inherit overlays system;
};
};
dragonwell = {
imports = [
inputs.agenix.nixosModules.default
inputs.golink.nixosModules.default
inputs.ugit.nixosModules.default
./machines/dragonwell
];
};
};
nixConfig = {
extra-substitutors = ["https://jolheiser.cachix.org"];
extra-trusted-public-keys = ["jolheiser.cachix.org-1:fiKkfTuHFqDK5ZOVxcqb4InUkKsrTvtMLISid7XvuVg="];
};
devShells.${system}.default = pkgs.mkShell {
nativeBuildInputs = [
agenix.packages.${system}.agenix
pkgs.colmena
];
};
};
} }