From 38e6d2d60a8688a2fa78e40ea3621bc8ecdd5d5b Mon Sep 17 00:00:00 2001 From: andrey_varnavskiy Date: Mon, 25 Nov 2024 11:44:15 +0500 Subject: [PATCH] modularize --- nixos/configuration.nix | 52 ++++------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/nixos/configuration.nix b/nixos/configuration.nix index 8ebaa57..f2f6c1d 100644 --- a/nixos/configuration.nix +++ b/nixos/configuration.nix @@ -1,61 +1,17 @@ -{ config, lib, pkgs, ... }: +{ stateVersion, hostname, ... }: { imports = [ ./hardware-configuration.nix - ./modules/zram.nix - ./modules/bluetooth.nix - ./modules/env.nix - ./modules/boot.nix ./packages.nix + ./modules ]; - xdg.mime.defaultApplications = { - "inode/directory" = "lf"; - }; - nix.settings.experimental-features = [ "nix-command" "flakes" ]; - boot.loader.systemd-boot.enable = true; - boot.loader.efi.canTouchEfiVariables = true; + networking.hostName = hostname; - networking.hostName = "nixos"; - networking.networkmanager.enable = true; - - time.timeZone = "Asia/Tashkent"; - - programs.hyprland = { - enable = true; - xwayland.enable = true; - }; - - services.pipewire = { - enable = true; - pulse.enable = true; - }; - - services.libinput.enable = true; - programs.zsh.enable = true; - users = { - defaultUserShell = pkgs.zsh; - users.amper = { - isNormalUser = true; - extraGroups = [ "wheel" "networkmanager" ]; - packages = with pkgs; [ - ]; - }; - }; - - services.getty.autologinUser = "amper"; - - programs.nh = { - enable = true; - # clean.enable = true; - # clean.extraArgs = "--keep-since 4d --keep 3"; - flake = "/home/amper/flake"; - }; - - system.stateVersion = "24.05"; # Did you read the comment? + system.stateVersion = stateVersion; }