some restructuring
This commit is contained in:
parent
26740dc299
commit
f5bc46061b
5 changed files with 28 additions and 21 deletions
|
@ -17,34 +17,51 @@
|
||||||
outputs = {
|
outputs = {
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
sops-nix,
|
|
||||||
home-manager,
|
home-manager,
|
||||||
...
|
...
|
||||||
}@inputs: let
|
}@inputs: let
|
||||||
lib = nixpkgs.lib;
|
lib = nixpkgs.lib;
|
||||||
system = "x86_64-linux";
|
|
||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
|
|
||||||
|
systems = [ "x86_64-linux" ];
|
||||||
|
forEachSystem = f: lib.genAttrs systems (system: f pkgsFor.${system});
|
||||||
|
pkgsFor = lib.genAttrs systems (
|
||||||
|
system:
|
||||||
|
import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
config.allowUnfree = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = import ./pkgs nixpkgs.legacyPackages.${system};
|
packages = forEachSystem (pkgs: import ./pkgs { inherit pkgs; });
|
||||||
formatter = nixpkgs.legacyPackages.${system}.nixpkgs-fmt;
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||||
|
devShells = forEachSystem (pkgs: import ./shells { inherit pkgs; });
|
||||||
|
nixosModules = import ./modules/nixos;
|
||||||
|
homeManagerModules = import ./modules/home-manager;
|
||||||
|
overlays = import ./overlays {inherit inputs outputs;};
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = let
|
||||||
|
pkgs = pkgsFor.x86_64-linux;
|
||||||
|
in {
|
||||||
ytnix = lib.nixosSystem {
|
ytnix = lib.nixosSystem {
|
||||||
specialArgs = { inherit inputs outputs; };
|
specialArgs = { inherit inputs outputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./nixos/configuration.nix
|
{
|
||||||
sops-nix.nixosModules.sops
|
nixpkgs = {inherit pkgs;};
|
||||||
|
}
|
||||||
|
./hosts/ytnix
|
||||||
|
inputs.sops-nix.nixosModules.sops
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"yt@ytnix" = home-manager.lib.homeManagerConfiguration {
|
"yt@ytnix" = home-manager.lib.homeManagerConfiguration {
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = pkgsFor.x86_64-linux;
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./home-manager/home.nix
|
./home/yt/ytnix.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -126,8 +126,6 @@
|
||||||
nextcloud-client
|
nextcloud-client
|
||||||
python312Packages.python-lsp-server
|
python312Packages.python-lsp-server
|
||||||
gopls
|
gopls
|
||||||
|
|
||||||
(callPackage ../pkgs/anki-bin.nix {})
|
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.waybar.enable = true;
|
programs.waybar.enable = true;
|
|
@ -10,15 +10,7 @@
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nixpkgs = {
|
nix = {
|
||||||
config = {
|
|
||||||
allowUnfree = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
nix = let
|
|
||||||
flakeInputs = lib.filterAttrs (_: lib.isType "flake") inputs;
|
|
||||||
in {
|
|
||||||
settings = {
|
settings = {
|
||||||
experimental-features = "nix-command flakes";
|
experimental-features = "nix-command flakes";
|
||||||
auto-optimise-store = true;
|
auto-optimise-store = true;
|
||||||
|
@ -37,7 +29,7 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
sops.defaultSopsFile = ../secrets/secrets.yaml;
|
sops.defaultSopsFile = ./secrets.yaml;
|
||||||
sops.defaultSopsFormat = "yaml";
|
sops.defaultSopsFormat = "yaml";
|
||||||
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
|
sops.age.keyFile = "/root/.config/sops/age/keys.txt";
|
||||||
sops.secrets = {
|
sops.secrets = {
|
Loading…
Add table
Reference in a new issue