chore: Flake | cleanup old flake inputs

This commit is contained in:
2025-02-16 15:17:19 +05:00
parent 79d044e8ef
commit 74a4772ad9
16 changed files with 11 additions and 437 deletions

View File

@@ -59,26 +59,6 @@
in { in {
nixosConfigurations = mkHostConfigs (readHosts "nixos"); nixosConfigurations = mkHostConfigs (readHosts "nixos");
# nixosConfigurations = {
# rihla = nixpkgs.lib.nixosSystem {
# system = "x86_64-linux";
# modules = [
# inputs.lanzaboote.nixosModules.lanzaboote
# inputs.disko.nixosModules.disko
# inputs.nixos-hardware.nixosModules.framework-13-7040-amd
# inputs.sops-nix.nixosModules.sops
# inputs.home-manager.nixosModules.home-manager
# ./nixos/configuration.nix
# ./nixos/disko-config.nix
# ./nixos/hardware-configuration.nix
# ];
# specialArgs = {
# inherit inputs;
# hostName = "rihla";
# };
# };
# };
devShell.x86_64-linux = let devShell.x86_64-linux = let
pkgs = nixpkgs.legacyPackages.x86_64-linux; pkgs = nixpkgs.legacyPackages.x86_64-linux;
in pkgs.mkShell { in pkgs.mkShell {

View File

@@ -13,15 +13,15 @@
# ========== Host-specific Optional Configs ========== # ========== Host-specific Optional Configs ==========
# #
(map (config: "${builtins.toString ./.}/common/optional/${config}.nix") [ (map (config: "${builtins.toString ./.}/common/optional/${config}.nix") [
"hyprland"
"starship"
"ssh"
"zsh"
"btop" "btop"
"firefox" "firefox"
"nvim" "hyprland"
"tmux"
"misc-packages" "misc-packages"
"nvim"
"ssh"
"starship"
"tmux"
"zsh"
]) ])
]; ];

View File

@@ -1,5 +1,6 @@
{ {
inputs, inputs,
pkgs,
lib, lib,
... ...
}: }:
@@ -88,5 +89,9 @@
security.rtkit.enable = true; security.rtkit.enable = true;
environment.systemPackages = with pkgs; [
pciutils
];
system.stateVersion = "25.05"; system.stateVersion = "25.05";
} }

View File

@@ -1,52 +0,0 @@
# 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).
{lib, config, pkgs, ...}: {
imports = [
./imports/environment.nix
./imports/hardware.nix
./imports/i18n.nix
./imports/networking.nix
./imports/nix.nix
./imports/programs.nix
./imports/security.nix
./imports/services.nix
./imports/users.nix
./imports/virtualisation.nix
];
# Bootloader.
boot = {
loader = {
# Set this to true on first install. This must be false for secure boot.
systemd-boot.enable = lib.mkForce false;
efi.canTouchEfiVariables = true;
};
lanzaboote = {
enable = true;
pkiBundle = "/var/lib/sbctl";
};
};
# Set your time zone.
time.timeZone = "Asia/Karachi";
# Allow unfree packages
nixpkgs = {
config = {
pulseaudio = false;
allowUnfree = true;
};
};
home-manager.users.shahab = import ../home-manager/home.nix;
# 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

@@ -1,100 +0,0 @@
{
disko = {
devices = {
disk = {
main = {
device = "/dev/nvme0n1";
type = "disk";
content = {
type = "gpt";
partitions = {
boot = {
name = "boot";
size = "1M";
type = "EF02";
};
esp = {
name = "ESP";
size = "500M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
};
};
luks = {
size = "100%";
content = {
name = "crypted";
type = "luks";
passwordFile = "/tmp/secret.key";
settings = {
allowDiscards = true;
crypttabExtraOpts = [
"fido2-device=auto"
"token-timeout=10"
];
};
content = {
type = "lvm_pv";
vg = "crypt_vg";
};
};
};
};
};
};
};
lvm_vg = {
crypt_vg = {
type = "lvm_vg";
lvs = {
swap = {
size = "64G";
content = {
type = "swap";
resumeDevice = true;
};
};
main = {
size = "100%";
content = {
type = "btrfs";
extraArgs = [
"-L"
"nixos"
"-f"
];
subvolumes = {
"@root" = {
mountpoint = "/";
mountOptions = [
"compress=zstd"
];
};
"@home" = {
mountpoint = "/home";
mountOptions = [
"subvol=home"
"compress=zstd"
"noatime"
];
};
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"subvol=nix"
"compress=zstd"
"noatime"
];
};
};
};
};
};
};
};
};
};
}

View File

@@ -1,40 +0,0 @@
# 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,
modulesPath,
...
}: {
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = {
initrd = {
availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usbhid"
"thunderbolt"
"usb_storage"
"sd_mod"
];
kernelModules = [];
};
kernelModules = ["kvm-amd"];
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.enp193s0f3u2.useDHCP = lib.mkDefault true;
# networking.interfaces.wlp1s0.useDHCP = lib.mkDefault true;
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
hardware.cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
}

View File

@@ -1,21 +0,0 @@
{pkgs, ...}: {
environment = {
systemPackages = with pkgs; [
pciutils
virt-manager
virt-viewer
spice
spice-gtk
spice-protocol
win-virtio
win-spice
sops
sbctl # Secure boot
yubikey-manager
# Gaming stuff
mangohud
protonup-qt
];
};
}

View File

@@ -1,12 +0,0 @@
{pkgs, ...}: {
hardware = {
# Bluetooth.
bluetooth.enable = true;
bluetooth.powerOnBoot = true;
graphics = {
enable = true;
extraPackages = with pkgs; [amdvlk];
};
};
}

View File

@@ -1,16 +0,0 @@
{...}: {
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "ur_PK";
LC_IDENTIFICATION = "ur_PK";
LC_MEASUREMENT = "ur_PK";
LC_MONETARY = "ur_PK";
LC_NAME = "ur_PK";
LC_NUMERIC = "ur_PK";
LC_PAPER = "ur_PK";
LC_TELEPHONE = "ur_PK";
LC_TIME = "ur_PK";
};
};
}

View File

@@ -1,7 +0,0 @@
{hostName, ...}: {
networking = {
inherit hostName;
networkmanager.enable = true;
firewall.allowedTCPPorts = [22];
};
}

View File

@@ -1,12 +0,0 @@
{...}: {
nix = {
settings = {
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = ["hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="];
experimental-features = [
"nix-command"
"flakes"
];
};
};
}

View File

@@ -1,29 +0,0 @@
{
pkgs,
inputs,
...
}: {
programs = {
nix-ld.enable = true;
dconf.enable = true;
gamemode.enable = true;
steam = {
enable = true;
gamescopeSession.enable = true;
};
_1password.enable = true;
_1password-gui = {
enable = true;
polkitPolicyOwners = ["shahab"];
};
hyprland = {
enable = true;
package = inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.hyprland;
portalPackage =
inputs.hyprland.packages.${pkgs.stdenv.hostPlatform.system}.xdg-desktop-portal-hyprland;
};
};
}

View File

@@ -1,17 +0,0 @@
{...}: {
security = {
rtkit.enable = true;
pam = {
u2f = {
enable = true;
settings = {
cue = true;
};
};
services = {
sudo.u2fAuth = true;
login.u2fAuth = true;
};
};
};
}

View File

@@ -1,39 +0,0 @@
{pkgs, ...}: {
services = {
greetd = {
enable = true;
settings = {
default_session = {
command = "${pkgs.greetd.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
user = "greeter";
};
};
};
# OpenSSH
openssh.enable = true;
# Cups printing service
printing.enable = true;
# Enable blueman
blueman.enable = true;
# Enable smart card services
pcscd.enable = true;
# Framework firmware updating
fwupd.enable = true;
# Enable sound with pipewire.
pulseaudio.enable = false;
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
spice-vdagentd.enable = true;
};
}

View File

@@ -1,32 +0,0 @@
{pkgs, ...}: {
users = {
mutableUsers = false;
users.shahab = {
shell = pkgs.zsh;
# Only do this if you have already configured zsh in home manager
ignoreShellProgramCheck = true;
isNormalUser = true;
description = "Shahab Dogar";
extraGroups = [
"networkmanager"
"wheel"
"input"
"libvirtd"
];
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
openssh.authorizedKeys = {
keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPBijtTtb6UT5gssWolNGX1rcjAKsdtfz25fZMMnzq4v"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGD/V4jLpuk7uAovkbHFr6uulfBKZmsH+BqmXIR2aYD0"
];
};
packages = with pkgs; [
libnotify
];
};
};
}

View File

@@ -1,34 +0,0 @@
{pkgs, ...}: {
virtualisation = {
podman = {
enable = true;
dockerSocket.enable = true;
dockerCompat = true;
autoPrune = {
enable = true;
dates = "weekly";
};
};
containers = {
registries = {
search = ["docker.io"];
};
};
libvirtd = {
enable = true;
qemu = {
swtpm.enable = true;
ovmf = {
enable = true;
packages = with pkgs; [OVMFFull.fd];
};
};
};
spiceUSBRedirection.enable = true;
};
}