Continue refactoring
This commit is contained in:
parent
34c8b954e5
commit
edcbfaf379
9 changed files with 95 additions and 68 deletions
|
@ -37,11 +37,15 @@
|
|||
${s.name} = nixpkgs.lib.nixosSystem {
|
||||
inherit (s) system;
|
||||
modules = [
|
||||
./lib
|
||||
./hosts/${s.name}
|
||||
home-manager.nixosModules.home-manager
|
||||
agenix.nixosModules.default
|
||||
(import ./home/common-home-manager.nix { inherit inputs; })
|
||||
];
|
||||
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = inputs;
|
||||
};
|
||||
}) {} systems;
|
||||
};
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
{ inputs, ... }:
|
||||
|
||||
{
|
||||
home-manager.useGlobalPkgs = true;
|
||||
home-manager.useUserPackages = true;
|
||||
home-manager.extraSpecialArgs = inputs;
|
||||
home-manager.users.florian = import ../home;
|
||||
}
|
|
@ -1,14 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
}
|
|
@ -7,6 +7,8 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
../../modules
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
];
|
||||
|
@ -21,8 +23,26 @@
|
|||
};
|
||||
};
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.florian = {
|
||||
isNormalUser = true;
|
||||
initialPassword = "test";
|
||||
description = "florian";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
home-manager.users.florian = {
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
# Configure for testing in vm
|
||||
users.users.florian.initialPassword = "test";
|
||||
virtualisation.vmVariant = {
|
||||
# following configuration is added only when building VM with build-vm
|
||||
virtualisation = {
|
|
@ -1,8 +0,0 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
imports =
|
||||
[
|
||||
|
||||
];
|
||||
}
|
|
@ -7,18 +7,7 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/linux_gaming.nix
|
||||
../../modules/system.nix
|
||||
../../modules/network.nix
|
||||
../../modules/nvidia.nix
|
||||
../../modules/plasma.nix
|
||||
../../modules/keymaps/us.nix
|
||||
../../modules/bluetooth.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/plymouth.nix
|
||||
../../modules/waydroid.nix
|
||||
|
||||
../../modules # Import optional configuration
|
||||
../../modules
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -28,5 +17,23 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.florian = {
|
||||
isNormalUser = true;
|
||||
description = "florian";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
home-manager.users.florian = {
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
networking.hostName = "nixos-desktop-perso"; # Define your hostname.
|
||||
}
|
||||
|
|
|
@ -7,17 +7,7 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/linux_gaming.nix
|
||||
../../modules/system.nix
|
||||
../../modules/network.nix
|
||||
../../modules/nvidia.nix
|
||||
../../modules/plasma.nix
|
||||
../../modules/keymaps/fr.nix
|
||||
../../modules/bluetooth.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/plymouth.nix
|
||||
|
||||
../../modules # Import optional configuration
|
||||
../../modules
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -27,6 +17,24 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.florian = {
|
||||
isNormalUser = true;
|
||||
description = "florian";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
home-manager.users.florian = {
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
networking.hostName = "nixos-laptop-perso"; # Define your hostname.
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
|
|
|
@ -7,17 +7,7 @@
|
|||
{
|
||||
imports =
|
||||
[
|
||||
../../modules/linux_gaming.nix
|
||||
../../modules/system.nix
|
||||
../../modules/network.nix
|
||||
../../modules/nvidia.nix
|
||||
../../modules/plasma.nix
|
||||
../../modules/keymaps/fr.nix
|
||||
../../modules/bluetooth.nix
|
||||
../../modules/pipewire.nix
|
||||
../../modules/plymouth.nix
|
||||
|
||||
../../modules # Import optional configuration
|
||||
../../modules
|
||||
|
||||
# Include the results of the hardware scan.
|
||||
./hardware-configuration.nix
|
||||
|
@ -27,6 +17,24 @@
|
|||
boot.loader.systemd-boot.enable = true;
|
||||
boot.loader.efi.canTouchEfiVariables = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.florian = {
|
||||
isNormalUser = true;
|
||||
description = "florian";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
};
|
||||
home-manager.users.florian = {
|
||||
home = {
|
||||
username = "florian";
|
||||
homeDirectory = "/home/florian";
|
||||
|
||||
stateVersion = "24.05";
|
||||
};
|
||||
|
||||
programs.home-manager.enable = true;
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
};
|
||||
|
||||
networking.hostName = "nixos-laptop-pro"; # Define your hostname.
|
||||
|
||||
hardware.nvidia.prime = {
|
||||
|
|
|
@ -1,5 +1,15 @@
|
|||
{ config, ... }:
|
||||
{ lib, ... }:
|
||||
|
||||
let
|
||||
applyHomeManagerConfig = { home-manager, ... }: let
|
||||
applyConfig = user: {
|
||||
home-manager.users.${user.name} = user.config;
|
||||
};
|
||||
in
|
||||
{
|
||||
home-manager.users = lib.foldl' (acc: user: acc // applyConfig user) {} (lib.attrValues home-manager.users);
|
||||
};
|
||||
in
|
||||
{
|
||||
|
||||
applyHomeManagerConfig = applyHomeManagerConfig;
|
||||
}
|
Loading…
Reference in a new issue