summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralex <[email protected]>2026-10-11 01:21:22 +0200
committeralex <[email protected]>2026-10-11 01:21:22 +0200
commit834a43f3b65f2ab178ab11610352cc3e6d0bfb72 (patch)
treef68b805e582dc51689fac17acb7b541d1d41a35f
downloadnixos-834a43f3b65f2ab178ab11610352cc3e6d0bfb72.tar.xz
nixos-834a43f3b65f2ab178ab11610352cc3e6d0bfb72.zip
init
-rw-r--r--flake.lock49
-rw-r--r--flake.nix44
-rw-r--r--home-manager/home.nix55
-rw-r--r--nixos/.configuration.nix.swpbin0 -> 16384 bytes
-rw-r--r--nixos/configuration.nix122
-rw-r--r--nixos/hardware-configuration.nix33
6 files changed, 303 insertions, 0 deletions
diff --git a/flake.lock b/flake.lock
new file mode 100644
index 0000000..d77d2bc
--- /dev/null
+++ b/flake.lock
@@ -0,0 +1,49 @@
+{
+ "nodes": {
+ "home-manager": {
+ "inputs": {
+ "nixpkgs": [
+ "nixpkgs"
+ ]
+ },
+ "locked": {
+ "lastModified": 1775425411,
+ "narHash": "sha256-KY6HsebJHEe5nHOWP7ur09mb0drGxYSzE3rQxy62rJo=",
+ "owner": "nix-community",
+ "repo": "home-manager",
+ "rev": "0d02ec1d0a05f88ef9e74b516842900c41f0f2fe",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nix-community",
+ "ref": "release-25.11",
+ "repo": "home-manager",
+ "type": "github"
+ }
+ },
+ "nixpkgs": {
+ "locked": {
+ "lastModified": 1776734388,
+ "narHash": "sha256-vl3dkhlE5gzsItuHoEMVe+DlonsK+0836LIRDnm6MXQ=",
+ "owner": "nixos",
+ "repo": "nixpkgs",
+ "rev": "10e7ad5bbcb421fe07e3a4ad53a634b0cd57ffac",
+ "type": "github"
+ },
+ "original": {
+ "owner": "nixos",
+ "ref": "nixos-25.11",
+ "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..f809844
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,44 @@
+{
+ description = "Your new nix config";
+
+ inputs = {
+ # Nixpkgs
+ nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
+
+ # Home manager
+ home-manager.url = "github:nix-community/home-manager/release-25.11";
+ home-manager.inputs.nixpkgs.follows = "nixpkgs";
+ };
+
+ outputs = {
+ self,
+ nixpkgs,
+ home-manager,
+ ...
+ } @ inputs: let
+ in {
+ # NixOS configuration entrypoint
+ # Available through 'nixos-rebuild --flake .#your-hostname'
+ nixosConfigurations = {
+ # FIXME replace with your hostname
+ your-hostname = nixpkgs.lib.nixosSystem {
+ specialArgs = {inherit inputs;};
+ # > Our main nixos configuration file <
+ modules = [./nixos/configuration.nix];
+ };
+ };
+
+ # Standalone home-manager configuration entrypoint
+ # Available through 'home-manager --flake .#your-username@your-hostname'
+ homeConfigurations = {
+ # FIXME replace with your username@hostname
+ "your-username@your-hostname" = home-manager.lib.homeManagerConfiguration {
+ # Home-manager requires 'pkgs' instance
+ pkgs = nixpkgs.legacyPackages.x86_64-linux; # FIXME replace x86_64-linux with your architecture
+ extraSpecialArgs = {inherit inputs;};
+ # > Our main home-manager configuration file <
+ modules = [./home-manager/home.nix];
+ };
+ };
+ };
+}
diff --git a/home-manager/home.nix b/home-manager/home.nix
new file mode 100644
index 0000000..814f6e6
--- /dev/null
+++ b/home-manager/home.nix
@@ -0,0 +1,55 @@
+# This is your home-manager configuration file
+# Use this to configure your home environment (it replaces ~/.config/nixpkgs/home.nix)
+{
+ inputs,
+ lib,
+ config,
+ pkgs,
+ ...
+}: {
+ # You can import other home-manager modules here
+ imports = [
+ # If you want to use home-manager modules from other flakes (such as nix-colors):
+ # inputs.nix-colors.homeManagerModule
+
+ # You can also split up your configuration and import pieces of it here:
+ # ./nvim.nix
+ ];
+
+ nixpkgs = {
+ # You can add overlays here
+ overlays = [
+ # If you want to use overlays exported from other flakes:
+ # neovim-nightly-overlay.overlays.default
+
+ # Or define it inline, for example:
+ # (final: prev: {
+ # hi = final.hello.overrideAttrs (oldAttrs: {
+ # patches = [ ./change-hello-to-hi.patch ];
+ # });
+ # })
+ ];
+ # Configure your nixpkgs instance
+ config = {
+ # Disable if you don't want unfree packages
+ allowUnfree = true;
+ };
+ };
+
+ # TODO: Set your username
+ home = {
+ username = "your-username";
+ homeDirectory = "/home/your-username";
+ };
+
+ # Add stuff for your user as you see fit:
+ # programs.neovim.enable = true;
+ # home.packages = with pkgs; [ steam ];
+
+ # Enable home-manager and git
+ programs.home-manager.enable = true;
+ programs.git.enable = true;
+
+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+ home.stateVersion = "25.11";
+}
diff --git a/nixos/.configuration.nix.swp b/nixos/.configuration.nix.swp
new file mode 100644
index 0000000..5b98274
--- /dev/null
+++ b/nixos/.configuration.nix.swp
Binary files differ
diff --git a/nixos/configuration.nix b/nixos/configuration.nix
new file mode 100644
index 0000000..f5d1502
--- /dev/null
+++ b/nixos/configuration.nix
@@ -0,0 +1,122 @@
+# This is your system's configuration file.
+# Use this to configure your system environment (it replaces /etc/nixos/configuration.nix)
+{
+ inputs,
+ lib,
+ config,
+ pkgs,
+ ...
+}: {
+ # You can import other NixOS modules here
+ imports = [
+ # If you want to use modules from other flakes (such as nixos-hardware):
+ # inputs.hardware.nixosModules.common-cpu-amd
+ # inputs.hardware.nixosModules.common-ssd
+
+ # You can also split up your configuration and import pieces of it here:
+ # ./users.nix
+
+ # Import your generated (nixos-generate-config) hardware configuration
+ ./hardware-configuration.nix
+ ];
+
+ nixpkgs = {
+ # You can add overlays here
+ overlays = [
+ # If you want to use overlays exported from other flakes:
+ # neovim-nightly-overlay.overlays.default
+
+ # Or define it inline, for example:
+ # (final: prev: {
+ # hi = final.hello.overrideAttrs (oldAttrs: {
+ # patches = [ ./change-hello-to-hi.patch ];
+ # });
+ # })
+ ];
+ # Configure your nixpkgs instance
+ config = {
+ # Disable if you don't want unfree packages
+ allowUnfree = true;
+ };
+ };
+
+ nix = {
+ settings = {
+ # Enable flakes and new 'nix' command
+ experimental-features = "nix-command flakes";
+ # Opinionated: disable global registry
+ flake-registry = "";
+ };
+ # Opinionated: disable channels
+ channel.enable = false;
+ };
+
+ boot.loader.systemd-boot.enable = true;
+ boot.loader.efi.canTouchEfiVariables = true;
+
+ networking.hostName = "phosphophyllite"; # Define your hostname.
+
+ programs.hyprland = {
+ enable = true;
+ xwayland.enable = true;
+ };
+ services.xserver.enable = true;
+ services.displayManager.gdm = {
+ enable = true;
+ };
+ services.desktopManager.gnome.enable = false;
+ # Enable networking
+ networking.networkmanager.enable = true;
+
+ # Set your time zone.
+ time.timeZone = "Europe/Bratislava";
+
+ # Select internationalisation properties.
+ i18n.defaultLocale = "en_US.UTF-8";
+
+ i18n.extraLocaleSettings = {
+ LC_ADDRESS = "sk_SK.UTF-8";
+ LC_IDENTIFICATION = "sk_SK.UTF-8";
+ LC_MEASUREMENT = "sk_SK.UTF-8";
+ LC_MONETARY = "sk_SK.UTF-8";
+ LC_NAME = "sk_SK.UTF-8";
+ LC_NUMERIC = "sk_SK.UTF-8";
+ LC_PAPER = "sk_SK.UTF-8";
+ LC_TELEPHONE = "sk_SK.UTF-8";
+ LC_TIME = "sk_SK.UTF-8";
+ };
+
+ # Configure keymap in X11
+ services.xserver.xkb = {
+ layout = "us";
+ variant = "";
+ };
+
+ # Define a user account. Don't forget to set a password with ‘passwd’.
+ users.users."phos" = {
+ isNormalUser = true;
+ extraGroups = [ "networkmanager" "wheel" ];
+ packages = with pkgs; [];
+ };
+
+ services.pipewire = {
+ enable = true;
+ alsa.enable = true;
+ alsa.support32Bit = true;
+ pulse.enable = true;
+ };
+
+ 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
+ kitty
+ git
+ vim
+ rofi
+ waybar
+ librewolf
+ ];
+
+ # https://nixos.wiki/wiki/FAQ/When_do_I_update_stateVersion
+ system.stateVersion = "25.11";
+}
diff --git a/nixos/hardware-configuration.nix b/nixos/hardware-configuration.nix
new file mode 100644
index 0000000..0ce8cdf
--- /dev/null
+++ b/nixos/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/95d04e16-97f5-4dda-bd99-eebcfece01f7";
+ fsType = "ext4";
+ };
+
+ fileSystems."/boot" =
+ { device = "/dev/disk/by-uuid/EE61-21CA";
+ fsType = "vfat";
+ options = [ "fmask=0077" "dmask=0077" ];
+ };
+
+ swapDevices =
+ [ { device = "/dev/disk/by-uuid/a0e6ef0c-6429-466c-964b-67b4656e8027"; }
+ ];
+
+ nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
+ hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
+}