Restructuring

This commit is contained in:
Tibo De Peuter 2023-04-04 12:08:13 +02:00
parent 79a809d8cb
commit 9c6bc18271
7 changed files with 148 additions and 184 deletions

View file

@ -43,6 +43,7 @@
inherit system; inherit system;
modules = [ modules = [
home-manager.nixosModule home-manager.nixosModule
./modules
]; ];
}; };

View file

@ -1,27 +1,19 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running nixos-help).
{ config, pkgs, ... }: { config, pkgs, ... }:
{ {
imports = imports = [
[ ./hardware-configuration.nix
./hardware-configuration.nix
];
# Nix Flakes ../../modules/apps/virtualbox
nix.package = pkgs.nixFlakes; ../../modules/des/gnome
nix.extraOptions = '' ];
experimental-features = nix-command flakes
'';
# Use the systemd-boot EFI boot loader.] # Use the systemd-boot EFI boot loader.]
boot.loader = { boot.loader = {
systemd-boot.enable = true; systemd-boot.enable = true;
efi = { efi = {
canTouchEfiVariables = true; canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi"; efiSysMountPoint = "/boot/efi";
}; };
}; };
@ -55,18 +47,6 @@
videoDrivers = [ "nvidia" ]; # Also for wayland compositors videoDrivers = [ "nvidia" ]; # Also for wayland compositors
# Enable the GNOME Desktop Environment.
displayManager.gdm.enable = true;
desktopManager.gnome.enable = true;
# Enable the Plasma 5 Desktop Environment.
# displayManager.sddm = {
# enable = true;
# defaultSession = "plasmawayland";
# };
# desktopManager.plasma.enable = true;
# Configure keymap in X11 # Configure keymap in X11
layout = "us"; layout = "us";
xkbVariant = ""; xkbVariant = "";
@ -99,37 +79,23 @@
services.xserver.libinput.enable = true; services.xserver.libinput.enable = true;
# NVIDIA drivers # NVIDIA drivers
hardware.opengl.enable = true; hardware = {
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable; opengl.enable = true;
hardware.nvidia.modesetting.enable = true; nvidia = {
open = true;
# Define a user account. Don't forget to set a password with passwd. # package = config.boot.kernelPackages.nvidiaPackages.stable;
users.users.tdpeuter = { modesetting.enable = true;
description = "Tibo De Peuter"; # prime = {
isNormalUser = true; # offload.enable = true;
extraGroups = [ "networkmanager" "wheel" ]; # intelBusId = "PCI::00:02:0";
initialPassword = "ChangeMe"; # nvidiaBusId = "PCI:01:00:0";
packages = with pkgs; [ # };
home-manager };
];
shell = pkgs.zsh;
}; };
# Allow unfree packages # Allow unfree packages
nixpkgs.config.allowUnfree = true; nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
];
# Computer architecture
virtualisation.virtualbox.host.enable = true;
virtualisation.virtualbox.host.enableExtensionPack = true;
virtualisation.virtualbox.guest.enable = true;
virtualisation.virtualbox.guest.x11 = true;
users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
# Some programs need SUID wrappers, can be configured further or are # Some programs need SUID wrappers, can be configured further or are
# started in user sessions. # started in user sessions.
# programs.mtr.enable = true; # programs.mtr.enable = true;

View file

@ -0,0 +1,8 @@
{
imports = [
./alacritty
./firefox
./thunderbird
# ./virtualbox
];
}

97
nixos/modules/default.nix Normal file
View file

@ -0,0 +1,97 @@
{ inputs, lib, config, pkgs, ... }:
{
imports = [
./apps
./shells
./utils
];
# Nix Flakes
nix.package = pkgs.nixFlakes;
nix.extraOptions = ''
experimental-features = nix-command flakes
keep-outputs = true
keep-derivations = true
'';
users.users.tdpeuter = {
description = "Tibo De Peuter";
isNormalUser = true;
extraGroups = [ "networkmanager" "wheel" ];
initialPassword = "ChangeMe";
packages = with pkgs; [
home-manager
];
shell = pkgs.zsh;
};
home-manager.users.tdpeuter = { pkgs, ... }: {
home = {
username = "tdpeuter";
homeDirectory = "/home/tdpeuter";
stateVersion = "22.11";
packages = with pkgs; [
brave
caprine-bin
direnv
discord
duf
git-crypt
gnupg
jellyfin-media-player
libreoffice-fresh-unwrapped
lynx
mattermost-desktop
nextcloud-client
obsidian
pinentry_qt
spotify
w3m
zathura
zenith
zoom-us
# Fonts
corefonts # Calibri for Uni
];
};
programs = {
home-manager.enable = true;
direnv = {
enable = true;
nix-direnv.enable = true;
};
git = {
enable = true;
userName = "tdpeuter";
userEmail = "tibo.depeuter@gmail.com";
extraConfig = {
core.editor = "vim";
};
includes = [
{
path = "~/.gitconfig-ugent";
condition = "gitdir:~/Nextcloud/Documenten/UGent";
}
];
};
gpg.enable = true;
};
services = {
gpg-agent = {
enable = true;
pinentryFlavor = "qt";
};
};
};
}

View file

@ -0,0 +1,5 @@
{
imports = [
./zsh
];
}

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./vifm ./vifm
./vim
./zellij ./zellij
]; ];
} }

View file

@ -1,114 +0,0 @@
{ inputs, lib, config, pkgs, ... }:
{
# Check documentation at
# https://rycee.gitlab.io/home-manager/options.html
imports = [
];
# Home manager
home = {
# Home Manager needs a bit of information about you and the
# paths it should manage.
username = "tdpeuter";
homeDirectory = "/home/tdpeuter";
# This value determines the Home Manager release that your
# configuration is compatible with. This helps avoid breakage
# when a new Home Manager release introduces backwards
# incompatible changes.
#
# You can update Home Manager without changing this value. See
# the Home Manager release notes for a list of state version
# changes in each release.
stateVersion = "22.11";
packages = with pkgs; [
alacritty
discord
duf
git-crypt
gnupg
libreoffice-fresh-unwrapped
lynx
mattermost-desktop
nextcloud-client
pinentry_qt
spotify
vifm
vim
w3m
zathura
zellij
zenith
zoom-us
# Webdevelopment
jetbrains.webstorm
# Software Engineering Lab 1
android-studio
# Fonts
font-awesome_5 # Vifm and zsh dependency
];
file = {
".config/alacritty".source = ../../../stow/alacritty/.config/alacritty;
".config/vifm".source = ../../../stow/vifm/.config/vifm;
".vim".source = ../../../stow/vim/.vim;
".vimrc".source = ../../../stow/vim/.vimrc;
".config/zellij".source = ../../../stow/zellij/.config/zellij;
".oh-my-zsh".source = ../../../stow/zsh/.oh-my-zsh;
};
};
programs = {
# Let Home Manager install and manage itself.
home-manager.enable = true;
git = {
enable = true;
userName = "tdpeuter";
userEmail = "tibo.depeuter@gmail.com";
extraConfig = {
core.editor = "vim";
};
};
gpg.enable = true;
zsh = {
enable = true;
oh-my-zsh = {
enable = true;
custom = "$HOME/.oh-my-zsh";
plugins = [ "dirhistory" "git" "screen" ];
theme = "mrfortem";
};
plugins = [
{
name = "cmdtime";
src = pkgs.fetchFromGitHub {
owner = "tom-auger";
repo = "cmdtime";
rev = "ffc72641dcfa0ee6666ceb1dc712b61be30a1e8b";
hash = "sha256-v6wCfNoPXDD3sS6yUYE6lre8Ir1yJcLGoAW3O8sUOCg=";
};
}
];
};
};
services = {
gpg-agent = {
enable = true;
pinentryFlavor = "qt";
};
};
}