a
This commit is contained in:
parent
c7b296b96f
commit
a1920f771c
6 changed files with 41 additions and 25 deletions
23
flake.nix
23
flake.nix
|
|
@ -34,30 +34,19 @@
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
in {
|
in {
|
||||||
inherit lib;
|
with myLib;
|
||||||
nixosModules = import ./modules/nixos;
|
|
||||||
homeManagerModules = import ./modules/home-manager;
|
|
||||||
|
|
||||||
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||||
|
|
||||||
|
homeManagerModules.default = ./modules/home-manager;
|
||||||
|
nixosModules.default = ./modules/nixos;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations = {
|
||||||
# Main desktop for games & workstation
|
# Main desktop for games & workstation
|
||||||
hummingbird = lib.nixosSystem {
|
hummingbird = mkSystem ./hosts/hummingbird;
|
||||||
specialArgs = {inherit inputs outputs;};
|
|
||||||
modules = [
|
|
||||||
./hosts/hummingbird
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations = {
|
||||||
"luna" = lib.homeManagerConfiguration {
|
"luna@hummingbird" = mkHome "x86_64-linux" ./home-manager/luna/home.nix;
|
||||||
pkgs = pkgsFor.x86_64-linux;
|
|
||||||
extraSpecialArgs = {inherit inputs outputs;};
|
|
||||||
modules = [
|
|
||||||
./home-manager/luna/hummingbird.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,14 +5,16 @@
|
||||||
config,
|
config,
|
||||||
outputs,
|
outputs,
|
||||||
...
|
...
|
||||||
}: {
|
}:
|
||||||
|
let
|
||||||
|
debug = builtins.trace "Heloooo";
|
||||||
|
in {
|
||||||
imports = [
|
imports = [
|
||||||
];
|
];
|
||||||
|
|
||||||
programs = {
|
programs = {
|
||||||
home-manager.enable = true;
|
home-manager.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
home = {
|
home = {
|
||||||
username = lib.mkDefault "luna";
|
username = lib.mkDefault "luna";
|
||||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@
|
||||||
# The home.packages option allows you to install Nix packages into your
|
# The home.packages option allows you to install Nix packages into your
|
||||||
# environment.
|
# environment.
|
||||||
home.packages = [
|
home.packages = [
|
||||||
alejandra # formatter
|
|
||||||
fd-find
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -6,10 +6,6 @@
|
||||||
imports = [
|
imports = [
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
];
|
];
|
||||||
|
|
||||||
home-manager.useGlobalPkgs = true;
|
home-manager.useGlobalPkgs = true;
|
||||||
home-manager.extraSpecialArgs = {
|
|
||||||
inherit inputs outputs;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,11 @@
|
||||||
neovim
|
neovim
|
||||||
rustup
|
rustup
|
||||||
vscode.fhs
|
vscode.fhs
|
||||||
|
nix-inspect
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
# flatpak
|
# flatpak
|
||||||
services.flatpak.enable = true;
|
services.flatpak.enable = true;
|
||||||
|
|
||||||
|
|
|
||||||
28
myLib/default.nix
Normal file
28
myLib/default.nix
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
{inputs}: let
|
||||||
|
myLib = (import ./default.nix) {inherit inputs;};
|
||||||
|
outputs = inputs.self.outputs;
|
||||||
|
in rec {
|
||||||
|
|
||||||
|
mkSystem = config:
|
||||||
|
inputs.nixpkgs.lib.nixosSystem {
|
||||||
|
specialArgs = {
|
||||||
|
inherit inputs outputs myLib;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
config
|
||||||
|
outputs.nixosModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
mkHome = sys: config:
|
||||||
|
inputs.home-manager.lib.homeManagerConfiguration {
|
||||||
|
pkgs = pkgsFor sys;
|
||||||
|
extraSpecialArgs = {
|
||||||
|
inherit inputs myLib outputs;
|
||||||
|
};
|
||||||
|
modules = [
|
||||||
|
config
|
||||||
|
outputs.homeManagerModules.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue