nixos/default.nix

154 lines
4 KiB
Nix
Raw Normal View History

{ config, inputs, outputs, pkgs, lib, home-manager, ... }: {
2023-08-07 17:28:33 +04:00
imports = [
# home manager
inputs.home-manager.nixosModules.default
2024-09-28 23:31:39 +04:00
# TODO:: GET RID OF THIS PLEASE
# my modules modules
2023-08-07 17:28:33 +04:00
# import for each folder
2024-09-28 23:31:39 +04:00
# add entry to module category's default.nix
2023-08-07 17:28:33 +04:00
outputs.nixosModules.desktop
outputs.nixosModules.shell
outputs.nixosModules.hardware
outputs.nixosModules.dev
outputs.nixosModules.media
2023-09-05 09:14:06 +04:00
outputs.nixosModules.work
2023-08-31 13:35:16 +04:00
outputs.nixosModules.security
2024-09-06 08:04:26 +04:00
outputs.nixosModules.virtualization
2023-08-07 17:28:33 +04:00
];
2023-08-08 11:21:47 +04:00
2024-04-09 20:38:51 +04:00
# nix settings that should 100% be global
#nix.settings.experimental-features = ["nix-command" "flakes"];
nix.settings = {
experimental-features = [ "nix-command" "flakes" ];
2024-04-09 20:38:51 +04:00
substituters = [
2024-08-11 22:26:36 +04:00
# garnix
2024-04-09 20:38:51 +04:00
"https://cache.garnix.io"
2024-08-11 22:26:36 +04:00
# nix-community
2024-06-14 22:29:21 +04:00
"https://nix-community.cachix.org"
2024-08-11 22:26:36 +04:00
# hyprland
"https://hyprland.cachix.org"
2024-04-09 20:38:51 +04:00
];
trusted-public-keys = [
"cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g="
2024-06-14 22:29:21 +04:00
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
2024-08-11 22:26:36 +04:00
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
2024-04-09 20:38:51 +04:00
];
};
2023-08-07 17:28:33 +04:00
# import the overlays
nixpkgs = {
2023-08-08 11:21:47 +04:00
overlays = [
outputs.overlays.additions
outputs.overlays.modifications
2024-08-21 18:51:38 +04:00
outputs.overlays.stable-packages
2023-08-08 11:21:47 +04:00
];
};
2023-08-07 17:28:33 +04:00
# grub (mount efi partition to /boot/efi)
# why /boot/efi? instead of /efi?
# 1. when dualbooting, windows makes the efi partition 100mb instead of 512mb+ (we need this for generations
# and intel microcode)
# 2. nixos does not like /efi :(
# 3. i dont like systemd boot D:
2023-08-08 11:21:47 +04:00
# TODO(sako):: add shim secure boot
2023-08-07 17:28:33 +04:00
# because window and riot games devs :(
boot.loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot/efi";
};
grub = {
devices = [ "nodev" ];
2023-08-07 17:28:33 +04:00
efiSupport = true;
enable = true;
useOSProber = true;
configurationLimit = 10;
};
};
# this shouldnt cause any issues right?
networking.networkmanager.enable = true;
2023-08-25 21:21:17 +04:00
time.timeZone = "Asia/Dubai";
2023-08-07 17:28:33 +04:00
i18n.defaultLocale = "en_US.UTF-8";
console = {
font = "Lat2-Terminus16";
# keyMap = "us";
2023-08-08 11:21:47 +04:00
# use xorg layout option
2023-08-07 17:28:33 +04:00
# TODO(sako):: add arabic locale
useXkbConfig = true;
};
# xorg layout
# change to needed
2024-06-14 21:11:11 +04:00
services.xserver.xkb.layout = "us";
services.xserver.xkb.options = "grp:alt_shift_toggle, ctrl:swapcaps";
2023-08-07 17:28:33 +04:00
# already sold soul to corporations \_o_/
nixpkgs.config.allowUnfree = true;
2023-08-09 23:02:37 +04:00
users.users.sako = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio" ];
2023-08-09 23:02:37 +04:00
};
2023-08-07 17:28:33 +04:00
home-manager.useUserPackages = true;
home-manager.users.sako = { pkgs, ... }: {
2023-08-08 11:21:47 +04:00
# CHANGE THIS WHEN THE SYSTEM VERSION CHANGES TOO!!!
home.packages = [ ];
2023-08-08 11:21:47 +04:00
home.username = "sako";
home.homeDirectory = "/home/sako";
programs.bash.enable = true;
programs.home-manager.enable = true;
2024-08-01 22:21:19 +04:00
# xdg.configFile.git = {
# source = ./config/git;
# };
programs.git = {
enable = true;
userName = "Sakooooo";
userEmail = "78461130+Sakooooo@users.noreply.github.com";
includes = [{ path = "~/.config/git/config.local"; }];
2024-08-01 22:21:19 +04:00
extraConfig = {
color.ui = "auto";
init.defaultBranch = "master";
pull.rebase = true;
};
2023-08-08 11:21:47 +04:00
};
2024-08-01 22:21:19 +04:00
2023-08-07 17:28:33 +04:00
};
# bare minimum
environment.systemPackages = with pkgs; [
vim # backup
wget # double u get
2023-08-07 17:28:33 +04:00
killall # die processes
unzip # zip file
gh # github
htop # htop
tree # trees
2024-07-07 21:51:12 +04:00
ripgrep # better grep may help later
2023-08-08 11:21:47 +04:00
];
2023-08-07 17:28:33 +04:00
# you phisiclally cannot live without this
2023-08-08 11:21:47 +04:00
# litearlly! ! ! ! ! !
2023-08-07 17:28:33 +04:00
programs.gnupg.agent = {
enable = true;
2024-06-14 21:21:53 +04:00
pinentryPackage = pkgs.pinentry-gtk2;
2024-07-14 20:46:48 +04:00
settings = {
allow-emacs-pinentry = "";
allow-loopback-pinentry = "";
};
2023-08-07 17:28:33 +04:00
# enableSSHSupport = true;
};
2024-08-01 22:21:19 +04:00
# programs.git = {
# enable = true;
# package = pkgs.gitFull;
# };
2023-08-07 17:28:33 +04:00
2023-09-13 15:24:53 +04:00
# read stable version patch notes and fix any issues
# then you can change this
#system.stateVersion = "23.05";
2023-08-07 17:28:33 +04:00
# read comment you read the comment?
}