Initial commit of NixOS config
This commit is contained in:
225
configuration.nix
Normal file
225
configuration.nix
Normal file
@ -0,0 +1,225 @@
|
||||
# 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’).
|
||||
|
||||
#Access Internet using:
|
||||
#nmcli device wifi list
|
||||
#nmcli device wifi connect <ssid> password <password>
|
||||
# or if no password (open wifi)
|
||||
#nmcli device wifi connect <ssid>
|
||||
|
||||
#Nix flake file limit: ulimit -n 500000
|
||||
|
||||
{ config, pkgs, ... }:
|
||||
{
|
||||
|
||||
#Assign Swap to the PC
|
||||
#swapDevices = [{
|
||||
# device = "/swapfile";
|
||||
# size = 16 * 1024; # 16GB
|
||||
#}];
|
||||
|
||||
imports =
|
||||
[
|
||||
./hardware-configuration.nix
|
||||
#Moved to flake.nix
|
||||
#./packages.nix
|
||||
#./firefox.nix
|
||||
#./zsh.nix
|
||||
#./lockscreen.nix
|
||||
];
|
||||
|
||||
# Bootloader.
|
||||
boot.loader = {
|
||||
systemd-boot.enable = false;
|
||||
efi.canTouchEfiVariables = true;
|
||||
#boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
||||
grub = {
|
||||
enable = true;
|
||||
device = "/dev/sdb"; #Needs to be changed when using a new computer! (Make grub partition - look below!)
|
||||
#devices = [ "nodev" ];
|
||||
efiSupport = true;
|
||||
useOSProber = true;
|
||||
};
|
||||
grub2-theme = {
|
||||
enable = true;
|
||||
theme = "whitesur";
|
||||
footer = true;
|
||||
};
|
||||
timeout = 10;
|
||||
};
|
||||
|
||||
#Ensure there is a grub_bios partition: (gparted)
|
||||
#Create a new parititon. File System: Unformatted - Size: ~5 Mib
|
||||
#Apply
|
||||
#Manage flags -> Add bios_grub
|
||||
|
||||
networking.hostName = "nixos";
|
||||
# Define your hostname.
|
||||
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
|
||||
|
||||
# Configure network proxy if necessary
|
||||
# networking.proxy.default = "http://user:password@proxy:port/";
|
||||
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
|
||||
|
||||
# Enable networking
|
||||
networking.networkmanager.enable = true;
|
||||
|
||||
# Set your time zone.
|
||||
time.timeZone = "Europe/Berlin";
|
||||
|
||||
# Select internationalisation properties.
|
||||
i18n.defaultLocale = "en_US.UTF-8";
|
||||
|
||||
i18n.extraLocaleSettings = {
|
||||
LC_ADDRESS = "de_DE.UTF-8";
|
||||
LC_IDENTIFICATION = "de_DE.UTF-8";
|
||||
LC_MEASUREMENT = "de_DE.UTF-8";
|
||||
LC_MONETARY = "de_DE.UTF-8";
|
||||
LC_NAME = "de_DE.UTF-8";
|
||||
LC_NUMERIC = "de_DE.UTF-8";
|
||||
LC_PAPER = "de_DE.UTF-8";
|
||||
LC_TELEPHONE = "de_DE.UTF-8";
|
||||
LC_TIME = "de_DE.UTF-8";
|
||||
};
|
||||
|
||||
# Enable the X11 windowing system.
|
||||
# You can disable this if you're only using the Wayland session.
|
||||
services.xserver.enable = true;
|
||||
|
||||
# Enable the KDE Plasma Desktop Environment.
|
||||
services.displayManager.sddm.enable = true;
|
||||
services.desktopManager.plasma6 = {
|
||||
enable = true;
|
||||
#Wallpaper options isnt available anymore in Plasma6
|
||||
#wallpaper = {
|
||||
# mode = "scale";
|
||||
# image = "/etc/nixos/other/wallpaper.png";
|
||||
#};
|
||||
};
|
||||
|
||||
services.ollama = {
|
||||
enable = true;
|
||||
# Optional: load models on startup
|
||||
#loadModels = [ ... ];
|
||||
};
|
||||
|
||||
services.locate = {
|
||||
enable = true;
|
||||
package = pkgs.plocate;
|
||||
#To get rid of warning
|
||||
#Depircated:
|
||||
#localuser = null;
|
||||
};
|
||||
|
||||
# Configure keymap in X11
|
||||
services.xserver.xkb = {
|
||||
layout = "de";
|
||||
variant = "";
|
||||
};
|
||||
|
||||
services.tailscale.enable = true;
|
||||
|
||||
fonts.packages = with pkgs; [
|
||||
font-awesome
|
||||
#TODO reconfigure nerd fonts!!!
|
||||
#nerd-fonts
|
||||
meslo-lgs-nf
|
||||
];
|
||||
|
||||
# Configure console keymap
|
||||
console.keyMap = "de";
|
||||
|
||||
# Enable CUPS to print documents.
|
||||
services.printing.enable = true;
|
||||
|
||||
# Enable sound with pipewire.
|
||||
services.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).
|
||||
# services.xserver.libinput.enable = true;
|
||||
|
||||
# Define a user account. Don't forget to set a password with ‘passwd’.
|
||||
users.users.cookiez = {
|
||||
isNormalUser = true;
|
||||
description = "Cookiez";
|
||||
extraGroups = [ "networkmanager" "wheel" ];
|
||||
packages = with pkgs; [
|
||||
#User Packages Here
|
||||
];
|
||||
};
|
||||
|
||||
#So no user in the group Wheel has to input the password in order to use sudo
|
||||
security.sudo.wheelNeedsPassword = false;
|
||||
|
||||
#theme-reminder uses a definitive /home/cookiez path!!!
|
||||
system.activationScripts.script.text = ''
|
||||
source /etc/nixos/other/colors.sh
|
||||
source /etc/nixos/other/pfp.sh
|
||||
|
||||
source /etc/nixos/other/theme-reminder.sh
|
||||
|
||||
echo -e "Use: $YELLOW'home-manager switch'$NOCOLOR or $DARKGRAY'home-upd'$NOCOLOR (if available) to update your home manager!"
|
||||
'';
|
||||
|
||||
|
||||
# #Install firefox.
|
||||
#programs.firefox.enable = true;
|
||||
#Enabled in a separate firefox.nix
|
||||
|
||||
#Allow Nix Commands
|
||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||
|
||||
#To allow the Flake to build all packages (Too many open files error)
|
||||
#systemd.services.nix-deamon.serviceConfig.LimitNOFILE = 100000;
|
||||
|
||||
# Allow unfree packages
|
||||
nixpkgs.config.allowUnfree = true;
|
||||
|
||||
programs.steam.enable = true;
|
||||
|
||||
# Some programs need SUID wrappers, can be configured further or are
|
||||
# started in user sessions.
|
||||
# programs.mtr.enable = true;
|
||||
# programs.gnupg.agent = {
|
||||
# enable = true;
|
||||
# enableSSHSupport = true;
|
||||
# };
|
||||
|
||||
# List services that you want to enable:
|
||||
|
||||
# Enable the OpenSSH daemon.
|
||||
services.openssh.enable = true;
|
||||
|
||||
environment.variables = {
|
||||
EDITOR = "micro";
|
||||
# XKB_DEFAULT_LAYOUT = "de";
|
||||
};
|
||||
|
||||
# Open ports in the firewall.
|
||||
# networking.firewall.allowedTCPPorts = [ ... ];
|
||||
# networking.firewall.allowedUDPPorts = [ ... ];
|
||||
# Or disable the firewall altogether.
|
||||
# networking.firewall.enable = false;
|
||||
|
||||
# This value determines the NixOS release from which the default
|
||||
# settings for stateful data, like file locations and database versions
|
||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||
# this value at the release version of the first install of this system.
|
||||
# Before changing this value read the documentation for this option
|
||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||
system.stateVersion = "25.05"; # Did you read the comment?
|
||||
}
|
||||
Reference in New Issue
Block a user