Working on modularizing stuff

This commit is contained in:
Chris Kruining 2024-07-21 00:07:19 +02:00
parent 835faf218d
commit 8349809fec
15 changed files with 256 additions and 41 deletions

94
hosts/pc/default.nix.back Normal file
View file

@ -0,0 +1,94 @@
{ config, lib, pkgs, inputs, ... }:
{
imports = [
./hardware-configuration.nix
../../modules/system/boot.nix
../../modules/system/networking.nix
../../modules/system/audio.nix
../../modules/system/zsa_voyager.nix
../../modules/desktop/plasma.nix
../../modules/programs/security.nix
../../modules/programs/theme.nix
../../modules/programs/shell.nix
../../modules/programs/gaming.nix
../../modules/programs/harden.nix
../../modules/programs/communication.nix
../../modules/programs/office.nix
inputs.home-manager.nixosModules.default
];
nixpkgs.config = {
allowUnfree = true;
};
nix.settings.experimental-features = [ "nix-command" "flakes" ];
# Define a user account. Don't forget to set a password with passwd.
users.users.chris = {
isNormalUser = true;
extraGroups = [ "wheel" "audio" ]; # Enable sudo for the user.
packages = with pkgs; [];
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
backupFileExtension = "backup";
users = {
chris.imports = [ ../../users/chris.nix ];
# root.imports = [ ../../users/root.nix ];
};
};
environment.systemPackages = with pkgs; [
neovim
wget
# chromium
thunderbird
zoxide
atuin
btop
dust
bat
tldr
eza
nextcloud-client
];
systemd.services.numLockOnTty = {
wantedBy = [ "multi-user.target" ];
serviceConfig = {
ExecStart = lib.mkForce (pkgs.writeShellScript "numLockOnTty" ''
for tty in /dev/tty{1..6}; do
${pkgs.kbd}/bin/setleds -D +num < "$tty";
done
'');
};
};
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}