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 {
|
||||
inherit lib;
|
||||
nixosModules = import ./modules/nixos;
|
||||
homeManagerModules = import ./modules/home-manager;
|
||||
|
||||
with myLib;
|
||||
formatter = forEachSystem (pkgs: pkgs.alejandra);
|
||||
|
||||
homeManagerModules.default = ./modules/home-manager;
|
||||
nixosModules.default = ./modules/nixos;
|
||||
|
||||
nixosConfigurations = {
|
||||
# Main desktop for games & workstation
|
||||
hummingbird = lib.nixosSystem {
|
||||
specialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./hosts/hummingbird
|
||||
];
|
||||
};
|
||||
hummingbird = mkSystem ./hosts/hummingbird;
|
||||
};
|
||||
|
||||
homeConfigurations = {
|
||||
"luna" = lib.homeManagerConfiguration {
|
||||
pkgs = pkgsFor.x86_64-linux;
|
||||
extraSpecialArgs = {inherit inputs outputs;};
|
||||
modules = [
|
||||
./home-manager/luna/hummingbird.nix
|
||||
];
|
||||
};
|
||||
"luna@hummingbird" = mkHome "x86_64-linux" ./home-manager/luna/home.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,14 +5,16 @@
|
|||
config,
|
||||
outputs,
|
||||
...
|
||||
}: {
|
||||
}:
|
||||
let
|
||||
debug = builtins.trace "Heloooo";
|
||||
in {
|
||||
imports = [
|
||||
];
|
||||
|
||||
programs = {
|
||||
home-manager.enable = true;
|
||||
};
|
||||
|
||||
home = {
|
||||
username = lib.mkDefault "luna";
|
||||
homeDirectory = lib.mkDefault "/home/${config.home.username}";
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
# The home.packages option allows you to install Nix packages into your
|
||||
# environment.
|
||||
home.packages = [
|
||||
alejandra # formatter
|
||||
fd-find
|
||||
|
||||
];
|
||||
}
|
||||
|
|
@ -6,10 +6,6 @@
|
|||
imports = [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.extraSpecialArgs = {
|
||||
inherit inputs outputs;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,9 +102,11 @@
|
|||
neovim
|
||||
rustup
|
||||
vscode.fhs
|
||||
nix-inspect
|
||||
];
|
||||
};
|
||||
|
||||
|
||||
# flatpak
|
||||
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