Restructure the configuration

This commit is contained in:
larstvei 2025-09-11 20:06:49 +02:00
parent 05fa93fc50
commit c50f3e2578
39 changed files with 24 additions and 40 deletions

View File

@ -45,7 +45,7 @@
modules = [
home-manager.darwinModules.default
./machines/macbook/configuration.nix
./machines/macbook
nix-rosetta-builder.darwinModules.default
{ nix-rosetta-builder.onDemand = true; }
];
@ -61,7 +61,7 @@
};
modules = [
home-manager.nixosModules.default
./machines/thinkpad/configuration.nix
./machines/thinkpad
];
};
};

View File

@ -1,19 +1,16 @@
{ pkgs, emacs-larstvei, ... }:
let
v = import ./variables.nix;
in
{
imports = [
../../system
../../system/darwin
../../modules/base
../../modules/darwin
];
system.primaryUser = v.username;
system.primaryUser = "larstvei";
networking.hostName = v.hostName;
networking.hostName = "larstvei-macbookpro";
users.users.${v.username} = {
home = v.userHome;
users.users.larstvei = {
home = "/Users/larstvei";
shell = pkgs.fish;
};
@ -21,7 +18,7 @@ in
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit emacs-larstvei; };
users.${v.username}.imports = [ ../../home ];
users.larstvei.imports = [ ../../modules/home ];
};
homebrew = {

View File

@ -1,5 +0,0 @@
{
username = "larstvei";
userHome = "/Users/larstvei";
hostName = "larstvei-macbookpro";
}

View File

@ -5,15 +5,12 @@
zen-browser,
...
}:
let
v = import ./variables.nix;
in
{
imports = [
../../system
../../system/nixos
./keyboard.nix
./hardware-configuration.nix
./keyboard
./hardware
../../modules/base
../../modules/nixos
];
home-manager = {
@ -24,9 +21,9 @@ in
inherit emacs-larstvei;
inherit zen-browser;
};
users.${v.username}.imports = [
../../home
../../home/desktop
users.larstvei.imports = [
../../modules/home
../../modules/desktop
];
};
@ -35,15 +32,15 @@ in
settings = {
default_session = {
command = "hyprland";
user = v.username;
user = "larstvei";
};
};
};
users.users.${v.username} = {
users.users.larstvei = {
isNormalUser = true;
description = "Lars Tveito";
home = v.userHome;
home = "/home/larstvei";
shell = pkgs.fish;
extraGroups = [
"networkmanager"
@ -51,7 +48,7 @@ in
];
};
networking.hostName = v.hostName;
networking.hostName = "larstvei-think";
console.keyMap = "us";

View File

@ -1,5 +0,0 @@
{
username = "larstvei";
userHome = "/home/larstvei";
hostName = "larstvei-think";
}

View File

@ -2,7 +2,7 @@
{
imports = [
../../home/fonts
../fonts
];
nix.linux-builder.enable = true;

View File

@ -1,7 +1,7 @@
{
imports = [
./languages
./tools
../languages
../tools
];
programs.home-manager.enable = true;

View File

@ -2,7 +2,7 @@
{
imports = [
../../home/fonts
../fonts
];
fonts = {