From d8374cb12b8657bbdd3cbc7917ba96c07f9fa3b7 Mon Sep 17 00:00:00 2001 From: Weckyy702 Date: Sat, 10 Jan 2026 17:32:29 +0100 Subject: [PATCH] Hello, World! --- .gitignore | 1 + configuration.nix | 99 +++++++++++++++++++++++++++++++++++++++++++++++ desktop.nix | 20 ++++++++++ dev-tools.nix | 15 +++++++ 4 files changed, 135 insertions(+) create mode 100644 .gitignore create mode 100644 configuration.nix create mode 100644 desktop.nix create mode 100644 dev-tools.nix diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..577b0a0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +hardware-configuration.nix diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..328fc84 --- /dev/null +++ b/configuration.nix @@ -0,0 +1,99 @@ +# 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, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ./dev-tools.nix + ./desktop.nix + ]; + + # Bootloader. + boot.loader.grub.enable = true; + boot.loader.grub.device = "/dev/nvme0n1"; + boot.loader.grub.useOSProber = true; + + # Use latest kernel. + boot.kernelPackages = pkgs.linuxPackages_latest; + + networking.hostName = "keith"; # Define your hostname. + # 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"; + }; + + security.polkit.enable = true; + + # Configure console keymap + console.keyMap = "de"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.weckyy702 = { + isNormalUser = true; + description = "Weckyy702"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + nix.settings.experimental-features = [ + "nix-command" + "flakes" + ]; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + environment.systemPackages = with pkgs; [ + vim + wget + ]; + + + # 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; + + # 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.11"; # Did you read the comment? + +} diff --git a/desktop.nix b/desktop.nix new file mode 100644 index 0000000..ed2b787 --- /dev/null +++ b/desktop.nix @@ -0,0 +1,20 @@ +{ config, pkgs, ...}: { + # Configure keymap in X11 + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; + + programs.regreet = { + enable = true; + }; + + programs.hyprland = { + enable = true; + withUWSM = true; + xwayland.enable = true; + }; + programs.hyprlock.enable = true; + # Configure electron apps to use wayland + environment.sessionVariables.NIXOS_OZONE_WL = "1"; +} diff --git a/dev-tools.nix b/dev-tools.nix new file mode 100644 index 0000000..8a44c70 --- /dev/null +++ b/dev-tools.nix @@ -0,0 +1,15 @@ +{ config, pkgs, ...} : { + programs.neovim = { + enable = true; + defaultEditor = true; + }; + + programs.git = { + enable = true; + config = { + init = { + defaultBranch = "main"; + }; + }; + }; +}