Inital commit

This commit is contained in:
OCbwoy3
2024-11-09 20:55:43 +02:00
commit ff816aebc9
14 changed files with 448 additions and 0 deletions

6
.editorconfig Normal file
View File

@@ -0,0 +1,6 @@
root = true
[*]
indent_style = tab
insert_final_newline = true
indent_size = 4

7
README.md Normal file
View File

@@ -0,0 +1,7 @@
# OCbwoy3's Dotfiles
The second ones, because the first ones were too difficult to install.
Commands you will most likely need:
```bash
sudo nixos-rebuild switch --flake "~/config/#default"
```

48
flake.lock generated Normal file
View File

@@ -0,0 +1,48 @@
{
"nodes": {
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1730837930,
"narHash": "sha256-0kZL4m+bKBJUBQse0HanewWO0g8hDdCvBhudzxgehqc=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "2f607e07f3ac7e53541120536708e824acccfaa8",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1730785428,
"narHash": "sha256-Zwl8YgTVJTEum+L+0zVAWvXAGbWAuXHax3KzuejaDyo=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "4aa36568d413aca0ea84a1684d2d46f55dbabad7",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

35
flake.nix Normal file
View File

@@ -0,0 +1,35 @@
{
description = "OCbwoy3's Dotfiles";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
catppuccin.url = "github:catppuccin/nix";
nix-flatpak.url = "github:gmodena/nix-flatpak/?ref=v0.4.1";
home-manager = {
url = "github:nix-community/home-manager";
inputs.nixpkgs.follows = "nixpkgs";
};
};
# Required by NixOS:
# /etc/nixos/hardware-configuration.nix
# inputs.home-manager.nixosModules.default
# catppuccin.nixosModules.catppuccin
# nix-flatpak.nixosModules.nix-flatpak
outputs = { self, nixpkgs, ... }@inputs: {
nixosConfigurations.default = nixpkgs.lib.nixosSystem {
specialArgs = {inherit inputs;};
modules = [
inputs.home-manager.nixosModules.default
catppuccin.nixosModules.catppuccin
nix-flatpak.nixosModules.nix-flatpak
/etc/nixos/hardware-configuration.nix
./hosts/default/configuration.nix
];
};
};
}

View File

@@ -0,0 +1,58 @@
{ config, pkgs, ... }:
{
imports = [
../../modules/nixos/nixpkgs.nix
../../modules/nixos/bootloader.nix
../../modules/nixos/hardware.nix
../../modules/nixos/nvidia.nix
../../modules/nixos/i18n.nix
../../modules/nixos/main-user.nix
../../modules/nixos/network.nix
../../modules/nixos/programs.nix
./packages.nix
]
programs.steam = {
enable = true;
remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
};
services.flatpak.enable = true;
services.flatpak.remotes = [
{
name = "flathub";
location = "https://dl.flathub.org/repo/flathub.flatpakrepo";
};
{
name = "sober";
location = "https://sober.vinegarhq.org/repo/"
}
];
services.flatpak.packages = [
{ appId = "org.vinegarhq.Sober"; origin = "sober"; }
];
programs.hyprland = {
# Install the packages from nixpkgs
enable = true;
# Whether to enable XWayland
xwayland.enable = true;
};
main-user.userName = "ocbwoy3";
main-user.realName = "OCbwoy3";
main-user.packages = with pkgs; [
brave
prismlauncher
vesktop
];
catppuccin.enable = true;
catppuccin.flavor = "mocha";
}

View File

@@ -0,0 +1,88 @@
{ config, pkgs, ... }:
{
fonts.packages = with pkgs; [
noto-fonts
noto-fonts-cjk-sans
noto-fonts-emoji
monaspace
nerdfonts
];
environment.systemPackages = with pkgs; [
nix-direnv
unzip
ifuse
w3m
imagemagick
alacritty
libimobiledevice
catppuccin-sddm
vim
microsoft-edge
direnv
gnome.nautilus
kdePackages.dolphin
kdePackages.kservice
qpwgraph
wget
git
neofetch
vscode
nodejs
bun
(python3.withPackages (subpkgs: with subpkgs; [
requests
pypresence
]))
wrangler
thefuck
fontforge
xclip
fontforge-gtk
deno
wofi
waybar
dunst
hyprlock
swww
swappy
slurp
grim
wl-clipboard
github-cli
cliphist
pywal
pavucontrol
polkit
polkit-kde-agent
wlogout
libnotify
killall
networkmanagerapplet
blueman
arrpc
playerctl
obs-studio
mangohud
jq
github-cli
file
nwg-look
rhythmbox
hyprpolkitagent
catppuccin-cursors.mochaLavender
# important
glib
openssl
nss
glibc # C LIBRARY DO NOT REMOVE VERY IMPORTANT
gobject-introspection
gimp
mpv
]
}

View File

@@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
boot.binfmt.registrations.appimage = {
wrapInterpreterInShell = false;
interpreter = "${pkgs.appimage-run}/bin/appimage-run";
recognitionType = "magic";
offset = 0;
mask = ''\xff\xff\xff\xff\x00\x00\x00\x00\xff\xff\xff'';
magicOrExtension = ''\x7fELF....AI\x02'';
};
boot.supportedFilesystems = [ "ntfs" ];
boot.loader = {
efi = {
canTouchEfiVariables = true;
};
grub = {
efiSupport = true;
device = "nodev";
};
};
}

View File

@@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
hardware.bluetooth.enable = true;
services.blueman.enable = true;
hardware.bluetooth.settings = {
General = {
Experimental = true;
ControllerMode = "bredr";
};
};
hardware.enableAllFirmware = true;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
}

26
modules/nixos/i18n.nix Normal file
View File

@@ -0,0 +1,26 @@
{ config, pkgs, ... }:
{
time.timeZone = "Europe/Riga";
i18n.defaultLocale = "lv_LV.UTF-8";
i18n.extraLocaleSettings = {
LC_ADDRESS = "lv_LV.UTF-8";
LC_IDENTIFICATION = "lv_LV.UTF-8";
LC_MEASUREMENT = "lv_LV.UTF-8";
LC_MONETARY = "lv_LV.UTF-8";
LC_NAME = "lv_LV.UTF-8";
LC_NUMERIC = "lv_LV.UTF-8";
LC_PAPER = "lv_LV.UTF-8";
LC_TELEPHONE = "lv_LV.UTF-8";
LC_TIME = "lv_LV.UTF-8";
};
services.xserver.xkb = {
layout = "us";
variant = "";
};
}

View File

@@ -0,0 +1,43 @@
{ lib, config, pkgs, ... }:
{
options = {
main-user.userName = lib.mkOption {
default = "ocbwoy3";
description = ''
Username
'';
};
main-user.realName = lib.mkOption {
default = "OCbwoy3";
description = ''
User's Name
'';
};
main-user.packages = lib.mkOption {
default = [];
description = ''
User's Packages
'';
};
};
config = {
users.users.${config.main-user.userName} = {
isNormalUser = true;
initialPassword = "password";
description = "${config.main-user.realName}";
shell = pkgs.zsh;
extraGroups = [ "networkmanager" "wheel" "input" ];
packages = ${config.main-user.packages};
# with pkgs; [
# brave
# prismlauncher
# gimp
# mpv
# vesktop
# ];
};
};
}

View File

@@ -0,0 +1,8 @@
{ config, pkgs, ... }:
{
networking.hostName = "nixos";
networking.networkmanager.enable = true;
}

10
modules/nixos/nixpkgs.nix Normal file
View File

@@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
nixpkgs.config.allowUnfree = true;
nixpkgs.config.packageOverrides = pkgs: {
vaapiIntel = pkgs.vaapiIntel.override { enableHybridCodec = true; };
};
}

39
modules/nixos/nvidia.nix Normal file
View File

@@ -0,0 +1,39 @@
{ config, pkgs, ... }:
{
boot.extraModprobeConfig = ''options nvidia_drm modeset=1 fbdev=1'';
environment.variables = {
LIBVA_DRIVER_NAME = "nvidia";
GBM_BACKEND = "nvidia-drm";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
NVD_BACKEND = "direct";
EGL_PLATFORM = "wayland";
};
hardware.graphics = {
enable = true;
extraPackages = with pkgs; [
intel-media-driver
vaapiIntel
vaapiVdpau
libvdpau-va-gl
];
};
environment.sessionVariables.NIXOS_OZONE_WL = "1";
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = false;
package = config.boot.kernelPackages.nvidiaPackages.latest;
};
services.xserver.enable = true;
services.xserver.videoDrivers = ["nvidia"];
}

View File

@@ -0,0 +1,28 @@
{ config, pkgs, ... }:
{
programs.zsh.enable = true;
programs.direnv = {
enable = true;
enableZshIntegration = true;
};
programs.gamemode.enable = true;
programs.gamemode.settings.general.renice = 0;
programs.gamemode.settings.general.ioprio = 0;
programs.gamemode.settings.general.softrealtime = "on";
services.usbmuxd.enable = true;
programs.nix-ld.enable = true;
programs.nix-ld.libraries = with pkgs; [
c-ares ffmpeg gtk3 http-parser libevent libvpx libxslt minizip nss re2 snappy libnotify libappindicator-gtk3
];
services.openssh = {
enable = true;
banner = "What the fuck do you think you're doing here?\n";
};
}