Skip to content

Commit a5250b5

Browse files
committed
first nixos configurations by me!
0 parents  commit a5250b5

File tree

5 files changed

+483
-0
lines changed

5 files changed

+483
-0
lines changed

configuration.nix

+142
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
# Edit this configuration file to define what should be installed on
2+
# your system. Help is available in the configuration.nix(5) man page
3+
# and in the NixOS manual (accessible by running ‘nixos-help’).
4+
5+
{ config, pkgs, ... }:
6+
7+
{
8+
imports =
9+
[ # Include the results of the hardware scan.
10+
./hardware-configuration.nix
11+
];
12+
13+
nix.settings.experimental-features = ["nix-command" "flakes"];
14+
15+
home-manager.backupFileExtension = "backup";
16+
17+
18+
environment.variables.EDITOR = "nano";
19+
20+
# Bootloader.
21+
boot.loader.systemd-boot.enable = true;
22+
boot.loader.efi.canTouchEfiVariables = true;
23+
24+
networking.hostName = "nixos"; # Define your hostname.
25+
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
26+
27+
# Configure network proxy if necessary
28+
# networking.proxy.default = "http://user:password@proxy:port/";
29+
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";
30+
31+
# Enable networking
32+
networking.networkmanager.enable = true;
33+
34+
# Set your time zone.
35+
time.timeZone = "Asia/Tashkent";
36+
37+
# Select internationalisation properties.
38+
i18n.defaultLocale = "en_US.UTF-8";
39+
40+
# Enable the X11 windowing system.
41+
services.xserver = {
42+
enable = true;
43+
};
44+
45+
# Enable the GNOME Desktop Environment.
46+
services.xserver.displayManager.gdm.enable = true;
47+
services.xserver.desktopManager.gnome.enable = true;
48+
49+
# Configure keymap in X11
50+
services.xserver.xkb = {
51+
layout = "us";
52+
variant = "";
53+
};
54+
55+
# Enable CUPS to print documents.
56+
services.printing.enable = true;
57+
58+
# Enable sound with pipewire.
59+
hardware.pulseaudio.enable = false;
60+
security.rtkit.enable = true;
61+
services.pipewire = {
62+
enable = true;
63+
alsa.enable = true;
64+
alsa.support32Bit = true;
65+
pulse.enable = true;
66+
# If you want to use JACK applications, uncomment this
67+
#jack.enable = true;
68+
69+
# use the example session manager (no others are packaged yet so this is enabled by default,
70+
# no need to redefine it in your config for now)
71+
#media-session.enable = true;
72+
};
73+
74+
# Enable touchpad support (enabled default in most desktopManager).
75+
# services.xserver.libinput.enable = true;
76+
77+
# Define a user account. Don't forget to set a password with ‘passwd’.
78+
users.users.rarebek = {
79+
isNormalUser = true;
80+
description = "rarebek";
81+
extraGroups = [ "networkmanager" "wheel" "docker" ];
82+
packages = with pkgs; [
83+
thunderbird
84+
git
85+
];
86+
};
87+
88+
# Docker rootless option
89+
virtualisation.docker.rootless = {
90+
enable = true;
91+
setSocketVariable = true;
92+
};
93+
94+
# Install firefox.
95+
programs.firefox.enable = true;
96+
97+
# Allow unfree packages
98+
nixpkgs.config.allowUnfree = true;
99+
100+
# List packages installed in system profile. To search, run:
101+
# $ nix search wget
102+
environment.systemPackages = with pkgs; [
103+
# vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
104+
# wget
105+
telegram-desktop
106+
google-chrome
107+
vscode
108+
discord
109+
go
110+
git
111+
wget
112+
curl
113+
];
114+
115+
# Some programs need SUID wrappers, can be configured further or are
116+
# started in user sessions.
117+
# programs.mtr.enable = true;
118+
# programs.gnupg.agent = {
119+
# enable = true;
120+
# enableSSHSupport = true;
121+
# };
122+
123+
# List services that you want to enable:
124+
125+
# Enable the OpenSSH daemon.
126+
services.openssh.enable = true;
127+
128+
# Open ports in the firewall.
129+
# networking.firewall.allowedTCPPorts = [ ... ];
130+
# networking.firewall.allowedUDPPorts = [ ... ];
131+
# Or disable the firewall altogether.
132+
# networking.firewall.enable = false;
133+
134+
# This value determines the NixOS release from which the default
135+
# settings for stateful data, like file locations and database versions
136+
# on your system were taken. It‘s perfectly fine and recommended to leave
137+
# this value at the release version of the first install of this system.
138+
# Before changing this value read the documentation for this option
139+
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
140+
system.stateVersion = "24.05"; # Did you read the comment?
141+
142+
}

flake.lock

+49
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
description = "rarebek's NixOS configuration with Flakes";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.05";
6+
7+
home-manager = {
8+
url = "github:nix-community/home-manager/release-24.05";
9+
inputs.nixpkgs.follows = "nixpkgs";
10+
};
11+
};
12+
13+
outputs = inputs@{ nixpkgs, home-manager, ... }: {
14+
nixosConfigurations = {
15+
nixos = nixpkgs.lib.nixosSystem {
16+
system = "x86_64-linux";
17+
modules = [
18+
./configuration.nix
19+
20+
home-manager.nixosModules.home-manager
21+
{
22+
home-manager.useGlobalPkgs = true;
23+
home-manager.useUserPackages = true;
24+
25+
home-manager.users.rarebek = import ./home.nix;
26+
}
27+
];
28+
};
29+
};
30+
};
31+
32+
}

hardware-configuration.nix

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Do not modify this file! It was generated by ‘nixos-generate-config’
2+
# and may be overwritten by future invocations. Please make changes
3+
# to /etc/nixos/configuration.nix instead.
4+
{ config, lib, pkgs, modulesPath, ... }:
5+
6+
{
7+
imports =
8+
[ (modulesPath + "/installer/scan/not-detected.nix")
9+
];
10+
11+
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
12+
boot.initrd.kernelModules = [ ];
13+
boot.kernelModules = [ "kvm-intel" ];
14+
boot.extraModulePackages = [ ];
15+
16+
fileSystems."/" =
17+
{ device = "/dev/disk/by-uuid/b819155e-b937-444f-9661-6352817c0576";
18+
fsType = "ext4";
19+
};
20+
21+
fileSystems."/boot" =
22+
{ device = "/dev/disk/by-uuid/6BFF-0D56";
23+
fsType = "vfat";
24+
options = [ "fmask=0077" "dmask=0077" ];
25+
};
26+
27+
swapDevices =
28+
[ { device = "/dev/disk/by-uuid/85e1a17b-327e-4341-ad93-595b5b42993a"; }
29+
];
30+
31+
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
32+
# (the default) this is the recommended approach. When using systemd-networkd it's
33+
# still possible to use this option, but it's recommended to use it in conjunction
34+
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
35+
networking.useDHCP = lib.mkDefault true;
36+
# networking.interfaces.eno1.useDHCP = lib.mkDefault true;
37+
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
38+
39+
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
40+
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
41+
}

0 commit comments

Comments
 (0)