From 213ead14cb02f02e89152913c06e997a2a599891 Mon Sep 17 00:00:00 2001 From: snurm Date: Sun, 2 Aug 2026 11:01:29 +0200 Subject: [PATCH] initial commit --- configuration.nix | 132 +++++++++++++++++++++++++++++++++++++ flake.lock | 49 ++++++++++++++ flake.nix | 30 +++++++++ hardware-configuration.nix | 33 ++++++++++ home.nix | 34 ++++++++++ hyprland/default.nix | 5 ++ hyprland/hyprland.lua | 0 7 files changed, 283 insertions(+) create mode 100644 configuration.nix create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 hardware-configuration.nix create mode 100644 home.nix create mode 100644 hyprland/default.nix create mode 100644 hyprland/hyprland.lua diff --git a/configuration.nix b/configuration.nix new file mode 100644 index 0000000..7b0fa6e --- /dev/null +++ b/configuration.nix @@ -0,0 +1,132 @@ +# 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, inputs, ... }: + +{ + imports = + [ # Include the results of the hardware scan. + ./hardware-configuration.nix + ]; + + # Bootloader. + boot.loader.systemd-boot.enable = true; + boot.loader.efi.canTouchEfiVariables = true; + + 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; + + # audio + services.pipewire = { + enable = true; + wireplumber.enable = true; + pulse.enable = true; + }; + + # Set your time zone. + time.timeZone = "Europe/Berlin"; + + # Select internationalisation properties. + i18n.defaultLocale = "en_US.UTF-8"; + i18n.extraLocales = ["ja_JP.UTF-8/UTF-8"]; + + fonts = { + enableDefaultPackages = true; + packages = with pkgs; [ + noto-fonts-cjk-sans + ]; + }; + + 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"; + }; + + # Configure keymap in X11 + services.xserver.xkb = { + layout = "de"; + variant = ""; + }; + + # Configure console keymap + console.keyMap = "de"; + + # Define a user account. Don't forget to set a password with ‘passwd’. + users.users.snurm = { + isNormalUser = true; + description = "snurm"; + extraGroups = [ "networkmanager" "wheel" ]; + packages = with pkgs; []; + }; + + # Allow unfree packages + nixpkgs.config.allowUnfree = true; + + nix.settings.experimental-features = [ "nix-command" "flakes" ]; + # List packages installed in system profile. To search, run: + # $ nix search wget + environment.systemPackages = with pkgs; [ + git + vim + kitty + wofi + vesktop + btop + pavucontrol + catppuccin-cursors.latteLavender + nvimpager + ]; + programs.hyprland.enable = true; + programs.hyprland.withUWSM = true; + programs.neovim = { + enable = true; + viAlias = true; + vimAlias = true; + defaultEditor = true; + }; + environment.variables.EDITOR = "nvim"; + programs.firefox.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; + + # 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/flake.lock b/flake.lock new file mode 100644 index 0000000..126af4b --- /dev/null +++ b/flake.lock @@ -0,0 +1,49 @@ +{ + "nodes": { + "home-manager": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1785119570, + "narHash": "sha256-Rgs2xKnGLFWQscxUaXX07oyZeuMDOHEbqDOsgliLFGM=", + "owner": "nix-community", + "repo": "home-manager", + "rev": "d4fd24667c8cbef124bb70a20380cab75ec8474d", + "type": "github" + }, + "original": { + "owner": "nix-community", + "ref": "release-26.05", + "repo": "home-manager", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1785491804, + "narHash": "sha256-p00vplVOyfKGlhju0+eGGPAxyYYKaY0lpyuoHLFIx2Y=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5b4f72e1705a63aace42900610c4db82cb4af0ec", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-26.05", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "home-manager": "home-manager", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..839bb6e --- /dev/null +++ b/flake.nix @@ -0,0 +1,30 @@ +{ + description = "A simple NixOS flake"; + + inputs = { + # NixOS official package source, using the nixos-26.05 branch here + nixpkgs.url = "github:NixOS/nixpkgs/nixos-26.05"; + home-manager = { + url = "github:nix-community/home-manager/release-26.05"; + inputs.nixpkgs.follows = "nixpkgs"; + }; + }; + + outputs = { self, nixpkgs, home-manager, ... }@inputs: { + nixosConfigurations.nixos = nixpkgs.lib.nixosSystem { + specialArgs = { inherit inputs; }; + modules = [ + # Import the previous configuration.nix we used, + # so the old configuration file still takes effect + ./configuration.nix + home-manager.nixosModules.home-manager + { + home-manager.useGlobalPkgs = true; + home-manager.useUserPackages = true; + home-manager.users.snurm = import ./home.nix; + home-manager.backupFileExtension = "backup"; + } + ]; + }; + }; +} diff --git a/hardware-configuration.nix b/hardware-configuration.nix new file mode 100644 index 0000000..82b2a98 --- /dev/null +++ b/hardware-configuration.nix @@ -0,0 +1,33 @@ +# Do not modify this file! It was generated by ‘nixos-generate-config’ +# and may be overwritten by future invocations. Please make changes +# to /etc/nixos/configuration.nix instead. +{ config, lib, pkgs, modulesPath, ... }: + +{ + imports = + [ (modulesPath + "/installer/scan/not-detected.nix") + ]; + + boot.initrd.availableKernelModules = [ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" ]; + boot.initrd.kernelModules = [ ]; + boot.kernelModules = [ "kvm-amd" ]; + boot.extraModulePackages = [ ]; + + fileSystems."/" = + { device = "/dev/disk/by-uuid/80073df0-54bd-438e-bcbc-795d3d886385"; + fsType = "ext4"; + }; + + fileSystems."/boot" = + { device = "/dev/disk/by-uuid/2F17-7ACA"; + fsType = "vfat"; + options = [ "fmask=0077" "dmask=0077" ]; + }; + + swapDevices = + [ { device = "/dev/disk/by-uuid/7810e79b-360b-48e1-a527-92ebeb4f628c"; } + ]; + + nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux"; + hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware; +} diff --git a/home.nix b/home.nix new file mode 100644 index 0000000..e19ff2e --- /dev/null +++ b/home.nix @@ -0,0 +1,34 @@ +{ config, pkgs, ...}: + +{ + home.username = "snurm"; + home.homeDirectory = "/home/snurm"; + home.stateVersion = "26.05"; + + programs.git = { + enable = true; + settings.user = { + name = "snurm"; + email = "user@example.com"; + }; + }; + + programs.kitty = { + enable = true; + font = { + name ="JetBrains Mono"; + size = 10; + }; + settings = { + confirm_os_window_close = 0; + enable_auto_bell = false; + mouse_hide_wait = "-1.0"; + background_opacity = "0.5"; + background_blur = 5; + }; + }; + + home.packages = with pkgs; [ + fastfetch + ]; +} diff --git a/hyprland/default.nix b/hyprland/default.nix new file mode 100644 index 0000000..014eedd --- /dev/null +++ b/hyprland/default.nix @@ -0,0 +1,5 @@ +{ pkgs, config, ... }: + +{ + +} diff --git a/hyprland/hyprland.lua b/hyprland/hyprland.lua new file mode 100644 index 0000000..e69de29