Move to hosts

This commit is contained in:
larstvei 2024-10-06 23:53:03 +02:00
parent bae661d61a
commit d269da3f15
3 changed files with 61 additions and 15 deletions

View File

@ -17,28 +17,48 @@
};
outputs =
{ darwin, home-manager, ... }@inputs:
{
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./modules/core.nix
./modules/macos.nix
home-manager.darwinModule
{
darwin,
nixpkgs,
home-manager,
...
}@inputs:
let
homeConfig = {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
users.larstvei = {
imports = [
{ _module.args = inputs; } # <- one could ask, why?
{ _module.args = inputs; }
./modules/home.nix
];
};
};
}
};
in
{
darwinConfigurations."larstvei-macbookpro" = darwin.lib.darwinSystem {
system = "aarch64-darwin";
modules = [
./hosts/darwin-m1/configuration.nix
./modules/core.nix
home-manager.darwinModule
homeConfig
];
};
nixosConfigurations."larstvei-nixos" = nixpkgs.lib.nixosSystem {
system = "x86_64-linux"; # Or "aarch64-linux" for ARM systems
modules = [
./hosts/nixos-intel-mbp/configuration.nix
./modules/core.nix
home-manager.nixosModule
homeConfig
];
};
};

View File

@ -1,7 +1,7 @@
{ pkgs, lib, ... }:
{
fonts.packages = import ./fonts.nix { inherit pkgs; };
fonts.packages = import ../../modules/fonts.nix { inherit pkgs; };
users.users."larstvei".home = "/Users/larstvei";

View File

@ -0,0 +1,26 @@
{ config, pkgs, lib, ... }:
{
networking.hostName = "larstvei-nixos";
time.timeZone = "Europe/Oslo";
i18n = {
defaultLocale = "en_US.UTF-8";
supportedLocales = [ "en_US.UTF-8" "nb_NO.UTF-8" ];
};
users.users.larstvei = {
isNormalUser = true;
home = "/home/larstvei";
extraGroups = [ "wheel" "networkmanager" ];
shell = pkgs.fish;
};
services = {
# Enable NetworkManager
networkmanager.enable = true;
};
# System state version
system.stateVersion = lib.mkDefault "24.11";
}