Skip to content

Commit

Permalink
Move amd, inte, nvidia, laptop, workstation, and tinypc to hosts option
Browse files Browse the repository at this point in the history
  • Loading branch information
arunoruto committed Nov 11, 2024
1 parent 3fe79f4 commit 2ec1f37
Show file tree
Hide file tree
Showing 56 changed files with 216 additions and 205 deletions.
2 changes: 1 addition & 1 deletion hosts/aizen/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
tinypc.enable = true;
hosts.tinypc.enable = true;
}
10 changes: 3 additions & 7 deletions hosts/isshin/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
{ lib, ... }:
{
# Set hostname
networking.hostName = lib.mkForce "isshin"; # Define your hostname.
# networking.hostName = lib.mkForce "isshin"; # Define your hostname.

laptop.enable = true;
hosts.laptop.enable = true;

# Eanble fingerprint for framework laptop
fingerprint.enable = true;

# tailscale.enable = false;
# netbird.enable = true;

amd.enable = true;
hosts.amd.enable = true;

# Fix 6GHz problem
# https://community.frame.work/t/responded-amd-rz616-wifi-card-doesnt-work-with-6ghz-on-kernel-6-7/43226
Expand Down
2 changes: 1 addition & 1 deletion hosts/kenpachi/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}:
{
tinypc.enable = true;
hosts.tinypc.enable = true;
tpm.enable = true;

#efi.enable = false;
Expand Down
2 changes: 1 addition & 1 deletion hosts/kuchiki/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# chrome.enable = false;
# steam.enable = false;
# home.pc.enable = false;
gui.enable = false;
programs.enable = false;

boot = {
kernelModules = [ "amdgpu" ];
Expand Down
2 changes: 1 addition & 1 deletion hosts/kyuubi/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ in
{
printing.enable = true;
scanning.enable = true;
workstation.enable = true;
hosts.workstation.enable = true;

# Define your hostname.
# networking.hostName = lib.mkForce "kyuubi";
Expand Down
4 changes: 2 additions & 2 deletions hosts/madara/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ in
{
printing.enable = true;
scanning.enable = true;
workstation.enable = true;
nvidia.enable = true;
hosts.workstation.enable = true;
hosts.nvidia.enable = true;

# Define your hostname.
# networking.hostName = lib.mkForce "kyuubi";
Expand Down
6 changes: 4 additions & 2 deletions hosts/yhwach/configuration.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
workstation.enable = true;
hosts = {
workstation.enable = true;
nvidia.enable = true;
};
yubikey.signing = "giyu";
nvidia.enable = true;
# netbird.enable = true;
# fingerprint.enable = true;

Expand Down
2 changes: 1 addition & 1 deletion hosts/yoruichi/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
...
}:
{
tinypc.enable = true;
hosts.tinypc.enable = true;

efi.enable = false;
grub.enable = true;
Expand Down
2 changes: 1 addition & 1 deletion hosts/zangetsu/configuration.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Eanble fingerprint for framework laptop
fingerprint.enable = false;

intel.enable = true;
hosts.intel.enable = true;

# Framework specific kernel Params
boot = {
Expand Down
16 changes: 10 additions & 6 deletions modules/home-manager/imports.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,26 @@
];

options = {
laptop.enable = lib.mkEnableOption "Sensible defaults for laptops";
tinypc.enable = lib.mkEnableOption "Sensible defaults for tinypcs";
hosts = {
laptop.enable = lib.mkEnableOption "Sensible defaults for laptops";
tinypc.enable = lib.mkEnableOption "Sensible defaults for tinypcs";
};
};

config = lib.mkIf (args ? nixosConfig) {
laptop.enable = lib.mkDefault osConfig.laptop.enable;
tinypc.enable = lib.mkDefault osConfig.tinypc.enable;
pc.enable = lib.mkDefault osConfig.gui.enable;
hosts = {
laptop.enable = lib.mkDefault osConfig.hosts.laptop.enable;
tinypc.enable = lib.mkDefault osConfig.hosts.tinypc.enable;
};
pc.enable = lib.mkDefault osConfig.programs.enable;

hostname = lib.mkDefault osConfig.networking.hostName;
keyboard = {
layout = lib.mkDefault osConfig.services.xserver.xkb.layout;
variant = lib.mkDefault osConfig.services.xserver.xkb.variant;
};
theming = {
enable = lib.mkDefault osConfig.gui.enable;
enable = lib.mkDefault osConfig.programs.enable;
image = lib.mkDefault osConfig.theming.image;
scheme = lib.mkDefault osConfig.theming.scheme;
};
Expand Down
4 changes: 2 additions & 2 deletions modules/home-manager/pc/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
imports = [
./desktop
./documents
./gui
./network
./programs
./terminal

./avatar.nix
Expand All @@ -21,7 +21,7 @@
avatar.enable = lib.mkDefault true;
desktop.enable = lib.mkDefault true;
documents.enable = lib.mkDefault true;
gui.enable = lib.mkDefault true;
pc.programs.enable = lib.mkDefault true;
terminals.enable = lib.mkDefault true;
};
}
13 changes: 5 additions & 8 deletions modules/home-manager/pc/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,15 @@
sway.enable = lib.mkDefault false;

home.packages = with pkgs; [
gimp
inkscape
# gimp
# inkscape
jabref
obs-studio
#obsidian
# obs-studio
#okular
rnote
spotify
telegram-desktop
#ultrastardx
via
vial
# via
# vial
#qbittorrent

exercism
Expand Down
21 changes: 12 additions & 9 deletions modules/home-manager/pc/desktop/gnome/dconf.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,20 @@
icon-theme = lib.mkForce "candy-icons";
};
# Power settings
"org/gnome/settings-daemon/plugins/power" = {
ambient-enabled = false;
idle-dim = false;
# sleep-inactive-ac-timeout = 1800;
# sleep-inactive-ac-type = "suspend";
# sleep-inactive-battery-timeout = 900;
# sleep-inactive-battery-type = "suspend";
};
"org/gnome/settings-daemon/plugins/power" =
{
ambient-enabled = false;
idle-dim = false;
}
// lib.mkIf config.hosts.laptop.enable {
sleep-inactive-ac-timeout = 1800;
sleep-inactive-ac-type = "suspend";
sleep-inactive-battery-timeout = 900;
sleep-inactive-battery-type = "suspend";
};
# Session
"org/gnome/desktop/session" = {
idle-delay = if config.laptop.enable then "uint32 900" else "uint32 0";
idle-delay = if config.hosts.laptop.enable then "uint32 900" else "uint32 0";
};
# Set list of custom keybinding
"org/gnome/settings-daemon/plugins/media-keys" = {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
./zed.nix
];

options.gui.enable = lib.mkEnableOption "Enable GUI programs";
options.pc.programs.enable = lib.mkEnableOption "Enable GUI programs";

config = lib.mkIf config.gui.enable {
config = lib.mkIf config.pc.programs.enable {
chrome.enable = lib.mkDefault true;
firefox.enable = lib.mkDefault true;
steam.enable = lib.mkDefault false;
Expand All @@ -27,7 +27,23 @@
zed.enable = lib.mkDefault true;

home.packages = with pkgs; [
ladybird
vlc
# unstable.vscode

discord
# jabref
# libsForQt5.kdenlive
libsForQt5.okular
# mailspring
# masterpdfeditor
# mprime
# unstable.mqtt-explorer
unstable.plex-desktop
remmina
zoom-us
zotero

# ladybird
# unstable.spacedrive
];

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions modules/home-manager/server/cli/helix/languages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
];

helix = {
julia.enable = lib.mkDefault (!config.tinypc.enable);
julia.enable = lib.mkDefault (!config.hosts.tinypc.enable);
ltex = {
enable = lib.mkDefault (!config.tinypc.enable);
ngram = lib.mkDefault (!config.tinypc.enable);
enable = lib.mkDefault (!config.hosts.tinypc.enable);
ngram = lib.mkDefault (!config.hosts.tinypc.enable);
};
matlab.enable = lib.mkDefault (!config.tinypc.enable);
# markdown.enable = lib.mkDefault (!config.tinypc.enable);
matlab.enable = lib.mkDefault (!config.hosts.tinypc.enable);
# markdown.enable = lib.mkDefault (!config.hosts.tinypc.enable);
markdown.enable = true;
markup.enable = lib.mkDefault (!config.tinypc.enable);
markup.enable = lib.mkDefault (!config.hosts.tinypc.enable);
nix.enable = lib.mkDefault true;
python.enable = lib.mkDefault (!config.tinypc.enable);
python.enable = lib.mkDefault (!config.hosts.tinypc.enable);
};
}
4 changes: 2 additions & 2 deletions modules/nixos/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
./desktop
./display
./environment
./host-types
./media
./network
./programs
./security
./services
./system
Expand All @@ -25,7 +25,7 @@
desktop-environment.enable = lib.mkDefault true;
display-manager.enable = lib.mkDefault true;
media.enable = lib.mkDefault false;
gui.enable = lib.mkDefault true;
programs.enable = lib.mkDefault true;

nix = {
nixPath = [ "nixpkgs=${inputs.nixpkgs}" ];
Expand Down
8 changes: 8 additions & 0 deletions modules/nixos/desktop/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@
./hyprland.nix
# ./kde.nix
./sway.nix

./wayland.nix
];

options.desktop-environment.enable = lib.mkEnableOption "Enable desktop environment and window manager support";

config = lib.mkIf config.desktop-environment.enable {
# DEs
# cosmic.enable = lib.mkDefault false;
gnome.enable = lib.mkDefault true;
# kde.enable = lib.mkDefault false;

# WMs
sway.enable = lib.mkDefault true;
hyprland.enable = lib.mkDefault true;

# Compositor
wayland.enable = lib.mkDefault true;

services.xserver = {
enable = true;
xkb = {
Expand Down
1 change: 1 addition & 0 deletions modules/nixos/desktop/gnome.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
environment = {
systemPackages = with pkgs; [
gnome-network-displays
gthumb
nautilus-open-any-terminal
gnome.nautilus-python
gnome.gnome-software
Expand Down
File renamed without changes.
23 changes: 0 additions & 23 deletions modules/nixos/environment/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,16 @@
}:
{
imports = [
./gui
./programming

./packages.nix
./cachix.nix
./fonts.nix
./latex.nix
./ld.nix

./amd
./intel
./nvidia
];

cachix.enable = lib.mkDefault false;
gui.enable = lib.mkDefault true;
latex.enable = lib.mkDefault false;
programming.enable = lib.mkDefault true;

amd.enable = lib.mkDefault false;
intel.enable = lib.mkDefault false;
nvidia.enable = lib.mkDefault false;

environment = {
# Enable shells
# shells = with pkgs; [
# bash
# nushell
# zsh
# ];
# pathsToLink = [
# "/share/zsh"
# "/share/fish"
# ];
};
}
24 changes: 0 additions & 24 deletions modules/nixos/environment/gui/default.nix

This file was deleted.

Loading

0 comments on commit 2ec1f37

Please sign in to comment.