Initial seperation of files

This commit is contained in:
Shaquille Soekhlal 2023-07-01 00:38:56 +02:00
parent 08aab3b090
commit 8cab39af19
8 changed files with 126 additions and 101 deletions

20
audio.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, ... }:
{
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
}

10
bootloader.nix Normal file
View File

@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.configurationLimit=2;
boot.initrd.systemd.enable = true;
boot.plymouth.enable = true;
}

View File

@ -10,15 +10,14 @@
<nixos-hardware/framework> <nixos-hardware/framework>
./hardware-configuration.nix ./hardware-configuration.nix
<home-manager/nixos> <home-manager/nixos>
./user-packages.nix
./users.nix
./audio.nix
./system-packages.nix
./hibernation.nix
./bootloader.nix
]; ];
# Bootloader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.systemd-boot.configurationLimit=2;
boot.initrd.systemd.enable = true;
boot.plymouth.enable = true;
# Setup keyfile # Setup keyfile
boot.initrd.secrets = { boot.initrd.secrets = {
"/crypto_keyfile.bin" = null; "/crypto_keyfile.bin" = null;
@ -68,98 +67,9 @@
# Enable CUPS to print documents. # Enable CUPS to print documents.
services.printing.enable = true; services.printing.enable = true;
# Enable sound with pipewire.
sound.enable = true;
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager). # Enable touchpad support (enabled default in most desktopManager).
# services.xserver.libinput.enable = true; # services.xserver.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
users.users.shaquille = {
isNormalUser = true;
description = "Shaquille Soekhlal";
extraGroups = [ "networkmanager" "wheel" ];
packages = with pkgs; [
firefox
neovim
gparted
microsoft-edge
bitwarden
telegram-desktop
vscode.fhs
dotnet-sdk_7
parsec-bin
anydesk
remmina
gnomeExtensions.remmina-search-provider
spotify
vimPlugins.nvchad
vimPlugins.nvchad-ui
vimPlugins.nvchad-extensions
barrier
protonup-qt
arduino
gimp-with-plugins
google-chrome
google-chrome-dev
discord
docker
heroic
jellyfin-media-player
nomacs
obs-studio
obsidian
prismlauncher
teamspeak5_client
vmware-workstation
vmware-horizon-client
yubikey-manager-qt
yubikey-touch-detector
#ciscoPacketTracer8
];
};
programs.steam.enable = true;
#programs.telegram-desktop.enable = true;
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
curl
gnumake
gnat13
cmake
git
nerdfonts
ripgrep
unzip
nodejs_20
flatpak
nix-index
roboto
gnomeExtensions.appindicator
dpkg
];
fonts.fontDir.enable = true; fonts.fontDir.enable = true;
fonts.fonts = with pkgs; [ fonts.fonts = with pkgs; [
roboto roboto
@ -201,7 +111,4 @@
# HibernateDelaySec=5min # HibernateDelaySec=5min
# ''; # '';
services.logind.lidSwitch = "suspend-then-hibernate";
environment.etc."systemd/sleep.conf".text = "HibernateDelaySec=30min";
} }

6
hibernation.nix Normal file
View File

@ -0,0 +1,6 @@
{ config, lib, pkgs, ... }:
{
services.logind.lidSwitch = "suspend-then-hibernate";
environment.etc."systemd/sleep.conf".text = "HibernateDelaySec=30min";
}

25
system-packages.nix Normal file
View File

@ -0,0 +1,25 @@
{ config, lib, pkgs, ... }:
{
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
wget
curl
gnumake
gnat13
cmake
git
nerdfonts
ripgrep
unzip
nodejs_20
flatpak
nix-index
roboto
gnomeExtensions.appindicator
dpkg
];
}

View File

@ -1,5 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
sudo rm /etc/nixos/*.nix rm /etc/nixos/*.nix
sudo cp *.nix /etc/nixos/ cp *.nix /etc/nixos/
nixos-rebuild switch

45
user-packages.nix Normal file
View File

@ -0,0 +1,45 @@
{ config, lib, pkgs, ... }:
{
programs.steam.enable = true;
users.users.shaquille = {
packages = with pkgs; [
firefox
neovim
gparted
microsoft-edge
bitwarden
telegram-desktop
vscode.fhs
dotnet-sdk_7
parsec-bin
anydesk
remmina
gnomeExtensions.remmina-search-provider
spotify
vimPlugins.nvchad
vimPlugins.nvchad-ui
vimPlugins.nvchad-extensions
barrier
protonup-qt
arduino
gimp-with-plugins
google-chrome
google-chrome-dev
discord
docker
heroic
jellyfin-media-player
nomacs
obs-studio
obsidian
prismlauncher
teamspeak5_client
vmware-workstation
vmware-horizon-client
yubikey-manager-qt
yubikey-touch-detector
#ciscoPacketTracer8
];
};
}

10
users.nix Normal file
View File

@ -0,0 +1,10 @@
{ config, lib, pkgs, ... }:
{
# Define a user account. Don't forget to set a password with passwd.
users.users.shaquille = {
isNormalUser = true;
description = "Shaquille Soekhlal";
extraGroups = [ "networkmanager" "wheel" ];
};
}