Removed general.nix as it was, essentially, the same as what configuration.nix used to be, so I reworked configuration.nix
This commit is contained in:
@ -50,50 +50,18 @@
|
|||||||
imports =
|
imports =
|
||||||
[
|
[
|
||||||
inputs.home-manager.nixosModules.home-manager
|
inputs.home-manager.nixosModules.home-manager
|
||||||
|
inputs.grub2-themes.nixosModules.default
|
||||||
|
inputs.nix-flatpak.nixosModules.nix-flatpak
|
||||||
|
inputs.stylix.nixosModules.stylix
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
../plasma/plasma.nix
|
|
||||||
../hyprland/hyprland.nix
|
./firefox.nix
|
||||||
../niri/niri.nix
|
./boot-splash.nix
|
||||||
|
./zsh.nix
|
||||||
|
./neovim.nix
|
||||||
|
./packages.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
specialisation = {
|
|
||||||
"plasma" = {
|
|
||||||
configuration = {
|
|
||||||
imports = [
|
|
||||||
../plasma/plasma.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
programs.gamemode.enable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
"hyprland" = {
|
|
||||||
configuration = {
|
|
||||||
imports = [
|
|
||||||
../hyprland/hyprland.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
"minimal" = {
|
|
||||||
inheritParentConfig = false;
|
|
||||||
configuration = {
|
|
||||||
imports = [
|
|
||||||
./minimal.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
"niri" = {
|
|
||||||
configuration = {
|
|
||||||
imports = [
|
|
||||||
../niri/niri.nix
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
# Bootloader.
|
# Bootloader.
|
||||||
boot.loader = {
|
boot.loader = {
|
||||||
systemd-boot.enable = false;
|
systemd-boot.enable = false;
|
||||||
@ -107,11 +75,11 @@
|
|||||||
efiSupport = true;
|
efiSupport = true;
|
||||||
useOSProber = true;
|
useOSProber = true;
|
||||||
#splashImage =
|
#splashImage =
|
||||||
extraConfig = ''
|
# extraConfig = ''
|
||||||
menuentry "NixOS - Default" {
|
# menuentry "NixOS - Default" {
|
||||||
set hidden=1
|
# set hidden=1
|
||||||
}
|
# }
|
||||||
'';
|
# '';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
#./configuration.nix
|
./configuration.nix
|
||||||
#./firefox.nix
|
#./firefox.nix
|
||||||
#./boot-splash.nix
|
#./boot-splash.nix
|
||||||
#./zsh.nix
|
#./zsh.nix
|
||||||
@ -9,7 +9,6 @@
|
|||||||
#./packages.nix
|
#./packages.nix
|
||||||
|
|
||||||
#./hardware-configuration.nix
|
#./hardware-configuration.nix
|
||||||
./general.nix
|
|
||||||
../plasma/plasma.nix
|
../plasma/plasma.nix
|
||||||
../hyprland/hyprland.nix
|
../hyprland/hyprland.nix
|
||||||
../niri/niri.nix
|
../niri/niri.nix
|
||||||
@ -21,7 +20,7 @@
|
|||||||
configuration = {
|
configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
../plasma/plasma.nix
|
../plasma/plasma.nix
|
||||||
./general.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.gamemode.enable = true;
|
programs.gamemode.enable = true;
|
||||||
@ -35,7 +34,7 @@
|
|||||||
configuration = {
|
configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
../hyprland/hyprland.nix
|
../hyprland/hyprland.nix
|
||||||
./general.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.etc."nixos-tags".text = "hyprland";
|
environment.etc."nixos-tags".text = "hyprland";
|
||||||
@ -58,7 +57,7 @@
|
|||||||
configuration = {
|
configuration = {
|
||||||
imports = [
|
imports = [
|
||||||
../niri/niri.nix
|
../niri/niri.nix
|
||||||
./general.nix
|
./configuration.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
environment.etc."nixos-tags".text = "niri";
|
environment.etc."nixos-tags".text = "niri";
|
||||||
|
|||||||
@ -1,318 +0,0 @@
|
|||||||
# 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
|
|
||||||
|
|
||||||
{ inputs, config, pkgs, lib, username, host, version, system, grub2-theme, ... }:
|
|
||||||
{
|
|
||||||
stylix = {
|
|
||||||
enable = false;
|
|
||||||
image = ../other/wallpaper2.png;
|
|
||||||
#autoEnable = true; #Auto generate theme based on wallpaper
|
|
||||||
base16Scheme = "${pkgs.base16-schemes}/share/themes/tokyo-night-moon.yaml";
|
|
||||||
opacity = {
|
|
||||||
desktop = 0.5;
|
|
||||||
terminal = 0.9;
|
|
||||||
};
|
|
||||||
fonts = {
|
|
||||||
monospace = {
|
|
||||||
package = pkgs.nerd-fonts.jetbrains-mono;
|
|
||||||
name = "JetBrainsMono Nerd Font";
|
|
||||||
};
|
|
||||||
|
|
||||||
sansSerif = {
|
|
||||||
package = pkgs.inter;
|
|
||||||
name = "Inter";
|
|
||||||
};
|
|
||||||
|
|
||||||
serif = {
|
|
||||||
package = pkgs.noto-fonts;
|
|
||||||
name = "Noto Serif";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
targets.grub.enable = false;
|
|
||||||
};
|
|
||||||
|
|
||||||
# in configuration.nix
|
|
||||||
#Assign Swap to the PC
|
|
||||||
#swapDevices = [{
|
|
||||||
# device = "/swapfile";
|
|
||||||
# size = 16 * 1024; # 16GB
|
|
||||||
#}];
|
|
||||||
|
|
||||||
imports =
|
|
||||||
[
|
|
||||||
inputs.home-manager.nixosModules.home-manager
|
|
||||||
inputs.grub2-themes.nixosModules.default
|
|
||||||
inputs.nix-flatpak.nixosModules.nix-flatpak
|
|
||||||
inputs.stylix.nixosModules.stylix
|
|
||||||
./hardware-configuration.nix
|
|
||||||
|
|
||||||
./firefox.nix
|
|
||||||
./boot-splash.nix
|
|
||||||
./zsh.nix
|
|
||||||
./neovim.nix
|
|
||||||
./packages.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
# Bootloader.
|
|
||||||
boot.loader = {
|
|
||||||
systemd-boot.enable = false;
|
|
||||||
efi.canTouchEfiVariables = true;
|
|
||||||
#boot.loader.efi.efiSysMountPoint = "/boot/efi";
|
|
||||||
|
|
||||||
grub = {
|
|
||||||
enable = true;
|
|
||||||
device = "/dev/nvme0n1"; #Needs to be changed when using a new computer! (Make grub partition - look below!)
|
|
||||||
#devices = [ "nodev" ];
|
|
||||||
efiSupport = true;
|
|
||||||
useOSProber = true;
|
|
||||||
#splashImage =
|
|
||||||
# extraConfig = ''
|
|
||||||
# menuentry "NixOS - Default" {
|
|
||||||
# set hidden=1
|
|
||||||
# }
|
|
||||||
# '';
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
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 = host;
|
|
||||||
# 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";
|
|
||||||
|
|
||||||
home-manager = {
|
|
||||||
useGlobalPkgs = true;
|
|
||||||
useUserPackages = true;
|
|
||||||
users.${username} = ./home.nix;
|
|
||||||
backupFileExtension = "backup"; # Automatically backs up conflicting files during activation
|
|
||||||
extraSpecialArgs = { inherit inputs username version system host; };
|
|
||||||
sharedModules = [ inputs.plasma-manager.homeModules.plasma-manager ];
|
|
||||||
};
|
|
||||||
|
|
||||||
# Enable networking
|
|
||||||
networking.networkmanager.enable = true;
|
|
||||||
|
|
||||||
networking.extraHosts = ''
|
|
||||||
100.89.141.79 tail-rpi
|
|
||||||
'';
|
|
||||||
|
|
||||||
# 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";
|
|
||||||
};
|
|
||||||
|
|
||||||
# List services that you want to enable:
|
|
||||||
services = {
|
|
||||||
ollama = {
|
|
||||||
enable = true;
|
|
||||||
# Optional: load models on startup
|
|
||||||
#loadModels = [ ... ];
|
|
||||||
};
|
|
||||||
|
|
||||||
fprintd.enable = true;
|
|
||||||
fprintd.tod.enable = true;
|
|
||||||
fprintd.tod.driver = pkgs.libfprint-2-tod1-goodix;
|
|
||||||
|
|
||||||
fwupd.enable = true; #Allows BIOS updates
|
|
||||||
|
|
||||||
locate = {
|
|
||||||
enable = true;
|
|
||||||
package = pkgs.plocate;
|
|
||||||
};
|
|
||||||
|
|
||||||
tailscale = {
|
|
||||||
enable = true;
|
|
||||||
useRoutingFeatures = "client";
|
|
||||||
extraSetFlags = [
|
|
||||||
"--operator=${username}"
|
|
||||||
"--accept-routes"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
#Enable CUPS to print documents.
|
|
||||||
printing.enable = true;
|
|
||||||
|
|
||||||
# Enable the OpenSSH daemon.
|
|
||||||
openssh.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
fonts = {
|
|
||||||
packages = with pkgs; [
|
|
||||||
font-awesome
|
|
||||||
nerd-fonts.jetbrains-mono
|
|
||||||
meslo-lgs-nf
|
|
||||||
noto-fonts
|
|
||||||
noto-fonts-cjk-sans
|
|
||||||
noto-fonts-emoji
|
|
||||||
inter
|
|
||||||
];
|
|
||||||
|
|
||||||
fontconfig = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
defaultFonts = {
|
|
||||||
monospace = [ "JetBrainsMono Nerd Font" "MesloLGS NF" ];
|
|
||||||
sansSerif = [ "Inter" "Noto Sans" ];
|
|
||||||
serif = [ "Noto Serif" ];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
#In order for dynamically linked executables to work
|
|
||||||
programs.nix-ld.enable = true;
|
|
||||||
|
|
||||||
programs.ssh.askPassword = lib.mkForce "${pkgs.kdePackages.ksshaskpass}/bin/ksshaskpass";
|
|
||||||
|
|
||||||
programs.steam.enable = true;
|
|
||||||
|
|
||||||
# Configure console keymap
|
|
||||||
console.keyMap = "de";
|
|
||||||
|
|
||||||
hardware.enableRedistributableFirmware = true;
|
|
||||||
#Enables proprietary, redistributable firmware so hardware devices function properly
|
|
||||||
|
|
||||||
hardware.graphics = {
|
|
||||||
enable = true;
|
|
||||||
# Mesa should be enabled by default for Vulkan, but you can be explicit
|
|
||||||
enable32Bit = true; # For 32-bit applications
|
|
||||||
};
|
|
||||||
|
|
||||||
hardware.cpu.amd.updateMicrocode = true;
|
|
||||||
|
|
||||||
hardware.bluetooth = {
|
|
||||||
enable = true;
|
|
||||||
powerOnBoot = true;
|
|
||||||
settings = {
|
|
||||||
General = {
|
|
||||||
# Shows battery charge of connected devices on supported
|
|
||||||
# Bluetooth adapters. Defaults to 'false'.
|
|
||||||
Experimental = true;
|
|
||||||
# When enabled other devices can connect faster to us, however
|
|
||||||
# the tradeoff is increased power consumption. Defaults to
|
|
||||||
# 'false'.
|
|
||||||
FastConnectable = true;
|
|
||||||
};
|
|
||||||
Policy = {
|
|
||||||
# Enable all controllers when they are found. This includes
|
|
||||||
# adapters present on start as well as adapters that are plugged
|
|
||||||
# in later on. Defaults to 'true'.
|
|
||||||
AutoEnable = true;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# 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.${username} = {
|
|
||||||
isNormalUser = true;
|
|
||||||
description = "Cookiez";
|
|
||||||
extraGroups = [ "networkmanager" "wheel" "docker" ];
|
|
||||||
packages = with pkgs; [
|
|
||||||
#User Packages Here
|
|
||||||
];
|
|
||||||
};
|
|
||||||
|
|
||||||
virtualisation.docker.enable = true;
|
|
||||||
|
|
||||||
environment.etc."gitconfig".text = ''
|
|
||||||
[init]
|
|
||||||
defaultBranch = main
|
|
||||||
'';
|
|
||||||
|
|
||||||
#So no user in the group Wheel has to input the password in order to use sudo
|
|
||||||
security.sudo.wheelNeedsPassword = false;
|
|
||||||
|
|
||||||
#Allow Nix Commands
|
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
|
||||||
|
|
||||||
# Allow unfree packages
|
|
||||||
nixpkgs.config.allowUnfree = 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;
|
|
||||||
# };
|
|
||||||
|
|
||||||
environment.variables = {
|
|
||||||
EDITOR = "nvim";
|
|
||||||
# XKB_DEFAULT_LAYOUT = "de";
|
|
||||||
};
|
|
||||||
|
|
||||||
environment.sessionVariables = {
|
|
||||||
NIXOS_OZONE_WL = "1"; #For chromium to work under wayland and with virtual Keyboards (Only really needed for virtual keyboards, but doest hurt ...)
|
|
||||||
TERMINAL = "kitty";
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
# 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 = version; # Did you read the comment?
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user