initial commit

This commit is contained in:
Ifrahim Ansari 2026-02-15 11:10:32 -05:00
commit 6491e91ec5
37 changed files with 1116 additions and 0 deletions

0
README.md Normal file
View file

127
desktop/configuration.nix Normal file
View file

@ -0,0 +1,127 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
../disk-config.nix
];
environment.shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake ~/nixos/.#nvidia";
c = "nix-shell ~/nixos/shells/c.nix";
js = "nix-shell ~/nixos/shells/js.nix";
nix = "nix-shell ~/nixos/shells/nix.nix";
rust = "nix-shell ~/nixos/shells/rust.nix";
python = "nix-shell ~/nixos/shells/python.nix";
};
programs.steam.enable = true;
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "iamhome"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Enable Desktop Environment.
services.displayManager.cosmic-greeter.enable = true;
services.desktopManager.cosmic.enable = true;
services.flatpak.enable = true;
hardware.graphics.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
services.printing.cups-pdf.enable = true;
services.printing.webInterface = false;
services.printing.drivers = with pkgs; [ brlaser ];
services.avahi = {
enable = true;
nssmdns4 = true;
openFirewall = true;
};
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
programs.bash.enable = true;
programs.bash.completion.enable = true;
users.users.ifrahim = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialPassword = "Smsia2004";
};
environment.systemPackages = with pkgs; [
home-manager
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
631
22
];
# /etc/nixos/configuration.nix snippet
virtualisation.docker.enable = true; # or podman
# OCI Container configuration
virtualisation.oci-containers = {
backend = "docker"; # or "podman"
containers = {
my-nginx = {
image = "nginx:latest";
autoStart = true;
ports = [
"8080:80" # Host:Container port mapping
];
};
};
};
# 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 - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# 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 = "25.11"; # Did you read the comment?
}

View file

@ -0,0 +1,15 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports =
[ (modulesPath + "/installer/scan/not-detected.nix")
];
boot.initrd.availableKernelModules = [ "nvme" "ahci" "thunderbolt" "xhci_pci" "usbhid" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

33
disk-config.nix Normal file
View file

@ -0,0 +1,33 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/nvme0n1";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

71
flake.lock generated Normal file
View file

@ -0,0 +1,71 @@
{
"nodes": {
"disko": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1768920986,
"narHash": "sha256-CNzzBsRhq7gg4BMBuTDObiWDH/rFYHEuDRVOwCcwXw4=",
"owner": "nix-community",
"repo": "disko",
"rev": "de5708739256238fb912c62f03988815db89ec9a",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "latest",
"repo": "disko",
"type": "github"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1770260404,
"narHash": "sha256-3iVX1+7YUIt23hBx1WZsUllhbmP2EnXrV8tCRbLxHc8=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "0d782ee42c86b196acff08acfbf41bb7d13eed5b",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-25.11",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1771043024,
"narHash": "sha256-O1XDr7EWbRp+kHrNNgLWgIrB0/US5wvw9K6RERWAj6I=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "3aadb7ca9eac2891d52a9dec199d9580a6e2bf44",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"disko": "disko",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

64
flake.nix Normal file
View file

@ -0,0 +1,64 @@
{
description = "A very basic flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-25.11";
disko = {
url = "github:nix-community/disko/latest";
inputs.nixpkgs.follows = "nixpkgs";
};
home-manager = {
url = "github:nix-community/home-manager/release-25.11";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
disko,
home-manager,
nixpkgs,
...
}:
let
system = "x86_64-linux";
serverModules = [
disko.nixosModules.disko
];
commonModules = [
disko.nixosModules.disko
home-manager.nixosModules.home-manager
{
home-manager.useGlobalPkgs = true;
home-manager.useUserPackages = true;
home-manager.users.ifrahim = import ./home.nix;
}
];
in
{
nixosConfigurations = {
# Black Server Configuration
black = nixpkgs.lib.nixosSystem {
inherit system;
modules = serverModules ++ [ ./servers/black/configuration.nix ];
};
# Laptop Configuration
laptop = nixpkgs.lib.nixosSystem {
inherit system;
modules = commonModules ++ [ ./laptop/configuration.nix ];
};
nvidia = nixpkgs.lib.nixosSystem {
inherit system;
modules = commonModules ++ [
./nvidia/nvidia.nix
./desktop/configuration.nix
];
};
};
};
}

45
home.nix Normal file
View file

@ -0,0 +1,45 @@
{ pkgs, ... }:
{
home.username = "ifrahim";
home.homeDirectory = "/home/ifrahim";
home.stateVersion = "25.11"; # Match your initial install version
# This is where your user-specific packages go now
home.packages = with pkgs; [
fd
nil
nixd
unzip
ghostty
flatpak
zed-editor
openconnect
networkmanager
nixos-generators
thunderbird-latest
nerd-fonts.jetbrains-mono
wl-clipboard
ripgrep
lazygit
htop
curl
wget
];
fonts.fontconfig.enable = true;
programs.git = {
enable = true;
settings.user = {
name = "Ifrahim Ansari";
email = "iam@ifrahim.dev";
};
};
home.file.".config/nvim" = {
source = ./nvim; # Nix implicitly converts local paths to store paths
recursive = true;
force = true;
};
}

52
iso/iso.nix Normal file
View file

@ -0,0 +1,52 @@
{
pkgs,
modulesPath,
lib,
config,
...
}:
{
imports = [
"${modulesPath}/installer/cd-dvd/installation-cd-minimal.nix"
];
users.users.root = {
initialPassword = "password";
};
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
services.openssh.enable = true;
# supported filesystems
boot.supportedFilesystems = lib.mkForce [
"btrfs"
"reiserfs"
"vfat"
"f2fs"
"xfs"
"ntfs"
"cifs"
];
# use the latest Linux kernel
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.initrd.availableKernelModules = [
"nvme"
"ahci"
"thunderbolt"
"xhci_pci"
"usbhid"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [
"kvm-amd"
"iwlwifi"
];
boot.extraModulePackages = [ ];
}

109
laptop/configuration.nix Normal file
View file

@ -0,0 +1,109 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
../disk-config.nix
];
environment.shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake ~/nixos/.#laptop";
c = "nix-shell ~/nixos/shells/c.nix";
js = "nix-shell ~/nixos/shells/js.nix";
nix = "nix-shell ~/nixos/shells/nix.nix";
rust = "nix-shell ~/nixos/shells/rust.nix";
python = "nix-shell ~/nixos/shells/python.nix";
};
fonts.fontconfig.enable = true;
fonts.packages = with pkgs; [ nerd-fonts.jetbrains-mono ];
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "whoami"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
networking.networkmanager.wifi.powersave = false;
# Set your time zone.
time.timeZone = "America/New_York";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
# Gnome Desktop.
services.desktopManager.gnome.enable = true;
services.displayManager.gdm.enable = true;
services.gnome.gnome-software.enable = true;
services.gnome.core-apps.enable = true;
services.gnome.games.enable = false;
services.flatpak.enable = true;
hardware.graphics.enable = true;
# Enable CUPS to print documents.
services.printing.enable = true;
# Enable sound.
services.pipewire = {
enable = true;
pulse.enable = true;
};
# Enable touchpad support (enabled default in most desktopManager).
services.libinput.enable = true;
# Define a user account. Don't forget to set a password with passwd.
programs.bash.enable = true;
programs.bash.completion.enable = true;
users.defaultUserShell = pkgs.bash;
users.users.ifrahim = {
isNormalUser = true;
extraGroups = [
"networkmanager"
"wheel"
]; # Enable sudo for the user.
initialPassword = "Smsia2004";
};
environment.systemPackages = with pkgs; [
home-manager
curl
wget
btop
];
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.enable = 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 - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# 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 = "25.11"; # Did you read the comment?
}

View file

@ -0,0 +1,29 @@
# 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"
"xhci_pci"
"usb_storage"
"sd_mod"
];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-amd" ];
boot.extraModulePackages = [ ];
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

25
nvidia/nvidia.nix Normal file
View file

@ -0,0 +1,25 @@
{
config,
lib,
pkgs,
...
}:
{
hardware.graphics = {
enable = true;
};
services.xserver.videoDrivers = [
"nvidia"
];
hardware.nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.beta;
};
}

3
nvim/init.lua Normal file
View file

@ -0,0 +1,3 @@
require("ifrahim.init")
require("config.lazy")
require("lsp.init")

26
nvim/lua/config/lazy.lua Normal file
View file

@ -0,0 +1,26 @@
-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
local lazyrepo = "https://github.com/folke/lazy.nvim.git"
local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath })
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
import = "plugins"
},
change_detection = {
notify = false
}
})

30
nvim/lua/ifrahim/init.lua Normal file
View file

@ -0,0 +1,30 @@
vim.g.mapleader = " "
vim.opt.mouse = ""
vim.opt.list = false
vim.opt.number = true
vim.opt.relativenumber = true
vim.opt.expandtab = true
vim.opt.shiftwidth = 2
vim.opt.tabstop = 2
vim.opt.clipboard = "unnamedplus"
vim.opt.updatetime = 200
vim.opt.termguicolors = true
vim.opt.fillchars = { eob = " " }
vim.opt.swapfile = false
vim.opt.smartindent = true
vim.opt.laststatus = 3
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
vim.g.loaded_python3_provider = 0
vim.g.loaded_perl_provider = 0
vim.g.loaded_ruby_provider = 0
vim.opt.backup = false
vim.opt.writebackup = false
vim.keymap.set("n", "<leader>nh", "<CMD>:nohlsearch<CR>", { silent = true })
vim.keymap.set("n", "<leader>nh", "<CMD>:nohlsearch<CR>", { silent = true })
vim.keymap.set("t", "<Esc>", "<C-\\><C-n>", { noremap = true, silent = true })

20
nvim/lua/lsp/init.lua Normal file
View file

@ -0,0 +1,20 @@
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities.textDocument.completion.completionItem.snippetSupport = true
vim.lsp.config("cssls", {
capabilities = capabilities,
})
vim.lsp.enable("lua_ls")
vim.lsp.enable("gopls")
vim.lsp.enable("docker_compose_language_service")
vim.lsp.enable("docker_language_server")
vim.lsp.enable("ts_ls")
vim.lsp.enable("pylsp")
vim.lsp.enable("fish_lsp")
vim.lsp.enable("css_modules")
vim.lsp.enable("css_variables")
vim.lsp.enable("cssls")
vim.lsp.enable("nginx_language_server")
vim.lsp.enable("nil_ls")
vim.lsp.enable("nixd")

27
nvim/lua/lsp/lua_ls.lua Normal file
View file

@ -0,0 +1,27 @@
return {
cmd = { "lua-language-server" },
filetypes = { "lua" },
root_markers = {
".lua",
".emmyrc.json",
".luarc.json",
".luarc.jsonc",
".luacheckrc",
".stylua.toml",
"stylua.toml",
"selene.toml",
"selene.yml",
".git",
},
settings = {
Lua = {
codeLens = {
enable = true,
},
hint = {
enable = true,
semicolon = "Disable",
},
},
},
}

View file

@ -0,0 +1,21 @@
return {
"stevearc/conform.nvim",
opts = {
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
formatters_by_ft = {
nginx = { "nginx-config-formatter" },
kdl = { "kdlfmt" },
lua = { "stylua" },
-- Conform will run multiple formatters sequentially
python = { "isort", "black" },
-- You can customize some of the format options for the filetype (:help conform.format)
rust = { "rustfmt", lsp_format = "fallback" },
-- Conform will run the first available formatter
javascript = { "prettierd", "prettier", stop_after_first = true },
},
},
}

View file

@ -0,0 +1,6 @@
return {
"sphamba/smear-cursor.nvim",
opts = {
legacy_computing_symbols_support = true,
},
}

View file

@ -0,0 +1,11 @@
return {
'sainnhe/everforest',
lazy = false,
priority = 1000,
config = function()
-- Optionally configure and load the colorscheme
-- directly inside the plugin declaration.
vim.g.everforest_enable_italic = true
vim.cmd.colorscheme('everforest')
end
}

View file

@ -0,0 +1,17 @@
local highlight = { "CursorColumn", "Whitespace" }
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = {
indent = {
highlight = { "CursorColumn", "Whitespace" },
char = "",
},
whitespace = {
highlight = { "CursorColumn", "Whitespace" },
remove_blankline_trail = false,
},
scope = { enabled = false },
},
}

View file

@ -0,0 +1,20 @@
return {
"kdheepak/lazygit.nvim",
lazy = false,
cmd = {
"LazyGit",
"LazyGitConfig",
"LazyGitCurrentFile",
"LazyGitFilter",
"LazyGitFilterCurrentFile",
},
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
-- setting the keybinding for LazyGit with 'keys' is recommended in
-- order to load the plugin when the command is run for the first time
keys = {
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
},
}

View file

@ -0,0 +1,4 @@
return {
"mason-org/mason.nvim",
opts = {},
}

45
nvim/lua/plugins/mini.lua Normal file
View file

@ -0,0 +1,45 @@
return {
"nvim-mini/mini.nvim",
version = "*",
lazy = false,
keys = {
{ "<leader>ff", "<CMD>Pick files<CR>", { silent = true } },
{ "<leader>fb", "<CMD>Pick buffers<CR>", { silent = true } },
},
config = function()
require("mini.basics").setup({
options = {
basic = true,
extra_ui = true,
win_borders = "auto",
},
-- Mappings. Set field to `false` to disable.
mappings = {
basic = true,
option_toggle_prefix = [[\]],
windows = true,
move_with_alt = false,
},
-- Autocommands. Set field to `false` to disable
autocommands = {
basic = true,
relnum_in_visual_mode = true,
},
-- Whether to disable showing non-error feedback
silent = true,
})
require("mini.cmdline").setup()
require("mini.completion").setup()
require("mini.icons").setup()
require("mini.diff").setup()
require("mini.git").setup()
require("mini.pairs").setup()
require("mini.surround").setup()
require("mini.statusline").setup()
require("mini.tabline").setup()
require("mini.pick").setup()
require("mini.notify").setup()
end,
}

View file

@ -0,0 +1 @@
return { "https://github.com/neovim/nvim-lspconfig" }

View file

@ -0,0 +1,3 @@
return {
"windwp/nvim-ts-autotag"
}

14
nvim/lua/plugins/oil.lua Normal file
View file

@ -0,0 +1,14 @@
return {
"stevearc/oil.nvim",
keys = {
{ "-", "<CMD>Oil<CR>", { silent = true } },
},
opts = {
delete_to_trash = true,
skip_confirm_for_simple_edits = true,
prompt_save_on_select_new_entry = false,
watch_for_changes = true,
},
dependencies = { { "nvim-mini/mini.icons", opts = {} } },
lazy = false,
}

View file

@ -0,0 +1,27 @@
return {
"nvim-treesitter/nvim-treesitter",
lazy = false,
build = ":TSUpdate",
opts = {
install_dir = vim.fn.stdpath("data") .. "/site",
},
config = function()
-- Install specified languages for Treesitter
require("nvim-treesitter").install({ "rust", "javascript", "python", "fish", "ssh_config" }):wait(300000)
-- Enable Treesitter highlighting for specified file types
vim.api.nvim_create_autocmd("FileType", {
pattern = { "javascript", "rust", "python", "lua" },
callback = function()
vim.treesitter.start() -- Start Treesitter highlighting
end,
})
-- Set up Treesitter-based folding
vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.wo.foldmethod = "expr"
-- Enable Treesitter-based indentation
vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
end,
}

View file

@ -0,0 +1,3 @@
return {
"tamton-aquib/zone.nvim",
}

View file

@ -0,0 +1,146 @@
{
config,
lib,
pkgs,
...
}:
{
imports = [
./hardware-configuration.nix
./disk-config.nix
];
environment.shellAliases = {
rebuild = "sudo nixos-rebuild switch --flake ~/nixos/.#black";
};
environment.systemPackages = with pkgs; [
nil
nixd
docker
lazygit
];
nixpkgs.config.allowUnfree = true;
# Use the systemd-boot EFI boot loader.
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
networking.hostName = "black"; # Define your hostname.
# Configure network connections interactively with nmcli or nmtui.
networking.networkmanager.enable = true;
# Set your time zone.
time.timeZone = "America/New_York";
nix.settings.experimental-features = [
"nix-command"
"flakes"
];
hardware.graphics.enable = true;
programs.git = {
enable = true;
config = {
user = {
name = "Ifrahim Ansari";
email = "iam@ifrahim.dev";
};
};
};
users.users.black = {
isNormalUser = true;
extraGroups = [ "wheel" ]; # Enable sudo for the user.
initialPassword = "Smsia2004";
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDDeD8k/xQ1cL6y05CHv3X3xESN58hxq833O05LiZaAY ifrahim@whoami"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIB/TG85rh2yB4kErVSnYMOffjBMB28uULlCKj5QI0NfL ifrahim@iamhome"
];
};
services.nginx = {
enable = true;
virtualHosts = {
"git.ifrahim.dev" = {
forceSSL = true;
enableACME = true;
locations."/" = {
proxyPass = "http://192.168.1.3:3000";
};
};
};
};
security.acme = {
acceptTerms = true;
defaults.email = "iam@ifrahim.dev";
};
# Forgejo Server
services.forgejo = {
enable = true;
settings = {
service = {
DISABLE_REGISTRATION = true;
};
server = {
ROOT_URL = "https://git.ifrahim.dev";
SSH_PORT = 2222;
};
};
};
virtualisation.docker.enable = true;
# OCI Container configuration
# virtualisation.oci-containers = {
# backend = "docker"; # or "podman"
# containers = {
# nginx = {
# image = "nginx:latest";
# autoStart = true;
# ports = [
# "8080:80" # Host:Container port mapping
# ];
# };
# };
# };
# Enable the OpenSSH daemon.
services.openssh.enable = true;
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [
22
80
443
2222
];
nix.gc = {
automatic = true;
dates = "daily";
};
# 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 - see https://nixos.org/manual/nixos/stable/#sec-upgrading for how
# to actually do that.
#
# 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 = "25.11"; # Did you read the comment?
}

View file

@ -0,0 +1,33 @@
{
disko.devices = {
disk = {
main = {
type = "disk";
device = "/dev/sda";
content = {
type = "gpt";
partitions = {
ESP = {
size = "1G";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
root = {
size = "100%";
content = {
type = "filesystem";
format = "ext4";
mountpoint = "/";
};
};
};
};
};
};
};
}

View file

@ -0,0 +1,26 @@
# 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" "ehci_pci" "ahci" "usb_storage" "sd_mod" ];
boot.initrd.kernelModules = [ ];
boot.kernelModules = [ "kvm-intel" ];
boot.extraModulePackages = [ ];
# 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.enp3s0.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp4s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

26
shells/c.nix Normal file
View file

@ -0,0 +1,26 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = with pkgs; [
xz
gcc
gtk4
libadwaita
gtk-layer-shell
gtk3
cmake
meson
ninja
clang-tools
libxml2
libyaml
systemd
gperf
libstemmer
gobject-introspection
curlWithGnuTls
pkg-config
];
}

0
shells/js.nix Normal file
View file

11
shells/nix.nix Normal file
View file

@ -0,0 +1,11 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = with pkgs; [
nil
nixd
nixfmt
];
}

10
shells/python.nix Normal file
View file

@ -0,0 +1,10 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = with pkgs; [
python3
uv
];
}

16
shells/rust.nix Normal file
View file

@ -0,0 +1,16 @@
{
pkgs ? import <nixpkgs> { },
}:
pkgs.mkShell {
buildInputs = with pkgs; [
rustup
];
shellHook = ''
rustup default stable
rustup component add rustfmt
rustup component add clippy
rustup component add rust-analyzer
'';
}

BIN
wallpapers/wallpaper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB