Re-organize Nix Modules
- Move all programs into system folder - Create `default.nix` for each folder to reduce number of imports in configuration.nix - Rename some modules to be more generic and less package specific to allow for easy swapping of programs in the future - Update flake.lock
This commit is contained in:
parent
ee2aff1f08
commit
59f88dad0f
12
flake.lock
generated
12
flake.lock
generated
@ -223,11 +223,11 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711133180,
|
"lastModified": 1711554349,
|
||||||
"narHash": "sha256-WJOahf+6115+GMl3wUfURu8fszuNeJLv9qAWFQl3Vmo=",
|
"narHash": "sha256-RypwcWEIFePBI0Hubfj4chanbM/G2yzJzC6wgz+dmS4=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "1c2c5e4cabba4c43504ef0f8cc3f3dfa284e2dbb",
|
"rev": "179f6acaf7c068c7870542cdae72afec9427a5b0",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
@ -276,11 +276,11 @@
|
|||||||
},
|
},
|
||||||
"nixpkgs-stable": {
|
"nixpkgs-stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1711124224,
|
"lastModified": 1711460390,
|
||||||
"narHash": "sha256-l0zlN/3CiodvWDtfBOVxeTwYSRz93muVbXWSpaMjXxM=",
|
"narHash": "sha256-akSgjDZL6pVHEfSE6sz1DNSXuYX6hq+P/1Z5IoYWs7E=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "56528ee42526794d413d6f244648aaee4a7b56c0",
|
"rev": "44733514b72e732bd49f5511bd0203dea9b9a434",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -25,7 +25,6 @@
|
|||||||
timezone = "America/New_York"; # Time Zone
|
timezone = "America/New_York"; # Time Zone
|
||||||
locale = "en_US.UTF-8"; # Locale
|
locale = "en_US.UTF-8"; # Locale
|
||||||
diskoConfig = "luks-btrfs-subvolumes"; # Select the disko config that was used to partition drive
|
diskoConfig = "luks-btrfs-subvolumes"; # Select the disko config that was used to partition drive
|
||||||
desktopEnvironment = "gnome"; # Window Manager / Desktop Environment to use
|
|
||||||
hardwareConfiguration = "qemu-vm"; # Select the hardware config from hardware directory
|
hardwareConfiguration = "qemu-vm"; # Select the hardware config from hardware directory
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -36,8 +35,8 @@
|
|||||||
email = "balajsra@umich.edu"; # Email (used for certain configurations)
|
email = "balajsra@umich.edu"; # Email (used for certain configurations)
|
||||||
dotfilesDir = "~/.dotfiles"; # Absolute path of the local repo
|
dotfilesDir = "~/.dotfiles"; # Absolute path of the local repo
|
||||||
theme = "dracula"; # Selected theme from themes directory
|
theme = "dracula"; # Selected theme from themes directory
|
||||||
wm = "dwm"; # Selected window manager or desktop environment
|
desktop = "gnome"; # Selected window manager or desktop environment
|
||||||
wmType = "x11"; # x11 or wayland
|
desktopType = "x11"; # x11 or wayland
|
||||||
browser = "vivaldi"; # Default browser
|
browser = "vivaldi"; # Default browser
|
||||||
term = "kitty"; # Default terminal command
|
term = "kitty"; # Default terminal command
|
||||||
editor = "vim"; # Default editor
|
editor = "vim"; # Default editor
|
||||||
|
@ -6,18 +6,19 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
(../../hardware + "/${systemSettings.hardwareConfiguration}.nix")
|
(../../hosts + "/${systemSettings.hardwareConfiguration}.nix")
|
||||||
../../system/hardware/kernel.nix
|
(../../system/gui + "/${userSettings.desktop}.nix")
|
||||||
../../system/hardware/bluetooth.nix
|
../../system/hardware/default.nix
|
||||||
../../system/hardware/opengl.nix
|
(../../system/programs/browser + "/${userSettings.browser}.nix")
|
||||||
../../system/hardware/openrgb.nix
|
../../system/programs/development/default.nix
|
||||||
../../system/hardware/printing.nix
|
../../system/programs/gaming/default.nix
|
||||||
../../system/hardware/automount.nix
|
../../system/programs/launcher/default.nix
|
||||||
../../system/security/firewall.nix
|
../../system/programs/media/default.nix
|
||||||
../../system/app/gaming/steam.nix
|
../../system/programs/productivity/default.nix
|
||||||
../../system/app/gaming/gamemode.nix
|
(../../system/programs/terminal + "/${userSettings.term}.nix")
|
||||||
../../system/hardware/audio.nix
|
../../system/programs/utilities/default.nix
|
||||||
(../../system/gui + "/${systemSettings.desktopEnvironment}.nix")
|
../../system/security/default.nix
|
||||||
|
../../system/util/default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
nix = {
|
nix = {
|
||||||
|
@ -10,63 +10,8 @@
|
|||||||
home.stateVersion = "23.11";
|
home.stateVersion = "23.11";
|
||||||
|
|
||||||
home.packages = (with pkgs; [
|
home.packages = (with pkgs; [
|
||||||
# Terminal
|
|
||||||
kitty
|
|
||||||
|
|
||||||
# Browser
|
|
||||||
vivaldi
|
|
||||||
|
|
||||||
# Launcher
|
|
||||||
dmenu
|
|
||||||
rofi
|
|
||||||
|
|
||||||
# Development
|
|
||||||
vscode
|
|
||||||
|
|
||||||
# Utilities
|
|
||||||
syncthing
|
|
||||||
bitwarden
|
|
||||||
ventoy
|
|
||||||
via
|
|
||||||
prusa-slicer
|
|
||||||
|
|
||||||
# Office
|
|
||||||
xournalpp
|
|
||||||
gimp
|
|
||||||
gnucash
|
|
||||||
|
|
||||||
# Gaming
|
|
||||||
wine
|
|
||||||
bottles
|
|
||||||
lutris
|
|
||||||
protonup-qt
|
|
||||||
|
|
||||||
# Media
|
|
||||||
gimp
|
|
||||||
mpv
|
|
||||||
blender
|
|
||||||
obs-studio
|
|
||||||
ffmpeg
|
|
||||||
trackma-gtk
|
|
||||||
|
|
||||||
# Messaging
|
|
||||||
beeper
|
|
||||||
discord
|
|
||||||
signal-desktop
|
|
||||||
zoom-us
|
|
||||||
|
|
||||||
# Productivity
|
|
||||||
anytype
|
|
||||||
logseq
|
|
||||||
|
|
||||||
# Music / Podcasts
|
|
||||||
pocket-casts
|
|
||||||
spotify
|
|
||||||
spicetify-cli
|
|
||||||
]);
|
]);
|
||||||
|
|
||||||
services.syncthing.enable = true;
|
|
||||||
|
|
||||||
xdg.enable = true;
|
xdg.enable = true;
|
||||||
xdg.userDirs = {
|
xdg.userDirs = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
|
||||||
|
|
||||||
{
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
}
|
|
8
system/gui/default.nix
Normal file
8
system/gui/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./x11.nix
|
||||||
|
./fonts.nix
|
||||||
|
];
|
||||||
|
}
|
@ -2,11 +2,8 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./x11.nix
|
./default.nix
|
||||||
./lightdm.nix
|
./lightdm.nix
|
||||||
../app/terminal/kitty.nix
|
|
||||||
../app/launcher/dmenu.nix
|
|
||||||
../app/launcher/rofi.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.windowManager.dwm.enable = true;
|
services.xserver.windowManager.dwm.enable = true;
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
fonts.packages = with pkgs; [
|
fonts.packages = with pkgs; [
|
||||||
|
corefonts
|
||||||
powerline
|
powerline
|
||||||
font-awesome
|
font-awesome
|
||||||
ubuntu_font_family
|
ubuntu_font_family
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./x11.nix
|
./default.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
services.xserver.displayManager.gdm.enable = true;
|
services.xserver.displayManager.gdm.enable = true;
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
../util/dbus.nix
|
|
||||||
../util/gnome-keyring.nix
|
|
||||||
./fonts.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
services.xserver = {
|
services.xserver = {
|
||||||
enable = true;
|
enable = true;
|
||||||
xkb = {
|
xkb = {
|
||||||
|
13
system/hardware/default.nix
Normal file
13
system/hardware/default.nix
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./audio.nix
|
||||||
|
./automount.nix
|
||||||
|
./bluetooth.nix
|
||||||
|
./kernel.nix
|
||||||
|
./opengl.nix
|
||||||
|
./openrgb.nix
|
||||||
|
./printing.nix
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/browser/vivaldi.nix
Normal file
7
system/programs/browser/vivaldi.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vivaldi
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/development/default.nix
Normal file
7
system/programs/development/default.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./vscode.nix
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/development/vscode.nix
Normal file
7
system/programs/development/vscode.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
vscode
|
||||||
|
];
|
||||||
|
}
|
8
system/programs/gaming/compatibility.nix
Normal file
8
system/programs/gaming/compatibility.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
wine
|
||||||
|
protonup-qt
|
||||||
|
];
|
||||||
|
}
|
9
system/programs/gaming/default.nix
Normal file
9
system/programs/gaming/default.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./utilities.nix
|
||||||
|
./launchers.nix
|
||||||
|
./compatibility.nix
|
||||||
|
];
|
||||||
|
}
|
@ -6,4 +6,11 @@
|
|||||||
remotePlay.openFirewall = true;
|
remotePlay.openFirewall = true;
|
||||||
gamescopeSession.enable = true;
|
gamescopeSession.enable = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
bottles
|
||||||
|
lutris
|
||||||
|
heroic
|
||||||
|
prismlauncher
|
||||||
|
];
|
||||||
}
|
}
|
15
system/programs/gaming/utilities.nix
Normal file
15
system/programs/gaming/utilities.nix
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
programs.gamemode = {
|
||||||
|
enable = true;
|
||||||
|
# settings = {};
|
||||||
|
# enableRenice = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
mangohud
|
||||||
|
goverlay
|
||||||
|
vkbasalt
|
||||||
|
];
|
||||||
|
}
|
8
system/programs/launcher/default.nix
Normal file
8
system/programs/launcher/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./dmenu.nix
|
||||||
|
./rofi.nix
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/launcher/dmenu.nix
Normal file
7
system/programs/launcher/dmenu.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
dmenu
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/launcher/rofi.nix
Normal file
7
system/programs/launcher/rofi.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
rofi
|
||||||
|
];
|
||||||
|
}
|
8
system/programs/media/creation.nix
Normal file
8
system/programs/media/creation.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
blender
|
||||||
|
obs-studio
|
||||||
|
];
|
||||||
|
}
|
9
system/programs/media/default.nix
Normal file
9
system/programs/media/default.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./players.nix
|
||||||
|
./editors.nix
|
||||||
|
./creation.nix
|
||||||
|
];
|
||||||
|
}
|
9
system/programs/media/editors.nix
Normal file
9
system/programs/media/editors.nix
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gimp
|
||||||
|
libsForQt5.kdenlive
|
||||||
|
ffmpeg
|
||||||
|
];
|
||||||
|
}
|
12
system/programs/media/players.nix
Normal file
12
system/programs/media/players.nix
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnome.eog
|
||||||
|
mpv
|
||||||
|
trackma-gtk
|
||||||
|
pocket-casts
|
||||||
|
spotify
|
||||||
|
spicetify-cli
|
||||||
|
];
|
||||||
|
}
|
10
system/programs/productivity/communication.nix
Normal file
10
system/programs/productivity/communication.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
beeper
|
||||||
|
discord
|
||||||
|
signal-desktop
|
||||||
|
zoom-us
|
||||||
|
];
|
||||||
|
}
|
10
system/programs/productivity/default.nix
Normal file
10
system/programs/productivity/default.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./office.nix
|
||||||
|
./finance.nix
|
||||||
|
./notes.nix
|
||||||
|
./communication.nix
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/productivity/finance.nix
Normal file
7
system/programs/productivity/finance.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
gnucash
|
||||||
|
];
|
||||||
|
}
|
8
system/programs/productivity/notes.nix
Normal file
8
system/programs/productivity/notes.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
anytype
|
||||||
|
logseq
|
||||||
|
];
|
||||||
|
}
|
10
system/programs/productivity/office.nix
Normal file
10
system/programs/productivity/office.nix
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
onlyoffice-bin
|
||||||
|
xournalpp
|
||||||
|
zathura
|
||||||
|
libsForQt5.okular
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/terminal/kitty.nix
Normal file
7
system/programs/terminal/kitty.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
kitty
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/utilities/3d-printing.nix
Normal file
7
system/programs/utilities/3d-printing.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
prusa-slicer
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/utilities/bootable-media.nix
Normal file
7
system/programs/utilities/bootable-media.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
ventoy
|
||||||
|
];
|
||||||
|
}
|
11
system/programs/utilities/default.nix
Normal file
11
system/programs/utilities/default.nix
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./3d-printing.nix
|
||||||
|
./bootable-media.nix
|
||||||
|
./file-syncing.nix
|
||||||
|
./keyboard-configuration.nix
|
||||||
|
./passwords.nix
|
||||||
|
];
|
||||||
|
}
|
5
system/programs/utilities/file-syncing.nix
Normal file
5
system/programs/utilities/file-syncing.nix
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
services.syncthing.enable = true;
|
||||||
|
}
|
7
system/programs/utilities/keyboard-configuration.nix
Normal file
7
system/programs/utilities/keyboard-configuration.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
via
|
||||||
|
];
|
||||||
|
}
|
7
system/programs/utilities/passwords.nix
Normal file
7
system/programs/utilities/passwords.nix
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
environment.systemPackages = with pkgs; [
|
||||||
|
bitwarden
|
||||||
|
];
|
||||||
|
}
|
8
system/security/default.nix
Normal file
8
system/security/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./firewall.nix
|
||||||
|
./gpg.nix
|
||||||
|
];
|
||||||
|
}
|
8
system/util/default.nix
Normal file
8
system/util/default.nix
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{ config, lib, pkgs, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./dbus.nix
|
||||||
|
./gnome-keyring.nix
|
||||||
|
];
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user