Begin stabilize system module

This commit is contained in:
Florian RICHER 2024-05-25 23:51:37 +02:00
parent edcbfaf379
commit 6163188786
24 changed files with 63 additions and 59 deletions

View file

@ -19,10 +19,10 @@
};
outputs = inputs@{
nixpkgs,
home-manager,
agenix,
...
nixpkgs,
home-manager,
agenix,
...
}:
let
systems = [
@ -37,15 +37,14 @@
${s.name} = nixpkgs.lib.nixosSystem {
inherit (s) system;
modules = [
./lib
./hosts/${s.name}
home-manager.nixosModules.home-manager
agenix.nixosModules.default
];
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.extraSpecialArgs = inputs;
# home-manager.useGlobalPkgs = true;
# home-manager.useUserPackages = true;
# home-manager.extraSpecialArgs = inputs;
};
}) {} systems;
};

View file

@ -42,6 +42,23 @@
nix.settings.experimental-features = [ "nix-command" "flakes" ];
};
modules = {
# users.florian = {
# };
system = {
bluetooth.enable = true;
gamingKernel.enable = true;
# keymaps.layout = "fr";
nvidia.enable = true;
pipewire.enable = true;
plymouth.enable = true;
printing.enable = true;
waydroid.enable = true;
};
};
# Configure for testing in vm
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm

View file

@ -1,15 +0,0 @@
{ 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;
}

View file

@ -2,9 +2,9 @@
{
imports = [
./cli
./desktop
./server
# ./cli
# ./desktop
# ./server
./system
];
}

View file

@ -2,14 +2,8 @@
{
imports = [
./chromium
./flatpak
./gamingKernel
./gnome
./hyprland
./jetbrainsToolbox
./kitty
./plasma
./vscode
];
}

View file

@ -2,12 +2,12 @@
with lib;
let
cfg = config.modules.system.plymouth;
cfg = config.modules.system.plasma;
in
{
options.modules.system.plymouth = {
options.modules.system.plasma = {
enable = mkEnableOption ''
Enable plymouth with my custom configurations
Enable plasma with my custom configurations
'';
};
config = mkIf cfg.enable {

11
modules/home/default.nix Normal file
View file

@ -0,0 +1,11 @@
{ config, pkgs, ... }:
{
imports = [
./chromium
./flatpak
./jetbrainsToolbox
./kitty
./vscode
];
}

View file

@ -2,10 +2,10 @@
with lib;
let
cfg = config.modules.desktop.vscode;
cfg = config.modules.home.vscode;
in
{
options.modules.desktop.vscode = {
options.modules.home.vscode = {
enable = mkEnableOption ''
Enable vscode with my custom configurations
'';

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -1,13 +1,15 @@
{ config, pkgs, ... }:
{ ... }:
{
imports = [
./bluetooth
./keymaps
./gamingKernel
# ./keymaps
./nvidia
./pipewire
./plymouth
./printing
./waydroid
# Common configuration
./system.nix

View file

@ -2,15 +2,15 @@
with lib;
let
cfg = config.modules.desktop.gamingKernel;
cfg = config.modules.system.gamingKernel;
in
{
options.modules.desktop.gamingKernel = {
options.modules.system.gamingKernel = {
enable = mkEnableOption ''
Enable gaming kernel with my custom configurations
'';
};
config = mkIf cfg.enable {
virtualisation.waydroid.enable = true;
boot.kernelPackages = pkgs.linuxPackages_zen;
};
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let
@ -15,9 +15,5 @@ in
type = types.string;
};
};
config = {
imports = [
./${cfg.layout}
];
};
config = (import ./${cfg.layout}.nix {});
}

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Configure keymap in X11
services.xserver = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ ... }:
{
# Configure keymap in X11
services.xserver = {

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -1,4 +1,4 @@
{ config, pkgs, lib, ... }:
{ config, lib, ... }:
with lib;
let

View file

@ -1,4 +1,4 @@
{ config, pkgs, ... }:
{ pkgs, ... }:
{
# Set your time zone.

View file

@ -2,15 +2,15 @@
with lib;
let
cfg = config.modules.desktop.waydroid;
cfg = config.modules.system.waydroid;
in
{
options.modules.desktop.waydroid = {
options.modules.system.waydroid = {
enable = mkEnableOption ''
Enable waydroid with my custom configurations
'';
};
config = mkIf cfg.enable {
boot.kernelPackages = pkgs.linuxPackages_zen;
virtualisation.waydroid.enable = true;
};
}