chore: run formatter
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
{ pkgs, inputs, config, lib, ... }:
|
||||
|
||||
{
|
||||
pkgs,
|
||||
inputs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
inputs.home-manager.nixosModules.home-manager
|
||||
inputs.sops-nix.nixosModules.sops
|
||||
@@ -14,7 +18,7 @@
|
||||
hostSpec = {
|
||||
username = "shahab";
|
||||
handle = "shahab96";
|
||||
email = { user = "shahab@dogar.dev"; };
|
||||
email = {user = "shahab@dogar.dev";};
|
||||
userFullName = "Shahab Dogar";
|
||||
domain = "rihla";
|
||||
networking.ports.tcp.ssh = 22;
|
||||
@@ -50,13 +54,13 @@
|
||||
|
||||
auto-optimise-store = true;
|
||||
warn-dirty = false;
|
||||
trusted-users = [ "@wheel" ];
|
||||
trusted-users = ["@wheel"];
|
||||
|
||||
substituters = [ "https://hyprland.cachix.org" ];
|
||||
substituters = ["https://hyprland.cachix.org"];
|
||||
trusted-public-keys = [
|
||||
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
|
||||
];
|
||||
experimental-features = [ "nix-command" "flakes" ];
|
||||
experimental-features = ["nix-command" "flakes"];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -70,7 +74,7 @@
|
||||
};
|
||||
|
||||
# ========= Sops =========
|
||||
environment.systemPackages = with pkgs; [ sops ];
|
||||
environment.systemPackages = with pkgs; [sops];
|
||||
|
||||
#
|
||||
# ========== Localization ==========
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
{ lib, config, device, withSwap, swapSize, label, ... }:
|
||||
|
||||
{
|
||||
lib,
|
||||
config,
|
||||
device,
|
||||
withSwap,
|
||||
swapSize,
|
||||
label,
|
||||
...
|
||||
}: {
|
||||
disko = {
|
||||
devices = {
|
||||
disk = {
|
||||
@@ -34,8 +40,7 @@
|
||||
passwordFile = "/tmp/secret.key";
|
||||
settings = {
|
||||
allowDiscards = true;
|
||||
crypttabExtraOpts =
|
||||
[ "fido2-device=auto" "token-timeout=10" ];
|
||||
crypttabExtraOpts = ["fido2-device=auto" "token-timeout=10"];
|
||||
};
|
||||
content = {
|
||||
type = "lvm_pv";
|
||||
@@ -62,20 +67,19 @@
|
||||
size = "100%";
|
||||
content = {
|
||||
type = "btrfs";
|
||||
extraArgs = [ "-L" label "-f" ];
|
||||
extraArgs = ["-L" label "-f"];
|
||||
subvolumes = {
|
||||
"@root" = {
|
||||
mountpoint = "/";
|
||||
mountOptions = [ "subvol=root" "compress=zstd" "noatime" ];
|
||||
mountOptions = ["subvol=root" "compress=zstd" "noatime"];
|
||||
};
|
||||
"@persist" = {
|
||||
mountpoint = config.hostSpec.persist;
|
||||
mountOptions =
|
||||
[ "subvol=persist" "compress=zstd" "noatime" ];
|
||||
mountOptions = ["subvol=persist" "compress=zstd" "noatime"];
|
||||
};
|
||||
"@nix" = {
|
||||
mountpoint = "/nix";
|
||||
mountOptions = [ "subvol=nix" "compress=zstd" "noatime" ];
|
||||
mountOptions = ["subvol=nix" "compress=zstd" "noatime"];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
{config, ...}: {
|
||||
programs = {
|
||||
_1password.enable = true;
|
||||
_1password-gui = {
|
||||
enable = true;
|
||||
polkitPolicyOwners = [ config.hostSpec.username ];
|
||||
polkitPolicyOwners = [config.hostSpec.username];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ claude-code ];
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [claude-code];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
programs.dconf.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ pkgs, ... }: {
|
||||
{pkgs, ...}: {
|
||||
virtualisation = {
|
||||
podman = {
|
||||
enable = true;
|
||||
@@ -11,7 +11,7 @@
|
||||
};
|
||||
};
|
||||
|
||||
containers = { registries = { search = [ "docker.io" ]; }; };
|
||||
containers = {registries = {search = ["docker.io"];};};
|
||||
|
||||
libvirtd = {
|
||||
enable = true;
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
ovmf = {
|
||||
enable = true;
|
||||
packages = with pkgs; [ OVMFFull.fd ];
|
||||
packages = with pkgs; [OVMFFull.fd];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ hoppscotch ];
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [hoppscotch];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
{ inputs, pkgs, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
programs.hyprland = {
|
||||
enable = true;
|
||||
package =
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
programs.nix-ld.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
environment.systemPackages = with pkgs; [ sbctl ];
|
||||
{pkgs, ...}: {
|
||||
environment.systemPackages = with pkgs; [sbctl];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services = {
|
||||
# Enable sound with pipewire.
|
||||
pulseaudio.enable = false;
|
||||
@@ -15,5 +13,5 @@
|
||||
security.rtkit.enable = true;
|
||||
|
||||
environment.systemPackages =
|
||||
builtins.attrValues { inherit (pkgs) pavucontrol; };
|
||||
builtins.attrValues {inherit (pkgs) pavucontrol;};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
services.blueman.enable = true;
|
||||
hardware = {
|
||||
bluetooth.enable = true;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
services.fwupd.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
services.greetd = {
|
||||
enable = true;
|
||||
settings = {
|
||||
default_session = {
|
||||
command =
|
||||
"${pkgs.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
||||
command = "${pkgs.tuigreet}/bin/tuigreet --greeting 'Welcome to NixOS!' --asterisks --remember --remember-user-session --time --cmd ${pkgs.hyprland}/bin/Hyprland";
|
||||
user = "greeter";
|
||||
};
|
||||
};
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
{ config, ... }:
|
||||
let sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
||||
{config, ...}: let
|
||||
sshPort = config.hostSpec.networking.ports.tcp.ssh;
|
||||
in {
|
||||
services.openssh = {
|
||||
enable = true;
|
||||
ports = [ sshPort ];
|
||||
ports = [sshPort];
|
||||
|
||||
settings = {
|
||||
PermitRootLogin = "no";
|
||||
@@ -14,5 +14,5 @@ in {
|
||||
openFirewall = true;
|
||||
};
|
||||
|
||||
networking.firewall.allowedTCPPorts = [ sshPort ];
|
||||
networking.firewall.allowedTCPPorts = [sshPort];
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
# Reminder that CUPS cpanel defaults to localhost:631
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
services.printing.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
{ ... }:
|
||||
|
||||
{
|
||||
{...}: {
|
||||
services.pcscd.enable = true;
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
{pkgs, ...}: {
|
||||
# yubikey login / sudo
|
||||
security.pam = {
|
||||
u2f = {
|
||||
@@ -13,5 +11,5 @@
|
||||
};
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ yubikey-manager ];
|
||||
environment.systemPackages = with pkgs; [yubikey-manager];
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
{ pkgs, config, lib, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
...
|
||||
}: let
|
||||
hostSpec = config.hostSpec;
|
||||
in {
|
||||
specialisation.gaming.configuration = {
|
||||
@@ -15,15 +19,15 @@ in {
|
||||
};
|
||||
|
||||
home-manager.users."${hostSpec.username}".imports = lib.flatten [
|
||||
({ config, ... }:
|
||||
({config, ...}:
|
||||
import (lib.custom.relativeToRoot
|
||||
"home/${hostSpec.username}/specialisations/gaming.nix") {
|
||||
inherit pkgs;
|
||||
})
|
||||
inherit pkgs;
|
||||
})
|
||||
];
|
||||
|
||||
powerManagement.cpuFreqGovernor = "performance";
|
||||
|
||||
environment.systemPackages = with pkgs; [ mangohud protonup-qt ];
|
||||
environment.systemPackages = with pkgs; [mangohud protonup-qt];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
{ pkgs, config, lib, inputs, ... }:
|
||||
let
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}: let
|
||||
hostSpec = config.hostSpec;
|
||||
pubKeys = lib.filesystem.listFilesRecursive ./keys;
|
||||
in {
|
||||
@@ -13,15 +18,14 @@ in {
|
||||
shell = pkgs.zsh;
|
||||
home = hostSpec.home;
|
||||
isNormalUser = true;
|
||||
hashedPassword =
|
||||
"$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
||||
extraGroups = [ "networkmanager" "wheel" "input" "libvirtd" ];
|
||||
hashedPassword = "$y$j9T$pvjyL7hL5x2VBarGNTnMl1$mLA2UsWTbfp8Hgp/ug5l8224thi..Mo8.p7ME.tDZ.4";
|
||||
extraGroups = ["networkmanager" "wheel" "input" "libvirtd"];
|
||||
|
||||
# Read all keys in ./keys and add them to authorizedKeys.
|
||||
openssh.authorizedKeys.keys =
|
||||
lib.lists.forEach pubKeys (key: builtins.readFile key);
|
||||
|
||||
packages = with pkgs; [ libnotify ];
|
||||
packages = with pkgs; [libnotify];
|
||||
};
|
||||
};
|
||||
|
||||
@@ -31,11 +35,11 @@ in {
|
||||
hostSpec = config.hostSpec;
|
||||
};
|
||||
users.${hostSpec.username}.imports = lib.flatten [
|
||||
({ config, ... }:
|
||||
({config, ...}:
|
||||
import (lib.custom.relativeToRoot
|
||||
"home/${hostSpec.username}/${hostSpec.hostName}.nix") {
|
||||
inherit pkgs inputs config lib hostSpec;
|
||||
})
|
||||
inherit pkgs inputs config lib hostSpec;
|
||||
})
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
{ inputs, pkgs, lib, config, ... }:
|
||||
|
||||
{
|
||||
inputs,
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}: {
|
||||
imports = lib.flatten [
|
||||
#
|
||||
# ========= Hardware =========
|
||||
@@ -33,7 +37,7 @@
|
||||
#
|
||||
# ========= Required Configs =========
|
||||
#
|
||||
(map lib.custom.relativeToRoot [ "hosts/common/core" ])
|
||||
(map lib.custom.relativeToRoot ["hosts/common/core"])
|
||||
|
||||
#
|
||||
# ========= Optional Configs =========
|
||||
@@ -99,7 +103,8 @@
|
||||
efi.canTouchEfiVariables = true;
|
||||
};
|
||||
|
||||
initrd.postResumeCommands = lib.mkIf config.hostSpec.impermanance
|
||||
initrd.postResumeCommands =
|
||||
lib.mkIf config.hostSpec.impermanance
|
||||
(lib.mkAfter ''
|
||||
mkdir /btrfs_tmp
|
||||
mount /dev/crypt_vg/root /btrfs_tmp
|
||||
@@ -133,7 +138,7 @@
|
||||
|
||||
security.rtkit.enable = true;
|
||||
|
||||
environment.systemPackages = with pkgs; [ pciutils bc ];
|
||||
environment.systemPackages = with pkgs; [pciutils bc];
|
||||
|
||||
system.stateVersion = "25.05";
|
||||
}
|
||||
|
||||
@@ -1,8 +1,14 @@
|
||||
# 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.
|
||||
{ pkgs, config, lib, modulesPath, ... }: {
|
||||
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
||||
{
|
||||
pkgs,
|
||||
config,
|
||||
lib,
|
||||
modulesPath,
|
||||
...
|
||||
}: {
|
||||
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
||||
|
||||
boot = {
|
||||
initrd = {
|
||||
@@ -15,11 +21,11 @@
|
||||
"usb_storage"
|
||||
"sd_mod"
|
||||
];
|
||||
kernelModules = [ ];
|
||||
kernelModules = [];
|
||||
};
|
||||
|
||||
kernelModules = [ "kvm-amd" ];
|
||||
extraModulePackages = [ ];
|
||||
kernelModules = ["kvm-amd"];
|
||||
extraModulePackages = [];
|
||||
};
|
||||
|
||||
# Enables DHCP on each ethernet and wireless interface. In case of scripted networking
|
||||
@@ -36,7 +42,7 @@
|
||||
lib.mkDefault config.hardware.enableRedistributableFirmware;
|
||||
graphics = {
|
||||
enable = true;
|
||||
extraPackages = with pkgs; [ amdvlk ];
|
||||
extraPackages = with pkgs; [amdvlk];
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user