add den pattern
This commit is contained in:
29
modules/core/common.nix
Normal file
29
modules/core/common.nix
Normal file
@@ -0,0 +1,29 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.common.enable or true)) {
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
nix.settings.experimental-features = [
|
||||
"nix-command"
|
||||
"flakes"
|
||||
];
|
||||
|
||||
users.defaultUserShell = pkgs.zsh;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
chromium
|
||||
gnumake
|
||||
jetbrains-toolbox
|
||||
fastfetch
|
||||
jq
|
||||
];
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
system.stateVersion = "25.11";
|
||||
};
|
||||
}
|
||||
6
modules/core/default.nix
Normal file
6
modules/core/default.nix
Normal file
@@ -0,0 +1,6 @@
|
||||
{ lib, ... }: {
|
||||
imports = lib.mapAttrsToList
|
||||
(file: _: ./. + "/${file}")
|
||||
(lib.filterAttrs (file: _: lib.hasSuffix ".nix" file && file != "default.nix")
|
||||
(builtins.readDir ./.));
|
||||
}
|
||||
18
modules/core/home-manager.nix
Normal file
18
modules/core/home-manager.nix
Normal file
@@ -0,0 +1,18 @@
|
||||
{ config, lib, pkgs, pkgsUnstable, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.home-manager.enable or true)) {
|
||||
home-manager = {
|
||||
useGlobalPkgs = true;
|
||||
useUserPackages = true;
|
||||
extraSpecialArgs = {
|
||||
inherit pkgsUnstable;
|
||||
};
|
||||
|
||||
users.avravels = import ../home/home.nix;
|
||||
};
|
||||
};
|
||||
}
|
||||
23
modules/core/locales.nix
Normal file
23
modules/core/locales.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.locales.enable or true)) {
|
||||
time.timeZone = "Europe/Amsterdam";
|
||||
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "nl_NL.UTF-8";
|
||||
LC_IDENTIFICATION = "nl_NL.UTF-8";
|
||||
LC_MEASUREMENT = "nl_NL.UTF-8";
|
||||
LC_MONETARY = "nl_NL.UTF-8";
|
||||
LC_NAME = "nl_NL.UTF-8";
|
||||
LC_NUMERIC = "nl_NL.UTF-8";
|
||||
LC_PAPER = "nl_NL.UTF-8";
|
||||
LC_TELEPHONE = "nl_NL.UTF-8";
|
||||
LC_TIME = "nl_NL.UTF-8";
|
||||
};
|
||||
};
|
||||
}
|
||||
17
modules/core/programs.nix
Normal file
17
modules/core/programs.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.programs.enable or true)) {
|
||||
programs = {
|
||||
zsh.enable = true;
|
||||
|
||||
hyprland.enable = true;
|
||||
hyprland.xwayland.enable = true;
|
||||
|
||||
virt-manager.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
28
modules/core/services.nix
Normal file
28
modules/core/services.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.services.enable or true)) {
|
||||
services.openssh.enable = true;
|
||||
|
||||
services = {
|
||||
displayManager.gdm.enable = true;
|
||||
desktopManager.gnome.enable = true;
|
||||
|
||||
xserver = {
|
||||
enable = true;
|
||||
xkb.layout = "us";
|
||||
xkb.variant = "";
|
||||
};
|
||||
|
||||
pulseaudio.enable = false;
|
||||
|
||||
pipewire.enable = true;
|
||||
pipewire.alsa.enable = true;
|
||||
pipewire.alsa.support32Bit = true;
|
||||
pipewire.pulse.enable = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
27
modules/core/users.nix
Normal file
27
modules/core/users.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ config, lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
dirModules = config.features.modules.core or { };
|
||||
in
|
||||
{
|
||||
config = lib.mkIf ((dirModules.enable or false) && (dirModules.users.enable or true)) {
|
||||
users.users.avravels = {
|
||||
initialPassword = "welcome";
|
||||
isNormalUser = true;
|
||||
description = "Armel van Ravels";
|
||||
extraGroups = [
|
||||
"networkmanager"
|
||||
"wheel"
|
||||
"libvirtd"
|
||||
"dialout"
|
||||
];
|
||||
packages = with pkgs; [
|
||||
home-manager
|
||||
spotify
|
||||
proton-vpn
|
||||
fzf
|
||||
];
|
||||
shell = pkgs.zsh;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user