Moved profiles to dedicated directory

This commit is contained in:
Jan-Bulthuis committed 2025-05-29 12:16:38 +02:00
1 parent cdffa07675
commit 9a97168950
8 files changed
+4 -1

No files matched your search

-62
View File
@@ -1,62 +0,0 @@
{
mkModule,
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.base;
in
{
options.modules.profiles.base = {
enable = mkEnableOption "base profile";
};
config = mkIf cfg.enable {
modules = {
bootloader.enable = mkDefault true;
ssh.enable = mkDefault true;
};
# Localization
time.timeZone = "Europe/Amsterdam";
i18n.defaultLocale = "en_US.UTF-8";
console.keyMap = "us";
# Enable neovim
programs.neovim = {
enable = true;
defaultEditor = true;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Enable the usage of flakes
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Clean tmp
boot.tmp.cleanOnBoot = true;
# Base packages
environment.systemPackages = with pkgs; [
git
wget
curl
dig
procps
wireguard-tools
usbutils
pciutils
zip
unzip
tmux
];
};
}
-28
View File
@@ -1,28 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.desktop;
in
{
options.modules.profiles.desktop = {
enable = mkEnableOption "desktop profile";
};
config = mkIf cfg.enable {
modules = {
profiles.base.enable = mkDefault true;
fonts.enable = mkDefault true;
graphics.enable = mkDefault true;
gnome.enable = mkDefault true; # TODO: Rename to display manager?
networkmanager.enable = mkDefault true;
printing.enable = mkDefault true;
sound.enable = mkDefault true;
};
};
}
-30
View File
@@ -1,30 +0,0 @@
{
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.laptop;
in
{
options.modules.profiles.laptop = {
enable = mkEnableOption "laptop profile";
};
config = mkIf cfg.enable {
# Setup modules
modules = {
profiles.desktop.enable = mkDefault true;
bluetooth.enable = mkDefault true;
power-saving.enable = mkDefault true;
};
# Add packages
environment.systemPackages = with pkgs; [
brightnessctl
];
};
}
-77
View File
@@ -1,77 +0,0 @@
{
mkModule,
pkgs,
lib,
config,
...
}:
with lib;
let
cfg = config.modules.profiles.vm;
in
{
options.modules.profiles.vm = {
enable = mkEnableOption "Base VM profile";
};
config = mkIf cfg.enable {
# Enabled modules
modules = {
profiles.base.enable = true;
ssh.enable = true;
};
# Admin users
users.users.local = {
extraGroups = [ "wheel" ];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIKKxoQSxfYqf9ITN8Fhckk8WbY4dwtBAXOhC9jxihJvq jan@bulthuis.dev"
];
};
# Enable qemu guest agent
services.qemuGuest.enable = true;
# Machine platform
nixpkgs.hostPlatform = "x86_64-linux";
# Hardware configuration
hardware.enableRedistributableFirmware = true;
boot.initrd.availableKernelModules = [
"ata_piix"
"uhci_hcd"
"virtio_pci"
"virtio_scsi"
"sd_mod"
"sr_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
hardware.cpu.intel.updateMicrocode = true;
# Filesystems
fileSystems."/" = {
device = "/dev/disk/by-partlabel/root";
fsType = "ext4";
};
fileSystems."/boot" = {
device = "/dev/disk/by-partlabel/EFI";
fsType = "vfat";
options = [
"fmask=0077"
"dmask=0077"
];
};
# Swapfile
swapDevices = [
{
device = "/var/lib/swapfile";
size = 6 * 1024;
}
];
};
}