Initial commit

This commit is contained in:
blahai 2024-08-30 20:38:37 +03:00
commit fcfb6cf997
No known key found for this signature in database
8 changed files with 1720 additions and 0 deletions

223
hosts/nyx/configuration.nix Normal file
View file

@ -0,0 +1,223 @@
# 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, system, lib, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
inputs.home-manager.nixosModules.default
];
# Bootloader.
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = 5;
};
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_zen;
};
networking.hostName = "nyx"; # 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;
# Set your time zone.
time.timeZone = "Europe/Helsinki";
# Select internationalisation properties.
i18n.defaultLocale = "en_US.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "fi_FI.UTF-8";
LC_IDENTIFICATION = "fi_FI.UTF-8";
LC_MEASUREMENT = "fi_FI.UTF-8";
LC_MONETARY = "fi_FI.UTF-8";
LC_NAME = "fi_FI.UTF-8";
LC_NUMERIC = "fi_FI.UTF-8";
LC_PAPER = "fi_FI.UTF-8";
LC_TELEPHONE = "fi_FI.UTF-8";
LC_TIME = "fi_FI.UTF-8";
};
# Enable the X11 windowing system.
services.xserver.enable = true;
# Enable the GNOME Desktop Environment.
services.xserver.displayManager.gdm.enable = true;
services.xserver.desktopManager.gnome.enable = true;
# Configure keymap in X11
services.xserver.xkb = {
layout = "us";
variant = "euro";
};
# Enable CUPS to print documents.
services.printing.enable = false;
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
# use the example session manager (no others are packaged yet so this is enabled by default,
# no need to redefine it in your config for now)
#media-session.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.pingu = {
isNormalUser = true;
description = "Elissa";
extraGroups = [ "networkmanager" "wheel" "docker" ];
shell = pkgs.fish;
packages = with pkgs; [
# thunderbird
floorp
vesktop
];
};
home-manager = {
extraSpecialArgs = { inherit inputs; };
users = {
"pingu" = import ./home.nix;
};
};
virtualisation.docker.enable = true;
# Enable automatic login for the user.
# services.xserver.displayManager.autoLogin.enable = true;
# services.xserver.displayManager.autoLogin.user = "pingu";
services.displayManager.autoLogin = {
enable = false;
user = "pingu";
};
# Workaround for GNOME autologin: https://github.com/NixOS/nixpkgs/issues/103746#issuecomment-945091229
systemd.services."getty@tty1".enable = false;
systemd.services."autovt@tty1".enable = false;
# Install firefox.
programs.firefox.enable = true;
programs.fish.enable = true;
programs.hyprland = {
enable = true;
package = inputs.hyprland.packages."${pkgs.system}".hyprland;
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# Nix settings bs
nix = {
settings = {
experimental-features = [ "nix-command" "flakes" ];
auto-optimise-store = true;
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
};
gc = {
automatic = true;
persistent = true;
dates = "daily";
options = "--delete-older-than +5";
};
};
# List packages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
neovim
vim # Do not forget to add an editor to edit configuration.nix! The Nano editor is also installed by default.
wget
git
curl
fish
fastfetch
zoxide
starship
cachix
gcc
ripgrep
clang
go
nixfmt-classic
python3
zip
nodejs
typescript
busybox
rustup
];
fonts.packages = with pkgs; [
iosevka-comfy.comfy
fira-code
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
nerdfonts
];
# 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;
settings = {
PermitRootLogin = "no";
PasswordAuthentication = false;
};
};
# 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. Its 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 = "24.05"; # Did you read the comment?
}

View file

@ -0,0 +1,60 @@
# 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" "ahci" "xhci_pci" "usbhid" "uas" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/465cd1e9-3e0f-4800-a28e-bde99c2fc6f8";
fsType = "ext4";
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/A32D-C27D";
fsType = "vfat";
options = [ "fmask=0077" "dmask=0077" ];
};
#fileSystems."/var/lib/docker/overlay2/7494aad14765ade76a2ecf82e21a3d20996943b4b3260e74feeeb01734c9db41/merged" =
# { device = "overlay";
# fsType = "overlay";
# };
fileSystems."/mnt/ext" =
{ device = "/dev/disk/by-uuid/43280a82-cf9a-452e-9bdc-a8cc66ccd7c8";
fsType = "btrfs";
options = [ "async" "auto" "nofail" "noatime" ];
};
fileSystems."/mnt/ext/storage" =
{ device = "/dev/disk/by-uuid/349dd615-0054-453e-b6bd-a15938bf8366";
fsType = "btrfs";
options = [ "async" "auto" "nofail" "noatime" ];
depends = [ "/mnt/ext" ];
};
swapDevices =
[ { device = "/dev/disk/by-uuid/df753d88-0883-4084-acb3-e8a1d3192603"; }
];
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
# (the default) this is the recommended approach. When using systemd-networkd it's
# still possible to use this option, but it's recommended to use it in conjunction
# with explicit per-interface declarations with `networking.interfaces.<interface>.useDHCP`.
networking.useDHCP = lib.mkDefault true;
# networking.interfaces.docker0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp13s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp14s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

66
hosts/nyx/home.nix Normal file
View file

@ -0,0 +1,66 @@
{ inputs, config, pkgs, ... }:
{
imports = [
../../modules/home-manager/hyprland.nix
../../modules/home-manager/ags/ags.nix
];
# Home Manager needs a bit of information about you and the paths it should
# manage.
home.username = "pingu";
home.homeDirectory = "/home/pingu";
# This value determines the Home Manager release that your configuration is
# compatible with. This helps avoid breakage when a new Home Manager release
# introduces backwards incompatible changes.
#
# You should not change this value, even if you update Home Manager. If you do
# want to update the value, then make sure to first check the Home Manager
# release notes.
home.stateVersion = "24.05"; # Please read the comment before changing.
# The home.packages option allows you to install Nix packages into your
# environment.
home.packages = [
];
# Home Manager is pretty good at managing dotfiles. The primary way to manage
# plain files is through 'home.file'.
home.file = {
# # Building this configuration will create a copy of 'dotfiles/screenrc' in
# # the Nix store. Activating the configuration will then make '~/.screenrc' a
# # symlink to the Nix store copy.
# ".screenrc".source = dotfiles/screenrc;
# # You can also set the file content immediately.
# ".gradle/gradle.properties".text = ''
# org.gradle.console=verbose
# org.gradle.daemon.idletimeout=3600000
# '';
};
# Home Manager can also manage your environment variables through
# 'home.sessionVariables'. These will be explicitly sourced when using a
# shell provided by Home Manager. If you don't want to manage your shell
# through Home Manager then you have to manually source 'hm-session-vars.sh'
# located at either
#
# ~/.nix-profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# ~/.local/state/nix/profiles/profile/etc/profile.d/hm-session-vars.sh
#
# or
#
# /etc/profiles/per-user/pingu/etc/profile.d/hm-session-vars.sh
#
home.sessionVariables = {
EDITOR = "nvim";
};
# Let Home Manager install and manage itself.
programs.home-manager.enable = true;
}