system: refactor profiles, remove common/desktop
This commit is contained in:
parent
3a2dd05e15
commit
70e7558421
@ -52,7 +52,7 @@
|
||||
|
||||
# nixfiles
|
||||
nixfiles = {
|
||||
profile.pc.enable = true;
|
||||
profile.workstation.enable = true;
|
||||
programs.adb.enable = true;
|
||||
workarounds.nvidiaPrimary = true;
|
||||
programs.greetd = {
|
||||
@ -65,8 +65,8 @@
|
||||
};
|
||||
programs.unbound.enable = true;
|
||||
common.remoteAccess.enable = true;
|
||||
sessions.plasma.enable = lib.mkDefault false;
|
||||
sessions.hyprland.enable = lib.mkDefault true;
|
||||
sessions.plasma.enable = lib.mkDefault true;
|
||||
sessions.hyprland.enable = lib.mkDefault false;
|
||||
hardware.nvidia.modesetting.enable = true;
|
||||
packageSets.gaming.enable = true;
|
||||
};
|
||||
|
@ -49,7 +49,7 @@
|
||||
services.displayManager.sddm.enable = false;
|
||||
|
||||
nixfiles = {
|
||||
profile.pc.enable = true;
|
||||
profile.workstation.enable = true;
|
||||
common.remoteAccess.enable = true;
|
||||
hardware.opengl.enable = true;
|
||||
packageSets = {
|
||||
|
@ -1,7 +1,6 @@
|
||||
{...}:
|
||||
{
|
||||
imports = [
|
||||
./desktop.nix
|
||||
./me.nix
|
||||
./remote.nix
|
||||
./wm.nix
|
||||
|
@ -1,66 +0,0 @@
|
||||
{ config, lib, pkgs, outputs, ...}:
|
||||
let
|
||||
cfg = config.nixfiles.common.desktop;
|
||||
inherit (lib) mkIf mkDefault mkForce mkEnableOption;
|
||||
in
|
||||
{
|
||||
# imports = [
|
||||
# ./base.nix
|
||||
# ./fragments/sound.nix
|
||||
# ./fragments/multimedia.nix
|
||||
# ./fragments/software/syncthing.nix
|
||||
# ./fragments/hardware/bluetooth.nix
|
||||
# ];
|
||||
|
||||
options.nixfiles.common.desktop = {
|
||||
enable = mkEnableOption "common desktop configuration";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# enable option sets
|
||||
nixfiles = {
|
||||
profile.base.enable = true;
|
||||
packageSets.multimedia.enable = mkDefault true;
|
||||
programs.syncthing.enable = mkDefault true;
|
||||
hardware = {
|
||||
bluetooth.enable = mkDefault true;
|
||||
sound.enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
services.xserver.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
arc-theme
|
||||
wl-clipboard
|
||||
];
|
||||
|
||||
# this solves some inconsistent behavior with xdg-open
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
|
||||
# Enable flatpak
|
||||
services.flatpak.enable = mkDefault true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = mkDefault true;
|
||||
cups-pdf.enable = mkDefault true;
|
||||
};
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
font-awesome
|
||||
noto-fonts-cjk
|
||||
(google-fonts.override { fonts = [ "NovaSquare" ];})
|
||||
];
|
||||
|
||||
# TODO this should be defined in home-manager or not at all probably
|
||||
# FIXME also my name is hardcoded
|
||||
users.users.nullbite = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -3,6 +3,7 @@
|
||||
imports = [
|
||||
./base.nix
|
||||
./pc.nix
|
||||
./workstation.nix
|
||||
./server.nix
|
||||
];
|
||||
}
|
||||
|
@ -1,17 +1,48 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.nixfiles.profile.pc;
|
||||
inherit (lib) mkDefault;
|
||||
in
|
||||
{
|
||||
options.nixfiles.profile.pc.enable = lib.mkEnableOption "the personal computer profile";
|
||||
options.nixfiles.profile.pc.enable = lib.mkEnableOption "minimal PC profile" // {
|
||||
description = ''
|
||||
Whether to enable the minimal PC profile. This profile configures basic
|
||||
system configuration for physical PCs, such as enabling sound and
|
||||
Bluetooth support.
|
||||
'';
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixfiles.profile.base.enable = lib.mkDefault true;
|
||||
nixfiles.binfmt.enable = lib.mkDefault true;
|
||||
|
||||
# disabling this for now; it doesn't work in chroot yet (the only reason i
|
||||
# want it) and it takes forever to compile.
|
||||
# nixfiles.binfmt.enable = lib.mkDefault true;
|
||||
|
||||
# networking.hostName = "nixos"; # Define your hostname.
|
||||
# Pick only one of the below networking options.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
# FIXME find somewhere else to put this
|
||||
networking.networkmanager.enable = lib.mkDefault true; # Easiest to use and most distros use this by default.
|
||||
|
||||
# enable option sets
|
||||
nixfiles = {
|
||||
hardware = {
|
||||
bluetooth.enable = mkDefault true;
|
||||
sound.enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
|
||||
# probably unnecessary, this will be enabled by whatever session i use
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
# this solves some inconsistent behavior with xdg-open
|
||||
xdg.portal.xdgOpenUsePortal = lib.mkDefault true;
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing = {
|
||||
enable = mkDefault true;
|
||||
cups-pdf.enable = mkDefault true;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
51
system/profile/workstation.nix
Normal file
51
system/profile/workstation.nix
Normal file
@ -0,0 +1,51 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
cfg = config.nixfiles.profile.workstation;
|
||||
inherit (lib) mkDefault;
|
||||
in
|
||||
{
|
||||
options.nixfiles.profile.workstation.enable = lib.mkEnableOption "workstation (featureful PC) profile" //
|
||||
{
|
||||
description = ''
|
||||
Whether to enable the workstation (featureful PC) profile. This profile
|
||||
enables the base PC profile, as well as installs and configures various
|
||||
other programs for a more complete computing experience.
|
||||
'';
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
nixfiles.profile.pc.enable = lib.mkDefault true;
|
||||
nixfiles.packageSets.multimedia.enable = lib.mkDefault true;
|
||||
nixfiles.programs.syncthing.enable = lib.mkDefault true;
|
||||
|
||||
# probably unnecessary, this will be enabled by whatever session i use
|
||||
# Enable the X11 windowing system.
|
||||
# services.xserver.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [
|
||||
arc-theme
|
||||
wl-clipboard
|
||||
xclip
|
||||
];
|
||||
|
||||
# this solves some inconsistent behavior with xdg-open
|
||||
xdg.portal.xdgOpenUsePortal = true;
|
||||
|
||||
# Enable flatpak
|
||||
services.flatpak.enable = mkDefault true;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
(nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||
font-awesome
|
||||
noto-fonts-cjk
|
||||
(google-fonts.override { fonts = [ "NovaSquare" ];})
|
||||
];
|
||||
|
||||
# TODO this should be defined in home-manager or not at all probably
|
||||
# FIXME also my name is hardcoded
|
||||
users.users.nullbite = {
|
||||
packages = with pkgs; [
|
||||
firefox
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
@ -26,7 +26,6 @@ in
|
||||
config = lib.mkIf cfg.enable {
|
||||
# enable dependencies
|
||||
nixfiles.common = {
|
||||
desktop.enable = true;
|
||||
wm.enable = true;
|
||||
};
|
||||
nixfiles.meta.wayland = true;
|
||||
@ -39,6 +38,8 @@ in
|
||||
};
|
||||
};
|
||||
|
||||
# misleading name
|
||||
services.xserver.enable = true;
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
# # TODO base this on if nvidia is enabled
|
||||
|
@ -15,8 +15,7 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
nixfiles.common.desktop.enable = true;
|
||||
|
||||
services.xserver.enable = true;
|
||||
services.displayManager.sddm.enable = mkDefault true;
|
||||
services.xserver.desktopManager.plasma6.enable = true;
|
||||
services.displayManager.defaultSession = "plasma";
|
||||
|
Loading…
x
Reference in New Issue
Block a user