Skip to content

Commit

Permalink
feat(nixos): init
Browse files Browse the repository at this point in the history
  • Loading branch information
nagy135 committed Feb 2, 2022
1 parent 809f071 commit c09fd29
Show file tree
Hide file tree
Showing 4 changed files with 304 additions and 132 deletions.
254 changes: 129 additions & 125 deletions nixos/configuration.nix
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,136 +1,140 @@
# 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
./hardware-configuration.nix
];

# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

networking.hostName = "nix"; # Define your hostname.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager = {
enable = true;
};

# Set your time zone.
time.timeZone = "Europe/Bratislava";

# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
networking.useDHCP = false;
networking.interfaces.wlp1s0.useDHCP = true;

# Configure network proxy if necessary
# networking.proxy.default = "http://user:password@proxy:port/";
# networking.proxy.noProxy = "127.0.0.1,localhost,internal.domain";

# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};

fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts
dina-font
proggyfonts
pkgs.powerline-fonts
pkgs.font-awesome
];

# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;

networking = {
hostName = "nixos"; # Define your hostname.

# Enable NetworkManager with iwd
networkmanager = {
enable = true;
wifi.backend = "iwd";
};

# The global useDHCP flag is deprecated, therefore explicitly set to false here.
# Per-interface useDHCP will be mandatory in the future, so this generated config
# replicates the default behaviour.
useDHCP = false;
interfaces.wlp1s0.useDHCP = true;
};

# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
keyMap = "us";
};

# Set your time zone.
time.timeZone = "Europe/Bratislava";

# fonts
fonts.fonts = with pkgs; [
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira-code-symbols
mplus-outline-fonts
dina-font
proggyfonts
pkgs.powerline-fonts
pkgs.font-awesome
];

# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
wget
chromium
alacritty
zsh
git
python3
powerline-fonts
neofetch
lazygit
qutebrowser
font-awesome
mpv
youtube-dl
xorg.xbacklight
];

# 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;
# pinentryFlavor = "gnome3";
# };

programs.zsh.enable = 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;

# Enable CUPS to print documents.
# services.printing.enable = true;

# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;

# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";

# Enable touchpad support.
services.xserver.libinput = {
enable = true;
naturalScrolling = true;
};

# Enable the XFCE Desktop Environment.
services.xserver = {
displayManager.lightdm.enable = true;
# desktopManager.xfce.enable = true;
desktopManager.xterm.enable = true;
# windowManager.bspwm.enable = true;
# Enable the X11 windowing system.
services.xserver.enable = true;


# Enable the Plasma 5 Desktop Environment.
services.xserver.displayManager.lightdm.enable = true;
services.xserver.windowManager.bspwm.enable = true;
services.xserver.windowManager.bspwm.configFile = "/home/infiniter/.config/bspwm/bspwmrc";


# Configure keymap in X11
services.xserver.layout = "us";
services.xserver.xkbOptions = "eurosign:e";

# Enable CUPS to print documents.
# services.printing.enable = true;

# Enable sound.
sound.enable = true;
hardware.pulseaudio.enable = true;

# Enable touchpad support (enabled default in most desktopManager).
services.xserver.libinput.enable = true;

# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.infiniter = {
isNormalUser = true;
shell = pkgs.zsh;
initialPassword = "pass";
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
};

# Define a user account. Don't forget to set a password with ‘passwd’.
users.users.infiniter = {
isNormalUser = true;
shell = pkgs.zsh;
extraGroups = [ "wheel" ]; # Enable ‘sudo’ for the user.
};

# 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 = "20.03"; # Did you read the comment?
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
chromium
git
python3
qutebrowser
mpv
xorg.xbacklight
sxhkd
alacritty
polybar
lsd
zsh
zsh-powerlevel10k
gcc
zig
];

programs.zsh.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 = "21.11"; # Did you read the comment?

}

14 changes: 7 additions & 7 deletions nixos/hardware-configuration.nix
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,32 +1,32 @@
# 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, ... }:
{ config, lib, pkgs, modulesPath, ... }:

{
imports =
[ <nixpkgs/nixos/modules/installer/scan/not-detected.nix>
[ (modulesPath + "/installer/scan/not-detected.nix")
];

boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.kernelModules = [ ];
boot.extraModulePackages = [ ];

fileSystems."/" =
{ device = "/dev/disk/by-uuid/2f2eff96-833d-45b4-a972-917a66babc81";
{ device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};

fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/ED93-60BB";
{ device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};

swapDevices =
[ { device = "/dev/disk/by-uuid/e06fc086-996a-43e7-aaea-5636d61b7de7"; }
[ { device = "/dev/disk/by-uuid/47b02d37-f096-4b9d-bbe6-1bca7e6c28db"; }
];

nix.maxJobs = lib.mkDefault 4;
powerManagement.cpuFreqGovernor = lib.mkDefault "powersave";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}
Loading

0 comments on commit c09fd29

Please sign in to comment.