feat: add config for new device
This commit is contained in:
@@ -22,6 +22,21 @@
|
|||||||
inherit (self) outputs;
|
inherit (self) outputs;
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
pkgs = import nixpkgs { inherit system; };
|
pkgs = import nixpkgs { inherit system; };
|
||||||
|
|
||||||
|
mkNixosConfig = name: modules: {
|
||||||
|
"${name}" = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit modules;
|
||||||
|
specialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mkHomeConfig = name: modules: {
|
||||||
|
"${name}" = home-manager.lib.homeManagerConfiguration {
|
||||||
|
inherit pkgs;
|
||||||
|
inherit modules;
|
||||||
|
extraSpecialArgs = { inherit inputs outputs; };
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages = import ./pkgs pkgs;
|
packages = import ./pkgs pkgs;
|
||||||
@@ -29,23 +44,11 @@
|
|||||||
nixosModules = import ./modules/nixos;
|
nixosModules = import ./modules/nixos;
|
||||||
homeManagerModules = import ./modules/home-manager;
|
homeManagerModules = import ./modules/home-manager;
|
||||||
|
|
||||||
nixosConfigurations = {
|
nixosConfigurations =
|
||||||
desktop = nixpkgs.lib.nixosSystem {
|
(mkNixosConfig "desktop" [ ./nixos/desktop ]) // (mkNixosConfig "server" [ ./nixos/server ]);
|
||||||
specialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./nixos/desktop
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
homeConfigurations = {
|
homeConfigurations =
|
||||||
"leonhard@desktop" = home-manager.lib.homeManagerConfiguration {
|
(mkHomeConfig "leonhard@desktop" [ ./home-manager/desktop/leonhard.nix ])
|
||||||
inherit pkgs;
|
// (mkHomeConfig "leonhard@server" [ ./home-manager/server/leonhard.nix ]);
|
||||||
extraSpecialArgs = { inherit inputs outputs; };
|
|
||||||
modules = [
|
|
||||||
./home-manager/desktop/leonhard.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(import ../base.nix { inherit inputs outputs; })
|
||||||
|
];
|
||||||
|
|
||||||
|
home = {
|
||||||
|
username = "leonhard";
|
||||||
|
homeDirectory = "/home/leonhard";
|
||||||
|
};
|
||||||
|
|
||||||
|
kekleo.graphical = false;
|
||||||
|
}
|
||||||
@@ -72,17 +72,6 @@
|
|||||||
LC_TIME = "de_DE.UTF-8";
|
LC_TIME = "de_DE.UTF-8";
|
||||||
};
|
};
|
||||||
|
|
||||||
users.users = {
|
|
||||||
leonhard = {
|
|
||||||
# You can set an initial password for your user.
|
|
||||||
# If you do, you can skip setting a root password by passing '--no-root-passwd' to nixos-install.
|
|
||||||
# Be sure to change it (using passwd) after rebooting!
|
|
||||||
initialPassword = "leonhard";
|
|
||||||
isNormalUser = true;
|
|
||||||
extraGroups = [ "wheel" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
# https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
|
||||||
system.stateVersion = "25.11";
|
system.stateVersion = "25.11";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,5 +27,13 @@
|
|||||||
# pulse.enable = true;
|
# pulse.enable = true;
|
||||||
# };
|
# };
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
leonhard = {
|
||||||
|
initialPassword = "leonhard";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
networking.hostName = "desktop";
|
networking.hostName = "desktop";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,21 @@
|
|||||||
|
{
|
||||||
|
inputs,
|
||||||
|
outputs,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
(import ../base.nix { inherit inputs outputs; })
|
||||||
|
./hardware-configuration.nix
|
||||||
|
];
|
||||||
|
|
||||||
|
users.users = {
|
||||||
|
leonhard = {
|
||||||
|
initialPassword = "leonhard";
|
||||||
|
isNormalUser = true;
|
||||||
|
extraGroups = [ "wheel" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
networking.hostName = "server";
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user