Initial commit

This commit is contained in:
Mira 2024-07-03 12:58:48 -04:00
parent 511ced5ad0
commit 0d6eeac4a8
3 changed files with 298 additions and 0 deletions

211
configuration.nix Normal file
View file

@ -0,0 +1,211 @@
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page, on
# https://search.nixos.org/options and in the NixOS manual (`nixos-help`).
{ config, lib, pkgs, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
nix = {
package = pkgs.nixFlakes;
extraOptions = ''
experimental-features = nix-command flakes
'';
};
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "auxin"; # Define your hostname.
# Pick only one of the below networking options.
# networking.wireless.enable = true; # Enables wireless support via wpa_supplicant.
networking.networkmanager.enable = true; # Easiest to use and most distros use this by default.
# Set your time zone.
time.timeZone = "America/New_York";
# 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";
# useXkbConfig = true; # use xkb.options in tty.
# };
# Enable the X11 windowing system.
services.xserver.enable = true;
services.xserver.displayManager.sddm = {
enable = true;
settings = {
Autologin = {
Session = "kodi.desktop";
User = "mira";
};
};
};
services.xserver.desktopManager.xfce.enable = true;
# Kodi
services.xserver.desktopManager.kodi.enable = true;
# smartd
services.smartd.enable = true;
# BTRFS scrub
services.btrfs.autoScrub.enable = true;
# Configure keymap in X11
# services.xserver.xkb.layout = "us";
# services.xserver.xkb.options = "eurosign:e,caps:escape";
# 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.mira = {
isNormalUser = true;
extraGroups = [ "wheel", "docker" ]; # Enable sudo for the user.
packages = with pkgs; [
firefox
tree
];
shell = pkgs.zsh;
openssh.authorizedKeys.keys = [
"sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAIMggnmTj7KL409V2mtbPgKERbmyJAeCGBcyzxWW+arRZAAAABHNzaDo= yubikey-black"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAltYcKHavkQBJFlogNuT3JhX6ob30V3EYje4pOQBLgq gpg\\mira.kristipati@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEKT/rbUu87QyRD7L/QSr+lQMJz2m/mdqlqyCQEMwUJj gpgssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIEw3/9inZC/MRPkuOF6T5LiFoOlgo5HZVIM36IC+hlzJ gpg\\mira-yubikey-black"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFdRtpQWCPyQQuzcwlbFukGZSlRTcfNzG840kMvbuPwr gpg\\kristipati.ajay@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIA0ikP2zdDBaJZ+aoE6jFz3UpCyHjz1r1QtuZTAvTpx zagreus25519"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJx1GWB1xkE+ECavUypp99FqmB4emiw+j2PpsxN8OXpa gpg\\mira@xn--2dkua.xn--tckwe"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINa3w6lweeP4XBokNCEJb86th9S81WQQ+LVVwCRpADap kristipati.ajay@gmail.com"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOY3LSWsg9XK1rI7r2E+1tmX3Vi7W5opwkvqO6AsduZR gpg\\ArgentumCation"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDA+Hrb45HQrcBe+gXQz4goWw0PBWdmAWMQ0RWrHXwvkWXM4KsXXrUP7qijEPPtDvJG3JL4Ifsbj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ages installed in system profile. To search, run:
# $ nix search wget
environment.systemPackages = with pkgs; [
alacritty
bat
btdu
btop
btrbk
czkawka
docker
hyfetch
hyperfine
jellyfin-media-player
lazydocker
lazygit
lsd
mcfly
neovim
sheldon
starship
tmux
viddy
wget
zsh
];
# 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;
};
programs.zsh.enable = true;
programs.zoxide = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
programs.fzf = {
enable = true;
enableBashIntegration = true;
enableFishIntegration = true;
enableZshIntegration = true;
};
programs.mcfly = {
enable = true;
enableBashIntegration = true;
enableZshIntegration = true;
enableFishIntegration = true;
};
# List services that you want to enable:
# Enable the OpenSSH daemon.
services.openssh = {
enable = true;
settings = {
PermitRootLogin = "prohibit-password";
PasswordAuthentication = false;
};
};
virtualization.docker = {
storageDriver = "overlay2";
enableOnBoot = true;
enable = true;
autoPrune.enable = true;
};
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you
# accidentally delete configuration.nix.
system.copySystemConfiguration = true;
# This option defines the first version of NixOS you have installed on this particular machine,
# and is used to maintain compatibility with application data (e.g. databases) created on older NixOS versions.
#
# Most users should NEVER change this value after the initial install, for any reason,
# even if you've upgraded your system to a new NixOS release.
#
# This value does NOT affect the Nixpkgs version your packages and OS are pulled from,
# so changing it will NOT upgrade your system.
#
# This value being lower than the current NixOS release does NOT mean your system is
# out of date, out of support, or vulnerable.
#
# Do NOT change this value unless you have manually inspected all the changes it would make to your configuration,
# and migrated your data accordingly.
#
# For more information, see `man configuration.nix` or https://nixos.org/manual/nixos/stable/options#opt-system.stateVersion .
system.stateVersion = "23.11"; # Did you read the comment?
}

21
flake.nix Normal file
View file

@ -0,0 +1,21 @@
# /etc/nixos/flake.nix
{
description = "flake for mira::auxin";
inputs = {
nixpkgs = {
url = "github:NixOS/nixpkgs/nixos-unstable";
};
};
outputs = { self, nixpkgs }: {
nixosConfigurations = {
auxin = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
./configuration.nix
];
};
};
};
}

View file

@ -0,0 +1,66 @@
# 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 = [ "xhci_pci" "ahci" "nvme" "usb_storage" "usbhid" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
fileSystems."/" =
{ device = "/dev/disk/by-uuid/b6931dc5-1ccb-4d81-abf6-38b6febc6176";
fsType = "btrfs";
options = [ "subvol=@nixos", "noatime" ];
};
fileSystems."/nix" =
{ device = "/dev/disk/by-uuid/b6931dc5-1ccb-4d81-abf6-38b6febc6176";
fsType = "btrfs";
options = [ "subvol=@nix", "noatime" ];
};
fileSystems."/home" =
{ device = "/dev/disk/by-uuid/b6931dc5-1ccb-4d81-abf6-38b6febc6176";
fsType = "btrfs";
options = [ "subvol=@home", "noatime", "compress=zstd" ];
};
fileSystems."/swap" =
{ device = "/dev/disk/by-uuid/b6931dc5-1ccb-4d81-abf6-38b6febc6176";
fsType = "btrfs";
options = [ "subvol=@swap" ];
};
fileSystems."/boot" =
{ device = "/dev/disk/by-uuid/34E4-E112";
fsType = "vfat";
};
fileSystems."/raid" =
{ device = "/dev/sdb1";
fsType = "btrfs";
options = [ "noatime", "noauto", "x-systemd.automount", "nofail", "space_cache=v2", "compress=zstd"]
};
swapDevices = [ "/swap/swapfile" ];
# 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.enp3s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp3s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0f0.useDHCP = lib.mkDefault true;
# networking.interfaces.enp4s0f1.useDHCP = lib.mkDefault true;
# networking.interfaces.enp9s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp7s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}